Commit Graph

446 Commits

Author SHA1 Message Date
Francisco Paisana 834c0b3929 integrated new observer pattern into phy controller fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana b2313e3631 observer pattern classes. Allows auto and explicit dispatch, and specifying which trigger method to use of an observer. 2020-08-24 22:10:32 +01:00
Francisco Paisana 7cd4f45d62 fsm refactor.
- avoid triggering directly a subfsm
- improved metafunctions
- other cleanups
2020-08-18 16:07:21 +01:00
Francisco Paisana 9146e6ddf1 change method name to resize intervals 2020-08-14 15:06:06 +01:00
Francisco Paisana 4457bbda7e added new asserts to interval interface 2020-08-14 15:06:06 +01:00
Francisco Paisana 8b174ce2f4 changed interval interface to disallow interval::stop < interval::start via an assertion 2020-08-14 15:06:06 +01:00
Francisco Paisana c1755727d7 changed interval method names, and added comments and assertions 2020-08-14 15:06:06 +01:00
Francisco Paisana 20b69fb22e substitution of ul_alloc_t for prb_interval 2020-08-14 15:06:06 +01:00
Francisco Paisana 857cc141c7 fix macro checking for exceptions, added missing includes, fixed bounded bitset methods' noexcept specifiers 2020-08-13 13:13:34 +01:00
Francisco Paisana cceeff10de moved expected, bounded_bitset, move_callback to adt folder. created a test for bitset 2020-08-13 13:13:34 +01:00
Francisco Paisana caf862c99f moved expected, bounded_bitset, move_callback to adt folder. created a test for bitset 2020-08-13 13:13:34 +01:00
faluco 072e84cec8 - Simplified the usage of span now with implicit constructors as it should be.
- Added overload for generic containers that have size and data members like vector.
- Removed unnecessary uses of make_span.
2020-08-11 19:47:26 +01:00
faluco 158edd4fe7 Removed init list constructor test. 2020-08-11 19:47:26 +01:00
faluco af8dfcf19c Extended a bit the span implementation with the following changes:
- Documented methods and class.
- Adapted interface to the latest standard: no init list and generic container constructors, new iterator pair ctor.
- Implemented some SFINAE for managing conversions in constructors.
- Re-organised some methods to be grouped by category (modifiers, observers, iterators, ...).
- Added convenience make_span functions.
- Added some more  asserts.
- Adapted test to use some syntax that was modified.
2020-08-11 19:47:26 +01:00
Francisco Paisana 76a62909c1 use of span type for universal array views 2020-08-11 19:47:26 +01:00
Francisco Paisana a9d882c1f1 fix task_scheduler_test. Fix potential reference invalidation in task_scheduler internal tasks data structure 2020-08-11 17:16:06 +01:00
Francisco Paisana 9d877e55b3 add test for when scope exit lambda is an lvalue 2020-08-10 17:23:43 +01:00
Francisco Paisana 0f67bee556 creation of a scope exit standalone file. Created a new folder ADT. Added test for scope exit. 2020-08-10 17:23:43 +01:00
faluco cfd3f51931
Import of srslog into srsepc and srsenb. (#1574)
* - Import of srslog into srsepc and srsenb.
* - Removed logger_file and logger_stdout files.
2020-07-30 19:17:23 +02:00
faluco efdff8ba4c
Import srslog into srsue (#1556)
- Import the srslog project into srslte.
- Ported srsue app to use the new logging framework.
- Implemented a wrapper that dispatches log entries to srslog.
- Renamed an existing log test to be more specific to avoid name clashes.
2020-07-22 16:04:18 +02:00
Andre Puschmann c8b4ba885b rename rlc_tx_queue to byte_buffer_queue
this data structure will be used by the PDCP layer as well.
2020-07-14 18:18:32 +02:00
Andre Puschmann a7911f0dab pdcp,rlc: refactor SDU queueing policy
this patch refactors the SDU queuing and dropping policy of the RLC and PDCP layer.
the previous design had issues when packets have been generated at a higher
rate above the PDCP than they could be consumed below the RLC.

When the RLC SDU queues were full, we allowed two policies, one to block on the write
and the other to drop the SDU. Both options are not ideal because they either
lead to a blocking stack thread or to lost PDCP PDUs.

To avoid this, this patch makes the following changes:

* PDCP monitors RLC's SDU queue and drops packets on its north-bound SAP if queues are full
  * a new method sdu_queue_is_full() has been added to the RLC interface for PDCP
* remove blocking write from pdcp and rlc write_sdu() interface
  * all writes into queues need to be non-blocking
  * if Tx queues are overflowing, SDUs are dropped above PDCP, not RLC
* log warning if RLC still needs to drop SDUs
  * this case should be avoided with the monitoring mechanism
2020-07-13 17:05:28 +02:00
Francisco Paisana 7c364070ee creation of task scheduler interface for classes/functions running outside the main control thread 2020-07-13 11:19:25 +01:00
Francisco Paisana 1a9c04bf2f use of task scheduler handle in pdcp 2020-07-13 11:19:25 +01:00
Francisco Paisana 4f5e65781f created task scheduler class to deal with timers, thread pool, multiqueue, internal tasks 2020-07-13 11:19:25 +01:00
Andre Puschmann 2749c870e3 rlc_am: refactor control test
* move both tests into own functions and call those in main()
* use common test header and macros
2020-07-08 10:09:06 +02:00
Andre Puschmann 58e255cb63 pdu_test: add unit test to verify correct packing of 3B PDU with Short BSR 2020-07-08 10:08:26 +02:00
Andre Puschmann 5589816690 pdu_test: fix PCAP output
API now requires to pass CC index
2020-07-08 10:08:26 +02:00
Francisco Paisana e550bf726d updated fsm to allow enter methods to receive event that caused them 2020-07-06 14:25:03 +01:00
Francisco Paisana 84f34bc736 changed to a label filtering approach for ctest 2020-07-02 15:56:59 +01:00
Francisco Paisana ebb8f18000 set some extra tests with the prefix "long_" 2020-07-02 15:56:59 +01:00
Andre Puschmann a3d7d4517c rlc_um: add dedicated unit test for the PDU packing bug
Here is the test output with the fix disabled:

13:47:42.679774 [RLC_UM_1] [D] MAC opportunity - 14 bytes
13:47:42.679784 [RLC_UM_1] [D] pdu_space=14, head_len=2
13:47:42.679790 [RLC_UM_1] [D]  adding new SDU segment - 10 bytes of 10 remaining
13:47:42.679834 [RLC_UM_1] [D]  Complete SDU scheduled for tx. Stack latency: 0 us
13:47:42.679909 [RLC_UM_1] [D] pdu_space=4, head_len=2
13:47:42.679922 [RLC_UM_1] [D]  adding new SDU segment - 0 bytes of 10 remaining
13:47:42.679928 [RLC_UM_1] [I]  Tx PDU SN=0 (14 B)
13:47:42.679974 [RLC_UM_1] [D]  vt_us = 1

The test checks the correct packing and of the two PDUs at the end.
2020-06-26 17:58:36 +02:00
Andre Puschmann df50dd7d3c rlc: extend RLC metrics
extend RLC metrics to count Rx/Tx PDUs/SDUs bytes/#
2020-06-26 17:58:36 +02:00
Andre Puschmann 48db31c5cf rlc_stress_test: fix random PDU dropping
the rand() was sometimes giving NaN so this case needs to be handled
and the PDU not dropped to have real zero drop-rate
2020-06-26 17:58:36 +02:00
Andre Puschmann fc3cd24177 rlc_um: fix counting of lost PDUs
* change try_push() return value to indicate whether the addition
  of the SDU to the tx queue was successful or not
* count lost PDUs
2020-06-26 17:58:36 +02:00
Andre Puschmann 96726a03e0 rlc_stress_test: fix PCAP support
expose actual RLC configuration to PCAP object
2020-06-26 17:58:36 +02:00
Andre Puschmann 1c7bfde404 rlc_stress_test: fix compilation with PCAP enabled 2020-06-26 17:58:36 +02:00
Francisco Paisana e3e9bbcd62 fix PNF PDU size cutting 2020-06-24 23:28:53 +01:00
Francisco Paisana a0606669e2 fix ue nr gw initialization 2020-06-24 23:28:53 +01:00
Francisco Paisana e6418b4b39 fix variable naming 2020-06-24 23:28:53 +01:00
Francisco Paisana 1d07258458 created pnf bridge executable 2020-06-24 23:28:53 +01:00
Francisco Paisana f0874b780b add radio_base/null classes 2020-06-18 23:37:26 +01:00
Francisco Paisana 64e8f5e3ed update license year 2020-06-18 12:41:54 +01:00
Pedro Alvarez 9c1a7d2cf1 Removed get_bearer_status in PDCP. Renamed get_state/set_state to
get_bearer_state/set_bearer_state.
2020-06-18 12:13:57 +01:00
Pedro Alvarez 208a539499 Split PDCP tx_count state variable into tx_hfn and next_pdcp_tx_sn
variables.
2020-06-18 12:13:57 +01:00
Pedro Alvarez 08578a7331 Switched to use a struct to hold the PDCP entity state variables. Deleted some unecessary setters. 2020-06-18 12:13:57 +01:00
Andre Puschmann 1f73e6ae69 multiqueue: add option to create queue with non-default capacity
this allows to create a queue that has a non-default capacity
currently this is 8192, but the value might now be suitable in some
cases like for TTI sync events
2020-06-12 21:37:10 +02:00
Francisco Paisana 27e5d98ef9 added vnf phy nr 2020-06-11 15:50:36 +01:00
Francisco Paisana b05ce2fe57 added pnf_dummy test 2020-06-11 15:50:36 +01:00
Francisco Paisana 8a022fb35b fix noexcept declaration issue in gcc4.8 2020-06-11 14:25:21 +02:00