Commit Graph

102 Commits

Author SHA1 Message Date
Robert Falkenberg 1a5683c226 lib,rlc_am_nr: add overlap check for segment offsets in rlc_amd_retx and queue 2022-04-20 12:17:52 +02:00
Pedro Alvarez 9d0bbc45b3 lib,rlc_am_nr: added debug window function 2022-04-12 14:43:44 +01:00
Robert Falkenberg dd7bd351b3 lib,rlc_am_nr: fix pack/unpack of NACKs in status PDUs 2022-03-31 12:04:43 +02:00
Robert Falkenberg d8cb4ec700 lib,rlc_am_nr: detect gaps in sequence of received SDU segments
This is required for checks such as
"there is at least one missing byte segment [...] before
the last byte of all received segments of this SDU"
2022-03-30 17:16:21 +02:00
Robert Falkenberg 79e8f7625e lib,rlc_am_nr: fix log msg for AM NR PDU header 2022-03-23 14:58:09 +01:00
Robert Falkenberg 7e13cd0712 lib,rlc_am_nr: rename get_tx_window_size() to get_tx_window_utilization() 2022-03-21 15:23:21 +01:00
Pedro Alvarez 12f440145d lib,rlc_am_nr: changed build_retx_pdu_without_segmentation to pass retx
info by copy. This is to avoid accidently using retx info by reference
after pop'ing the retx from the queue.
2022-03-17 13:54:56 +00:00
Pedro Alvarez b4814bfdc1 lib,rlc_am_nr: added test for polling bit set when retx queue is empty. Fixed lost PDU test now that we correctly set the polling bit. 2022-03-17 13:54:56 +00:00
Pedro Alvarez 1d1e6dd832 lib,rlc_am_nr: added pollBYTE support and a unit test for it 2022-03-17 13:54:56 +00:00
Pedro Alvarez eaa8fff6a0 lib,rlc_am_nr: Passing bool to get_pdu_poll() to differentiate the
behaviour between RETX and non-RETX PDUs.
2022-03-17 13:54:56 +00:00
Robert Falkenberg 5bb6cdec1e lib,rlc_am_nr: use std:vector for nacks in rlc_am_nr_status_pdu_t
- Also create tx_status a member to avoid frequent allocations
for each created PDU.

- Remove unused member nack_range from rlc_am_nr_status_pdu_t.
2022-03-16 10:57:28 +01:00
Robert Falkenberg 0cf052e31d lib,rlc_am_nr: replace hard-coded WINDOWS_SIZE 2022-03-16 10:57:28 +01:00
Robert Falkenberg 80e23624f8 lib,rlc_am_nr: extract function am_window_size() 2022-03-16 10:57:28 +01:00
Robert Falkenberg 47c1845cdc lib,rlc_am_nr: add pdu_retx_queue_base, rlc_ringbuffer_base as interfaces
that are independent from templated capacity.
2022-03-16 10:57:28 +01:00
Robert Falkenberg 11ac8c2529 lib,rlc_am_nr: add support for 18-bit SNs
and first bunch of corresponding unit tests
2022-03-16 10:57:28 +01:00
Robert Falkenberg b6d93577a0 rlc, nr: replace so_end by segment_length 2022-03-09 08:28:46 +01:00
Robert Falkenberg bb7339910f rlc: separate types of rlc_amd_retx_t for LTE and NR 2022-03-09 08:28:46 +01:00
Robert Falkenberg 60c3d79f47 rlc, nr: complete packing of status PDUs with 18bit SNs 2022-03-01 20:44:39 +01:00
Robert Falkenberg f7515e98cf rlc, nr: add pack/unpack of nack_range in status PDUs 2022-03-01 15:31:35 +01:00
Robert Falkenberg 0fb6420e8b rlc, nr: avoid multi increments of SDU's retx_count within one status message 2022-02-28 16:37:44 +01:00
Robert Falkenberg 511ad9ed25 rlc, nr: Increment retx_count for segments 2022-02-28 16:37:44 +01:00
Robert Falkenberg 034aa6a6d4 rlc, nr: inform upper layer when max retransmissions is exceeded 2022-02-28 16:37:44 +01:00
Robert Falkenberg 95ebc06ec1 rlc: implement SDU discard for AM+UM in NR+LTE
- Implemented in common base classes
- Added locking
2022-02-23 11:18:31 +01:00
Robert Falkenberg 9b44d13471 rlc, nr: notify PDCP about fully acked SDUs 2022-02-23 10:57:21 +01:00
Pedro Alvarez e6d976d115 lib,rlc_am_nr: fixed stack smashing bug that happened when too many NACKs were present in the status report 2022-02-22 21:14:15 +00:00
Pedro Alvarez ddbd857867 lib,rlc_am_nr: make sure that the RB name is logged when logging the header and status PDUs in NR 2022-02-22 21:14:15 +00:00
Pedro Alvarez c8d15135c6 lib,rlc_am_nr: addressing reveier comments:
* made some methods const
  * changed from TESTASSERT to TESTASSERT_EQ
  * fix up comment
  * removed superfulous if
  * used typedef for list of segments received
  * added unit test for is_retx_required()
  * added unit test for malformed status PDU
2022-02-16 13:23:32 +00:00
Pedro Alvarez 634c9ea3af lib,rlc_am_nr: starting to order segments to be able to receive them out-of-order 2022-02-16 13:23:32 +00:00
Pedro Alvarez 832d650574 lib,rlc_am_nr: remove unused variables. Fixed up some comments. 2022-02-16 13:23:32 +00:00
Pedro Alvarez 9bb3b1f18f lib,rlc_am_nr: remove unused code after re-factor 2022-02-16 13:23:32 +00:00
Pedro Alvarez 5e8b7b5ebe lib,rlc_am_nr: re-factored code for retx'ing with and without segmentation. 2022-02-16 13:23:32 +00:00
Pedro Alvarez 38e4c47f34 lib,rlc_am_nr: added current SO to keep track of the SO for the next RETX. 2022-02-16 13:23:32 +00:00
Pedro Alvarez 65d5df8b6e lib,rlc_am_nr: Continue to add functionality to provide segments of retx'es. Started to add function to re-segment already existing SDU segment 2022-02-16 13:23:32 +00:00
Pedro Alvarez e4a72de342 lib,rlc_am_nr: refactored build_pdu helpers to receive the payload pointer for consistency. Added function to segment retx. Added some comments to build PDU helper functions. 2022-02-16 13:23:32 +00:00
Pedro Alvarez b1a33a07a1 lib,rlc_am_nr: starting to add test for segmenting retx. Changed sdu under segmentation to only hold the SN. The actual SDU already exists in the pdu stored in the tx_window. 2022-02-16 13:23:32 +00:00
Pedro Alvarez 9bd368e0a9 lib,rlc: changed back status and header logging helpers to log directly. Make sure RB name is automatically logged. 2022-01-18 11:53:37 +00:00
Pedro Alvarez b53da22eb1 lib,rlc: changed return of string helper functions from char* to std::string to avoid UB 2022-01-18 11:53:37 +00:00
Pedro Alvarez e157806db2 lib,rlc_am_lte: removed RB_NAME macro. changed status and data pdu logging helpers to return C strings. Using new logging macros to make sure that RB name is included when logging status and amd pdus. 2022-01-18 11:53:37 +00:00
Pedro Alvarez 0f4b64f13f lib,rlc: added macros for hex logging that automatically add the rb_name. changed logging to use new macros in multiple places. 2022-01-18 11:53:37 +00:00
Pedro Alvarez b687072815 lib,rlc: added rb_name and logger to rlc_common. Added macros to help making sure bearer name is always included to the log to rlc_common.h. Started using said macros in TM, UM and AM entities. 2022-01-18 11:53:37 +00:00
Pedro Alvarez b0581ae5ae lib,rlc_am_nr: removed ugly hack to get last element of list. Renamed current_sdu to sdu_under_segmentation. 2022-01-10 23:25:44 +00:00
Pedro Alvarez bd8c7f7c57 lib,rlc_am_nr: added max_hdr and min_hdr variables, that are configured based on SN length. Replaced magic numbers with said variables. 2022-01-10 23:25:44 +00:00
Pedro Alvarez 5532c514ba lib,rlc_am_nr: added logging macros to make sure that the RB name is allways logged. 2022-01-10 23:25:44 +00:00
Pedro Alvarez f60259afb9 lib,rlc_am_nr: fixed multiple typos and deleted useless comments 2022-01-10 23:25:44 +00:00
Pedro Alvarez 9e6b852834 lib,rlc_am_nr: Added handle_full_sdu() and handle_segment_sdu() functions. Reduced duplicate code in handling SDU segments. 2022-01-10 23:25:44 +00:00
Pedro Alvarez 8afea13d9a lib,rlc_am_nr: added initial logic to support receiving PDU segments. 2022-01-10 23:25:44 +00:00
Pedro Alvarez aae1d9ad10 lib,rlc_am_nr: changed rlc_amd_nr_tx_sdu to use std::list to store
segment infomation. Segment infomation incluses, SO and payload length.
2022-01-10 23:25:44 +00:00
Pedro Alvarez 76c33c78a9 lib,rlc_am_nr: starting to add test for segmentation. Starting to add functions for creating new segments and segment continuation. 2022-01-10 23:25:44 +00:00
Pedro Alvarez 3e5b064a08 lib,rlc_am_nr: starting to add build_sdu_segment() function.
Also adding write_header function that receives as argument uint8_t* so
we can write the header straight to the payload.
2022-01-10 23:25:44 +00:00
Pedro Alvarez b425316936 lib,rlc_am_nr: fixed tx_mod_base_nr(). Added unit test for inside_tx_window(). 2021-12-07 16:46:26 +00:00