Merge branch 'develop-nos1-fixes' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-nos1-fixes
Conflicts: cmake_targets/CMakeLists.txt openair1/SCHED/phy_procedures_lte_eNb.c openair2/RRC/LITE/rrc_UE.c openair2/RRC/LITE/rrc_common.c targets/SIMU/USER/oaisim_functions.c
This commit is contained in:
@@ -160,6 +160,8 @@ volatile int oai_exit = 0;
|
||||
//int32_t **rxdata;
|
||||
//int32_t **txdata;
|
||||
|
||||
uint16_t sf_ahead=4;
|
||||
uint8_t nfapi_mode = 0;
|
||||
|
||||
// Added for PHY abstraction
|
||||
extern node_list* ue_node_list;
|
||||
@@ -377,7 +379,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
omv_data.geo[i].node_type = 0; //eNB
|
||||
enb_node_list = enb_node_list->next;
|
||||
omv_data.geo[i].Neighbors = 0;
|
||||
|
||||
/*
|
||||
for (j = NB_RU; j < NB_UE_INST + NB_RU; j++) {
|
||||
if (is_UE_active (i, j - NB_RU) == 1) {
|
||||
omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
|
||||
@@ -387,6 +389,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
"[RU %d][UE %d] is_UE_active(i,j) %d geo (x%d, y%d) num neighbors %d\n", i, j-NB_RU, is_UE_active(i,j-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +416,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
|
||||
ue_node_list = ue_node_list->next;
|
||||
omv_data.geo[i].Neighbors = 0;
|
||||
|
||||
/*
|
||||
for (j = 0; j < NB_RU; j++) {
|
||||
if (is_UE_active (j, i - NB_RU) == 1) {
|
||||
omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
|
||||
@@ -423,6 +426,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
"[UE %d][RU %d] is_UE_active %d geo (x%d, y%d) num neighbors %d\n", i-NB_RU, j, is_UE_active(j,i-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1178,8 +1182,7 @@ main (int argc, char **argv)
|
||||
|
||||
|
||||
|
||||
if (create_tasks(0,
|
||||
oai_emulation.info.nb_ue_local) < 0)
|
||||
if (create_tasks_ue(oai_emulation.info.nb_ue_local) < 0)
|
||||
exit(-1); // need a softer mode
|
||||
|
||||
|
||||
@@ -1771,9 +1774,6 @@ oai_shutdown (void)
|
||||
}
|
||||
} //End of PHY abstraction changes
|
||||
|
||||
#ifdef OPENAIR2
|
||||
mac_top_cleanup ();
|
||||
#endif
|
||||
|
||||
// stop OMG
|
||||
stop_mobility_generator (omg_param_list); //omg_param_list.mobility_type
|
||||
@@ -1826,3 +1826,10 @@ get_OAI_emulation ()
|
||||
}
|
||||
|
||||
|
||||
// dummy function declarations
|
||||
|
||||
void *rrc_enb_task(void *args_p) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
#include "ENB_APP/enb_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
|
||||
#ifdef SMBV
|
||||
extern uint8_t config_smbv;
|
||||
extern char smbv_ip[16];
|
||||
@@ -177,6 +180,18 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
int oaisim_flag=1;
|
||||
|
||||
|
||||
void RCConfig_sim(void) {
|
||||
|
||||
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
|
||||
|
||||
|
||||
// Get num RU instances
|
||||
config_getlist( &RUParamList,NULL,0, NULL);
|
||||
RC.nb_RU = RUParamList.numelt;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void get_simulation_options(int argc, char *argv[])
|
||||
{
|
||||
int option;
|
||||
@@ -788,7 +803,7 @@ void get_simulation_options(int argc, char *argv[])
|
||||
|
||||
if (RC.config_file_name != NULL) {
|
||||
/* Read eNB configuration file */
|
||||
RCConfig();
|
||||
RCConfig_sim();
|
||||
printf("returned with %d eNBs, %d rus\n",RC.nb_inst,RC.nb_RU);
|
||||
oai_emulation.info.nb_enb_local = RC.nb_inst;
|
||||
oai_emulation.info.nb_ru_local = RC.nb_RU;
|
||||
@@ -1106,7 +1121,7 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
||||
|
||||
*ptimestamp = last_UE_rx_timestamp[UE_id][CC_id];
|
||||
|
||||
LOG_D(EMU,"UE %d DL simulation 0: UE_trx_read nsamps %d TS %llu (%llu, offset %d) antenna %d\n",
|
||||
LOG_I(EMU,"UE %d DL simulation 0: UE_trx_read nsamps %d TS %llu (%llu, offset %d) antenna %d\n",
|
||||
UE_id,
|
||||
nsamps,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
|
||||
@@ -1573,6 +1588,119 @@ void update_ocm()
|
||||
void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
{
|
||||
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
|
||||
//int rrc_state=0;
|
||||
/*
|
||||
if (oai_emulation.info.otg_enabled ==1 ) {
|
||||
|
||||
int dst_id, app_id;
|
||||
Packet_otg_elt_t *otg_pkt;
|
||||
|
||||
for (dst_id = 0; dst_id < NUMBER_OF_UE_MAX; dst_id++) {
|
||||
for_times += 1;
|
||||
|
||||
// generate traffic if the ue is rrc reconfigured state
|
||||
//if ((rrc_state=mac_eNB_get_rrc_status(enb_module_idP, dst_id)) > 2 //RRC_CONNECTED
|
||||
{
|
||||
if (mac_eNB_get_rrc_status(enb_module_idP, oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_idP][dst_id]) > 2 ){
|
||||
if_times += 1;
|
||||
|
||||
for (app_id=0; app_id<MAX_NUM_APPLICATION; app_id++) {
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
|
||||
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(enb_module_idP, dst_id + NB_eNB_INST, app_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
otg_times += 1;
|
||||
(otg_pkt->otg_pkt).rb_id = DTCH-2; // app could be binded to a given DRB
|
||||
(otg_pkt->otg_pkt).module_id = enb_module_idP;
|
||||
(otg_pkt->otg_pkt).dst_id = dst_id;
|
||||
(otg_pkt->otg_pkt).is_ue = 0;
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_DATA;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[enb_module_idP]));
|
||||
LOG_D(EMU,"[eNB %d] ADD pkt to OTG buffer with size %d for dst %d on rb_id %d for app id %d \n",
|
||||
(otg_pkt->otg_pkt).module_id, otg_pkt->otg_pkt.sdu_buffer_size, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id, app_id);
|
||||
} else {
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
mbms_service_id_t service_id;
|
||||
mbms_session_id_t session_id;
|
||||
rb_id_t rb_id;
|
||||
|
||||
// MBSM multicast traffic
|
||||
if (ctime >= 500 ) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
if (pdcp_mbms_array_eNB[enb_module_idP][service_id][session_id].instanciated_instance == TRUE) { // this service/session is configured
|
||||
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n", service_id, session_id, service_id*maxSessionPerPMCH + session_id);
|
||||
rb_id = pdcp_mbms_array_eNB[enb_module_idP][service_id][session_id].rb_id;
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen_multicast(enb_module_idP, session_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
(otg_pkt->otg_pkt).rb_id = rb_id;
|
||||
(otg_pkt->otg_pkt).module_id = enb_module_idP;
|
||||
(otg_pkt->otg_pkt).dst_id = session_id;
|
||||
(otg_pkt->otg_pkt).is_ue = FALSE;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_TRANSPARENT;
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[enb_module_idP]));
|
||||
LOG_D(EMU, "[eNB %d] ADD packet (%p) multicast to OTG buffer for dst %d on rb_id %d\n",
|
||||
(otg_pkt->otg_pkt).module_id, otg_pkt, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
|
||||
*/
|
||||
// old version
|
||||
/* // MBSM multicast traffic
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
// LOG_I(OTG,"DUY:frame %d, pdcp_mbms_array[module_id][rb_id].instanciated_instance is %d\n",frame,pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance);
|
||||
if ((pdcp_mbms_array[module_idP][service_id*maxSessionPerPMCH + session_id].instanciated_instance== module_idP + 1) && (eNB_flag == 1)){ // this service/session is configured
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d)\n", service_id, session_id);
|
||||
// Duy add
|
||||
LOG_I(OTG, "frame %d, multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n",frame, service_id, session_id,service_id*maxSessionPerPMCH + session_id);
|
||||
// end Duy add
|
||||
rb_id = pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].rb_id;
|
||||
otg_pkt=(uint8_t*) packet_gen_multicast(module_idP, session_id, ctime, &pkt_size);
|
||||
if (otg_pkt != NULL) {
|
||||
LOG_D(OTG,"[eNB %d] sending a multicast packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", eNB_index, module_idP, rb_id, module_idP, session_id, pkt_size);
|
||||
pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,PDCP_TM);
|
||||
free(otg_pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end multicast traffic
|
||||
#endif
|
||||
*/
|
||||
/*
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end multicast traffic
|
||||
*/
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
#if 0 // defined(EXMIMO) || defined(OAI_USRP)
|
||||
if (otg_enabled==1) {
|
||||
ctime = frame * 100;
|
||||
@@ -1674,6 +1802,13 @@ void init_time()
|
||||
td_avg = TARGET_SF_TIME_NS;
|
||||
}
|
||||
|
||||
// dummy function
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) {
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user