mirror of https://github.com/PentHertz/srsLTE.git
Fix gnb race condition in asynchronous PRACH processing by setting number of threads to 0
This commit is contained in:
parent
9c298b203d
commit
5b31fa72d3
|
@ -82,6 +82,7 @@ private:
|
||||||
uint32_t current_tti = 0; ///< Current TTI, read and write from same thread
|
uint32_t current_tti = 0; ///< Current TTI, read and write from same thread
|
||||||
srslog::basic_logger& logger;
|
srslog::basic_logger& logger;
|
||||||
prach_stack_adaptor_t prach_stack_adaptor;
|
prach_stack_adaptor_t prach_stack_adaptor;
|
||||||
|
uint32_t nof_prach_workers = 0;
|
||||||
|
|
||||||
// Current configuration
|
// Current configuration
|
||||||
std::mutex common_cfg_mutex;
|
std::mutex common_cfg_mutex;
|
||||||
|
@ -91,6 +92,7 @@ private:
|
||||||
public:
|
public:
|
||||||
struct args_t {
|
struct args_t {
|
||||||
uint32_t nof_phy_threads = 3;
|
uint32_t nof_phy_threads = 3;
|
||||||
|
uint32_t nof_prach_workers = 0;
|
||||||
uint32_t prio = 52;
|
uint32_t prio = 52;
|
||||||
uint32_t pusch_max_nof_iter = 10;
|
uint32_t pusch_max_nof_iter = 10;
|
||||||
srsran::phy_log_args_t log = {};
|
srsran::phy_log_args_t log = {};
|
||||||
|
|
|
@ -30,6 +30,8 @@ worker_pool::worker_pool(srsran::phy_common_interface& common_,
|
||||||
|
|
||||||
bool worker_pool::init(const args_t& args, const phy_cell_cfg_list_nr_t& cell_list)
|
bool worker_pool::init(const args_t& args, const phy_cell_cfg_list_nr_t& cell_list)
|
||||||
{
|
{
|
||||||
|
nof_prach_workers = args.nof_prach_workers;
|
||||||
|
|
||||||
// Configure logger
|
// Configure logger
|
||||||
srslog::basic_levels log_level = srslog::str_to_basic_level(args.log.phy_level);
|
srslog::basic_levels log_level = srslog::str_to_basic_level(args.log.phy_level);
|
||||||
logger.set_level(log_level);
|
logger.set_level(log_level);
|
||||||
|
@ -131,7 +133,7 @@ int worker_pool::set_common_cfg(const phy_interface_rrc_nr::common_cfg_t& common
|
||||||
prach_cfg.is_nr = true;
|
prach_cfg.is_nr = true;
|
||||||
|
|
||||||
// Set the PRACH configuration
|
// Set the PRACH configuration
|
||||||
prach.init(0, cell, prach_cfg, &prach_stack_adaptor, logger, 0, 1);
|
prach.init(0, cell, prach_cfg, &prach_stack_adaptor, logger, 0, nof_prach_workers);
|
||||||
prach.set_max_prach_offset_us(1000);
|
prach.set_max_prach_offset_us(1000);
|
||||||
|
|
||||||
// Save current configuration
|
// Save current configuration
|
||||||
|
|
|
@ -60,16 +60,15 @@ if (RF_FOUND AND ENABLE_SRSUE AND ENABLE_SRSENB)
|
||||||
--ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS}
|
--ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Disabled until fixed
|
add_nr_test(nr_phy_test_10MHz_prach nr_phy_test
|
||||||
#add_nr_test(nr_phy_test_10MHz_prach nr_phy_test
|
--duration=1000 # 100 slots
|
||||||
# --duration=1000 # 100 slots
|
--gnb.stack.pdsch.slots=none # No PDSCH
|
||||||
# --gnb.stack.pdsch.slots=none # No PDSCH
|
--gnb.stack.pusch.slots=none # No PUSCH
|
||||||
# --gnb.stack.pusch.slots=none # No PUSCH
|
--gnb.phy.nof_threads=${NR_PHY_TEST_GNB_NOF_THREADS}
|
||||||
# --gnb.phy.nof_threads=${NR_PHY_TEST_GNB_NOF_THREADS}
|
--ue.stack.prach.period=30 # Transmit PRACH every 30 radio frames
|
||||||
# --ue.stack.prach.period=30 # Transmit PRACH every 30 radio frames
|
--ue.stack.prach.preamble=10 # Use preamble 10
|
||||||
# --ue.stack.prach.preamble=10 # Use preamble 10
|
--ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS}
|
||||||
# --ue.phy.nof_threads=${NR_PHY_TEST_UE_NOF_THREADS}
|
)
|
||||||
# )
|
|
||||||
|
|
||||||
add_nr_test(nr_phy_test_10MHz_sr nr_phy_test
|
add_nr_test(nr_phy_test_10MHz_sr nr_phy_test
|
||||||
--duration=1000 # 100 slots
|
--duration=1000 # 100 slots
|
||||||
|
|
|
@ -566,6 +566,11 @@ public:
|
||||||
return SRSRAN_ERROR;
|
return SRSRAN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip next steps if uci data is invalid
|
||||||
|
if (not pucch_info.uci_data.value.valid) {
|
||||||
|
return SRSRAN_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle PHY metrics
|
// Handle PHY metrics
|
||||||
metrics.pucch.epre_db_avg = SRSRAN_VEC_CMA(pucch_info.csi.epre_dB, metrics.pucch.epre_db_avg, metrics.pucch.count);
|
metrics.pucch.epre_db_avg = SRSRAN_VEC_CMA(pucch_info.csi.epre_dB, metrics.pucch.epre_db_avg, metrics.pucch.count);
|
||||||
metrics.pucch.epre_db_min = SRSRAN_MIN(metrics.pucch.epre_db_min, pucch_info.csi.epre_dB);
|
metrics.pucch.epre_db_min = SRSRAN_MIN(metrics.pucch.epre_db_min, pucch_info.csi.epre_dB);
|
||||||
|
|
|
@ -254,9 +254,6 @@ int main(int argc, char** argv)
|
||||||
metrics.gnb_stack.pucch.ta_us_min,
|
metrics.gnb_stack.pucch.ta_us_min,
|
||||||
metrics.gnb_stack.pucch.ta_us_max);
|
metrics.gnb_stack.pucch.ta_us_max);
|
||||||
srsran::console(" +------------+------------+------------+------------+\n");
|
srsran::console(" +------------+------------+------------+------------+\n");
|
||||||
} else {
|
|
||||||
// In this case the gNb should not have detected any
|
|
||||||
TESTASSERT(metrics.gnb_stack.prach.empty());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print SR
|
// Print SR
|
||||||
|
|
Loading…
Reference in New Issue