Skip to content

Commit fd5ebc7

Browse files
carlo-galcodebot
authored andcommitted
sched: improve comments of pucch resource manager
Signed-off-by: Carlo Galiotto <[email protected]>
1 parent 1dc6fc4 commit fd5ebc7

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

lib/scheduler/pucch_scheduling/pucch_allocator_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ pucch_harq_ack_grant pucch_allocator_impl::update_format2_grant(pucch_info&
10831083

10841084
const pucch_harq_resource_alloc_record pucch_f2_harq_info =
10851085
use_pucch_f2_csi_res ? pucch_harq_resource_alloc_record{.pucch_res = nullptr}
1086-
: resource_manager.fetch_specific_f2_harq_resource(
1086+
: resource_manager.fetch_allocated_f2_harq_resource(
10871087
sl_tx,
10881088
existing_f2_grant.crnti,
10891089
ue_cell_cfg.cfg_dedicated().ul_config.value().init_ul_bwp.pucch_cfg.value());

lib/scheduler/pucch_scheduling/pucch_resource_manager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ int pucch_resource_manager::fetch_f2_pucch_res_indic(slot_point slot_tx, rnti_t
281281
}
282282

283283
const pucch_harq_resource_alloc_record
284-
pucch_resource_manager::fetch_specific_f2_harq_resource(slot_point slot_harq,
285-
rnti_t crnti,
286-
const pucch_config& pucch_cfg)
284+
pucch_resource_manager::fetch_allocated_f2_harq_resource(slot_point slot_harq,
285+
rnti_t crnti,
286+
const pucch_config& pucch_cfg)
287287
{
288288
srsran_sanity_check(slot_harq < last_sl_ind + RES_MANAGER_RING_BUFFER_SIZE,
289289
"PUCCH being allocated to far into the future");
@@ -308,7 +308,7 @@ pucch_resource_manager::fetch_specific_f2_harq_resource(slot_point slot
308308

309309
const auto& pucch_res_list = pucch_cfg.pucch_res_list;
310310

311-
// If there is an available resource, try to allocate it.
311+
// If the resource is found, get the resource indicator and the configuration from the PUCCH resource list.
312312
if (target_ue_resource != slot_ue_res_array.end() and
313313
static_cast<unsigned>(target_ue_resource - slot_ue_res_array.begin()) <
314314
pucch_cfg.pucch_res_set[PUCCH_HARQ_F2_RES_SET_ID].pucch_res_id_list.size()) {

lib/scheduler/pucch_scheduling/pucch_resource_manager.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ class pucch_resource_manager
124124
/// \return PUCCH resource indicator of the resource used allocated to the UE; if UE is not found, returns -1.
125125
int fetch_f2_pucch_res_indic(slot_point slot_tx, rnti_t crnti, const pucch_config& pucch_cfg);
126126

127-
/// \brief Returns the configuration of the PUCCH Format 2 resource used for HARQ already allocated to a given RNTI at
128-
/// a given slot.
129-
/// \return Pointer to the resource configuration allocated to the UE; if UE is not found, returns \c nullptr.
127+
/// \brief Fetches the configuration of the PUCCH Format 2 resource used for HARQ previously allocated to a given RNTI
128+
/// for a given slot.
129+
/// \return If the resource is found, it returns (i) the pointer to the configuration and (ii) the PUCCH resource
130+
/// indicator corresponding to the PUCCH resource that previously allocated to the UE. Else, the pointer passed will
131+
/// be \c nullptr, whereas the PUCCH resource indicator is to be ignored.
130132
const pucch_harq_resource_alloc_record
131-
fetch_specific_f2_harq_resource(slot_point slot_harq, rnti_t crnti, const pucch_config& pucch_cfg);
133+
fetch_allocated_f2_harq_resource(slot_point slot_harq, rnti_t crnti, const pucch_config& pucch_cfg);
132134

133135
/// \brief Returns the configuration of the PUCCH resource used for CSI (format 2) for a given RNTI at a given slot.
134136
/// \return Pointer to the resource configuration used allocated to the UE; if UE is not found, returns \c nullptr.

0 commit comments

Comments
 (0)