Skip to content
Snippets Groups Projects
Commit a1f1d53c authored by Francesco Mani's avatar Francesco Mani
Browse files

another tentative fix for gnb initialization crashes

parent d30b8c69
No related branches found
No related tags found
6 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1106Integration 2021 wk13 a,!1105Integration 2021 wk13 a,!1098Integration 2021 wk12,!1052Nr fapi beamindex ssb ro
...@@ -249,6 +249,7 @@ L1s = ( ...@@ -249,6 +249,7 @@ L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "local_mac"; tr_n_preference = "local_mac";
pusch_proc_threads = 8;
} }
); );
......
...@@ -468,21 +468,16 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { ...@@ -468,21 +468,16 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
if (RC.gNB == NULL) { if (RC.gNB == NULL) {
RC.gNB = (PHY_VARS_gNB **) malloc((1+RC.nb_nr_L1_inst)*sizeof(PHY_VARS_gNB *)); RC.gNB = (PHY_VARS_gNB **) malloc((1+RC.nb_nr_L1_inst)*sizeof(PHY_VARS_gNB *));
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) { LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB));
memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB));
}
} }
LOG_I(PHY,"gNB L1 structure RC.gNB allocated @ %p\n",RC.gNB);
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) { for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
if (RC.gNB[inst] == NULL) { if (RC.gNB[inst] == NULL) {
RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB)); RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB));
memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB)); memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB));
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]);
} }
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]);
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
gNB->abstraction_flag = 0; gNB->abstraction_flag = 0;
gNB->single_thread_flag = single_thread_flag; gNB->single_thread_flag = single_thread_flag;
......
...@@ -809,10 +809,10 @@ if(!IS_SOFTMODEM_NOS1) ...@@ -809,10 +809,10 @@ if(!IS_SOFTMODEM_NOS1)
if (RC.nb_nr_inst > 0) { if (RC.nb_nr_inst > 0) {
// don't create if node doesn't connect to RRC/S1/GTP // don't create if node doesn't connect to RRC/S1/GTP
RCconfig_NR_L1();
AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n"); AssertFatal(create_gNB_tasks(1) == 0,"cannot create ITTI tasks\n");
} else { } else {
printf("No ITTI, Initializing L1\n"); AssertFatal(1==0,"RC.nb_nr_inst should have been already initialized in get_options()");
RCconfig_NR_L1();
} }
/* Start the agent. If it is turned off in the configuration, it won't start */ /* Start the agent. If it is turned off in the configuration, it won't start */
......
...@@ -147,8 +147,6 @@ void *gNB_app_task(void *args_p) ...@@ -147,8 +147,6 @@ void *gNB_app_task(void *args_p)
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__); LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
RCconfig_NR_L1();
RCconfig_nr_macrlc(); RCconfig_nr_macrlc();
LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst);
......
...@@ -424,8 +424,6 @@ void RCconfig_NR_L1(void) { ...@@ -424,8 +424,6 @@ void RCconfig_NR_L1(void) {
RC.nb_nr_CC = (int *)malloc((1+RC.nb_nr_inst)*sizeof(int)); RC.nb_nr_CC = (int *)malloc((1+RC.nb_nr_inst)*sizeof(int));
RC.nb_nr_CC[0]=1; RC.nb_nr_CC[0]=1;
RC.nb_nr_inst =1; // DJP - feptx_prec uses num_gNB but phy_init_RU uses nb_nr_inst
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_inst=1 this is because phy_init_RU() uses that to index and not RC.num_gNB - why the 2 similar variables?\n", __FUNCTION__); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_inst=1 this is because phy_init_RU() uses that to index and not RC.num_gNB - why the 2 similar variables?\n", __FUNCTION__);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_CC[0]=%d for init_gNB_afterRU()\n", __FUNCTION__, RC.nb_nr_CC[0]); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_CC[0]=%d for init_gNB_afterRU()\n", __FUNCTION__, RC.nb_nr_CC[0]);
LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_macrlc_inst:%d because used by mac_top_init_gNB()\n", __FUNCTION__, RC.nb_nr_macrlc_inst); LOG_I(PHY,"%s() NFAPI PNF mode - RC.nb_nr_macrlc_inst:%d because used by mac_top_init_gNB()\n", __FUNCTION__, RC.nb_nr_macrlc_inst);
......
...@@ -249,6 +249,7 @@ L1s = ( ...@@ -249,6 +249,7 @@ L1s = (
{ {
num_cc = 1; num_cc = 1;
tr_n_preference = "local_mac"; tr_n_preference = "local_mac";
pusch_proc_threads = 8;
} }
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment