limit the rlc queue size for suspended bearers

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent 4fc243ae4b
commit 597334c4bf

@ -23,6 +23,7 @@
#define SRSLTE_RLC_COMMON_H #define SRSLTE_RLC_COMMON_H
#include "srslte/common/block_queue.h" #include "srslte/common/block_queue.h"
#include "srslte/common/logmap.h"
#include "srslte/upper/rlc_metrics.h" #include "srslte/upper/rlc_metrics.h"
#include <stdlib.h> #include <stdlib.h>
@ -297,7 +298,7 @@ private:
// Do not block ever // Do not block ever
if (!rx_pdu_resume_queue.try_push(p)) { if (!rx_pdu_resume_queue.try_push(p)) {
fprintf(stderr, "Error dropping PDUs while bearer suspended. Queue should be unbounded\n"); srslte::logmap::get("RLC ")->warning("Dropping SDUs while bearer suspended.\n");
return; return;
} }
} }
@ -307,7 +308,7 @@ private:
{ {
// Do not block ever // Do not block ever
if (!tx_sdu_resume_queue.try_push(std::move(sdu)).first) { if (!tx_sdu_resume_queue.try_push(std::move(sdu)).first) {
fprintf(stderr, "Error dropping SDUs while bearer suspended. Queue should be unbounded\n"); srslte::logmap::get("RLC ")->warning("Dropping SDUs while bearer suspended.\n");
return; return;
} }
} }
@ -318,7 +319,7 @@ private:
} pdu_t; } pdu_t;
block_queue<pdu_t> rx_pdu_resume_queue; block_queue<pdu_t> rx_pdu_resume_queue;
block_queue<unique_byte_buffer_t> tx_sdu_resume_queue; block_queue<unique_byte_buffer_t> tx_sdu_resume_queue{256};
}; };
} // namespace srslte } // namespace srslte

@ -43,7 +43,7 @@ ue_stack_lte::ue_stack_lte() :
pdcp(&timers, &pdcp_log), pdcp(&timers, &pdcp_log),
nas(&timers), nas(&timers),
thread("STACK"), thread("STACK"),
pending_tasks(1024), pending_tasks(512),
background_tasks(2) background_tasks(2)
{ {
ue_queue_id = pending_tasks.add_queue(); ue_queue_id = pending_tasks.add_queue();

Loading…
Cancel
Save