pdcp,rlc: increase number of PDCP SDUs for notification from RLC

the current value of 256 limits the number of PDCP SDUs that can be
notified from RLC. The limit is quickly hit when too many SDUs
are in flight. This can cause unwanted log entries and weird PDCP
behaviour.

the patch increases the value to 1024, which still can be too few if
many smaller SDUs are traveling.

The patch also set the log level to warning to quicker spot
misconfigs in logs.

Fixes #2616
master
Andre Puschmann 4 years ago
parent 2f8ea05132
commit 48537f3fe7

@ -170,8 +170,9 @@ struct pdcp_lte_state_t {
}; };
// Custom type for interface between PDCP and RLC to convey SDU delivery status // Custom type for interface between PDCP and RLC to convey SDU delivery status
#define MAX_SDUS_PER_RLC_PDU (256) // default to RLC SDU queue length // Arbitrarily chosen limit, optimal value depends on the RLC (pollPDU) and PDCP config, channel BLER,
#define MAX_SDUS_TO_NOTIFY (MAX_SDUS_PER_RLC_PDU) // Arbitrarily chosen limit // traffic characterisitcs, etc. The chosen value has been tested with 100 PRB bi-dir TCP
#define MAX_SDUS_TO_NOTIFY (1024)
typedef srsran::bounded_vector<uint32_t, MAX_SDUS_TO_NOTIFY> pdcp_sn_vector_t; typedef srsran::bounded_vector<uint32_t, MAX_SDUS_TO_NOTIFY> pdcp_sn_vector_t;
} // namespace srsran } // namespace srsran

@ -83,7 +83,7 @@ private:
uint32_t count = 0; uint32_t count = 0;
uint32_t bytes = 0; uint32_t bytes = 0;
uint32_t fms = 0; uint32_t fms = 0; // SN of the first missing PDCP SDU
uint32_t lms = 0; uint32_t lms = 0;
srsran::circular_array<sdu_data, capacity> sdus; srsran::circular_array<sdu_data, capacity> sdus;
}; };

@ -345,6 +345,9 @@ private:
// Mutexes // Mutexes
std::mutex mutex; std::mutex mutex;
// default to RLC SDU queue length
const uint32_t MAX_SDUS_PER_RLC_PDU = RLC_TX_QUEUE_LEN;
}; };
// Receiver sub-class // Receiver sub-class

@ -148,7 +148,7 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, int upper_sn)
if (!rlc->rb_is_um(lcid) and is_drb()) { if (!rlc->rb_is_um(lcid) and is_drb()) {
if (not store_sdu(used_sn, sdu)) { if (not store_sdu(used_sn, sdu)) {
// Could not store the SDU, discarding // Could not store the SDU, discarding
logger.info("Could not store SDU. Discarding %d\n", used_sn); logger.warning("Could not store SDU. Discarding SN=%d", used_sn);
return; return;
} }
} }
@ -688,7 +688,7 @@ bool pdcp_entity_lte::store_sdu(uint32_t sn, const unique_byte_buffer_t& sdu)
// Discard Timer Callback (discardTimer) // Discard Timer Callback (discardTimer)
void pdcp_entity_lte::discard_callback::operator()(uint32_t timer_id) void pdcp_entity_lte::discard_callback::operator()(uint32_t timer_id)
{ {
parent->logger.debug("Discard timer expired for PDU with SN = %d", discard_sn); parent->logger.info("Discard timer for SN=%d expired", discard_sn);
// Notify the RLC of the discard. It's the RLC to actually discard, if no segment was transmitted yet. // Notify the RLC of the discard. It's the RLC to actually discard, if no segment was transmitted yet.
parent->rlc->discard_sdu(parent->lcid, discard_sn); parent->rlc->discard_sdu(parent->lcid, discard_sn);

Loading…
Cancel
Save