@@ -398,40 +398,27 @@ static void configure_cli11_cell_affinity_args(CLI::App& app, ru_ofh_unit_cpu_af
398398 " Policy used for assigning CPU cores to the Radio Unit tasks" );
399399}
400400
401- static void configure_cli11_txrx_affinity_args (CLI::App& app, os_sched_affinity_bitmask& mask)
402- {
403- add_option_function<std::string>(
404- app,
405- " --ru_txrx_cpus" ,
406- [&mask](const std::string& value) { parse_affinity_mask (mask, value, " txrx_cpus" ); },
407- " Number of CPUs used for the Radio Unit tasks" );
408- }
409-
410401static void configure_cli11_expert_execution_args (CLI::App& app, ru_ofh_unit_expert_execution_config& config)
411402{
412403 // Affinities section.
413404 CLI::App* affinities_subcmd = add_subcommand (app, " affinities" , " gNB CPU affinities configuration" )->configurable ();
405+ CLI::App* ofh_subcmd =
406+ add_subcommand (*affinities_subcmd, " ofh" , " Open Fronthaul CPU affinities configuration" )->configurable ();
414407 add_option_function<std::string>(
415- *affinities_subcmd ,
408+ *ofh_subcmd ,
416409 " --ru_timing_cpu" ,
417410 [&config](const std::string& value) { parse_affinity_mask (config.ru_timing_cpu , value, " ru_timing_cpu" ); },
418411 " CPU used for timing in the Radio Unit" );
419412
420413 // RU txrx affinity section.
421414 add_option_cell (
422- *affinities_subcmd ,
423- " --ofh " ,
415+ *ofh_subcmd ,
416+ " --txrx_cpus " ,
424417 [&config](const std::vector<std::string>& values) {
425418 config.txrx_affinities .resize (values.size ());
426419
427420 for (unsigned i = 0 , e = values.size (); i != e; ++i) {
428- CLI::App subapp (" RU tx-rx thread CPU affinities" ,
429- " RU tx-rx thread CPU affinities config #" + std::to_string (i));
430- subapp.config_formatter (create_yaml_config_parser ());
431- subapp.allow_config_extras ();
432- configure_cli11_txrx_affinity_args (subapp, config.txrx_affinities [i]);
433- std::istringstream ss (values[i]);
434- subapp.parse_from_stream (ss);
421+ parse_affinity_mask (config.txrx_affinities [i], values[i], " txrx_cpus" );
435422 }
436423 },
437424 " Sets the CPU affinities configuration for RU cells tx-rx threads. Number of entries specified defines the "
0 commit comments