@@ -1999,17 +1999,26 @@ static void manage_hal_optional(CLI::App& app, gnb_appconfig& gnb_cfg)
19991999
20002000static void manage_expert_execution_threads (CLI::App& app, gnb_appconfig& gnb_cfg)
20012001{
2002+ // When no downlink threads property is defined, make sure that the value of this variable is smaller than the
2003+ // max_proc_delay..
2004+ upper_phy_threads_appconfig& upper = gnb_cfg.expert_execution_cfg .threads .upper_threads ;
2005+ CLI::App* expert_cmd = app.get_subcommand (" expert_execution" );
2006+ if (expert_cmd->count_all () < 1 || expert_cmd->get_subcommand (" threads" )->count_all () < 1 ||
2007+ expert_cmd->get_subcommand (" threads" )->get_subcommand (" upper_phy" )->count_all () < 1 ||
2008+ expert_cmd->get_subcommand (" threads" )->get_subcommand (" upper_phy" )->count (" --nof_dl_threads" ) == 0 ) {
2009+ upper.nof_dl_threads = std::min (upper.nof_dl_threads , gnb_cfg.expert_phy_cfg .max_processing_delay_slots );
2010+ }
2011+
20022012 if (!variant_holds_alternative<ru_sdr_appconfig>(gnb_cfg.ru_cfg )) {
20032013 return ;
20042014 }
20052015
20062016 // Ignore the default settings based in the number of CPU cores for ZMQ.
20072017 if (variant_get<ru_sdr_appconfig>(gnb_cfg.ru_cfg ).device_driver == " zmq" ) {
2008- upper_phy_threads_appconfig& upper = gnb_cfg.expert_execution_cfg .threads .upper_threads ;
2009- upper.nof_pdsch_threads = 1 ;
2010- upper.nof_pusch_decoder_threads = 0 ;
2011- upper.nof_ul_threads = 1 ;
2012- upper.nof_dl_threads = 1 ;
2018+ upper.nof_pdsch_threads = 1 ;
2019+ upper.nof_pusch_decoder_threads = 0 ;
2020+ upper.nof_ul_threads = 1 ;
2021+ upper.nof_dl_threads = 1 ;
20132022 gnb_cfg.expert_execution_cfg .threads .lower_threads .execution_profile = lower_phy_thread_profile::blocking;
20142023 }
20152024}
@@ -2177,7 +2186,7 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
21772186 app.callback ([&]() {
21782187 manage_ru_variant (app, gnb_cfg, sdr_cfg, ofh_cfg);
21792188 manage_hal_optional (app, gnb_cfg);
2180- manage_expert_execution_threads (app, gnb_cfg);
21812189 manage_processing_delay (app, gnb_cfg);
2190+ manage_expert_execution_threads (app, gnb_cfg);
21822191 });
21832192}
0 commit comments