Commit Graph

65 Commits

Author SHA1 Message Date
Francisco 21718af3b6 avoid allocating std::string to get lcid radio bearer name. Refactored the lte radio bearer enum type 2021-04-12 13:21:43 +01:00
Andre Puschmann 6eedd70275 rlc_stress_test: add RLC UM NR 12bit stresstest 2021-03-25 08:06:49 +01:00
Codebot 4523ee6087 rename srsLTE to srsRAN 2021-03-21 21:47:01 +01:00
Andre Puschmann 3e07767f28 rlc_stress_test: set maxRetx for AM to 32 by default
since the tests are random we sometimes hit the maxRetx threshold
with 8 retx allowed that made the unit test fail.

increase threshold to lower the likelihood for this to happen.
2021-03-16 15:47:38 +01:00
Francisco 3e9f93eb8a refactor - remove old log_filter and logmap libraries from the codebase 2021-03-11 20:10:54 +00:00
Andre Puschmann 20cbc48f90 rlc_am_lte: refactor PDCP/RLC interface to use fix sized data structure
this patch replaces the std::vector type used in the interface between
PDCP and RLC to signal delivery status between both layers. The new
data type is a configurable but fixed-size vector.
The RLC AM doesn't need to dynamically allocate the vector for every SN but
uses the tx_window for storage.
2021-03-09 21:56:33 +01:00
Francisco d1236fd62f stack,optimization - replaced previous block_queue design for new bounded queue in several places in the enb 2021-03-08 14:49:14 +01:00
Andre Puschmann fa23be4d6d rlc_stress_test: fix SDU generation
the PDCP SN was used to fill the SDU with data. But since
the max value isn't devisable by 256 it didn't always increment
correctly. Use a normal byte now that wraps correctly.
2021-03-05 19:46:00 +01:00
Andre Puschmann 5e345df439 rlc_stress_test: make pedantic operation the default
among cleaning up the the stress test, it does:
* remove optional pedantic flag and make it the default to catch resegmentation issues
* use random SDU and MAC grant size the default
* use factory functions to create RLC configs (make maxretx configurable)
* remove reestablishment and print error when maxRetx is triggered
* fix NR PCAP usage and removes PCAP ifdef
2021-03-05 15:47:30 +01:00
Pedro Alvarez 4011714664 Fix errors in RLC stress tests due to PDCP SN wrap-around 2021-03-01 10:20:17 +00:00
Pedro Alvarez d8f3878ce1
RLC failure to deliver notifications and discard timer limits to 1500ms (#2368)
* Added interfaces for the RLC to notify the PDCP of failure to transmit
SDU

* Limit discard timer to 1500ms, to avoid issues of lingering SDUs in the undeliverd_sdus_queue.

* Fix bug in early exit of notify_delivery and notify_failure

* fix compilation issue in rlc-pdcp notification

Co-authored-by: Francisco <francisco.paisana@softwareradiosystems.com>
2021-02-22 10:36:14 +00:00
Pedro Alvarez 2ed8dceddf Use TX_COUNT in RLC AM stress test. Avoids issue with re-using SNs within the test 2021-02-15 19:37:49 +00:00
faluco 57f66febfc Ported the RLC classes to srslog in the lib dir. 2021-02-11 14:37:27 +01:00
Francisco 04ab4eefcd use new make_byte_buffer() helper method to create unique_byte_buffers 2021-02-07 18:48:21 +00:00
Pedro Alvarez 7b25eac47c Fix race condition in rlc_am_stress test and other fixes related to this
test. The race condition was being cause by write_sdu being called
simultanously to read_pdu, which could cause the read_pdu to try to get
the SDU info before it had been written by the write_sdu.

Changes in this commit include:
 - Make sure PDCP sn in included in RLC AM stress test.
 - Stop handling control PDU when TX is not enabled in RLC AM.
 - Fixed issue with length of the PDCP SN in rlc_stress_test.
 - Moved the place were sdu info erase was called to avoid double calls to erase
 - Tentative fix for race condition in rlc_am_stress test.
 - Added function to print information about undelivered_sdu_info_queue
   for debugging.
2021-02-05 12:24:50 +00:00
Pedro Alvarez de90b4753f Added the ability of the RLC AM to notify the PDCP of the acknowledged
PDCP PDUs. This includes:

- Modifying the byte_buffer_t to include PDCP SN meta-data. This way,
  the RLC can keep track of the ack'ed bytes for a specific PDCP PDU.
- Added in the RLC an `undelivered_sdu_info queue`, to keep track of the
  amount of ack'ed bytes and the total size of the PDCP PDU,
  so the RLC can know when delivery is finished.
- Added an interface between the PDCP and the RLC so that the RLC can
  notify the PDCP when it receives an ack from the status PDUs. The RLC
  passes to the PDCP a vector of all the ack'ed pdus in a rx'ed status PDU.
- Added some tests to the notify functionality. This includes some tests
  where the PDUs are acked imediatly, and one test where the PDU is
  retx'ed.
2021-02-05 12:24:50 +00:00
David Rupprecht 99c3aa9ba2 Refactor assert to TESTASSERT in unit test 2021-01-26 21:19:37 +01:00
Andre Puschmann c0883291f6 rlc: pass TTI to get_metrics to calculate "real" LTE rx/tx rate
when retrieving the RLC metrics, the number of TTIs since the last
call are passed. This allows to calculate the actual rate
based on the LTE timing rather than only the system timing.
2020-12-12 15:59:27 +01:00
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 2020-12-12 15:59:25 +01:00
faluco f0d651ae8e - Fixed a leak in the MME class not releasing the static byte buffer pool.
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
2020-09-22 18:00:50 +02: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
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
Francisco Paisana edba7f57e4 corrected mac_nr_pdu includes 2020-05-26 10:02:08 +01:00
Francisco Paisana 67f6eebf61 fix rlc stress test to reflect threading in stack 2020-03-26 20:11:35 +00:00
Francisco Paisana 344eaf49ec use logmap in the whole enb and ue 2020-03-25 15:50:30 +00:00
Xavier Arteaga e832769ae6 Updated copyright 2020-03-16 11:26:06 +01:00
Xavier Arteaga d3537fc340 srsLTE: expanded RLC stress test with the addition of multiple PDU per TTI in reverse order 2020-01-24 10:36:41 +01:00
Pedro Alvarez c5979f59eb Clang format UE, eNB and lib (#850)
* Clang-formated UE, eNB and lib.
* Fixed compiling errors from clang-format.
* Fix linking issues introduced by clang-format
* Fix poor formating in initializing arrays of arrays.
* Fix mistake in conflict resolution on rm_turbo.c
* Re-apply clang format to gtpc_ies.h
2019-12-16 16:04:22 +01:00
Andre Puschmann 7885b5b9ee add CMake flag to enable 5G-NR components 2019-12-11 17:50:11 +01:00
Andre Puschmann b20f7ba541 refactor RLC UM and add NR receiver 2019-11-16 14:35:16 +01:00
Francisco Paisana d2c56caf7e applied new timer class to the whole code base 2019-10-23 19:33:25 +01:00
Francisco Paisana 67d6a25194 Moving mac timers to stack timers (#638)
* first step towards moving MAC timers to stack. Mac is still using its own timers. srslte::timers class can be restructured.

* moved timers out of the UE MAC
2019-09-04 15:28:09 +02:00
Francisco Paisana 58e2e51044 removed rlc_interfaces. The rlc_cnfg types are now part of the rrc_interface_types. Removed implicit RB initialization in the RLC. 2019-07-05 10:44:15 +02:00
Andre Puschmann 701db61fde rlc: extend stress tester to simulate MAC PDU corruption 2019-07-04 14:43:20 +02:00
Andre Puschmann 58763fb714 stack: move initialization of log object into ctor
this fixes the issue when the stack is torn down if, for example,
the radio couldn't be loaded correctly. it will hence call stop() on all stack
components which are not initialzized yet, and logging therefore doesn't work.
the log object is know during contruction time and therefore can be passed
in as soon as possible.
2019-06-27 14:51:33 +02:00
Francisco Paisana 415d3418b6 reorganized enb to mirror ue director/class structure with a stack class 2019-06-07 15:41:56 +02:00
Andre Puschmann e8d6236975 remove init for all RLC TM/UM/AM
- all RLC entities are now initialized during contruction
- there is no need to check for, e.g., existance of timers, during
  runtime
- there is also no need to call re-init during resume
- timers are freed in dtor
2019-06-06 14:34:25 +02:00
Andre Puschmann e47010130f extend thread class to set unique thread name in ctor
this will also extend all classes that use srslte::thread
to specify the name of the thread in the ctor as well
as to set the name of the worker threads in the thread pool
the thread name will be displayed in gdb.
2019-06-03 15:03:20 +02:00
Francisco Paisana 3bedc93ba5 added _t to unique_byte_buffer type 2019-05-16 12:35:01 +02:00
Francisco Paisana f469e2178b replaced byte_buffer_t allocated by the buffer pool for unique_byte_buffer which is safer and easier to use 2019-05-16 12:35:01 +02:00
Andre Puschmann 4b01a2e4a0 update copyright notice 2019-04-29 09:20:02 +02:00
Andre Puschmann cecc28540b add crash handler to rlc_stress_test 2018-10-09 21:18:05 +02:00
Andre Puschmann f7d907f1b2 remove pedantic flag from RLC stress test 2018-10-09 21:17:17 +02:00
Andre Puschmann f20535657f add option to randomize MAC opportunities in RLC tester 2018-10-03 14:58:24 +02:00
Andre Puschmann 601b2a357b fix fail logic in RLC stress test 2018-09-25 16:23:00 +02:00
Andre Puschmann f5c3bd5328 cleaup RLC stress test 2018-09-25 11:00:35 +02:00
Andre Puschmann 34535c7efb fix RLC AM issues reported by clang-tidy 2018-09-25 10:46:36 +02:00