Commit c194956d authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

RRC timer thres removed from UE context and added to eNB RRC context, value 0...

RRC timer thres removed from UE context and added to eNB RRC context, value 0 of thres equivalent to infinity
parent 04a3cda0
...@@ -135,7 +135,7 @@ x_image *x_create_image(x_connection *_x, unsigned char *data, ...@@ -135,7 +135,7 @@ x_image *x_create_image(x_connection *_x, unsigned char *data,
if (ret == NULL) OOM; if (ret == NULL) OOM;
template.class = TrueColor; template.class = TrueColor;
template.depth = 32; template.depth = 24;
template.red_mask = 0xff0000; template.red_mask = 0xff0000;
template.green_mask = 0x00ff00; template.green_mask = 0x00ff00;
template.blue_mask = 0x0000ff; template.blue_mask = 0x0000ff;
......
...@@ -102,6 +102,7 @@ typedef struct RrcConfigurationReq_s { ...@@ -102,6 +102,7 @@ typedef struct RrcConfigurationReq_s {
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE]; uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
uint8_t num_plmn; uint8_t num_plmn;
uint32_t rrc_inactivity_timer_thres; // for testing, maybe change later
paging_drx_t default_drx; paging_drx_t default_drx;
int16_t nb_cc; int16_t nb_cc;
......
...@@ -579,8 +579,10 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { ...@@ -579,8 +579,10 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I) for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]); PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = 10000;
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id; RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
RRC_CONFIGURATION_REQ(msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr; RRC_CONFIGURATION_REQ (msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr;
AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
&& !ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr, && !ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX_OLD].strptr,
"It seems that you use an old configuration file. Please change the existing\n" "It seems that you use an old configuration file. Please change the existing\n"
......
...@@ -601,7 +601,7 @@ typedef struct eNB_RRC_UE_s { ...@@ -601,7 +601,7 @@ typedef struct eNB_RRC_UE_s {
uint32_t ue_reestablishment_timer_thres; uint32_t ue_reestablishment_timer_thres;
/* RRC inactivity timer: on timeout, should release RRC connection for inactivity on all E-RABs */ /* RRC inactivity timer: on timeout, should release RRC connection for inactivity on all E-RABs */
uint32_t ue_rrc_inactivity_timer; uint32_t ue_rrc_inactivity_timer;
uint32_t ue_rrc_inactivity_timer_thres; // uint32_t ue_rrc_inactivity_timer_thres;
uint8_t e_rab_release_command_flag; uint8_t e_rab_release_command_flag;
int8_t reestablishment_xid; int8_t reestablishment_xid;
} eNB_RRC_UE_t; } eNB_RRC_UE_t;
......
...@@ -835,7 +835,8 @@ rrc_eNB_free_UE( ...@@ -835,7 +835,8 @@ rrc_eNB_free_UE(
return; return;
} }
if((ue_context_pP->ue_context.ue_rrc_inactivity_timer >= ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres) && // if((ue_context_pP->ue_context.ue_rrc_inactivity_timer >= ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres) &&
if((ue_context_pP->ue_context.ue_rrc_inactivity_timer >= RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres) &&
(mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) { (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 20, user inactivity\n", LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 20, user inactivity\n",
enb_mod_idP, enb_mod_idP,
...@@ -1008,7 +1009,7 @@ rrc_eNB_process_RRCConnectionSetupComplete( ...@@ -1008,7 +1009,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
ue_context_pP->ue_context.Srb1.Active = 1; ue_context_pP->ue_context.Srb1.Active = 1;
ue_context_pP->ue_context.Status = RRC_CONNECTED; ue_context_pP->ue_context.Status = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file // ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
...@@ -1314,7 +1315,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ...@@ -1314,7 +1315,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
ue_context_pP->ue_context.Status = RRC_CONNECTED; ue_context_pP->ue_context.Status = RRC_CONNECTED;
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file // ue_context_pP->ue_context.ue_rrc_inactivity_timer_thres = 10000; // The value should come from config file
ue_context_pP->ue_context.reestablishment_xid = next_xid; ue_context_pP->ue_context.reestablishment_xid = next_xid;
SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid]; SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid];
...@@ -7379,9 +7380,10 @@ rrc_rx_tx( ...@@ -7379,9 +7380,10 @@ rrc_rx_tx(
pthread_mutex_unlock(&rrc_release_freelist); pthread_mutex_unlock(&rrc_release_freelist);
if (ue_context_p->ue_context.ue_rrc_inactivity_timer > 0) { if ((ue_context_p->ue_context.ue_rrc_inactivity_timer > 0) && (RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres > 0)) {
// ue_context_p->ue_context.ue_rrc_inactivity_timer++; // (un)comment this line to (de)activate the RRC inactivity timer ue_context_p->ue_context.ue_rrc_inactivity_timer++; // (un)comment this line to (de)activate the RRC inactivity timer
if (ue_context_p->ue_context.ue_rrc_inactivity_timer >= ue_context_p->ue_context.ue_rrc_inactivity_timer_thres) { //if (ue_context_p->ue_context.ue_rrc_inactivity_timer >= ue_context_p->ue_context.ue_rrc_inactivity_timer_thres) {
if (ue_context_p->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres){
LOG_I(RRC, "Removing UE %x instance because of rrc_inactivity_timer timeout\n", LOG_I(RRC, "Removing UE %x instance because of rrc_inactivity_timer timeout\n",
ue_context_p->ue_context.rnti); ue_context_p->ue_context.rnti);
ue_to_be_removed = ue_context_p; ue_to_be_removed = ue_context_p;
...@@ -7422,7 +7424,8 @@ rrc_rx_tx( ...@@ -7422,7 +7424,8 @@ rrc_rx_tx(
if (ue_to_be_removed) { if (ue_to_be_removed) {
if ((ue_to_be_removed->ue_context.ul_failure_timer >= 20000) || if ((ue_to_be_removed->ue_context.ul_failure_timer >= 20000) ||
(ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= ue_to_be_removed->ue_context.ue_rrc_inactivity_timer_thres)) { (ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres)) {
//(ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= ue_to_be_removed->ue_context.ue_rrc_inactivity_timer_thres)) {
ue_to_be_removed->ue_context.ue_release_timer_s1 = 1; ue_to_be_removed->ue_context.ue_release_timer_s1 = 1;
ue_to_be_removed->ue_context.ue_release_timer_thres_s1 = 100; ue_to_be_removed->ue_context.ue_release_timer_thres_s1 = 100;
ue_to_be_removed->ue_context.ue_release_timer = 0; ue_to_be_removed->ue_context.ue_release_timer = 0;
...@@ -7435,7 +7438,8 @@ rrc_rx_tx( ...@@ -7435,7 +7438,8 @@ rrc_rx_tx(
ue_to_be_removed->ue_context.ul_failure_timer = 0; ue_to_be_removed->ue_context.ul_failure_timer = 0;
} }
if (ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= ue_to_be_removed->ue_context.ue_rrc_inactivity_timer_thres) { //if (ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= ue_to_be_removed->ue_context.ue_rrc_inactivity_timer_thres) {
if (ue_to_be_removed->ue_context.ue_rrc_inactivity_timer >= RC.rrc[ctxt_pP->module_id]->configuration.rrc_inactivity_timer_thres) {
ue_to_be_removed->ue_context.ue_rrc_inactivity_timer = 0; //reset timer after S1 command UE context release request is sent ue_to_be_removed->ue_context.ue_rrc_inactivity_timer = 0; //reset timer after S1 command UE context release request is sent
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment