From d4d656cc71a66cd51b770485719626f6eceef0e7 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Tue, 12 Jul 2016 17:31:58 +0200 Subject: [PATCH] DO NOT MERGE THIS ONE!! This commit drops RLC UM packets if the buffer occupancy is higher than 16MB. Let's say your UE can go up to 16Mb/s. If you do UDP iperf with let's say 40Mb/s very quickly the buffer occupancy will reach the 16Mb limit and following packets will get dropped. Then something goes wrong. I don't know what. Just that iperf reports very low throughput (I've seen down to 11 kb/s). Stopping iperf, waiting for buffer to be empty and starting again at let's say 10Mb/s does not provide 10Mb/s immediately, but eventually it does, as if the RLC UM "goes back to normal". So I don't know if it's a correct solution. conclusion: DO NOT MERGE!! Let's say it's work in progress, open for comments and suggestions. --- openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c index 7b0c9890e..7739e37bd 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c @@ -687,6 +687,14 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t char message_string[7000]; #endif + /* put a hard limit of 16MB */ + if (rlc_p->buffer_occupancy > 16 * 1024 * 1024) { + free_mem_block(sdu_pP); + LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" buffer full, dropping incoming data\n", + PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p)); + return; + } + LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" RLC_UM_DATA_REQ size %d Bytes, BO %d , NB SDU %d\n", PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p), ((struct rlc_um_data_req *) (sdu_pP->data))->data_size, -- GitLab