Skip to content

Commit 7504b4c

Browse files
committed
fapi_adaptor: log slot controller acquisition failure
1 parent d5cbd2f commit 7504b4c

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

lib/fapi_adaptor/phy/fapi_to_phy_translator.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ fapi_to_phy_translator::fapi_to_phy_translator(const fapi_to_phy_translator_conf
6262
slot_controller_mngr(*dependencies.dl_processor_pool,
6363
*dependencies.dl_rg_pool,
6464
sector_id,
65-
config.nof_slots_request_headroom),
65+
config.nof_slots_request_headroom,
66+
logger),
6667
pm_repo(std::move(dependencies.pm_repo)),
6768
part2_repo(std::move(dependencies.part2_repo)),
6869
error_notifier(dummy_error_notifier),
@@ -81,7 +82,8 @@ fapi_to_phy_translator::slot_based_upper_phy_controller::slot_based_upper_phy_co
8182
downlink_processor_pool& dl_processor_pool,
8283
resource_grid_pool& rg_pool,
8384
slot_point slot_,
84-
unsigned sector_id) :
85+
unsigned sector_id,
86+
srslog::basic_logger& logger) :
8587
slot(slot_)
8688
{
8789
resource_grid_context context = {slot_, sector_id};
@@ -90,6 +92,7 @@ fapi_to_phy_translator::slot_based_upper_phy_controller::slot_based_upper_phy_co
9092

9193
// If the resource grid is not valid, all DL transmissions for this slot shall be discarded.
9294
if (!grid) {
95+
logger.warning("Could not acquire resource grid for slot={}", slot_);
9396
dl_processor = {};
9497
return;
9598
}
@@ -102,6 +105,7 @@ fapi_to_phy_translator::slot_based_upper_phy_controller::slot_based_upper_phy_co
102105

103106
// Swap the DL processor with a dummy if it failed to configure the resource grid.
104107
if (!dl_processor.is_valid()) {
108+
logger.warning("Could not acquire downlink processor for slot={}", slot_);
105109
dl_processor = {};
106110
}
107111
}
@@ -785,7 +789,7 @@ void fapi_to_phy_translator::slot_based_upper_phy_controller_manager::release_co
785789
fapi_to_phy_translator::slot_based_upper_phy_controller&
786790
fapi_to_phy_translator::slot_based_upper_phy_controller_manager::acquire_controller(slot_point slot)
787791
{
788-
controller(slot) = slot_based_upper_phy_controller(dl_processor_pool, rg_pool, slot, sector_id);
792+
controller(slot) = slot_based_upper_phy_controller(dl_processor_pool, rg_pool, slot, sector_id, logger);
789793

790794
return controller(slot);
791795
}
@@ -794,11 +798,13 @@ fapi_to_phy_translator::slot_based_upper_phy_controller_manager::slot_based_uppe
794798
downlink_processor_pool& dl_processor_pool_,
795799
resource_grid_pool& rg_pool_,
796800
unsigned sector_id_,
797-
unsigned nof_slots_request_headroom) :
801+
unsigned nof_slots_request_headroom,
802+
srslog::basic_logger& logger_) :
798803
dl_processor_pool(dl_processor_pool_),
799804
rg_pool(rg_pool_),
800805
sector_id(sector_id_),
801806
// The manager should be able to manage the current slot plus the requests headroom size.
802-
controllers(nof_slots_request_headroom + 1U)
807+
controllers(nof_slots_request_headroom + 1U),
808+
logger(logger_)
803809
{
804810
}

lib/fapi_adaptor/phy/fapi_to_phy_translator.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ class fapi_to_phy_translator : public fapi::slot_message_gateway, public fapi::s
114114
slot_based_upper_phy_controller(downlink_processor_pool& dl_processor_pool,
115115
resource_grid_pool& rg_pool,
116116
slot_point slot_,
117-
unsigned sector_id);
117+
unsigned sector_id,
118+
srslog::basic_logger& logger);
118119

119120
slot_based_upper_phy_controller(slot_based_upper_phy_controller&& other) = delete;
120121

@@ -133,6 +134,7 @@ class fapi_to_phy_translator : public fapi::slot_message_gateway, public fapi::s
133134
resource_grid_pool& rg_pool;
134135
const unsigned sector_id;
135136
std::vector<slot_based_upper_phy_controller> controllers;
137+
srslog::basic_logger& logger;
136138

137139
/// Returns the controller for the given slot.
138140
slot_based_upper_phy_controller& controller(slot_point slot)
@@ -153,7 +155,8 @@ class fapi_to_phy_translator : public fapi::slot_message_gateway, public fapi::s
153155
slot_based_upper_phy_controller_manager(downlink_processor_pool& dl_processor_pool_,
154156
resource_grid_pool& rg_pool_,
155157
unsigned sector_id_,
156-
unsigned nof_slots_request_headroom);
158+
unsigned nof_slots_request_headroom,
159+
srslog::basic_logger& logger);
157160

158161
/// \brief Releases the controller for the given slot.
159162
///

0 commit comments

Comments
 (0)