Skip to content

Commit 549d121

Browse files
joaquim-srsasaezper
authored andcommitted
gnb: fix PHY UL/DL number of threads validation
1 parent afec0ce commit 549d121

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

apps/gnb/gnb_appconfig_validators.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,21 @@ static bool validate_log_appconfig(const log_appconfig& config)
471471
/// Validates expert physical layer configuration parameters.
472472
static bool validate_expert_phy_appconfig(const expert_upper_phy_appconfig& config)
473473
{
474-
static const interval<unsigned> nof_ul_threads_range(1, std::thread::hardware_concurrency());
475-
static constexpr interval<float> lphy_dl_throttling_range(0.0F, 1.0F);
474+
static const interval<unsigned, true> nof_ul_dl_threads_range(1, std::thread::hardware_concurrency());
475+
static constexpr interval<float> lphy_dl_throttling_range(0.0F, 1.0F);
476476

477477
bool valid = true;
478478

479-
if (!nof_ul_threads_range.contains(config.nof_ul_threads)) {
480-
fmt::print("Number of UL threads (i.e., {}) must be in range {}.\n", config.nof_ul_threads, nof_ul_threads_range);
479+
if (!nof_ul_dl_threads_range.contains(config.nof_ul_threads)) {
480+
fmt::print(
481+
"Number of PHY UL threads (i.e., {}) must be in range {}.\n", config.nof_ul_threads, nof_ul_dl_threads_range);
482+
valid = false;
483+
}
484+
485+
if (!nof_ul_dl_threads_range.contains(config.nof_pdsch_threads)) {
486+
fmt::print("Number of PHY PDSCH threads (i.e., {}) must be in range {}.\n",
487+
config.nof_pdsch_threads,
488+
nof_ul_dl_threads_range);
481489
valid = false;
482490
}
483491

0 commit comments

Comments
 (0)