reestablish pdcp bearers is required in case of AM bearers

master
Francisco Paisana 4 years ago
parent 079ae70e64
commit 137e554eb3

@ -373,6 +373,7 @@ public:
virtual void enable_encryption(uint16_t rnti, uint32_t lcid) = 0; virtual void enable_encryption(uint16_t rnti, uint32_t lcid) = 0;
virtual bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) = 0; virtual bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) = 0;
virtual bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) = 0; virtual bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) = 0;
virtual void reestablish(uint16_t rnti) = 0;
}; };
// PDCP interface for RLC // PDCP interface for RLC

@ -54,6 +54,7 @@ public:
void enable_encryption(uint16_t rnti, uint32_t lcid) override; void enable_encryption(uint16_t rnti, uint32_t lcid) override;
bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) override; bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) override;
bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) override; bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) override;
void reestablish(uint16_t rnti) override;
private: private:
class user_interface_rlc : public srsue::rlc_interface_pdcp class user_interface_rlc : public srsue::rlc_interface_pdcp

@ -1314,7 +1314,6 @@ void rrc::ue::rrc_mobility::intraenb_ho_st::enter(rrc_mobility* f, const ho_meas
/* Freeze all DRBs. SRBs DL are needed for sending the HO Cmd */ /* Freeze all DRBs. SRBs DL are needed for sending the HO Cmd */
for (const drb_to_add_mod_s& drb : f->rrc_ue->bearer_list.get_established_drbs()) { for (const drb_to_add_mod_s& drb : f->rrc_ue->bearer_list.get_established_drbs()) {
f->rrc_enb->pdcp->del_bearer(f->rrc_ue->rnti, drb.drb_id + 2);
f->rrc_enb->mac->bearer_ue_rem(f->rrc_ue->rnti, drb.drb_id + 2); f->rrc_enb->mac->bearer_ue_rem(f->rrc_ue->rnti, drb.drb_id + 2);
} }
sched_interface::ue_bearer_cfg_t bcfg = {}; sched_interface::ue_bearer_cfg_t bcfg = {};
@ -1342,8 +1341,7 @@ void rrc::ue::rrc_mobility::handle_crnti_ce(intraenb_ho_st& s, const user_crnti_
if (is_first_crnti_ce) { if (is_first_crnti_ce) {
// Need to reset SNs of bearers. // Need to reset SNs of bearers.
rrc_enb->pdcp->rem_user(rrc_ue->rnti); rrc_enb->pdcp->reestablish(rrc_ue->rnti);
rrc_enb->pdcp->add_user(rrc_ue->rnti);
rrc_enb->rlc->reestablish(rrc_ue->rnti); rrc_enb->rlc->reestablish(rrc_ue->rnti);
// Change PCell in MAC/Scheduler // Change PCell in MAC/Scheduler

@ -135,6 +135,14 @@ bool pdcp::set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte
return users[rnti].pdcp->set_bearer_state(lcid, state); return users[rnti].pdcp->set_bearer_state(lcid, state);
} }
void pdcp::reestablish(uint16_t rnti)
{
if (users.count(rnti) == 0) {
return;
}
users[rnti].pdcp->reestablish();
}
void pdcp::write_pdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu) void pdcp::write_pdu(uint16_t rnti, uint32_t lcid, srslte::unique_byte_buffer_t sdu)
{ {
if (users.count(rnti)) { if (users.count(rnti)) {

@ -74,6 +74,7 @@ public:
void enable_encryption(uint16_t rnti, uint32_t lcid) override {} void enable_encryption(uint16_t rnti, uint32_t lcid) override {}
bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) override { return true; } bool get_bearer_state(uint16_t rnti, uint32_t lcid, srslte::pdcp_lte_state_t* state) override { return true; }
bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) override { return true; } bool set_bearer_state(uint16_t rnti, uint32_t lcid, const srslte::pdcp_lte_state_t& state) override { return true; }
void reestablish(uint16_t rnti) override {}
}; };
class s1ap_dummy : public s1ap_interface_rrc class s1ap_dummy : public s1ap_interface_rrc

Loading…
Cancel
Save