Commit 5dbbc06f authored by Wang Tsu-Han's avatar Wang Tsu-Han

fixes for getting config by command line

parent aab5c990
...@@ -67,6 +67,8 @@ extern PARALLEL_CONF_t get_thread_parallel_conf(void); ...@@ -67,6 +67,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;
...@@ -2494,29 +2496,33 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { ...@@ -2494,29 +2496,33 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
int RCconfig_parallel(void) { 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(THREADParamList.numelt>0) { if(parallel_config == NULL){
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); if(THREADParamList.numelt>0) {
parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr)); config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
} else { parallel_conf = strdup(*(THREADParamList.paramarray[0][THREAD_PARALLEL_IDX].strptr));
parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT"); } else {
parallel_conf = strdup("PARALLEL_RU_L1_TRX_SPLIT");
}
set_parallel_conf(parallel_conf);
} }
if(THREADParamList.numelt>0) { if(worker_config == NULL){
config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL); if(THREADParamList.numelt>0) {
worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr)); config_getlist( &THREADParamList,ThreadParams,sizeof(ThreadParams)/sizeof(paramdef_t),NULL);
} else { worker_conf = strdup(*(THREADParamList.paramarray[0][THREAD_WORKER_IDX].strptr));
worker_conf = strdup("WORKER_ENABLE"); } else {
worker_conf = strdup("WORKER_ENABLE");
}
set_worker_conf(worker_conf);
} }
set_parallel_conf(parallel_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;
...@@ -51,8 +53,6 @@ softmodem_params_t* get_softmodem_params(void) { ...@@ -51,8 +53,6 @@ softmodem_params_t* get_softmodem_params(void) {
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