Commit 71885e8c authored by Xu Bo's avatar Xu Bo

Merge remote-tracking branch 'remotes/origin/issue255_256_257_tmp' into ues_test

parents 439f1be7 4aa50184
...@@ -972,7 +972,6 @@ typedef struct { ...@@ -972,7 +972,6 @@ typedef struct {
boolean_t active[NUMBER_OF_UE_MAX]; boolean_t active[NUMBER_OF_UE_MAX];
} UE_list_t; } UE_list_t;
#ifdef UE_EXPANSION
/*! \brief deleting control information*/ /*! \brief deleting control information*/
typedef struct { typedef struct {
///rnti of UE ///rnti of UE
...@@ -988,7 +987,6 @@ typedef struct { ...@@ -988,7 +987,6 @@ typedef struct {
int head_freelist; ///the head position of the delete list int head_freelist; ///the head position of the delete list
int tail_freelist; ///the tail position of the delete list int tail_freelist; ///the tail position of the delete list
} UE_free_list_t; } UE_free_list_t;
#endif
/*! \brief eNB common channels */ /*! \brief eNB common channels */
typedef struct { typedef struct {
...@@ -1140,9 +1138,8 @@ typedef struct eNB_MAC_INST_s { ...@@ -1140,9 +1138,8 @@ typedef struct eNB_MAC_INST_s {
time_stats_t rx_ulsch_sdu; // include rlc_data_ind time_stats_t rx_ulsch_sdu; // include rlc_data_ind
/// processing time of eNB PCH scheduler /// processing time of eNB PCH scheduler
time_stats_t schedule_pch; time_stats_t schedule_pch;
#ifdef UE_EXPANSION
UE_free_list_t UE_free_list; UE_free_list_t UE_free_list;
#endif
} eNB_MAC_INST; } eNB_MAC_INST;
/* /*
......
...@@ -490,11 +490,9 @@ void openair_rrc_top_init_ue( ...@@ -490,11 +490,9 @@ void openair_rrc_top_init_ue(
uint8_t HO_active uint8_t HO_active
); );
#ifdef UE_EXPANSION
pthread_mutex_t lock_ue_freelist; pthread_mutex_t lock_ue_freelist;
void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti); void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti);
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag); void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag);
void release_UE_in_freeList(module_id_t mod_id); void release_UE_in_freeList(module_id_t mod_id);
#endif
/** @}*/ /** @}*/
...@@ -887,8 +887,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s* ...@@ -887,8 +887,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
} }
} }
#ifdef UE_EXPANSION
void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti) void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti)
{ {
...@@ -988,7 +986,7 @@ void release_UE_in_freeList(module_id_t mod_id) ...@@ -988,7 +986,7 @@ void release_UE_in_freeList(module_id_t mod_id)
} }
} }
} }
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
rrc_eNB_process_RRCConnectionSetupComplete( rrc_eNB_process_RRCConnectionSetupComplete(
...@@ -1895,44 +1893,46 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ...@@ -1895,44 +1893,46 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
PDCP_TRANSMISSION_MODE_CONTROL); PDCP_TRANSMISSION_MODE_CONTROL);
// delete UE data of prior RNTI. UE use current RNTI. // delete UE data of prior RNTI. UE use current RNTI.
protocol_ctxt_t ctxt_prior = *ctxt_pP; // protocol_ctxt_t ctxt_prior = *ctxt_pP;
ctxt_prior.rnti = reestablish_rnti; // ctxt_prior.rnti = reestablish_rnti;
//
LTE_eNB_ULSCH_t *ulsch = NULL; // LTE_eNB_ULSCH_t *ulsch = NULL;
nfapi_ul_config_request_body_t *ul_req_tmp = NULL; // nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
PHY_VARS_eNB *eNB_PHY = NULL; // PHY_VARS_eNB *eNB_PHY = NULL;
eNB_MAC_INST *eNB_MAC = RC.mac[ctxt_prior.module_id]; // eNB_MAC_INST *eNB_MAC = RC.mac[ctxt_prior.module_id];
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { // for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[ctxt_prior.module_id][CC_id]; // eNB_PHY = RC.eNB[ctxt_prior.module_id][CC_id];
for (int i=0; i<NUMBER_OF_UE_MAX; i++) { // for (int i=0; i<NUMBER_OF_UE_MAX; i++) {
ulsch = eNB_PHY->ulsch[i]; // ulsch = eNB_PHY->ulsch[i];
if((ulsch != NULL) && (ulsch->rnti == ctxt_prior.rnti)){ // if((ulsch != NULL) && (ulsch->rnti == ctxt_prior.rnti)){
LOG_I(RRC, "clean_eNb_ulsch UE %x \n", ctxt_prior.rnti); // LOG_I(RRC, "clean_eNb_ulsch UE %x \n", ctxt_prior.rnti);
//clean_eNb_ulsch(ulsch); // clean_eNb_ulsch(ulsch);
ulsch->rnti = 0; // break;
break; // }
} // }
} //
// for(int j = 0; j < 10; j++){
for(int j = 0; j < 10; j++){ // ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body;
ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body; // if(ul_req_tmp){
if(ul_req_tmp){ // int pdu_number = ul_req_tmp->number_of_pdus;
int pdu_number = ul_req_tmp->number_of_pdus; // for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){ // if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == ctxt_prior.rnti){
if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == ctxt_prior.rnti){ // LOG_I(RRC, "remove UE %x from ul_config_pdu_list %d/%d\n", ctxt_prior.rnti, pdu_index, pdu_number);
LOG_I(RRC, "remove UE %x from ul_config_pdu_list %d/%d\n", ctxt_prior.rnti, pdu_index, pdu_number); // if(pdu_index < pdu_number -1){
if(pdu_index < pdu_number -1){ // memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t)); // }
} // ul_req_tmp->number_of_pdus--;
ul_req_tmp->number_of_pdus--; // }
} // }
} // }
} // }
} // }
} // rrc_mac_remove_ue(ctxt_prior.module_id, ctxt_prior.rnti);
rrc_mac_remove_ue(ctxt_prior.module_id, ctxt_prior.rnti); // rrc_rlc_remove_ue(&ctxt_prior);
rrc_rlc_remove_ue(&ctxt_prior); // pdcp_remove_UE(&ctxt_prior);
pdcp_remove_UE(&ctxt_prior); // add UE info to freeList for RU_thread to remove the UE instead of remove it here
LOG_I(RRC, "[RRCConnectionReestablishment]put UE %x into freeList\n", reestablish_rnti);
put_UE_in_freelist(ctxt_pP->module_id, reestablish_rnti, 0);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -6725,9 +6725,9 @@ rrc_enb_task( ...@@ -6725,9 +6725,9 @@ rrc_enb_task(
int CC_id; int CC_id;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
#ifdef UE_EXPANSION
pthread_mutex_init(&lock_ue_freelist, NULL); pthread_mutex_init(&lock_ue_freelist, NULL);
#endif
itti_mark_task_ready(TASK_RRC_ENB); itti_mark_task_ready(TASK_RRC_ENB);
LOG_I(RRC,"Entering main loop of RRC message task\n"); LOG_I(RRC,"Entering main loop of RRC message task\n");
while (1) { while (1) {
......
...@@ -169,9 +169,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -169,9 +169,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
#endif #endif
} }
#ifdef UE_EXPANSION
release_UE_in_freeList(eNB->Mod_id); release_UE_in_freeList(eNB->Mod_id);
#endif
// UE-specific RX processing for subframe n // UE-specific RX processing for subframe n
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay ); phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
......
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