Commit f1cbe724 authored by Wang Tsu-Han's avatar Wang Tsu-Han

fixes for getting config by command line

parent cc90fd9a
...@@ -69,6 +69,8 @@ extern PARALLEL_CONF_t get_thread_parallel_conf(void); ...@@ -69,6 +69,8 @@ extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern WORKER_CONF_t get_thread_worker_conf(void); extern WORKER_CONF_t get_thread_worker_conf(void);
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw); extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw); extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
extern char *parallel_config;
extern char *worker_config;
void RCconfig_flexran() { void RCconfig_flexran() {
uint16_t i; uint16_t i;
...@@ -2673,27 +2675,31 @@ int RCconfig_parallel(void) { ...@@ -2673,27 +2675,31 @@ int RCconfig_parallel(void) {
char *parallel_conf = NULL; char *parallel_conf = NULL;
char *worker_conf = NULL; char *worker_conf = NULL;
paramdef_t ThreadParams[] = THREAD_CONF_DESC; paramdef_t ThreadParams[] = THREAD_CONF_DESC;
paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0}; paramlist_def_t THREADParamList = {THREAD_CONFIG_STRING_THREAD_STRUCT,NULL,0};
config_getlist( &THREADParamList,NULL,0,NULL); config_getlist( &THREADParamList,NULL,0,NULL);
if(parallel_config == NULL){
if(THREADParamList.numelt>0) { if(THREADParamList.numelt>0) {
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr));
} else { } else {
parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT"); parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT");
} }
set_parallel_conf(parallel_conf);
}
if(worker_config == NULL){
if(THREADParamList.numelt>0) { if(THREADParamList.numelt>0) {
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr)); worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr));
} else { } else {
worker_conf = strdup("WORKER_ENABLE"); worker_conf = strdup("WORKER_ENABLE");
} }
set_parallel_conf(parallel_conf);
set_worker_conf(worker_conf); set_worker_conf(worker_conf);
}
return 0; return 0;
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h" #include "common/utils/load_module_shlib.h"
static softmodem_params_t softmodem_params; static softmodem_params_t softmodem_params;
char *parallel_config=NULL;
char *worker_config=NULL;
uint64_t get_softmodem_optmask(void) { uint64_t get_softmodem_optmask(void) {
return softmodem_params.optmask; return softmodem_params.optmask;
...@@ -74,8 +76,6 @@ WORKER_CONF_t get_thread_worker_conf(void) ...@@ -74,8 +76,6 @@ WORKER_CONF_t get_thread_worker_conf(void)
#endif #endif
void get_common_options(void) void get_common_options(void)
{ {
char *parallel_config=NULL;
char *worker_config=NULL;
uint32_t online_log_messages; uint32_t online_log_messages;
......
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