enb: signal user activity to EUTRA RRC when doing NR DL traffic

to avoid releasing the UE when only NR DL traffic is done.
similar to the EUTRA solution.
master
Andre Puschmann 3 years ago
parent 8b2514ded3
commit 315057d11c

@ -81,6 +81,13 @@ public:
* @param nr_rnti The RNTI that has been assigned to the UE on the SgNB * @param nr_rnti The RNTI that has been assigned to the UE on the SgNB
*/ */
virtual void sgnb_addition_complete(uint16_t eutra_rnti, uint16_t nr_rnti) = 0; virtual void sgnb_addition_complete(uint16_t eutra_rnti, uint16_t nr_rnti) = 0;
/**
* @brief Signal user activity (i.e. DL/UL traffic) for given RNTI
*
* @param eutra_rnti The RNTI that the EUTRA RRC uses
*/
virtual void set_activity_user(uint16_t eutra_rnti) = 0;
}; };
class stack_nr_interface_stack_eutra class stack_nr_interface_stack_eutra

@ -136,6 +136,7 @@ public:
/// User management /// User management
virtual int add_user(uint16_t rnti) = 0; virtual int add_user(uint16_t rnti) = 0;
virtual int update_user(uint16_t new_rnti, uint16_t old_rnti) = 0; virtual int update_user(uint16_t new_rnti, uint16_t old_rnti) = 0;
virtual void set_activity_user(uint16_t rnti) = 0;
}; };
// NR interface is almost identical to EUTRA version // NR interface is almost identical to EUTRA version

@ -118,6 +118,7 @@ public:
{ {
rrc.sgnb_addition_complete(eutra_rnti, nr_rnti); rrc.sgnb_addition_complete(eutra_rnti, nr_rnti);
} }
void set_activity_user(uint16_t eutra_rnti) final { rrc.set_activity_user(eutra_rnti); }
// gtpu_interface_pdcp // gtpu_interface_pdcp
void write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu); void write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t pdu);

@ -62,15 +62,18 @@ public:
void get_metrics(srsenb::rrc_metrics_t& m); void get_metrics(srsenb::rrc_metrics_t& m);
rrc_nr_cfg_t update_default_cfg(const rrc_nr_cfg_t& rrc_cfg); rrc_nr_cfg_t update_default_cfg(const rrc_nr_cfg_t& rrc_cfg);
int add_user(uint16_t rnti);
void rem_user(uint16_t rnti);
int update_user(uint16_t new_rnti, uint16_t old_rnti);
void config_phy(); void config_phy();
void config_mac(); void config_mac();
int32_t generate_sibs(); int32_t generate_sibs();
int read_pdu_bcch_bch(const uint32_t tti, srsran::unique_byte_buffer_t& buffer) final; int read_pdu_bcch_bch(const uint32_t tti, srsran::unique_byte_buffer_t& buffer) final;
int read_pdu_bcch_dlsch(uint32_t sib_index, srsran::unique_byte_buffer_t& buffer) final; int read_pdu_bcch_dlsch(uint32_t sib_index, srsran::unique_byte_buffer_t& buffer) final;
/// User manegement
int add_user(uint16_t rnti);
void rem_user(uint16_t rnti);
int update_user(uint16_t new_rnti, uint16_t old_rnti);
void set_activity_user(uint16_t rnti);
// RLC interface // RLC interface
// TODO // TODO
void read_pdu_pcch(uint8_t* payload, uint32_t payload_size) {} void read_pdu_pcch(uint8_t* payload, uint32_t payload_size) {}
@ -112,6 +115,7 @@ public:
bool is_idle() { return state == rrc_nr_state_t::RRC_IDLE; } bool is_idle() { return state == rrc_nr_state_t::RRC_IDLE; }
bool is_inactive() { return state == rrc_nr_state_t::RRC_INACTIVE; } bool is_inactive() { return state == rrc_nr_state_t::RRC_INACTIVE; }
bool is_endc() { return endc; } bool is_endc() { return endc; }
uint16_t get_eutra_rnti() { return eutra_rnti; }
// setters // setters

@ -85,6 +85,14 @@ public:
eutra_stack->sgnb_addition_complete(eutra_rnti, nr_rnti); eutra_stack->sgnb_addition_complete(eutra_rnti, nr_rnti);
} }
void set_activity_user(uint16_t eutra_rnti)
{
if (eutra_stack == nullptr) {
return;
}
eutra_stack->set_activity_user(eutra_rnti);
}
// stack_nr_interface_stack_eutra // stack_nr_interface_stack_eutra
void tti_clock() void tti_clock()
{ {

@ -143,6 +143,12 @@ int ue_nr::generate_pdu(srsran::byte_buffer_t* pdu, uint32_t grant_size)
// add to MAC PDU and pack // add to MAC PDU and pack
mac_pdu_dl.add_sdu(lcid, ue_rlc_buffer->msg, ue_rlc_buffer->N_bytes); mac_pdu_dl.add_sdu(lcid, ue_rlc_buffer->msg, ue_rlc_buffer->N_bytes);
// Indicate DRB activity in DL to RRC
if (lcid > 3) {
rrc->set_activity_user(rnti);
logger.debug("DL activity rnti=0x%x, n_bytes=%d", rnti, ue_rlc_buffer->N_bytes);
}
} }
mac_pdu_dl.pack(); mac_pdu_dl.pack();

@ -201,6 +201,22 @@ int rrc_nr::update_user(uint16_t new_rnti, uint16_t old_rnti)
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }
void rrc_nr::set_activity_user(uint16_t rnti)
{
auto it = users.find(rnti);
if (it == users.end()) {
logger.info("rnti=0x%x not found. Can't set activity", rnti);
return;
}
ue* ue_ptr = it->second.get();
// inform EUTRA RRC about user activity
if (ue_ptr->is_endc()) {
// inform EUTRA RRC about user activity
rrc_eutra->set_activity_user(ue_ptr->get_eutra_rnti());
}
}
void rrc_nr::config_phy() void rrc_nr::config_phy()
{ {
static const srsran::phy_cfg_nr_t default_phy_cfg = static const srsran::phy_cfg_nr_t default_phy_cfg =

@ -25,6 +25,7 @@ public:
int read_pdu_bcch_dlsch(uint32_t sib_index, srsran::unique_byte_buffer_t& buffer) { return SRSRAN_SUCCESS; } int read_pdu_bcch_dlsch(uint32_t sib_index, srsran::unique_byte_buffer_t& buffer) { return SRSRAN_SUCCESS; }
int add_user(uint16_t rnti) { return SRSRAN_SUCCESS; } int add_user(uint16_t rnti) { return SRSRAN_SUCCESS; }
int update_user(uint16_t new_rnti, uint16_t old_rnti) { return SRSRAN_SUCCESS; } int update_user(uint16_t new_rnti, uint16_t old_rnti) { return SRSRAN_SUCCESS; }
void set_activity_user(uint16_t rnti) {}
}; };
class rlc_nr_dummy : public rlc_interface_mac_nr class rlc_nr_dummy : public rlc_interface_mac_nr

Loading…
Cancel
Save