Skip to content

Commit af6c45d

Browse files
committed
sched: avoid allocating UL HARQs due to SR when UE is being removed
1 parent 6c2a5ec commit af6c45d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/scheduler/ue_scheduling/ul_logical_channel_manager.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class ul_logical_channel_manager
3535
/// \brief Verifies if logical channel group is activated for UL.
3636
bool is_active(lcg_id_t lcg_id) const { return groups[lcg_id].active; }
3737

38+
/// \brief Verifies if at least one logical channel group is active.
39+
bool is_active() const
40+
{
41+
return std::any_of(groups.begin(), groups.end(), [](const auto& g) { return g.active; });
42+
}
43+
3844
/// \brief Checks whether a logical channel has pending data.
3945
bool has_pending_bytes() const
4046
{
@@ -74,6 +80,10 @@ class ul_logical_channel_manager
7480
/// \brief Indicate that the UE requested an UL grant.
7581
void handle_sr_indication()
7682
{
83+
if (not is_active()) {
84+
// Ignore SR indication if the UL has been deactivated.
85+
return;
86+
}
7787
sr_pending.store(true, std::memory_order::memory_order_relaxed);
7888
// TODO: handle SR indication content.
7989
}

0 commit comments

Comments
 (0)