Skip to content

Commit f394481

Browse files
committed
gnb: setting the headroom size to the max_proc_delay when it is not present in the configuration
1 parent 85676da commit f394481

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,28 +2326,40 @@ static void manage_expert_execution_threads(CLI::App& app, gnb_appconfig& gnb_cf
23262326
}
23272327
}
23282328

2329-
static void manage_processing_delay(CLI::App& app, gnb_appconfig& gnb_cfg)
2329+
/// Sets the request headroom size to the max processing delay value if the request headroom property was not parsed,
2330+
static void manage_max_request_headroom_size(CLI::App& app, gnb_appconfig& gnb_cfg)
23302331
{
2331-
// If max proc delay property is present in the config, do nothing.
2332+
// If max request headroom slots property is present in the config, do nothing.
23322333
CLI::App* expert_cmd = app.get_subcommand("expert_phy");
2333-
if (expert_cmd->count_all() >= 1 && expert_cmd->count("--max_proc_delay") >= 1) {
2334+
if (expert_cmd->count_all() >= 1 && expert_cmd->count("--max_request_headroom_slots") >= 1) {
23342335
return;
23352336
}
23362337

2337-
// As processing delay is not cell related, use the first cell to update the value.
2338-
const auto& cell = gnb_cfg.cells_cfg.front().cell;
2339-
nr_band band = cell.band ? cell.band.value() : band_helper::get_band_from_dl_arfcn(cell.dl_arfcn);
2340-
2341-
switch (band_helper::get_duplex_mode(band)) {
2342-
case duplex_mode::TDD:
2343-
gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 5;
2344-
break;
2345-
case duplex_mode::FDD:
2346-
gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 2;
2347-
break;
2348-
default:
2349-
break;
2338+
gnb_cfg.expert_phy_cfg.nof_slots_request_headroom = gnb_cfg.expert_phy_cfg.max_processing_delay_slots;
2339+
}
2340+
2341+
static void manage_processing_delay(CLI::App& app, gnb_appconfig& gnb_cfg)
2342+
{
2343+
// If max proc delay property is not present in the config, configure the default value.
2344+
CLI::App* expert_cmd = app.get_subcommand("expert_phy");
2345+
if (expert_cmd->count_all() == 0 || expert_cmd->count("--max_proc_delay") == 0) {
2346+
// As processing delay is not cell related, use the first cell to update the value.
2347+
const auto& cell = gnb_cfg.cells_cfg.front().cell;
2348+
nr_band band = cell.band ? cell.band.value() : band_helper::get_band_from_dl_arfcn(cell.dl_arfcn);
2349+
2350+
switch (band_helper::get_duplex_mode(band)) {
2351+
case duplex_mode::TDD:
2352+
gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 5;
2353+
break;
2354+
case duplex_mode::FDD:
2355+
gnb_cfg.expert_phy_cfg.max_processing_delay_slots = 2;
2356+
break;
2357+
default:
2358+
break;
2359+
}
23502360
}
2361+
2362+
manage_max_request_headroom_size(app, gnb_cfg);
23512363
}
23522364

23532365
void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_parsed_appconfig& gnb_parsed_cfg)

0 commit comments

Comments
 (0)