From fbcc9a239328bf4383a0a4cf493747a3cca05d32 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Apr 2017 17:30:43 +0200 Subject: [PATCH 1/3] minor: bad comparison it was: *num_li_pP >= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU it should be: *num_li_pP > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU --- openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c index 4255464e3a..c00e87c4e0 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c @@ -183,7 +183,7 @@ int rlc_um_read_length_indicators(unsigned char**data_ppP, rlc_um_e_li_t* e_liP, // AssertFatal(*data_size_pP >= 0, "Invalid data_size!"); } - if (*num_li_pP >= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) { + if (*num_li_pP > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) { return -1; } } From 94f880ad23c8ac7e6650226fdf22088d7ffb18d8 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 10 Apr 2017 17:31:21 +0200 Subject: [PATCH 2/3] bugfix: increase RLC UM header size The constant RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU is set to 24. This is too low. Running a downlink TCP iperf with a 10MHz or 20MHz cell leads to lots of the following warning in the log: [RLC][W][SN 792] Bad RLC header! Discard this RLC PDU (size=618) The problem is that the uplink RLC PDU contains a lot of TCP ack. We can see much more than 24 of them. The RLC layer is not happy and discards the PDU. Putting 256 for RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU (arbitrarily chosen, big but not too big) solves the problem, at least for 10MHz. --- openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h index 2d0a875edb..acd94fa205 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h @@ -53,7 +53,7 @@ // UM_Window_Size = 512 when a 10 bit SN is configured and UM_Window_Size = 0 // when the receiving UM RLC entity is configured for MCCH or MTCH. // li field (values shifted 1 bit left) -# define RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU 24 +# define RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU 256 //---------------------------------------------------------- // Events defined for state model of the acknowledged mode entity /** Internal event defined for state model of the RLC UM. */ From 965aa5e6ef80177f94eb15c3f86be16cb0639f09 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 11 Apr 2017 09:32:14 +0200 Subject: [PATCH 3/3] change value of RLC_AM_MAX_SDU_IN_PDU and RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU Fabrice Nabet (TCL) suggests the value 128 for both. See https://gitlab.eurecom.fr/oai/openairinterface5g/issues/234#note_3179 --- openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h | 2 +- openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h index 69429b84b8..12af0279a8 100644 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h @@ -63,7 +63,7 @@ # define RLC_AM_MIN_SEGMENT_SIZE_REQUEST 8 /** Max SDUs that can fit in a PDU. */ -# define RLC_AM_MAX_SDU_IN_PDU 32 +# define RLC_AM_MAX_SDU_IN_PDU 128 /** Max fragments for a SDU. */ # define RLC_AM_MAX_SDU_FRAGMENTS 32 diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h index acd94fa205..34d97de59d 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h @@ -53,7 +53,7 @@ // UM_Window_Size = 512 when a 10 bit SN is configured and UM_Window_Size = 0 // when the receiving UM RLC entity is configured for MCCH or MTCH. // li field (values shifted 1 bit left) -# define RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU 256 +# define RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU 128 //---------------------------------------------------------- // Events defined for state model of the acknowledged mode entity /** Internal event defined for state model of the RLC UM. */