From f7fe3b448f1a2315b13b1be8c0fddc7ad2db1a16 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 4 Sep 2023 12:26:17 +0200 Subject: [PATCH] nr rlc am: harmonize comparisons of SNs in process_control_pdu() Let's compare SNs in a similar way as done in previous commit, to ease readability. --- openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c index 044572060b..57713477ca 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c @@ -481,8 +481,9 @@ process_wait_list_head: } /* if current segment SN > current NACK, we can't classify it yet */ - if (sn_compare_tx(entity, cur_wait_list->sdu->sn, cur_nack_sn) > 0 - || (cur_wait_list->sdu->sn == cur_nack_sn + cmp = sn_compare_tx(entity, cur_wait_list->sdu->sn, cur_nack_sn); + if (cmp > 0 + || (cmp == 0 && cur_wait_list->so > cur_so_start)) goto done_nack; @@ -541,8 +542,9 @@ process_retransmit_list_head: } /* if current segment SN > current NACK, we can't classify it yet */ - if (sn_compare_tx(entity, cur_retransmit_list->sdu->sn, cur_nack_sn) > 0 - || (cur_retransmit_list->sdu->sn == cur_nack_sn + cmp = sn_compare_tx(entity, cur_retransmit_list->sdu->sn, cur_nack_sn); + if (cmp > 0 + || (cmp == 0 && cur_retransmit_list->so > cur_so_start)) goto done_nack;