Commit Graph

3607 Commits

Author SHA1 Message Date
David Rupprecht 5a3a2a6d6f Added functions for adding phr and tag config 2021-04-12 20:50:30 +02:00
Andre Puschmann 48537f3fe7 pdcp,rlc: increase number of PDCP SDUs for notification from RLC
the current value of 256 limits the number of PDCP SDUs that can be
notified from RLC. The limit is quickly hit when too many SDUs
are in flight. This can cause unwanted log entries and weird PDCP
behaviour.

the patch increases the value to 1024, which still can be too few if
many smaller SDUs are traveling.

The patch also set the log level to warning to quicker spot
misconfigs in logs.

Fixes #2616
2021-04-12 20:09:20 +02:00
Xavier Arteaga 2f8ea05132 SRSUE: Add periodic CQI R10 parsing 2021-04-12 20:08:22 +02:00
Andre Puschmann c9da21c9bb mac_nr: add error handling when unpacking SCH MAC PDU
* only handle PDU if unpacking was successfull
* add TC unpacking with malformed PDU
2021-04-12 18:26:31 +02:00
Xavier Arteaga e989e62c52 Fix NR PDCCH DMRS test 2021-04-12 17:05:53 +02:00
Xavier Arteaga b8a9a7fc70 Review soft demodulator zero check 2021-04-12 17:05:53 +02:00
Xavier Arteaga dd26c6a90e Added more comments for better understanding in NR PDCCH DMRS 2021-04-12 17:05:53 +02:00
Xavier Arteaga 17a3c76540 Fix NR TDD pattern configuration 2021-04-12 17:05:53 +02:00
Xavier Arteaga c84e73541d Offset FFT window for UE DL NR 2021-04-12 17:05:53 +02:00
Xavier Arteaga f799ab6f94 Fix NR UL RV selection 2021-04-12 17:05:53 +02:00
Xavier Arteaga 42dcff45b2 Improve PDCCH NR detection 2021-04-12 17:05:53 +02:00
Xavier Arteaga 1a6e5cdee5 Demodulator sets LLR to zero for 0.0 symbols 2021-04-12 17:05:53 +02:00
Xavier Arteaga 3889f1369f Added partial NR time resource mapping tables 2021-04-12 17:05:53 +02:00
Xavier Arteaga de187d4c88 Fix copy-past issue in srsran_vec_apply_cfo_simd 2021-04-12 17:05:53 +02:00
Xavier Arteaga 2e3c00aa97 NR PDSCH zeroes RE around the DC. Added delay and CFO emulation to phy_dl_nr_test 2021-04-12 17:05:53 +02:00
Xavier Arteaga 667cc0b552 NR PDSCH/PUSCH DMRS estimation precompensates Synch error and CFO before interpolation 2021-04-12 17:05:53 +02:00
Francisco 685c971dc2 fix recursive call to get rb name 2021-04-12 13:21:43 +01:00
Francisco f7a8b8bf94 separate drb srb ids into separate enum types 2021-04-12 13:21:43 +01:00
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
Francisco 437db3af03 forbid allocations when dispatching task to thread pool 2021-04-10 15:03:38 +01:00
Andre Puschmann b991b07167 rlc: add length check for RLC PDU generation
makes sure that RLC doesn't generate a PDU larger than
the provided grant size
2021-04-10 14:01:43 +02:00
Andre Puschmann 8024bf7820 mux_nr: improve logging when building UL MAC PDU 2021-04-09 20:40:22 +02:00
Andre Puschmann 9950278a12 nr,mac_sch_pdu,mux: fix packing of MAC subPDUs with 16bit L field
the created RLC PDU was too large to fit inside the MAC grant
because only the header room for the short L field was used.

The patch determines the correct size before passing the opportunity to RLC.

It also improves logging in error case by using the MAC logger instead of
stderr/stdout when error occurs.
2021-04-09 20:12:03 +02:00
Francisco ff8a43f6b0 avoid allocation of dl_sched_list and ul_sched_t by converting a std::vector to bounded_vector 2021-04-09 15:38:07 +01:00
Francisco f1c67f5b2b pool - avoid concurrent batch allocations in background threads 2021-04-09 12:54:22 +01:00
Francisco 75e9700de0 rlc - usage of memory pool to allocate RLC bearers 2021-04-09 12:54:22 +01:00
Francisco 71f1f1b556 enb - log warning when rnti-specific memory block is full 2021-04-09 12:54:22 +01:00
Francisco a890a22ccd enb - rnti memory pool now fallbacks to new/delete if rnti-specific memory block is full 2021-04-09 12:54:22 +01:00
Francisco a780a6a7b6 fix obj pool interface 2021-04-09 12:54:22 +01:00
Francisco 60d5c6df7b implementation of memory pool with individual memory blocks per UE that get accessed via their rnti 2021-04-09 12:54:22 +01:00
Andre Puschmann db496df1e6 mac_nr: add support for periodic BSR reporting
building on the previous refactor this patch now adds support
for peridoic BSR reporting (using short BSR). It furthermore does
the following changes:

* add BSR packing
* add proc_bsr_nr unit test
* move mac_nr test code into test folder under src (needs to be done with other test code too)
2021-04-09 12:28:05 +02:00
Andre Puschmann 6dd8c21073 mac_sch_pdu_nr: add unpacking of TA CE in DL-SCH
also add basic test to verify correct unpacking
2021-04-09 09:49:14 +02:00
Francisco dc763b5045 rlc am - fix bugs in buffered_pdcp_pdu_list
The count and container elements were not being correctly updated in the events
of SN overwrite, clear(), clear_pdcp_sdu(sn) of sn that doesnt exist
2021-04-08 20:11:15 +01:00
Francisco ebbb74e639 rlc am - use of circular_map container in RLC AM window
The window elements are not being correctly cleaned up when clear() is called
or when overwritten by newer SN. Furthermore, the window count member is not being
correctly updated when the insertion of a newer SN overwrites the previous one.

I used the circular_map container to avoid this sort of bugs
2021-04-08 20:11:15 +01:00
David Rupprecht 82c9636156 Refactor pdcp ctor seperate the configure function 2021-04-08 19:08:17 +02:00
David Rupprecht 56e947bf27 Added functionality for releasing a NR bearer 2021-04-08 17:37:36 +02:00
David Rupprecht cc6d8128ad Added gw interface if it is running 2021-04-08 17:37:36 +02:00
David Rupprecht 7a481c40ab Added mac prach nr proc error handling 2021-04-08 17:37:36 +02:00
David Rupprecht f9ea02b6bf Added functions for rrc reestablishing procedure if nr reconfig failes 2021-04-08 17:37:36 +02:00
Xavier Arteaga 58a9ef6e7f Minor NR PHY tweaks and aesthetic 2021-04-08 11:39:55 +02:00
Xavier Arteaga 991c6e7016 Refactored NR HARQ-ACK feedback enqueue 2021-04-08 11:39:55 +02:00
Xavier Arteaga bd11b66b6c Fix unitialised NR PHY arguments 2021-04-08 11:39:55 +02:00
Xavier Arteaga 22239b29c5 Disable smoothing filter for NR PDCCH DMRS 2021-04-08 11:39:55 +02:00
Xavier Arteaga 9f54c6ae6d Fix NR PUCCH info string and memory leak 2021-04-08 11:39:55 +02:00
Francisco b7d4a72ea1 adt - fix circular map clear() and erase(it) functions 2021-04-07 22:26:42 +01:00
Andre Puschmann 0fdcea2924 rlc_am: count every segment retx as a full retx for this SN
previously we were only counting retx if we retx the start of a segment.
this could lead to unwanted behaviour, i.e., not counting retx
correctly and thus not triggering the maxretx attempt, if the receive
always sends NACKs with a SO_start.

The RLC spec is not clear on how this should be handled correctly but
IMHO using an integer number of retx is reasonable, even for segments
that might be retransmitted more often.

The alternative of using a fractional retx counter that may be increamented
proportional to the segment size that is retx is another alternative
but considered too complex to implement (and test correctly).
2021-04-07 22:18:22 +02:00
Andre Puschmann c74661ae95 rlc_am: add log message when received NACK SN is already on retx queue 2021-04-07 22:18:22 +02:00
Francisco d02cc51e33 use mutex or atomic in running flag to signal the interruption of a thread 2021-04-07 16:11:31 +01:00
Xavier Arteaga 49731ab5a1 Initial NR-DCI refactor
Added NR DCI 1_1 size

Several DCI NR fixes
2021-04-07 16:57:12 +02:00
Xavier Arteaga 01990c2e1d SRSUE: Add PHY-MAC SR related interfaces 2021-04-07 14:16:46 +02:00
Xavier Arteaga 64acf03158 Fix sch_nr_test 2021-04-07 13:56:06 +02:00
Xavier Arteaga 1dcd75a6c7 Ignore CRC for RV!=0 in phy_dl_nr_test 2021-04-07 13:56:06 +02:00
Xavier Arteaga 3504bfcf5a Fix NR-SCH test 2021-04-07 13:56:06 +02:00
Xavier Arteaga 39e97cbcf4 Fix unbounded memory access 2021-04-07 13:56:06 +02:00
Xavier Arteaga 29c6adad93 Avoid unused LDPC memory in AVX2 decoder 2021-04-07 13:56:06 +02:00
Xavier Arteaga 392a8cc1b6 Fix LDPC RM number of useful iterations 2021-04-07 13:56:06 +02:00
Xavier Arteaga 3568f633c3 Use LDPC RM number of useful LLR and rename functions 2021-04-07 13:56:06 +02:00
Xavier Arteaga ecd2c1cdcc Improved LDPC decoded performance and other NR aesthetical changes 2021-04-07 13:56:06 +02:00
Francisco cdf72248f3 Reimplement batch-based background object/memory pool
Main changes:
- addition of pool utilities
- The node size/alignment and batch allocation threshold are now runtime arguments
- object pool and memory pool are not anymore based on the same class.
  The object pool cannot use intrusive free list because it would overwrite the object
  memory
2021-04-07 12:02:22 +01:00
Francisco 62a6d9a8dc fix background memory pool destruction 2021-04-07 12:02:22 +01:00
Francisco b004c2024d integration of object pool in mac::ue for allocation of softbuffers. Definition of common object pool interface class 2021-04-07 12:02:22 +01:00
Francisco 460d7a8f4f fix memory pool test - placed the pool state into a shared_ptr so that the callbacks still have a valid handle when the pool is destroyed 2021-04-07 12:02:22 +01:00
Francisco 9bec13731a adt unit test - fix memory pool test 2021-04-07 12:02:22 +01:00
Francisco ec3cd9ffea adt - added background object pool test, and fix existing bugs related to the creation of pools with objects that are too small to be used in free lists 2021-04-07 12:02:22 +01:00
Francisco d1c5b000dc adt - creation of pre-initialized object pool, that leverages the background memory pool allocator 2021-04-07 12:02:22 +01:00
Ismael Gomez 3daba090f6 Fixed compilation of turbo decoder in ARM 2021-04-06 18:42:26 +02:00
Francisco 2fc2280c3b adt pool - replace uint8_t* for void* to represent memory blocks 2021-04-02 17:40:50 +01:00
Francisco a79ca92020 refactor type storage and pool tests 2021-04-02 17:40:50 +01:00
Francisco 2723993740 fix network utils test 2021-04-02 11:42:50 +01:00
Francisco 046633674a refactor - removal of stack-gtpu interface, and use of socket manager interface instead 2021-04-02 11:42:50 +01:00
Francisco c24e382c19 Refactor of socket manager class
- use of inheritance to simplify testing
- removal of global network manager
- pass of custon socket manager to s1ap and gtpu ctors
- overhauled the registration of socket fd,callback in socket manager
2021-04-02 11:42:50 +01:00
Francisco 4aac7ac238 use global rx multisocket handler, and remove stack-s1ap interface 2021-04-02 11:42:50 +01:00
Francisco 39de2efa69 multisocket handler - use blocking socket remove method 2021-04-02 11:42:50 +01:00
Francisco bf96d897ee network utils refactor - renaming of socket handle to unique socket and cleanup of its methods 2021-04-02 11:42:50 +01:00
Pedro Alvarez 8194b5ec73 Added check for consequetive KOs in MAC. Change set_activity_user to pass activity and max KOs to RRC and trigger RLF timeout. 2021-04-01 13:21:43 +01:00
dr 968c261bec Reordered lock to avoid deadlock in mac pcap thread 2021-04-01 10:58:56 +01:00
Francisco 23ae9967cf replaced present+value for optional field in s1ap mme_ue_s1ap_id context field 2021-04-01 10:24:34 +01:00
Francisco c3482b45e1 s1ap - handle erroneous enb/mme s1ap ue id in received s1ap messages from the MME 2021-04-01 10:24:34 +01:00
Francisco ced757a11b adt - add optional construct that closely emulates std::optional<T> 2021-03-31 19:14:11 +01:00
faluco 54fab314c0 Enhance RRC eNB events:
- Implement a common event "log_rrc" for all RRC events and discriminate by procedure using an enum.
- Log events for connection, reestablishment, reconfig, reject and release.
- Log the corresponding ASN1 message used by each procedure.
- Redefine the JSON object for this event to match the new structure.

Fixed a compilation error detected by the static analyzer in gcc9.3 where bounded_vector::data() was using taking the address of the internal buffer which confused it, prefer to use the data method of std::array.
2021-03-31 19:37:49 +02:00
Andre Puschmann d135ae4d29 proc_bsr: initial BSR procedure for NR
* refactor some common methods to mac_common.cc
* add common mux_base class
* move UL PDU generation to mux class
* add logical channel registration to MAC, MUX, BSR
* add initial proc BSR
* add basic MAC NR test
* rework MAC interfaces
2021-03-30 13:46:12 +02:00
Francisco d04a19f8bc refactor - increase code reuse in adt files 2021-03-29 22:11:25 +01:00
Francisco 5eccfad05b gtpu - added comments, updated expected construct, handled in rrc the case a gtpu teid fails to allocate 2021-03-29 10:20:55 +01:00
Francisco ab2bd9a2d2 gtpu refactor - handle dl path state activation internally in gtpu tunnel manager class 2021-03-29 10:20:55 +01:00
Francisco cfd24f6a0e gtpu - leverage byte_buffer_pool to store buffered sdus in gtpu 2021-03-29 10:20:55 +01:00
Francisco c201eb7708 use of more space efficient sorted vector structure for lcid tunnels of a rnti 2021-03-29 10:20:55 +01:00
Francisco eba0edea4a creation of static id obj pool class. Application of this class to gtpu tunnels container to avoid allocations 2021-03-29 10:20:55 +01:00
Francisco 60cd7e6cfe adt - improved concurrent fixed memory pool policy to send buffers from thread cache to central cache 2021-03-27 12:21:08 +00:00
Francisco eb38ff43ab fixed size buffer pool bugfix - deleted threads now return the cached memory blocks to the pool shared memory block container 2021-03-27 12:21:08 +00:00
Francisco be771e5c23 performance - use of new concurrent fixed size pool for byte_buffer pool 2021-03-27 12:21:08 +00:00
Francisco e1523692c2 implementation of concurrent fixed size pool that leverages thread local caches to avoid mutexing 2021-03-27 12:21:08 +00:00
David Rupprecht b944528a4f Install srslog to system folder 2021-03-26 16:16:28 +01:00
faluco e2c7809abb - Introduce a new tracer scoped object that only records if the event duration exceeds the programmed threshold. 2021-03-26 10:31:26 +01:00
Andre Puschmann bde7b49ca3 ue,mac_nr: add basic SR procedure
the current implementation support only one SR config
and doesn't support the prohibit timer
2021-03-26 09:53:03 +01:00
Xavier Arteaga 6219500148 Added NR-RRC RACH parsing 2021-03-26 09:45:10 +01:00
faluco 3c1a97f450 - Use fprintf in the srsran_assert context incase the assert is being triggered by srslog producing a circular loop.
- Switch to use a dynamic circular buffer for the log backend queue.
2021-03-25 19:00:06 +01:00
faluco 4b5e15cd70 - Fixed missing return statements in base_circular_buffer::try_push.
- Fixed array index calculation in base_circular_buffer::clear.
- Removed redundant explicit in srslog::backend_worker.
2021-03-25 19:00:06 +01:00
faluco b06ef3f390 Switch the queue of the log backend to use a circular buffer. 2021-03-25 19:00:06 +01:00
David Rupprecht 8c86d2084d Adding NR phy config RRC parsing
Added error handling

Reworked flattening error handling
2021-03-25 11:34:53 +01:00
Andre Puschmann 6eedd70275 rlc_stress_test: add RLC UM NR 12bit stresstest 2021-03-25 08:06:49 +01:00