PDCP status report: Fix issue in keeping track of Rx'ed COUNTs after eNB reestablishment. Fixed issue in logic that limits the size of the rx_counts info vector.

master
Pedro Alvarez 4 years ago
parent d2ef541957
commit f02694dd3e

@ -115,8 +115,8 @@ public:
virtual void notify_delivery(const pdcp_sn_vector_t& pdcp_sns) = 0; virtual void notify_delivery(const pdcp_sn_vector_t& pdcp_sns) = 0;
virtual void notify_failure(const pdcp_sn_vector_t& pdcp_sns) = 0; virtual void notify_failure(const pdcp_sn_vector_t& pdcp_sns) = 0;
virtual void get_bearer_state(pdcp_lte_state_t* state) = 0; virtual void get_bearer_state(pdcp_lte_state_t* state) = 0;
virtual void set_bearer_state(const pdcp_lte_state_t& state) = 0; virtual void set_bearer_state(const pdcp_lte_state_t& state, bool set_fmc) = 0;
virtual std::map<uint32_t, srslte::unique_byte_buffer_t> get_buffered_pdus() = 0; virtual std::map<uint32_t, srslte::unique_byte_buffer_t> get_buffered_pdus() = 0;

@ -137,7 +137,7 @@ public:
// Internal state getters/setters // Internal state getters/setters
void get_bearer_state(pdcp_lte_state_t* state) override; void get_bearer_state(pdcp_lte_state_t* state) override;
void set_bearer_state(const pdcp_lte_state_t& state) override; void set_bearer_state(const pdcp_lte_state_t& state, bool set_fmc) override;
// Metrics helpers // Metrics helpers
pdcp_bearer_metrics_t get_metrics() override; pdcp_bearer_metrics_t get_metrics() override;

@ -60,7 +60,7 @@ public:
void set_rx_reord(uint32_t rx_reord_) { rx_reord = rx_reord_; } void set_rx_reord(uint32_t rx_reord_) { rx_reord = rx_reord_; }
void get_bearer_state(pdcp_lte_state_t* state) override; void get_bearer_state(pdcp_lte_state_t* state) override;
void set_bearer_state(const pdcp_lte_state_t& state) override; void set_bearer_state(const pdcp_lte_state_t& state, bool set_fmc) override;
void send_status_report() override {} void send_status_report() override {}
pdcp_bearer_metrics_t get_metrics() override; pdcp_bearer_metrics_t get_metrics() override;

@ -237,7 +237,7 @@ bool pdcp::set_bearer_state(uint32_t lcid, const srslte::pdcp_lte_state_t& state
if (not valid_lcid(lcid)) { if (not valid_lcid(lcid)) {
return false; return false;
} }
pdcp_array[lcid]->set_bearer_state(state); pdcp_array[lcid]->set_bearer_state(state, true);
return true; return true;
} }

@ -414,7 +414,9 @@ void pdcp_entity_lte::handle_am_drb_pdu(srslte::unique_byte_buffer_t pdu)
void pdcp_entity_lte::update_rx_counts_queue(uint32_t rx_count) void pdcp_entity_lte::update_rx_counts_queue(uint32_t rx_count)
{ {
std::sort(rx_counts_info.begin(), rx_counts_info.end(), std::greater<uint32_t>()); if (rx_count < fmc) {
return;
}
// Update largest RX_COUNT // Update largest RX_COUNT
if (rx_count > largest_rx_count) { if (rx_count > largest_rx_count) {
@ -431,16 +433,35 @@ void pdcp_entity_lte::update_rx_counts_queue(uint32_t rx_count)
} }
} else { } else {
rx_counts_info.push_back(rx_count); rx_counts_info.push_back(rx_count);
std::sort(rx_counts_info.begin(), rx_counts_info.end(), std::greater<uint32_t>());
} }
// If the size of the rx_vector_info is getting very large // If the size of the rx_vector_info is getting very large
// Consider the FMC as lost and update the vector. // Consider the FMC as lost and update the vector.
if (rx_counts_info.size() > reordering_window) { if (rx_counts_info.size() > reordering_window) {
fmc++; logger.debug("Queue too large. Updating. Old FMC=%d, Old back=%d, old queue_size=%d",
fmc,
rx_counts_info.back(),
rx_counts_info.size());
fmc = rx_counts_info.back();
while (not rx_counts_info.empty() && rx_counts_info.back() == fmc) { while (not rx_counts_info.empty() && rx_counts_info.back() == fmc) {
rx_counts_info.pop_back(); rx_counts_info.pop_back();
fmc++; fmc++;
} }
logger.debug("Queue too large. Updating. New FMC=%d, new back=%d, new queue_size=%d",
fmc,
rx_counts_info.back(),
rx_counts_info.size());
}
if (rx_counts_info.empty()) {
logger.info("Updated RX_COUNT info with SDU COUNT=%d, queue_size=%d, FMC=%d", rx_count, rx_counts_info.size(), fmc);
} else {
logger.info("Updated RX_COUNT info with SDU COUNT=%d, queue_size=%d, FMC=%d, back=%d",
rx_count,
rx_counts_info.size(),
fmc,
rx_counts_info.back());
} }
} }
/**************************************************************************** /****************************************************************************
@ -765,9 +786,12 @@ void pdcp_entity_lte::get_bearer_state(pdcp_lte_state_t* state)
*state = st; *state = st;
} }
void pdcp_entity_lte::set_bearer_state(const pdcp_lte_state_t& state) void pdcp_entity_lte::set_bearer_state(const pdcp_lte_state_t& state, bool set_fmc)
{ {
st = state; st = state;
if (set_fmc) {
fmc = COUNT(st.rx_hfn, st.last_submitted_pdcp_rx_sn);
}
} }
std::map<uint32_t, srslte::unique_byte_buffer_t> pdcp_entity_lte::get_buffered_pdus() std::map<uint32_t, srslte::unique_byte_buffer_t> pdcp_entity_lte::get_buffered_pdus()

@ -286,7 +286,7 @@ void pdcp_entity_nr::get_bearer_state(pdcp_lte_state_t* state)
// TODO // TODO
} }
void pdcp_entity_nr::set_bearer_state(const pdcp_lte_state_t& state) void pdcp_entity_nr::set_bearer_state(const pdcp_lte_state_t& state, bool set_fmc)
{ {
// TODO // TODO
} }

@ -67,7 +67,7 @@ public:
pdcp.enable_encryption(srslte::DIRECTION_TXRX); pdcp.enable_encryption(srslte::DIRECTION_TXRX);
} }
void set_pdcp_initial_state(const srslte::pdcp_lte_state_t& init_state) { pdcp.set_bearer_state(init_state); } void set_pdcp_initial_state(const srslte::pdcp_lte_state_t& init_state) { pdcp.set_bearer_state(init_state, false); }
rlc_dummy rlc; rlc_dummy rlc;
rrc_dummy rrc; rrc_dummy rrc;

Loading…
Cancel
Save