handle rrc configs with pdcp with sn=15 or 18 bits

This commit is contained in:
Francisco 2021-02-16 20:17:43 +00:00 committed by Francisco Paisana
parent faf2adde90
commit 6a178693a8
3 changed files with 11 additions and 2 deletions

View File

@ -30,6 +30,7 @@ namespace srslte {
// LTE and NR common config
const uint8_t PDCP_SN_LEN_5 = 5;
const uint8_t PDCP_SN_LEN_7 = 7;
const uint8_t PDCP_SN_LEN_15 = 15;
const uint8_t PDCP_SN_LEN_12 = 12;
const uint8_t PDCP_SN_LEN_18 = 18;

View File

@ -232,6 +232,14 @@ uint8_t get_pdcp_drb_sn_len(const pdcp_cfg_s& pdcp_cfg)
sn_len = srslte::PDCP_SN_LEN_7;
}
}
if (pdcp_cfg.ext) {
if (pdcp_cfg.pdcp_sn_size_v1130_present) {
sn_len = srslte::PDCP_SN_LEN_15;
}
if (pdcp_cfg.pdcp_sn_size_v1310_present) {
sn_len = srslte::PDCP_SN_LEN_18;
}
}
return sn_len;
}

View File

@ -84,7 +84,7 @@ void pdcp_entity_lte::reestablish()
} else {
// Send status report if required on reestablishment in RLC AM
send_status_report();
// Re-transmit unacknwoledged SDUs
// Re-transmit unacknowledged SDUs
std::map<uint32_t, unique_byte_buffer_t> undelivered_sdus = std::move(undelivered_sdus_queue);
undelivered_sdus_queue.clear();
for (std::map<uint32_t, unique_byte_buffer_t>::iterator it = undelivered_sdus.begin(); it != undelivered_sdus.end();
@ -126,7 +126,7 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, int upper_sn)
// PDUs will be removed from the queue, either when the lower layers will report
// a succesfull transmission or when the discard timer expires.
// Status report will also use this queue, to know the First Missing SDU (FMS).
if (is_drb() && !rlc->rb_is_um(lcid)) {
if (!rlc->rb_is_um(lcid)) {
store_sdu(used_sn, sdu);
}