ue,stack: clear all EPS bearers when going RRC idle

the EPS bearer manager was only informed when a single DRB
was removed but not when entering idle which requires to
remove all bearers.

This cause the service request to fail.
master
Andre Puschmann 4 years ago
parent e20934583e
commit 368c7b9e4f

@ -31,6 +31,7 @@ public:
virtual srsran::tti_point get_current_tti() = 0;
virtual void add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t rat, uint32_t lcid) = 0;
virtual void remove_eps_bearer(uint8_t eps_bearer_id) = 0;
virtual void reset_eps_bearers() = 0;
};
// Combined interface for PHY to access stack (MAC and RRC)

@ -45,9 +45,12 @@ public:
/// Registers EPS bearer with PDCP RAT type and LCID
void add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t rat, uint32_t lcid);
/// EPS bearer is removed from map when the associated DRB is deleted (e.g. after connection release)
/// Single EPS bearer is removed from map when the associated DRB is deleted
void remove_eps_bearer(uint8_t eps_bearer_id);
/// All registered bearer are removed (e.g. after connection release)
void reset();
// GW interface
bool has_active_radio_bearer(uint32_t eps_bearer_id);

@ -167,6 +167,7 @@ public:
tti_point get_current_tti() final { return current_tti; }
void add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t rat, uint32_t lcid) final;
void remove_eps_bearer(uint8_t eps_bearer_id) final;
void reset_eps_bearers() final;
srsran::ext_task_sched_handle get_task_sched() { return {&task_sched}; }

@ -106,9 +106,10 @@ public:
bool has_active_radio_bearer(uint32_t eps_bearer_id) final { return true; /* TODO: add EPS to LCID mapping */ }
// Interface for RRC
srsran::tti_point get_current_tti() { return srsran::tti_point{0}; };
void add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t rat, uint32_t lcid) final{};
void remove_eps_bearer(uint8_t eps_bearer_id) final{};
srsran::tti_point get_current_tti() { return srsran::tti_point{0}; }
void add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t rat, uint32_t lcid) final {}
void remove_eps_bearer(uint8_t eps_bearer_id) final {}
void reset_eps_bearers() final {}
private:
void run_thread() final;

@ -36,7 +36,6 @@ void bearer_manager::add_eps_bearer(uint8_t eps_bearer_id, srsran::srsran_rat_t
logger.info("Registered EPS bearer ID %d for lcid=%d over %s-PDCP", eps_bearer_id, lcid, to_string(rat).c_str());
}
/// EPS bearer is removed from map when the associated DRB is deleted (e.g. after connection release)
void bearer_manager::remove_eps_bearer(uint8_t eps_bearer_id)
{
srsran::rwlock_write_guard rw_lock(rwlock);
@ -49,6 +48,13 @@ void bearer_manager::remove_eps_bearer(uint8_t eps_bearer_id)
logger.info("Removed mapping for EPS bearer ID %d", eps_bearer_id);
}
void bearer_manager::reset()
{
srsran::rwlock_write_guard rw_lock(rwlock);
eps_rb_map.clear();
logger.info("Reset EPS bearer manager");
}
// GW interface
bool bearer_manager::has_active_radio_bearer(uint32_t eps_bearer_id)
{

@ -1120,6 +1120,7 @@ void rrc::leave_connected()
rlc->reset();
pdcp->reset();
set_mac_default();
stack->reset_eps_bearers();
// 1> indicate the release of the RRC connection to upper layers together with the release cause;
nas->left_rrc_connected();

@ -391,6 +391,11 @@ bool ue_stack_lte::has_active_radio_bearer(uint32_t eps_bearer_id)
return bearers.has_active_radio_bearer(eps_bearer_id);
}
void ue_stack_lte::reset_eps_bearers()
{
bearers.reset();
}
/**
* Check whether nas is attached
* @return bool wether NAS is in EMM_REGISTERED

Loading…
Cancel
Save