diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 88351c9d5ed241e611ba1df1f173ab059f6b8c22..2f3c89f5e4791fc77de384cfc0af7b10c790a6f3 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -100,6 +100,8 @@ extern int transmission_mode; extern uint16_t sf_ahead; extern uint16_t sl_ahead; + +extern uint32_t num_threads_pusch; //pthread_t main_gNB_thread; time_stats_t softmodem_stats_mt; // main thread @@ -870,11 +872,11 @@ 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()); + int threadCnt = min(numCPU, num_threads_pusch); char ul_pool[80]; sprintf(ul_pool,"-1"); int s_offset = 0; - for (int icpu=2; icpu<threadCnt; icpu++) { + for (int icpu=1; icpu<threadCnt; icpu++) { sprintf(ul_pool+2+s_offset,",-1"); s_offset += 3; } diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 8271e66e2fbcafcf532569b8ddf994bd307ae82c..adda039eaf752fde6a568c697b84da5d6bbb129d 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -98,6 +98,8 @@ int config_sync_var=-1; volatile int start_gNB = 0; volatile int oai_exit = 0; +uint32_t num_threads_pusch; + static int wait_for_sync = 0; unsigned int mmapped_dma=0; diff --git a/executables/thread-common.h b/executables/thread-common.h index c5e8587e7749b94a0b858970ef73ac67efe6bc22..6f3af3cfc00f69fef57958f58d3b0a0f193de10b 100644 --- a/executables/thread-common.h +++ b/executables/thread-common.h @@ -39,8 +39,4 @@ 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 e7cc5923bae00f39ff7044a4f743a809ec76185c..27765a854810ba30733b5cc6ffef7ac9f640c5ac 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -891,7 +891,6 @@ 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/openair2/GNB_APP/gnb_paramdef.h b/openair2/GNB_APP/gnb_paramdef.h index 84da1de530ac99bc188350c185e26704ea9c1184..d892e667d49e58212d12af2cffe9d11f1e3c6e51 100644 --- a/openair2/GNB_APP/gnb_paramdef.h +++ b/openair2/GNB_APP/gnb_paramdef.h @@ -50,6 +50,7 @@ extern int asn_debug; extern int asn1_xer_print; +extern uint32_t num_threads_pusch; #ifdef LIBCONFIG_LONG #define libconfig_int long @@ -83,13 +84,15 @@ typedef enum { /* global parameters, not under a specific section */ #define GNB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity" #define GNB_CONFIG_STRING_ACTIVE_GNBS "Active_gNBs" +#define GNB_CONFIG_PUSCH_THREADS "Num_Threads_PUSCH" /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* global configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBSPARAMS_DESC { \ {GNB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \ +{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \ +{GNB_CONFIG_PUSCH_THREADS, NULL, 0, uptr:&num_threads_pusch, defuintval:1, TYPE_UINT, 0} \ } #define GNB_ASN1_VERBOSITY_IDX 0 #define GNB_ACTIVE_GNBS_IDX 1 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 255cfb08dc6e73266dae61c79e4c1236fdeaa591..47876154cb6d8cff411b7f9a64f7171bd15390b1 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 @@ -1,6 +1,7 @@ Active_gNBs = ( "gNB-Eurecom-5GNRBox"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; +Num_Threads_PUSCH = 8; gNBs = ( @@ -260,7 +261,6 @@ THREAD_STRUCT = ( parallel_config = "PARALLEL_RU_L1_TRX_SPLIT"; #two option for worker "WORKER_DISABLE" or "WORKER_ENABLE" worker_config = "WORKER_ENABLE"; - numULProcThreads = 8; } ); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf index fd1b62fd3dc05e3ec56fb977c1a65ee9a45a60d0..e34b26150092b902660cdf8b9fb43ef7595e82ff 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf @@ -1,6 +1,7 @@ Active_gNBs = ( "gNB-Eurecom-5GNRBox"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; +Num_Threads_PUSCH = 8; gNBs = (