diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 1a7a6aa373..88351c9d5e 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -870,12 +870,13 @@ void init_gNB_proc(int inst) { gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t)); gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t)); int numCPU = sysconf(_SC_NPROCESSORS_ONLN); + int threadCnt = min(numCPU, get_uldeocde_thread_count()); char ul_pool[80]; - sprintf(ul_pool,"%d",1); + sprintf(ul_pool,"-1"); int s_offset = 0; - for (int icpu=2; icputhreadPool, false); initNotifiedFIFO(gNB->respDecode); diff --git a/executables/thread-common.h b/executables/thread-common.h index 6f3af3cfc0..c5e8587e77 100644 --- a/executables/thread-common.h +++ b/executables/thread-common.h @@ -39,4 +39,8 @@ static inline WORKER_CONF_t get_thread_worker_conf(void) { return thread_struct.worker_conf; } +static inline uint8_t get_uldeocde_thread_count(void) { + return thread_struct.numULProcThreads; +} + #endif diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 27765a8548..e7cc5923ba 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -891,6 +891,7 @@ typedef enum { typedef struct THREAD_STRUCT_s { PARALLEL_CONF_t parallel_conf; WORKER_CONF_t worker_conf; + uint8_t numULProcThreads; } THREAD_STRUCT; typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf index 6f081fa24f..255cfb08dc 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf @@ -260,6 +260,7 @@ THREAD_STRUCT = ( parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" worker_config = "WORKER_ENABLE"; + numULProcThreads = 8; } );