Make sure that the status report is sent in RLF and PDCP reestablishment triggered by Handover

master
Pedro Alvarez 4 years ago
parent 6a6bffcf5c
commit 6ecd6e273c

@ -40,6 +40,7 @@ public:
virtual void config_security(uint16_t rnti, uint32_t lcid, srslte::as_security_config_t sec_cfg) = 0; virtual void config_security(uint16_t rnti, uint32_t lcid, srslte::as_security_config_t sec_cfg) = 0;
virtual void enable_integrity(uint16_t rnti, uint32_t lcid) = 0; virtual void enable_integrity(uint16_t rnti, uint32_t lcid) = 0;
virtual void enable_encryption(uint16_t rnti, uint32_t lcid) = 0; virtual void enable_encryption(uint16_t rnti, uint32_t lcid) = 0;
virtual void send_status_report(uint16_t rnti) = 0;
virtual void send_status_report(uint16_t rnti, uint32_t lcid) = 0; virtual void send_status_report(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;

@ -267,6 +267,7 @@ public:
virtual void enable_integrity(uint32_t lcid, srslte::srslte_direction_t direction) = 0; virtual void enable_integrity(uint32_t lcid, srslte::srslte_direction_t direction) = 0;
virtual void enable_encryption(uint32_t lcid, virtual void enable_encryption(uint32_t lcid,
srslte::srslte_direction_t direction = srslte::srslte_direction_t::DIRECTION_TXRX) = 0; srslte::srslte_direction_t direction = srslte::srslte_direction_t::DIRECTION_TXRX) = 0;
virtual void send_status_report() = 0;
virtual void send_status_report(uint32_t lcid) = 0; virtual void send_status_report(uint32_t lcid) = 0;
}; };
// RRC NR interface for RRC (LTE) // RRC NR interface for RRC (LTE)

@ -49,6 +49,7 @@ public:
void enable_security_timed(uint32_t lcid, srslte_direction_t direction, uint32_t sn); void enable_security_timed(uint32_t lcid, srslte_direction_t direction, uint32_t sn);
bool get_bearer_state(uint32_t lcid, srslte::pdcp_lte_state_t* state); bool get_bearer_state(uint32_t lcid, srslte::pdcp_lte_state_t* state);
bool set_bearer_state(uint32_t lcid, const srslte::pdcp_lte_state_t& state); bool set_bearer_state(uint32_t lcid, const srslte::pdcp_lte_state_t& state);
void send_status_report() override;
void send_status_report(uint32_t lcid) override; void send_status_report(uint32_t lcid) override;
// RLC interface // RLC interface

@ -221,6 +221,13 @@ void pdcp::enable_security_timed(uint32_t lcid, srslte_direction_t direction, ui
} }
} }
void pdcp::send_status_report()
{
for (auto& lcid_it : pdcp_array) {
lcid_it.second->send_status_report();
}
}
void pdcp::send_status_report(uint32_t lcid) void pdcp::send_status_report(uint32_t lcid)
{ {
if (valid_lcid(lcid)) { if (valid_lcid(lcid)) {

@ -425,7 +425,12 @@ void pdcp_entity_lte::send_status_report()
{ {
// Check wether RLC AM is being used. // Check wether RLC AM is being used.
if (rlc->rb_is_um(lcid)) { if (rlc->rb_is_um(lcid)) {
logger.error("Trying to send PDCP Status Report and RLC is not AM"); logger.info("Trying to send PDCP Status Report and RLC is not AM");
return;
}
if (not cfg.status_report_required) {
logger.info("Trying to send PDCP Status Report and RLC is not AM");
return; return;
} }

@ -52,6 +52,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 send_status_report(uint16_t rnti) override;
void send_status_report(uint16_t rnti, uint32_t lcid) override; void send_status_report(uint16_t rnti, uint32_t lcid) override;
void reestablish(uint16_t rnti) override; void reestablish(uint16_t rnti) override;

@ -991,6 +991,9 @@ void rrc::ue::rrc_mobility::handle_crnti_ce(intraenb_ho_st& s, const user_crnti_
rrc_ue->ue_security_cfg.regenerate_keys_handover(s.target_cell->cell_cfg.pci, s.target_cell->cell_cfg.dl_earfcn); rrc_ue->ue_security_cfg.regenerate_keys_handover(s.target_cell->cell_cfg.pci, s.target_cell->cell_cfg.dl_earfcn);
rrc_ue->apply_pdcp_srb_updates(rrc_ue->current_ue_cfg.rr_cfg); rrc_ue->apply_pdcp_srb_updates(rrc_ue->current_ue_cfg.rr_cfg);
rrc_ue->apply_pdcp_drb_updates(rrc_ue->current_ue_cfg.rr_cfg); rrc_ue->apply_pdcp_drb_updates(rrc_ue->current_ue_cfg.rr_cfg);
// Send PDCP status report if necessary
rrc_enb->pdcp->send_status_report(rrc_ue->rnti);
} else { } else {
logger.info("Received duplicate C-RNTI CE during rnti=0x%x handover.", rrc_ue->rnti); logger.info("Received duplicate C-RNTI CE during rnti=0x%x handover.", rrc_ue->rnti);
} }

@ -135,6 +135,14 @@ void pdcp::reestablish(uint16_t rnti)
users[rnti].pdcp->reestablish(); users[rnti].pdcp->reestablish();
} }
void pdcp::send_status_report(uint16_t rnti)
{
if (users.count(rnti) == 0) {
return;
}
users[rnti].pdcp->send_status_report();
}
void pdcp::notify_delivery(uint16_t rnti, uint32_t lcid, const std::vector<uint32_t>& pdcp_sns) void pdcp::notify_delivery(uint16_t rnti, uint32_t lcid, const std::vector<uint32_t>& pdcp_sns)
{ {
if (users.count(rnti)) { if (users.count(rnti)) {

@ -76,6 +76,7 @@ public:
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 {} void reestablish(uint16_t rnti) override {}
void send_status_report(uint16_t rnti) override {}
void send_status_report(uint16_t rnti, uint32_t lcid) override {} void send_status_report(uint16_t rnti, uint32_t lcid) override {}
std::map<uint32_t, srslte::unique_byte_buffer_t> get_buffered_pdus(uint16_t rnti, uint32_t lcid) override std::map<uint32_t, srslte::unique_byte_buffer_t> get_buffered_pdus(uint16_t rnti, uint32_t lcid) override
{ {

@ -47,6 +47,7 @@ public:
{ {
return std::move(buffered_pdus); return std::move(buffered_pdus);
} }
void send_status_report(uint16_t rnti) override {}
void send_status_report(uint16_t rnti, uint32_t lcid) override {} void send_status_report(uint16_t rnti, uint32_t lcid) override {}
void push_buffered_pdu(uint32_t sn, srslte::unique_byte_buffer_t pdu) { buffered_pdus[sn] = std::move(pdu); } void push_buffered_pdu(uint32_t sn, srslte::unique_byte_buffer_t pdu) { buffered_pdus[sn] = std::move(pdu); }

@ -959,6 +959,7 @@ srslte::proc_outcome_t rrc::connection_reconf_no_ho_proc::init(const asn1::rrc::
if (rrc_ptr->rlc->has_bearer(i)) { if (rrc_ptr->rlc->has_bearer(i)) {
rrc_ptr->rlc->reestablish(i); rrc_ptr->rlc->reestablish(i);
rrc_ptr->pdcp->reestablish(i); rrc_ptr->pdcp->reestablish(i);
rrc_ptr->pdcp->send_status_report(i);
} }
} }
} }
@ -1686,6 +1687,9 @@ srslte::proc_outcome_t rrc::ho_proc::init(const asn1::rrc::rrc_conn_recfg_s& rrc
// SCell addition/removal can take some time to compute. Enqueue in a background task and do it in the end. // SCell addition/removal can take some time to compute. Enqueue in a background task and do it in the end.
rrc_ptr->apply_scell_config(&recfg_r8, false); rrc_ptr->apply_scell_config(&recfg_r8, false);
// Send PDCP status report if configured
rrc_ptr->pdcp->send_status_report();
Info("Finished HO configuration. Waiting PHY to synchronize with target cell"); Info("Finished HO configuration. Waiting PHY to synchronize with target cell");
return proc_outcome_t::yield; return proc_outcome_t::yield;

Loading…
Cancel
Save