Releasing the UE when max retransmissions are reached in the RLC. (#2385)

master
Pedro Alvarez 4 years ago committed by GitHub
parent 138685399e
commit 976b5c12c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,7 @@
#define SRSLTE_CIRCULAR_ARRAY_H #define SRSLTE_CIRCULAR_ARRAY_H
#include <array> #include <array>
#include <cstddef>
/** /**
* *

@ -187,6 +187,7 @@ private:
const static uint32_t LCID_REM_USER = 0xffff0001; const static uint32_t LCID_REM_USER = 0xffff0001;
const static uint32_t LCID_REL_USER = 0xffff0002; const static uint32_t LCID_REL_USER = 0xffff0002;
const static uint32_t LCID_ACT_USER = 0xffff0004; const static uint32_t LCID_ACT_USER = 0xffff0004;
const static uint32_t LCID_RTX_USER = 0xffff0005;
bool running = false; bool running = false;
srslte::block_queue<rrc_pdu> rx_pdu_queue; srslte::block_queue<rrc_pdu> rx_pdu_queue;

@ -40,6 +40,7 @@ public:
void set_activity_timeout(const activity_timeout_type_t type); void set_activity_timeout(const activity_timeout_type_t type);
void set_activity(); void set_activity();
void activity_timer_expired(); void activity_timer_expired();
void max_retx_reached();
rrc_state_t get_state(); rrc_state_t get_state();
void get_metrics(rrc_ue_metrics_t& ue_metrics) const; void get_metrics(rrc_ue_metrics_t& ue_metrics) const;

@ -142,7 +142,11 @@ uint32_t rrc::get_nof_users()
return users.size(); return users.size();
} }
void rrc::max_retx_attempted(uint16_t rnti) {} void rrc::max_retx_attempted(uint16_t rnti)
{
rrc_pdu p = {rnti, LCID_RTX_USER, nullptr};
rx_pdu_queue.push(std::move(p));
}
// This function is called from PRACH worker (can wait) // This function is called from PRACH worker (can wait)
int rrc::add_user(uint16_t rnti, const sched_interface::ue_cfg_t& sched_ue_cfg) int rrc::add_user(uint16_t rnti, const sched_interface::ue_cfg_t& sched_ue_cfg)
@ -960,6 +964,9 @@ void rrc::tti_clock()
case LCID_ACT_USER: case LCID_ACT_USER:
user_it->second->set_activity(); user_it->second->set_activity();
break; break;
case LCID_RTX_USER:
user_it->second->max_retx_reached();
break;
case LCID_EXIT: case LCID_EXIT:
logger.info("Exiting thread"); logger.info("Exiting thread");
break; break;

@ -121,6 +121,26 @@ void rrc::ue::activity_timer_expired()
state = RRC_STATE_RELEASE_REQUEST; state = RRC_STATE_RELEASE_REQUEST;
} }
void rrc::ue::max_retx_reached()
{
if (parent) {
parent->logger.info("Max retx reached for rnti=0x%x", rnti);
if (parent->s1ap->user_exists(rnti)) {
parent->s1ap->user_release(rnti, asn1::s1ap::cause_radio_network_opts::radio_conn_with_ue_lost);
event_logger::get().log_rrc_disconnect(ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx,
static_cast<unsigned>(rrc_idle_transition_cause::release),
rnti);
} else {
if (rnti != SRSLTE_MRNTI) {
parent->rem_user_thread(rnti);
}
}
}
state = RRC_STATE_RELEASE_REQUEST;
}
void rrc::ue::set_activity_timeout(const activity_timeout_type_t type) void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)
{ {
uint32_t deadline_s = 0; uint32_t deadline_s = 0;

Loading…
Cancel
Save