set last_submitted_pdcp_rx_sn to -1 of the next ul rx sn

master
Francisco 4 years ago committed by Francisco Paisana
parent c0eb088958
commit faf2adde90

@ -75,7 +75,6 @@ struct ue_eutra_cap_s;
* Conversion Helpers
***********************/
namespace srslte {
plmn_id_t make_plmn_id_t(const asn1::rrc::plmn_id_s& asn1_type);
void to_asn1(asn1::rrc::plmn_id_s* asn1_type, const plmn_id_t& cfg);
plmn_id_t make_plmn_id_t(const asn1::fixed_octstring<3, true>& asn1_type);
@ -96,6 +95,7 @@ void to_asn1(asn1::rrc::rlc_cfg_c* asn1_type, const rlc_config_t& cfg);
**************************/
srslte::pdcp_config_t make_srb_pdcp_config_t(const uint8_t bearer_id, bool is_ue);
srslte::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue);
uint8_t get_pdcp_drb_sn_len(const asn1::rrc::pdcp_cfg_s& pdcp_cfg);
srslte::pdcp_config_t
make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue, const asn1::rrc::pdcp_cfg_s& pdcp_cfg);

@ -224,6 +224,17 @@ srslte::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue
return cfg;
}
uint8_t get_pdcp_drb_sn_len(const pdcp_cfg_s& pdcp_cfg)
{
uint8_t sn_len = srslte::PDCP_SN_LEN_12;
if (pdcp_cfg.rlc_um_present) {
if (pdcp_cfg.rlc_um.pdcp_sn_size.value == pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::len7bits) {
sn_len = srslte::PDCP_SN_LEN_7;
}
}
return sn_len;
}
srslte::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue, const asn1::rrc::pdcp_cfg_s& pdcp_cfg)
{
// TODO: complete config processing
@ -250,12 +261,7 @@ srslte::pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue
}
}
uint8_t sn_len = srslte::PDCP_SN_LEN_12;
if (pdcp_cfg.rlc_um_present) {
if (pdcp_cfg.rlc_um.pdcp_sn_size.value == pdcp_cfg_s::rlc_um_s_::pdcp_sn_size_e_::len7bits) {
sn_len = srslte::PDCP_SN_LEN_7;
}
}
uint8_t sn_len = get_pdcp_drb_sn_len(pdcp_cfg);
bool status_report_required = false;
if (pdcp_cfg.rlc_am_present) {

@ -887,7 +887,9 @@ void rrc::ue::rrc_mobility::handle_status_transfer(s1_target_ho_st& s, const sta
drb_state.next_pdcp_tx_sn = erab_item.dl_coun_tvalue.pdcp_sn;
drb_state.rx_hfn = erab_item.ul_coun_tvalue.hfn;
drb_state.next_pdcp_rx_sn = erab_item.ul_coun_tvalue.pdcp_sn;
drb_state.last_submitted_pdcp_rx_sn = erab_item.ul_coun_tvalue.pdcp_sn;
uint8_t sn_len = srslte::get_pdcp_drb_sn_len(drb_it->pdcp_cfg);
uint32_t maximum_pdcp_sn = (1u << sn_len) - 1u;
drb_state.last_submitted_pdcp_rx_sn = std::max(erab_item.ul_coun_tvalue.pdcp_sn - 1u, maximum_pdcp_sn);
logger.info("Setting lcid=%d PDCP state to {Tx SN: %d, Rx SN: %d}",
drb_it->lc_ch_id,
drb_state.next_pdcp_tx_sn,

Loading…
Cancel
Save