From d262d152ecfc884e07e0e588ba419c763b57ccaf Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Fri, 13 Nov 2020 14:34:01 +0100
Subject: [PATCH] rlc v2: implement SOstart/SOend in NACK reporting

The necessity of SOstart/SOend was understood after email exchanges with
David Breaux <davidbreaux67@gmail.com>.

See openair2/LAYER2/rlc_v2/tests/test46.h for some details.

Basically if we NACK without SOstart/SOend then the other end of the RLC
channel will consider all the bytes as NACKed and will have to resend them
all. If another status is then reported before all the bytes are sent,
and because we don't use SOstart/SOend this status will NACK all the bytes
again, then all the bytes are to be sent again. And the cycle repeats.
It will end with a max retx reached (which triggers RLF, Radio Link Failure).

The function put_bit in openair2/LAYER2/rlc_v2/rlc_pdu.c has been changed
too, maybe introducing some performance issues.
---
 openair2/LAYER2/rlc_v2/TODO                |   3 -
 openair2/LAYER2/rlc_v2/rlc_entity_am.c     | 156 +++++++++++++++++----
 openair2/LAYER2/rlc_v2/rlc_pdu.c           |   5 +-
 openair2/LAYER2/rlc_v2/tests/run_tests.sh  |   2 +-
 openair2/LAYER2/rlc_v2/tests/test11.txt.gz | Bin 430 -> 427 bytes
 openair2/LAYER2/rlc_v2/tests/test12.txt.gz | Bin 415 -> 411 bytes
 openair2/LAYER2/rlc_v2/tests/test46.h      |  49 +++++++
 openair2/LAYER2/rlc_v2/tests/test46.txt.gz | Bin 0 -> 2063 bytes
 openair2/LAYER2/rlc_v2/tests/test47.h      |  27 ++++
 openair2/LAYER2/rlc_v2/tests/test47.txt.gz | Bin 0 -> 416 bytes
 openair2/LAYER2/rlc_v2/tests/test48.h      |  29 ++++
 openair2/LAYER2/rlc_v2/tests/test48.txt.gz | Bin 0 -> 427 bytes
 openair2/LAYER2/rlc_v2/tests/test49.h      |  27 ++++
 openair2/LAYER2/rlc_v2/tests/test49.txt.gz | Bin 0 -> 895 bytes
 openair2/LAYER2/rlc_v2/tests/test6.h       |   3 -
 openair2/LAYER2/rlc_v2/tests/test6.txt.gz  | Bin 777 -> 773 bytes
 openair2/LAYER2/rlc_v2/tests/test7.h       |   3 -
 openair2/LAYER2/rlc_v2/tests/test7.txt.gz  | Bin 796 -> 779 bytes
 openair2/LAYER2/rlc_v2/tests/test9.h       |   3 -
 openair2/LAYER2/rlc_v2/tests/test9.txt.gz  | Bin 327 -> 324 bytes
 20 files changed, 261 insertions(+), 46 deletions(-)
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test46.h
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test46.txt.gz
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test47.h
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test47.txt.gz
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test48.h
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test48.txt.gz
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test49.h
 create mode 100644 openair2/LAYER2/rlc_v2/tests/test49.txt.gz

diff --git a/openair2/LAYER2/rlc_v2/TODO b/openair2/LAYER2/rlc_v2/TODO
index 0778d4320b..e93ad7e8b9 100644
--- a/openair2/LAYER2/rlc_v2/TODO
+++ b/openair2/LAYER2/rlc_v2/TODO
@@ -13,6 +13,3 @@ RLC AM
 - 36.322 5.1.3.2.3 Actions when a RLC data PDU is placed in the reception
   buffer
   [...] and in-sequence byte segments of the AMD PDU with SN = VR(R) [...]
-
-- use SOstart/SOend in NACK reporting, do not NACK full PDU if
-  parts of it have been received
diff --git a/openair2/LAYER2/rlc_v2/rlc_entity_am.c b/openair2/LAYER2/rlc_v2/rlc_entity_am.c
index b4f3d2f47c..710f22855e 100644
--- a/openair2/LAYER2/rlc_v2/rlc_entity_am.c
+++ b/openair2/LAYER2/rlc_v2/rlc_entity_am.c
@@ -898,6 +898,64 @@ static tx_pdu_size_t compute_new_pdu_size(rlc_entity_am_t *entity, int maxsize)
   return ret;
 }
 
+/* return number of missing parts of a sn
+ * if everything is missing (nothing received), return 0
+ */
+static int count_nack_missing_parts(rlc_entity_am_t *entity, int sn)
+{
+  rlc_rx_pdu_segment_t *l = entity->rx_list;
+  int last_byte;
+  int new_last_byte;
+  int count;
+
+  while (l != NULL) {
+    if (l->sn == sn)
+      break;
+    l = l->next;
+  }
+  /* nothing received, everything is missing, return 0 */
+  if (l == NULL)
+    return 0;
+
+  last_byte = -1;
+  count = 0;
+  while (l != NULL && l->sn == sn) {
+    if (l->so > last_byte + 1)
+      /* missing part detected */
+      count++;
+    if (l->is_last)
+      /* end of PDU reached - no more missing part to add */
+      return count;
+    new_last_byte = l->so + l->size - l->data_offset - 1;
+    if (new_last_byte > last_byte)
+      last_byte = new_last_byte;
+    l = l->next;
+  }
+  /* at this point: end of PDU not received, one more missing part */
+  count++;
+
+  return count;
+}
+
+/* return size of nack reporting for sn, in bits */
+static int segment_nack_size(rlc_entity_am_t *entity, int sn)
+{
+  /* nack + e1 + e2 = 12 bits
+   * SOstart + SOend = 30 bits
+   */
+  int count;
+
+  count = count_nack_missing_parts(entity, sn);
+
+  /* count_nack_missing_parts returns 0 when everything is missing
+   * in which case we don't have SOstart/SOend, so only 12 bits
+   */
+  if (count == 0)
+    return 12;
+
+  return count * (12 + 30);
+}
+
 static int status_size(rlc_entity_am_t *entity, int maxsize)
 {
   /* let's count bits */
@@ -912,11 +970,16 @@ static int status_size(rlc_entity_am_t *entity, int maxsize)
     return 0;
   }
 
-  /* each NACK adds 12 bits */
+  /* add size of NACKs */
   sn = entity->vr_r;
-  while (bits + 12 <= maxsize && sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
-    if (!(rlc_am_segment_full(entity, sn)))
-      bits += 12;
+  while (sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
+    if (!(rlc_am_segment_full(entity, sn))) {
+      int nack_size = segment_nack_size(entity, sn);
+      /* stop there if not enough room */
+      if (bits + nack_size > maxsize)
+        break;
+      bits += nack_size;
+    }
     sn = (sn + 1) % 1024;
   }
 
@@ -929,7 +992,8 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
   int bits = 15;               /* minimum size is 15 (header+ack_sn+e1) */
   int sn;
   rlc_pdu_encoder_t encoder;
-  int has_nack = 0;
+  rlc_pdu_encoder_t encoder_ack;
+  rlc_pdu_encoder_t previous_e1;
   int ack;
 
   rlc_pdu_encoder_init(&encoder, buffer, size);
@@ -947,24 +1011,68 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
   rlc_pdu_encoder_put_bits(&encoder, 0, 3);   /* CPT */
 
   /* reserve room for ACK (it will be set after putting the NACKs) */
+  encoder_ack = encoder;
   rlc_pdu_encoder_put_bits(&encoder, 0, 10);
+  /* put 0 for e1, will be set to 1 later in the code if needed */
+  previous_e1 = encoder;
+  rlc_pdu_encoder_put_bits(&encoder, 0, 1);
 
   /* at this point, ACK is VR(R) */
   ack = entity->vr_r;
 
-  /* each NACK adds 12 bits */
   sn = entity->vr_r;
-  while (bits + 12 <= size && sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
+  while (sn_compare_rx(entity, sn, entity->vr_ms) < 0) {
     if (!(rlc_am_segment_full(entity, sn))) {
-      /* put previous e1 (is 1) */
-      rlc_pdu_encoder_put_bits(&encoder, 1, 1);
-      /* if previous was NACK, put previous e2 (0, we don't do 'so' thing) */
-      if (has_nack)
-        rlc_pdu_encoder_put_bits(&encoder, 0, 1);
-      /* put NACKed sn */
-      rlc_pdu_encoder_put_bits(&encoder, sn, 10);
-      has_nack = 1;
-      bits += 12;
+      rlc_rx_pdu_segment_t *l;
+      int i;
+      int count     = count_nack_missing_parts(entity, sn);
+      int nack_bits = count == 0 ? 12 : count * (12 + 30);
+      int last_byte;
+      int new_last_byte;
+      int so_start;
+      int so_end;
+      /* if not enough room, stop putting NACKs */
+      if (bits + nack_bits > size)
+        break;
+      /* set previous e1 to 1 */
+      rlc_pdu_encoder_put_bits(&previous_e1, 1, 1);
+
+      if (count == 0) {
+        /* simply NACK, no SOstart/SOend */
+        rlc_pdu_encoder_put_bits(&encoder, sn, 10);                 /* nack */
+        previous_e1 = encoder;
+        rlc_pdu_encoder_put_bits(&encoder, 0, 2);                 /* e1, e2 */
+      } else {
+        /* count is not 0, so we have 'count' NACK+e1+e2+SOstart+SOend */
+        l = entity->rx_list;
+        last_byte = -1;
+        while (l->sn != sn) l = l->next;
+        for (i = 0; i < count; i++) {
+          rlc_pdu_encoder_put_bits(&encoder, sn, 10);               /* nack */
+          previous_e1 = encoder;
+          /* all NACKs but the last have a following NACK, set e1 for them */
+          rlc_pdu_encoder_put_bits(&encoder, i != count - 1, 1);      /* e1 */
+          rlc_pdu_encoder_put_bits(&encoder, 1, 1);                   /* e2 */
+          /* look for the next segment with missing data before it */
+          while (l != NULL && l->sn == sn && !(l->so > last_byte + 1)) {
+            new_last_byte = l->so + l->size - l->data_offset - 1;
+            if (new_last_byte > last_byte)
+              last_byte = new_last_byte;
+            l = l->next;
+          }
+          so_start = last_byte + 1;
+          if (l == NULL)
+            so_end = 0x7fff;
+          else
+            so_end = l->so - 1;
+          rlc_pdu_encoder_put_bits(&encoder, so_start, 15);
+          rlc_pdu_encoder_put_bits(&encoder, so_end, 15);
+          if (l != NULL)
+            last_byte = l->so + l->size - l->data_offset - 1;
+        }
+      }
+
+      bits += nack_bits;
     } else {
       /* this sn is full and we put all NACKs before it, use it for ACK */
       ack = (sn + 1) % 1024;
@@ -972,24 +1080,10 @@ static int generate_status(rlc_entity_am_t *entity, char *buffer, int size)
     sn = (sn + 1) % 1024;
   }
 
-  /* go to highest full sn+1 for ACK, VR(MS) is the limit */
-  while (sn_compare_rx(entity, sn, entity->vr_ms) < 0 &&
-         rlc_am_segment_full(entity, sn)) {
-    ack = (sn + 1) % 1024;
-    sn = (sn + 1) % 1024;
-  }
-
-  /* at this point, if last put was NACK then put 2 bits else put 1 bit */
-  if (has_nack)
-    rlc_pdu_encoder_put_bits(&encoder, 0, 2);
-  else
-    rlc_pdu_encoder_put_bits(&encoder, 0, 1);
-
   rlc_pdu_encoder_align(&encoder);
 
   /* let's put the ACK */
-  buffer[0] |= ack >> 6;
-  buffer[1] |= (ack & 0x3f) << 2;
+  rlc_pdu_encoder_put_bits(&encoder_ack, ack, 10);
 
   /* reset the trigger */
   entity->status_triggered = 0;
diff --git a/openair2/LAYER2/rlc_v2/rlc_pdu.c b/openair2/LAYER2/rlc_v2/rlc_pdu.c
index c55e2d9c3c..dc8fc8b094 100644
--- a/openair2/LAYER2/rlc_v2/rlc_pdu.c
+++ b/openair2/LAYER2/rlc_v2/rlc_pdu.c
@@ -233,9 +233,10 @@ static void put_bit(rlc_pdu_encoder_t *encoder, int bit)
     exit(1);
   }
 
-  encoder->buffer[encoder->byte] <<= 1;
   if (bit)
-    encoder->buffer[encoder->byte] |= 1;
+    encoder->buffer[encoder->byte] |= 1 << (7 - encoder->bit);
+  else
+    encoder->buffer[encoder->byte] &= ~(1 << (7 - encoder->bit));
 
   encoder->bit++;
   if (encoder->bit == 8) {
diff --git a/openair2/LAYER2/rlc_v2/tests/run_tests.sh b/openair2/LAYER2/rlc_v2/tests/run_tests.sh
index 72feff0036..f3776157a3 100755
--- a/openair2/LAYER2/rlc_v2/tests/run_tests.sh
+++ b/openair2/LAYER2/rlc_v2/tests/run_tests.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_count=45
+test_count=49
 
 for i in `seq $test_count`
 do
diff --git a/openair2/LAYER2/rlc_v2/tests/test11.txt.gz b/openair2/LAYER2/rlc_v2/tests/test11.txt.gz
index ea435a666025ab5d90ca2992b91dd94e1551a654..160916bb368ac40216ecf15155677fdbb54f5f84 100644
GIT binary patch
literal 427
zcmV;c0aX4UiwFqxWUXHU19W9`bTKh5ba-?CwUo<h!!Qs<_x*~yY&T`bPua_oY)c`@
zsuZKxatWjlEIWOCeJv*{b*ef}Xh6uqXwIFv9?yI_o2QuG-lX6ZmC84nE*e~}3eZ&w
zz4}yON^uV&5Q99B4+=mbC<4VG0ZJY&=6{2D4<tcLP!4J}6sT<9gBk3B{Xvk|2XO!n
z!4WtH3vdFK;3YT*7yF<`^{gsctL(LCb`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1=6m`8FkzpXFNK+&p#fnq4a*UElLqS5(ASdrHxr-o6TpPM5nh_1@~5n-U{hdd;_Eq
JWzaDQ003|)yl4Ob

diff --git a/openair2/LAYER2/rlc_v2/tests/test46.h b/openair2/LAYER2/rlc_v2/tests/test46.h
new file mode 100644
index 0000000000..b58c9dce64
--- /dev/null
+++ b/openair2/LAYER2/rlc_v2/tests/test46.h
@@ -0,0 +1,49 @@
+/*
+ * rlc am test ack/nack reporting with segmented SDUs
+ *   eNB sends SDU in big PDU, not received
+ *   eNB retx with smaller PDUs, not received except a few
+ *   after some time, RX works again, UE should NACK with SOstart/SOend
+ *
+ * this test was written because in the past we didn't generate NACKs with
+ * SOstart/SOend, potentially leading to infinite retransmissions, even with
+ * good radio conditions (well, there will be max ReTX reached at some point).
+ * The scenario is as follows:
+ * the eNB transmits many many PDUs segments and asks for status
+ * report at some point (but before sending all the segments). The UE then
+ * generates a (wrong) NACK without SOstart/SOend, and then the eNB has to
+ * resend everything from start (all bytes of the PDU have been NACKed because
+ * there is no SOstart/SOend). Then the eNB will again ask for status report
+ * before sending everything and the process repeats all over again.
+ */
+TIME, 1,
+    ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    UE_RECV_FAILS, 1,
+    ENB_RECV_FAILS, 1,
+    ENB_SDU, 0, 300,
+    ENB_PDU_SIZE, 500,
+    UE_PDU_SIZE, 1000,
+TIME, 2,
+    ENB_PDU_SIZE, 7,
+TIME, 50,
+    UE_RECV_FAILS, 0,
+TIME, 51,
+    UE_RECV_FAILS, 1,
+TIME, 60,
+    UE_RECV_FAILS, 0,
+TIME, 61,
+    UE_RECV_FAILS, 1,
+TIME, 70,
+    UE_RECV_FAILS, 0,
+TIME, 71,
+    UE_RECV_FAILS, 1,
+TIME, 80,
+    UE_RECV_FAILS, 0,
+TIME, 81,
+    UE_RECV_FAILS, 1,
+TIME, 140,
+    UE_RECV_FAILS, 0,
+    ENB_RECV_FAILS, 0,
+TIME, 150,
+    ENB_PDU_SIZE, 200,
+TIME, -1
diff --git a/openair2/LAYER2/rlc_v2/tests/test46.txt.gz b/openair2/LAYER2/rlc_v2/tests/test46.txt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..dd633ec0329973242005359584099d8e223de24c
GIT binary patch
literal 2063
zcmZ9Idpy(oAIH;9%q4C1V8k$TD`oB*A(zv140Y6uLzvu3ncT^>wUJA8(1XZwPQQL#
zu=vU4=eFDuwK%RNv;8EOVZs=j`R&{9{2q_<`~CHKKi==>>-l+qK3ch8aBo0$z<y9{
zNKCAS)rr`|*nP`oj=2bHm0Me4<uJ_0AN<c;(BqqRPeu~y6y*75k6#Bmk>1Ffci8jd
zM|xaWChZ3m5{Cj6uCb`o+=Pu--gY97B^IqHMy2m?6t7b~Ux~gA>~5>=2}qr(2~^>s
zy=pLXibEqQdazIWW#p3NKg%_~)@xE|>_U(ZtenO-Nk>C66J0Z0`u6)E)sHxuU7~8-
z-H$;k|G`GIGExNlv^a2qa@tMLRkbv#16y7s8^D=djzEI5uwXDW$dLfGB9rez<H?{(
z?Q(GA_#g!Fn|5+{hAI@^tsL!)%T|lVo`lH%D~AA8SE2s+GSOJdt-CJJr#6zHbU!cT
z&GkSdf`_rPTi4=CIs6^Vz<dI{>e$%9E1eH&R|toy4sdf`5wA{YSiSyQdms`znRT_N
zA;@jQtN}5ZSsiFwdm-}RTcqr-SUFc{gro00tH<P`d-0D!&$J)9DnCQoUUJ;*lfvkj
z^c`EHl;1U9E4ZNz{{m~)v0hSa3EY|hZDyywZYNH^G+0s-7VI)EzNAeY+oW`HAR3xj
z1~l3jjn_~wAnVRdL~Ees3Siitp|cvdA0-xLD4kO&QVwxGW2hE_#hjJv&-wY>VGpVo
zDY;xKth<@*7kv#4W9G%YNn#tLJ<FBDoa3HmEuI5icJV*!J#x^pGIRvNKXv@6!Q~&X
zhAX-cp7cGH8!rFpc0;9JeO|-wi0}i;E-%8Df9c!nV700<xgA_Oe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wTWres1i%T&xL7a*iB{EkzA|xKwSo68Kz8A5>XJKd|S34=4_3Z1Rjq^~fxu8$pup
zf$qW2Ksd(PNHg-VHsvj(|0dz6Ga5>4QsCgSk>+GCB;`GXc}vyC*-(wRt-y)QMp}@E
zk(43`ld6h$GDH$1WGnNsXZ6TlI+PL!Ge<Sl32j7tD$A+L=IE3E(79g@>CYu(IigL8
zs?wZy*_Eo~pLOpCL;CXxzd9OXh(6MsrR+*I@~|!?4AOt+B=WH43JK)Vr7Zr8z{#q(
zS%E_c#*^CRMAO)tq=KH+gHC5u+|b|<p9+-XLq(H$(XBOO{DMh&xT$Y?B`)`ZP=3~?
ziWOk^F-UpO>7(L{ZMa8*>S)K=_O3<oEhSC-wh5;7(JuU_Bm%#K#Ozw!!z={x_lo!^
zVfs%gCA$u@c2(kOFP3CrH)ogk-|{cr?_~_DYktq}|GR&Q#js`u!~t`f@?zpj^Hn`h
zrd`FF{(XnlBI{aF=HFX$W)Gd5bvI6DW1@%xkY^HXKr6Aoj38!svAWk}{)3iVoBj`K
z6h++r6J?gEiWxDi?p2wJRs9Bs)z@tdErGVls*Jq=E&zQ<f_43=bC`3lSeH3Oo0p^U
zXQ&Q~1|rdnkjo9FPg|wzF7|W1z1xfFHGWvWQS=7-MvsYu%7%-rsCjxu9Am^6x2K8)
X-yH79v{y`bY|GEq`M0Op?A!Nm?NJQf

literal 0
HcmV?d00001

diff --git a/openair2/LAYER2/rlc_v2/tests/test47.h b/openair2/LAYER2/rlc_v2/tests/test47.h
new file mode 100644
index 0000000000..30cc6498da
--- /dev/null
+++ b/openair2/LAYER2/rlc_v2/tests/test47.h
@@ -0,0 +1,27 @@
+/*
+ * am: test function segment_nack_size, case "if (count == 0) return 12;"
+ * The eNB sends 5 PDUs, only first and last received by the UE. Then we
+ * ask for the UE's buffer status to trigger the case.
+ */
+TIME, 1,
+    ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    ENB_RECV_FAILS, 1,
+    ENB_PDU_SIZE, 100,
+    UE_PDU_SIZE, 100,
+TIME, 2,
+    ENB_SDU, 0, 10,
+TIME, 3,
+    UE_RECV_FAILS, 1,
+    ENB_SDU, 1, 10,
+TIME, 4,
+    ENB_SDU, 2, 10,
+TIME, 5,
+    ENB_SDU, 3, 10,
+TIME, 6,
+    UE_RECV_FAILS, 0,
+    ENB_RECV_FAILS, 0,
+    ENB_SDU, 4, 10,
+TIME, 42,
+    UE_BUFFER_STATUS,
+TIME, -1
diff --git a/openair2/LAYER2/rlc_v2/tests/test47.txt.gz b/openair2/LAYER2/rlc_v2/tests/test47.txt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..5404bd79369fff5f25b25c51ca9dd1c3ea236164
GIT binary patch
literal 416
zcmV;R0bl+fiwFn~XRcoY19W9`bTl_Eba-?Ct&_V>!$1&4d%oh9(4d*w^&>73X=##F
z2w8rtQKSeVKf>edS(_N)B{sI8vA5VcduDWJyWVUgtnY3jNQBa4$GFNHT<&wwRfKB)
zZom}b9z-Ap2}pr7$OHMH02G2&4;R}3=+QixGO11coHsp1T1rA4Xbx+)?ohco?2o3z
z=62WX%(XcY&d5mLksg>UX9VnwAOWSI3}mNcKt=1qY+C~>7c@BnUcl0hlnkX<gFUbh
z4!|LJ1x~;zI0NS{Xi`cRuslafIa2meKnTJRfhdTEcn}{FxS&ZXwSeV2QhF#QA!G$f
zASon+*iqUf6i@`kE@)Cp&ttXu^Oxk$UT$Mfcu6W$O_rIeDw@OLt=|HZUw>n3i%FZJ
zFlAiTN!?VI-u>h5kpT7U=ZWlGzRnKdj9qZDvq7-mjM`k-$c8kG(^SaA`62H_)aatm
z-xK|d&&+&xK6=b&!MgoZv^yVf)aUPr*;yXxs1GyiAN{uv@r*PN3S?=4T3Vnd3qAlU
KzFe^s2LJ%53BYIo

literal 0
HcmV?d00001

diff --git a/openair2/LAYER2/rlc_v2/tests/test48.h b/openair2/LAYER2/rlc_v2/tests/test48.h
new file mode 100644
index 0000000000..46c2c8ad33
--- /dev/null
+++ b/openair2/LAYER2/rlc_v2/tests/test48.h
@@ -0,0 +1,29 @@
+/*
+ * am: test case "if (bits + nack_size > maxsize)" in functions status_size
+ * and generate_status.
+ * The eNB sends 5 PDUs, only first and last received by the UE. Then we
+ * ask for the UE's buffer status to trigger the case. UE PDU size is
+ * limited to 6 to trigger the case.
+ */
+TIME, 1,
+    ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    ENB_RECV_FAILS, 1,
+    ENB_PDU_SIZE, 100,
+    UE_PDU_SIZE, 6,
+TIME, 2,
+    ENB_SDU, 0, 10,
+TIME, 3,
+    UE_RECV_FAILS, 1,
+    ENB_SDU, 1, 10,
+TIME, 4,
+    ENB_SDU, 2, 10,
+TIME, 5,
+    ENB_SDU, 3, 10,
+TIME, 6,
+    UE_RECV_FAILS, 0,
+    ENB_RECV_FAILS, 0,
+    ENB_SDU, 4, 10,
+TIME, 42,
+    UE_BUFFER_STATUS,
+TIME, -1
diff --git a/openair2/LAYER2/rlc_v2/tests/test48.txt.gz b/openair2/LAYER2/rlc_v2/tests/test48.txt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c1797b73bb05906533b665989bdb1f242895c29d
GIT binary patch
literal 427
zcmV;c0aX4UiwFp4T&`aN19W9`bTl|Fba-?Ct&_V>!$1&4d%oh9(4d*wwd1%%q@_tx
zA!PZnMv)?f{0NV)XV=6CFNtM~H1-yrvuCbnHmmg}#_HiNhQz2$en{$~#r3WL-NdMO
zp9V}Z9zg_Rkbo3Og91<pT7V+Z^66?b06m)*Q>BebUW>M;h@+&`fu^vws}5C|{qA5Y
ztnatI&QzNt;e?Fz9qEC&@*-d_f)td2a*$2OfJ*1WY+C~>A2b>P&tPd!N`_Lb!2vh~
zFTfFa2~NQoI0qL#XjDpOumVp?c~bUJLI}bTfhdTE1dtH2@Ij+eY6dIxr1VfqBFGYw
zLNZ7Wu~FJdD4__7ebA_sp2l+X7tWbK`>`8y!dqISZu8vKb=mIsAN>}X;`SF?TTIrL
zrKys-Nt?E|^zNN>mjr0uzfWXy`8j)l6Lvvw7rJL|=aPnlG&bJR^zrT#)Y%oEz9AQy
z?9NA@^O=P>p`(wfT7nHIqCYLT>v+Pi9~8*sf(vb0*I{rrr2iu(uhyB4`rYE;Zn>}B
VMQTo9u0W3#d;x&&PX$2-002Em%`^Z2

literal 0
HcmV?d00001

diff --git a/openair2/LAYER2/rlc_v2/tests/test49.h b/openair2/LAYER2/rlc_v2/tests/test49.h
new file mode 100644
index 0000000000..edeec27403
--- /dev/null
+++ b/openair2/LAYER2/rlc_v2/tests/test49.h
@@ -0,0 +1,27 @@
+/*
+ * rlc am test ack/nack reporting with segmented SDUs
+ *
+ * 5 SDUs put into 6 PDUs, all PDUs received expect the 3rd. Then
+ * retransmission happens with smaller PDU size.
+ */
+TIME, 1,
+    ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    UE_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
+    ENB_SDU, 0, 60,
+    ENB_SDU, 1, 160,
+    ENB_SDU, 2, 130,
+    ENB_SDU, 3, 120,
+    ENB_SDU, 4, 100,
+    ENB_PDU_SIZE, 100,
+    UE_PDU_SIZE, 1000,
+TIME, 3,
+    UE_RECV_FAILS, 1,
+TIME, 4,
+    UE_RECV_FAILS, 0,
+TIME, 7,
+    ENB_PDU_SIZE, 40,
+TIME, 42,
+    UE_RECV_FAILS, 1,
+TIME, 80,
+    UE_RECV_FAILS, 0,
+TIME, -1
diff --git a/openair2/LAYER2/rlc_v2/tests/test49.txt.gz b/openair2/LAYER2/rlc_v2/tests/test49.txt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..752a1aedd51defe7b9225848e6ff5bf45c7d1a7f
GIT binary patch
literal 895
zcmV-_1AzP=iwFo60m)wi19W9`bTm0Gba-?C?U>7MTtyIu_dLb7gbnJhzRwcHTQ+f4
z2t|EGm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O^4LNA~9$<6&sm@o68O$?K08+t)AT
VlV6xmeqlFX`~{-o;B)C5002XNs$u{D

literal 0
HcmV?d00001

diff --git a/openair2/LAYER2/rlc_v2/tests/test6.h b/openair2/LAYER2/rlc_v2/tests/test6.h
index 2115c8a328..f778749729 100644
--- a/openair2/LAYER2/rlc_v2/tests/test6.h
+++ b/openair2/LAYER2/rlc_v2/tests/test6.h
@@ -5,9 +5,6 @@
  *   [1..600] is received but ACK/NACK not
  *   eNB retx with still smaller PDUs [1..400] [401..600] [601..900]
  *   all is received, ACKs/NACKs go through
- *
- * this test will fail if NACK mechanism uses SOstart/SOend
- * (not implemented for the moment)
  */
 TIME, 1,
     ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
diff --git a/openair2/LAYER2/rlc_v2/tests/test6.txt.gz b/openair2/LAYER2/rlc_v2/tests/test6.txt.gz
index 54870821a619725938e1ea529ff533d748d9c7db..345c149eec772a1057e77089963bac98bd8bc13f 100644
GIT binary patch
literal 773
zcmV+g1N!_QiwFpqQ>|YD19W9`bT%$@cys{mnoExzH4ugO`4!(1HmLlz?-DUvHkqst
ziu@>}kwys3WrE<>bDJ<xM%*Aah>0kv)hpWz*LO~xZu|D;_3eq9Z@)g_PCV#*_x8LV
z`QmONU!FMM{iZaL6W<|%IK(3XiAX{+Qjm%?q$2~F$YrJ?8z(r2^SFSExP;5Nf~&ZO
z>$riNxP?>P#tYuzJwD(gKH)RI;48l2JAU9Ne&H3r2|{oLPY8raNQ6u%gi2_HP8ftq
zSOg_(q7WU?69X|46EPDDu@W1x69;h;7g33uBqT@jq(F+KM9QQ>s-#Bhq(PdbMN-lx
z3)zu9Iglecku$lFE4h(7d5|Z0k(InDLU9yN36w}lluRj<N@<i%8I(y`6s2scP#x7%
z12s|;HB$?<QX92X2X#^xRjK<@HkzY(TA)Q*qGej4Ra&EU+MrF^qFrjd=|XpOPY?7+
zPxMSL^h$5^P9OA1Uv#B!hA<q%GXf(r5+gGTqcR$!GX`Ta7DE}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&
zvoSk!Feh^{mAP5MaxBjZtjJ2N%qpzPYOKy0tjSs|Wo=YYhk7)i5lv`D3tG{Jc66W<
zU8tg)Eo{g3?7)uf#Ln!(uI$F{?7^Pw#a8w<{*8a*-}pEFjeq0+|K<PZSJz+k)?f5j
zz3ad0``_06r_$=rrS$~0h>gzFW$H5ijeq0c_&5HIf8+mIRM%K8cGvuH;Ch<A$Y+;L
z&<th<GyaW#<Nq7t|8Zl!yZY+F^pD>s<;(S2FWw!bp6}lux9SP$bG|HM7BO2f&#fe%
zBVWVC5XZ;J`wPKu@$xg)tF2d<^h|m$ivQ1L_%*RTDZ})X45!J^WN0!p8NMtTKA0_E
zejAjJK3w&mfu18{sj<}jcSjQsG!{E;u+&&;Ui4|hImAnEZ$9W9Z{NK8^aF(b|6s;4
zV;TR(zwvMU8~?_?@&9}p>r<b^<G)@~&%IXoqaQim&#A}bzQ4Ww^Rf2o`u^45*|Zby
H7CZm|ELM+i

diff --git a/openair2/LAYER2/rlc_v2/tests/test7.h b/openair2/LAYER2/rlc_v2/tests/test7.h
index 081227a400..83e9083b10 100644
--- a/openair2/LAYER2/rlc_v2/tests/test7.h
+++ b/openair2/LAYER2/rlc_v2/tests/test7.h
@@ -6,9 +6,6 @@
  *   eNB retx with still smaller PDUs [1..400] [401..600] [601..900]
  *   [401..600] received, ACK goes through
  *   link clean, all goes through
- *
- * this test will fail if NACK mechanism uses SOstart/SOend
- * (not implemented for the moment)
  */
 TIME, 1,
     ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
diff --git a/openair2/LAYER2/rlc_v2/tests/test7.txt.gz b/openair2/LAYER2/rlc_v2/tests/test7.txt.gz
index 9976a6050779805882bbefb2dab98fa27fd789bc..48148755dc87b70df54d4a863a5727283ae42afb 100644
GIT binary patch
literal 779
zcmV+m1N8hKiwFpcU#(vP19W9`bT=+^cys{mn>}lsM-)bT|B6$_O}O(tv!$`xG?uFn
z%zWH20uh2Xa)^JucjHJ{WL<{H@r7lpcdL7z=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.h
+++ b/openair2/LAYER2/rlc_v2/tests/test9.h
@@ -11,9 +11,6 @@
  * In the current RLC implementation, this is impossible. If we send [12..21]
  * it means [1..21] has been split and so we won't sent it later on.
  * Maybe with HARQ retransmissions in PHY/MAC in bad radio conditions?
- *
- * this test will fail if NACK mechanism uses SOstart/SOend
- * (not implemented for the moment)
  */
 TIME, 1,
     ENB_AM, 100000, 100000, 35, 0, 45, -1, -1, 4,
diff --git a/openair2/LAYER2/rlc_v2/tests/test9.txt.gz b/openair2/LAYER2/rlc_v2/tests/test9.txt.gz
index cc6d934e708e1ddad7286e7c3eec33cd23c91f94..d3803062aa9de8a7e8fa319d58248e6b06c89e99 100644
GIT binary patch
literal 324
zcmV-K0lWSmiwFomVXa>R19W9`bU7|`cys{0luJ*;Fc5_A{S|YB3!2S4Iilu@klLOQ
zs?yj&k-|f9Qv|=BIFL#a7NR2b;?sKOo87h7`D&dZzq!sJ8CqQ)wnlZhs1<mb!PM^>
zJ~P~b1O@a!9}K_{jKCO7z!WUN9aw_>MGaOELImPLd`JKZArT~oB#;zRKz5K4qV5;#
z3B-eb(rvNV+ZWZ11fC@*I6$0*BZ!?KUT8sdGJ^aSXX=?aJ;k@4)nJuy2=KcMY2em7
zIm1*nbgKqdRUK7#Cj?KUd4mi4jV(K~e}2U6ax(*=P#lW?wGEs6%h9!g<6GpU+ILSS
z8LK^edbC7wg{tZsIt}R0H-k^0UQg+!KIj&!<!1az&he2P{eNm-@IAi8Bwh;x)0L$*
Wrs|sJZA_un)#3v@!SqEg1pok{29+29

literal 327
zcmV-N0l5AjiwFpB!rxp119W9`bU7|`cys{0lub*+Kp2GY{S|Z6i_DwN_fgub2u)8S
zCE49dp?;8UD*EefQd0;l#cJ$*-<fB2XWwErFLKQ8ZgWVE+UniXnFd#D177EF>rV^C
z91kEt0RvEhAsB%%n1CsmfhAah8r%<Ba0MYmAOS={LP!LOAqgafWRMb4K{UiXPKp7<
zlYOyuxwXqT)AR&EOHi_dxClp>ctL`w1+i%l@>iUpXX^D7)q1WvtCU@UpJm8Gzuwsy
zhN_WYHEdPQQMEcFcovTvT)1znZrt|u8TZr02!ulMDE?O)7PD_hUjzHU$iZplf0eL5
z9Smm<p;UaLAo{lj5tWSI5K-g(jl+HI^^D!DceciSy66|(CHCCW|J3Vx;<uQ@d+FdB
Zt*vvbX0!R|Q&@8|`2vfGRlm&z0062KoVWl0

-- 
2.26.2