enb: add SRB2+DRB1 to scheduler AFTER receiving Reconfig Complete

this commit fixes and issue where, after receiving paging and the resulting
PRACH from the UE, the eNB would create DRB1 and already schedule DL traffic
on this bearer. However, since the UE has not received the reconfig message
yet, the DL traffic is dropped since DRB1 isn't set up yet.

the commit also does not reset the BSR state of the bearer inside MAC since
this caused to a stall of the received DL PDU. The value would initially be set to
a non-zero value (after receiving the DL PDU from EPC). But when the bearer
was (re-)introduced to MAC, it would reset the BSR to zero, and, since
MAC never polls RLC, the PDU wasn't sent down until the next PDU arrives
and sets the BSR to a non-zero value again.
This commit is contained in:
Andre Puschmann 2020-01-17 21:46:44 +01:00
parent d3cb2eac83
commit 179fd394b2
2 changed files with 18 additions and 13 deletions

View File

@ -157,8 +157,6 @@ void sched_ue::set_bearer_cfg(uint32_t lc_id, sched_interface::ue_bearer_cfg_t*
std::lock_guard<std::mutex> lock(mutex);
if (lc_id < sched_interface::MAX_LC) {
memcpy(&lch[lc_id].cfg, cfg_, sizeof(sched_interface::ue_bearer_cfg_t));
lch[lc_id].buf_tx = 0;
lch[lc_id].buf_retx = 0;
if (lch[lc_id].cfg.direction != sched_interface::ue_bearer_cfg_t::IDLE) {
Info("SCHED: Set bearer config lc_id=%d, direction=%d\n", lc_id, (int)lch[lc_id].cfg.direction);
}

View File

@ -1215,10 +1215,25 @@ void rrc::ue::handle_rrc_con_setup_complete(rrc_conn_setup_complete_s* msg, srsl
void rrc::ue::handle_rrc_reconf_complete(rrc_conn_recfg_complete_s* msg, srslte::unique_byte_buffer_t pdu)
{
parent->rrc_log->info("RRCReconfigurationComplete transaction ID: %d\n", msg->rrc_transaction_id);
if (last_rrc_conn_recfg.rrc_transaction_id == msg->rrc_transaction_id) {
// Finally, add SRB2 and DRB1 to the scheduler
srsenb::sched_interface::ue_bearer_cfg_t bearer_cfg;
bearer_cfg.direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH;
bearer_cfg.group = 0;
parent->mac->bearer_ue_cfg(rnti, 2, &bearer_cfg);
bearer_cfg.group = last_rrc_conn_recfg.crit_exts.c1()
.rrc_conn_recfg_r8()
.rr_cfg_ded.drb_to_add_mod_list[0]
.lc_ch_cfg.ul_specific_params.lc_ch_group;
parent->mac->bearer_ue_cfg(rnti, 3, &bearer_cfg);
// Acknowledge Dedicated Configuration
parent->mac->phy_config_enabled(rnti, true);
// Acknowledge Dedicated Configuration
parent->mac->phy_config_enabled(rnti, true);
} else {
parent->rrc_log->error("Expected RRCReconfigurationComplete with transaction ID: %d, got %d\n",
last_rrc_conn_recfg.rrc_transaction_id,
msg->rrc_transaction_id);
}
}
void rrc::ue::handle_security_mode_complete(security_mode_complete_s* msg)
@ -1769,14 +1784,6 @@ void rrc::ue::send_connection_reconf(srslte::unique_byte_buffer_t pdu)
return;
}
// Add SRB2 and DRB1 to the scheduler
srsenb::sched_interface::ue_bearer_cfg_t bearer_cfg;
bearer_cfg.direction = srsenb::sched_interface::ue_bearer_cfg_t::BOTH;
bearer_cfg.group = 0;
parent->mac->bearer_ue_cfg(rnti, 2, &bearer_cfg);
bearer_cfg.group = conn_reconf->rr_cfg_ded.drb_to_add_mod_list[0].lc_ch_cfg.ul_specific_params.lc_ch_group;
parent->mac->bearer_ue_cfg(rnti, 3, &bearer_cfg);
// Configure SRB2 in RLC and PDCP
parent->rlc->add_bearer(rnti, 2, srslte::rlc_config_t::srb_config(2));