Skip to content

Commit f65c1f7

Browse files
committed
sched: improvements on CRC info handling in HARQ
1 parent 51c0185 commit f65c1f7

File tree

10 files changed

+61
-78
lines changed

10 files changed

+61
-78
lines changed

lib/scheduler/cell/cell_harq_manager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,8 @@ std::optional<ul_harq_process_handle> unique_ue_harq_entity::find_ul_harq_waitin
854854
return ul_harq_process_handle(cell_harq_mgr->ul, *h);
855855
}
856856

857-
std::optional<dl_harq_process_handle> unique_ue_harq_entity::find_dl_harq(slot_point uci_slot, uint8_t harq_bit_idx)
857+
std::optional<dl_harq_process_handle> unique_ue_harq_entity::find_dl_harq_waiting_ack(slot_point uci_slot,
858+
uint8_t harq_bit_idx)
858859
{
859860
if (cell_harq_mgr->dl.alloc_hist != nullptr) {
860861
// NTN mode.
@@ -871,7 +872,7 @@ std::optional<dl_harq_process_handle> unique_ue_harq_entity::find_dl_harq(slot_p
871872
return std::nullopt;
872873
}
873874

874-
std::optional<ul_harq_process_handle> unique_ue_harq_entity::find_ul_harq(slot_point pusch_slot)
875+
std::optional<ul_harq_process_handle> unique_ue_harq_entity::find_ul_harq_waiting_ack(slot_point pusch_slot)
875876
{
876877
if (cell_harq_mgr->ul.alloc_hist != nullptr) {
877878
// NTN mode.
@@ -901,7 +902,7 @@ void unique_ue_harq_entity::uci_sched_failed(slot_point uci_slot)
901902
}
902903
}
903904

904-
unsigned unique_ue_harq_entity::total_ul_bytes_waiting_crc() const
905+
unsigned unique_ue_harq_entity::total_ul_bytes_waiting_ack() const
905906
{
906907
if (cell_harq_mgr->ul.is_ntn_mode()) {
907908
return cell_harq_mgr->ul.alloc_hist->sum_pending_ul_tbs(ue_index);

lib/scheduler/cell/cell_harq_manager.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,30 +503,25 @@ class unique_ue_harq_entity
503503
std::optional<dl_harq_process_handle> find_dl_harq_waiting_ack();
504504
std::optional<ul_harq_process_handle> find_ul_harq_waiting_ack();
505505

506-
/// Fetch active DL HARQ process based on HARQ-ACK UCI slot and HARQ bit index.
506+
/// Fetch a DL HARQ process expecting ACK info based on HARQ-ACK UCI slot and HARQ bit index.
507507
/// \param[in] uci_slot Slot when the UCI is to be received.
508508
/// \param[in] harq_bit_idx Bit index of the HARQ-ACK in the UCI indication.
509509
/// \return Active DL HARQ process with matching UCI slot and HARQ bit index, if found.
510-
std::optional<dl_harq_process_handle> find_dl_harq(slot_point uci_slot, uint8_t harq_bit_idx);
510+
std::optional<dl_harq_process_handle> find_dl_harq_waiting_ack(slot_point uci_slot, uint8_t harq_bit_idx);
511511

512512
/// Fetch active UL HARQ process based on slot when its PUSCH was transmitted.
513513
/// \param[in] pusch_slot Slot when the PUSCH was transmitted.
514514
/// \return Active UL HARQ process with matching PUSCH slot, if found.
515-
std::optional<ul_harq_process_handle> find_ul_harq(slot_point pusch_slot);
515+
std::optional<ul_harq_process_handle> find_ul_harq_waiting_ack(slot_point pusch_slot);
516516

517517
/// \brief The UCI scheduling associated with a given slot was cancelled. The associated DL HARQs will be NACKed, and
518518
/// won't expect further UCIs.
519519
///
520520
/// This function can be called for instance when there is an error indication coming from lower layers.
521521
void uci_sched_failed(slot_point uci_slot);
522522

523-
unsigned ntn_get_tbs_pending_crcs() const
524-
{
525-
// TODO
526-
return 0;
527-
}
528-
529-
unsigned total_ul_bytes_waiting_crc() const;
523+
/// Determines the sum of the number of bytes that are in active UL HARQ processes.
524+
unsigned total_ul_bytes_waiting_ack() const;
530525

531526
private:
532527
dl_harq_ent_impl& get_dl_ue() { return cell_harq_mgr->dl.ues[ue_index]; }

lib/scheduler/slicing/slice_ue_repository.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@ unsigned slice_ue::pending_ul_newtx_bytes() const
8080
if (pending_bytes == 0) {
8181
break;
8282
}
83-
unsigned harq_bytes = 0;
84-
for (unsigned i = 0; i != ue_cc.harqs.nof_ul_harqs(); ++i) {
85-
std::optional<const ul_harq_process_handle> h_ul = ue_cc.harqs.ul_harq(to_harq_id(i));
86-
if (h_ul.has_value()) {
87-
harq_bytes += h_ul->get_grant_params().tbs_bytes;
88-
}
89-
}
90-
harq_bytes += ue_cc.harqs.ntn_get_tbs_pending_crcs();
83+
unsigned harq_bytes = ue_cc.harqs.total_ul_bytes_waiting_ack();
9184
pending_bytes -= std::min(pending_bytes, harq_bytes);
9285
}
9386

lib/scheduler/ue_scheduling/ue.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,7 @@ unsigned ue::pending_ul_newtx_bytes() const
147147
if (pending_bytes == 0) {
148148
break;
149149
}
150-
unsigned harq_bytes = 0;
151-
for (unsigned i = 0; i != ue_cc->harqs.nof_ul_harqs(); ++i) {
152-
std::optional<const ul_harq_process_handle> h_ul = ue_cc->harqs.ul_harq(to_harq_id(i));
153-
if (h_ul.has_value()) {
154-
harq_bytes += h_ul->get_grant_params().tbs_bytes;
155-
}
156-
}
157-
harq_bytes += ue_cc->harqs.ntn_get_tbs_pending_crcs();
150+
unsigned harq_bytes = ue_cc->harqs.total_ul_bytes_waiting_ack();
158151
pending_bytes -= std::min(pending_bytes, harq_bytes);
159152
}
160153

lib/scheduler/ue_scheduling/ue_cell.cpp

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ std::optional<dl_harq_process::dl_ack_info_result> ue_cell::handle_dl_ack_info(s
102102
unsigned harq_bit_idx,
103103
std::optional<float> pucch_snr)
104104
{
105-
std::optional<dl_harq_process_handle> h_dl = harqs.find_dl_harq(uci_slot, harq_bit_idx);
105+
std::optional<dl_harq_process_handle> h_dl = harqs.find_dl_harq_waiting_ack(uci_slot, harq_bit_idx);
106106
if (not h_dl.has_value()) {
107107
logger.warning("rnti={}: Discarding ACK info. Cause: DL HARQ for uci slot={} not found.", rnti(), uci_slot);
108108
return std::nullopt;
@@ -232,18 +232,12 @@ grant_prbs_mcs ue_cell::required_ul_prbs(const pusch_time_domain_resource_alloca
232232
int ue_cell::handle_crc_pdu(slot_point pusch_slot, const ul_crc_pdu_indication& crc_pdu)
233233
{
234234
// Find UL HARQ with matching PUSCH slot.
235-
std::optional<ul_harq_process_handle> h_ul = harqs.ul_harq(crc_pdu.harq_id);
236-
if (not h_ul.has_value()) {
237-
logger.warning("rnti={} h_id={}: Discarding CRC. Cause: UL HARQ process is not active", rnti(), crc_pdu.harq_id);
238-
return -1;
239-
}
240-
if (h_ul->pusch_slot() != pusch_slot) {
241-
logger.warning(
242-
"rnti={} h_id={}: Discarding CRC. Cause: UL HARQ process was expecting a CRC at a different slot ({}!={})",
243-
rnti(),
244-
crc_pdu.harq_id,
245-
pusch_slot,
246-
h_ul->pusch_slot());
235+
std::optional<ul_harq_process_handle> h_ul = harqs.find_ul_harq_waiting_ack(pusch_slot);
236+
if (not h_ul.has_value() or h_ul->id() != crc_pdu.harq_id) {
237+
logger.warning("rnti={} h_id={}: Discarding CRC. Cause: UL HARQ process is not expecting CRC for PUSCH slot {}",
238+
rnti(),
239+
crc_pdu.harq_id,
240+
pusch_slot);
247241
return -1;
248242
}
249243

lib/scheduler/ue_scheduling/ue_fallback_scheduler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class ue_fallback_scheduler
166166
const pusch_time_domain_resource_allocation& pusch_td,
167167
std::optional<ul_harq_process_handle> h_ul_retx);
168168

169+
/// \return A pair with the number of SRB bytes allocated and which DL HARQ process was used.
169170
std::pair<unsigned, dl_harq_process_handle> fill_dl_srb_grant(ue& u,
170171
slot_point pdsch_slot,
171172
std::optional<dl_harq_process_handle> h_dl,

lib/scheduler/ue_scheduling/ue_pusch_alloc_param_candidate_searcher.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ class ue_pusch_alloc_param_candidate_searcher
153153
};
154154

155155
/// Create a searcher for UE PUSCH parameters.
156-
ue_pusch_alloc_param_candidate_searcher(const ue& ue_ref_,
157-
du_cell_index_t cell_index,
156+
ue_pusch_alloc_param_candidate_searcher(const ue& ue_ref_,
157+
du_cell_index_t cell_index,
158158
const std::optional<ul_harq_process_handle>& ul_harq_,
159-
slot_point pdcch_slot_,
160-
span<const slot_point> slots_with_no_pusch_space_,
161-
slot_point pusch_slot_) :
159+
slot_point pdcch_slot_,
160+
span<const slot_point> slots_with_no_pusch_space_,
161+
slot_point pusch_slot_) :
162162
ue_ref(ue_ref_),
163163
ue_cc(ue_ref.find_cell(cell_index)),
164164
slots_with_no_pusch_space(slots_with_no_pusch_space_),

lib/scheduler/ue_scheduling/ue_scheduler_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void ue_scheduler_impl::update_harq_pucch_counter(cell_resource_allocator& cell_
108108
// expecting to be acknowledged on the same slot.
109109
for (unsigned harq_bit_idx = 0; harq_bit_idx != nof_harqs_per_rnti_per_slot; ++harq_bit_idx) {
110110
std::optional<dl_harq_process_handle> h_dl =
111-
user->get_pcell().harqs.find_dl_harq(slot_alloc.slot, harq_bit_idx);
111+
user->get_pcell().harqs.find_dl_harq_waiting_ack(slot_alloc.slot, harq_bit_idx);
112112
if (not h_dl.has_value() or not h_dl->is_waiting_ack()) {
113113
logger.warning(
114114
"ue={} rnti={}: No DL HARQ process with state waiting-for-ack found at slot={} for harq-bit-index={}",

tests/unittests/scheduler/cell/cell_harq_manager_test.cpp

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ TEST_F(single_harq_process_test, when_harq_is_allocated_then_harq_grant_params_h
296296
ASSERT_EQ(h_dl.get_grant_params().tbs_bytes, pdsch_info.codewords[0].tb_size_bytes);
297297
ASSERT_EQ(h_dl.get_grant_params().rbs.type1(), pdsch_info.rbs.type1());
298298
ASSERT_EQ(h_dl.get_grant_params().dci_cfg_type, dci_dl_rnti_config_type::c_rnti_f1_0);
299-
ASSERT_EQ(h_ul.get_grant_params().tbs_bytes, harq_ent.total_ul_bytes_waiting_crc());
299+
ASSERT_EQ(h_ul.get_grant_params().tbs_bytes, harq_ent.total_ul_bytes_waiting_ack());
300300
}
301301

302302
TEST_F(single_harq_process_test, positive_ack_sets_harq_to_empty)
@@ -309,15 +309,15 @@ TEST_F(single_harq_process_test, positive_ack_sets_harq_to_empty)
309309
ASSERT_FALSE(h_ul.is_waiting_ack());
310310
ASSERT_FALSE(h_ul.has_pending_retx());
311311

312-
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_crc(), 0);
312+
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_ack(), 0);
313313
}
314314

315315
TEST_F(single_harq_process_test, negative_ack_sets_harq_to_pending_retx)
316316
{
317317
ASSERT_EQ(h_dl.dl_ack_info(mac_harq_ack_report_status::nack, 5), dl_harq_process_handle::status_update::nacked);
318318
ASSERT_FALSE(h_dl.is_waiting_ack());
319319
ASSERT_TRUE(h_dl.has_pending_retx());
320-
ASSERT_EQ(harq_ent.find_ul_harq(current_slot + k2), h_ul);
320+
ASSERT_EQ(harq_ent.find_ul_harq_waiting_ack(current_slot + k2), h_ul);
321321
ASSERT_EQ(h_ul.ul_crc_info(false), 0);
322322
ASSERT_FALSE(h_ul.is_waiting_ack());
323323
ASSERT_TRUE(h_ul.has_pending_retx());
@@ -677,8 +677,8 @@ TEST_F(single_ue_harq_entity_test, when_max_retxs_reached_then_harq_entity_does_
677677
ASSERT_TRUE(h_dl.has_value());
678678
ASSERT_TRUE(h_ul.has_value());
679679
for (unsigned i = 0; i != max_retxs; ++i) {
680-
ASSERT_EQ(harq_ent.find_dl_harq(current_slot + k1, 0), h_dl);
681-
ASSERT_EQ(harq_ent.find_ul_harq(current_slot + k2), h_ul);
680+
ASSERT_EQ(harq_ent.find_dl_harq_waiting_ack(current_slot + k1, 0), h_dl);
681+
ASSERT_EQ(harq_ent.find_ul_harq_waiting_ack(current_slot + k2), h_ul);
682682
ASSERT_EQ(h_dl.value().dl_ack_info(mac_harq_ack_report_status::nack, 5),
683683
dl_harq_process_handle::status_update::nacked);
684684
ASSERT_EQ(h_ul.value().ul_crc_info(false), 0);
@@ -744,15 +744,15 @@ TEST_P(single_ue_harq_entity_2_bits_tester, handle_pucchs)
744744
auto params = GetParam();
745745

746746
// First PUCCH, 2 HARQ bits, different indexes.
747-
auto h_dl1 = harq_ent.find_dl_harq(pucch_slot, 0);
748-
auto h_dl2 = harq_ent.find_dl_harq(pucch_slot, 1);
747+
auto h_dl1 = harq_ent.find_dl_harq_waiting_ack(pucch_slot, 0);
748+
auto h_dl2 = harq_ent.find_dl_harq_waiting_ack(pucch_slot, 1);
749749
h_dl1->dl_ack_info((mac_harq_ack_report_status)params.ack[0][0], std::nullopt);
750750
h_dl2->dl_ack_info((mac_harq_ack_report_status)params.ack[0][1], std::nullopt);
751751

752752
// Second PUCCH, 2 HARQ bits, different indexes.
753753
if (params.ack.size() > 1) {
754-
h_dl1 = harq_ent.find_dl_harq(pucch_slot, 0);
755-
h_dl2 = harq_ent.find_dl_harq(pucch_slot, 1);
754+
h_dl1 = harq_ent.find_dl_harq_waiting_ack(pucch_slot, 0);
755+
h_dl2 = harq_ent.find_dl_harq_waiting_ack(pucch_slot, 1);
756756
h_dl1->dl_ack_info((mac_harq_ack_report_status)params.ack[1][0], std::nullopt);
757757
h_dl2->dl_ack_info((mac_harq_ack_report_status)params.ack[1][1], std::nullopt);
758758
}
@@ -812,7 +812,7 @@ TEST_F(single_ue_harq_entity_harq_5bit_tester, when_5_harq_bits_are_acks_then_al
812812

813813
// ACK received.
814814
for (unsigned i = 0; i != active_harqs; ++i) {
815-
auto h_dl = this->harq_ent.find_dl_harq(pucch_slot, i);
815+
auto h_dl = this->harq_ent.find_dl_harq_waiting_ack(pucch_slot, i);
816816
ASSERT_EQ(h_dl->dl_ack_info(mac_harq_ack_report_status::ack, std::nullopt),
817817
dl_harq_process_handle::status_update::acked);
818818
}
@@ -840,7 +840,7 @@ TEST_F(single_ue_harq_entity_harq_5bit_tester, when_5_harq_bits_are_nacks_then_a
840840

841841
// NACK received.
842842
for (unsigned i = 0; i != active_harqs; ++i) {
843-
auto h_dl_ack = this->harq_ent.find_dl_harq(pucch_slot, i);
843+
auto h_dl_ack = this->harq_ent.find_dl_harq_waiting_ack(pucch_slot, i);
844844
ASSERT_EQ(h_dl_ack->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
845845
dl_harq_process_handle::status_update::nacked);
846846
}
@@ -911,12 +911,14 @@ TEST_F(multi_ue_harq_manager_test, when_harq_entities_are_nacked_then_they_appea
911911
ASSERT_TRUE(cell_harqs.pending_ul_retxs().empty());
912912
ASSERT_EQ(cell_harqs.pending_dl_retxs().begin(), cell_harqs.pending_dl_retxs().end());
913913

914-
ASSERT_EQ(harq_ent1.find_dl_harq(current_slot + k1, 0)->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
914+
ASSERT_EQ(harq_ent1.find_dl_harq_waiting_ack(current_slot + k1, 0)
915+
->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
915916
dl_harq_process_handle::status_update::nacked);
916-
ASSERT_EQ(harq_ent1.find_ul_harq(current_slot + k2)->ul_crc_info(false), 0);
917-
ASSERT_EQ(harq_ent2.find_dl_harq(current_slot + k1, 0)->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
917+
ASSERT_EQ(harq_ent1.find_ul_harq_waiting_ack(current_slot + k2)->ul_crc_info(false), 0);
918+
ASSERT_EQ(harq_ent2.find_dl_harq_waiting_ack(current_slot + k1, 0)
919+
->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
918920
dl_harq_process_handle::status_update::nacked);
919-
ASSERT_EQ(harq_ent2.find_ul_harq(current_slot + k2)->ul_crc_info(false), 0);
921+
ASSERT_EQ(harq_ent2.find_ul_harq_waiting_ack(current_slot + k2)->ul_crc_info(false), 0);
920922

921923
// HARQs are in the list of pending retxs.
922924
ASSERT_FALSE(cell_harqs.pending_dl_retxs().empty());
@@ -962,12 +964,14 @@ TEST_F(multi_ue_harq_manager_test, pending_harq_retxs_are_ordered_from_oldest_to
962964
ASSERT_TRUE(harq_ent2.alloc_dl_harq(current_slot, k1, max_retxs, 0).has_value());
963965
ASSERT_TRUE(harq_ent1.alloc_ul_harq(current_slot + k2, max_retxs).has_value());
964966

965-
ASSERT_EQ(harq_ent1.find_dl_harq(current_slot + k1, 0)->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
967+
ASSERT_EQ(harq_ent1.find_dl_harq_waiting_ack(current_slot + k1, 0)
968+
->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
966969
dl_harq_process_handle::status_update::nacked);
967-
ASSERT_EQ(harq_ent2.find_dl_harq(current_slot + k1, 0)->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
970+
ASSERT_EQ(harq_ent2.find_dl_harq_waiting_ack(current_slot + k1, 0)
971+
->dl_ack_info(mac_harq_ack_report_status::nack, std::nullopt),
968972
dl_harq_process_handle::status_update::nacked);
969-
ASSERT_EQ(harq_ent2.find_ul_harq(current_slot + k2)->ul_crc_info(false), 0);
970-
ASSERT_EQ(harq_ent1.find_ul_harq(current_slot + k2)->ul_crc_info(false), 0);
973+
ASSERT_EQ(harq_ent2.find_ul_harq_waiting_ack(current_slot + k2)->ul_crc_info(false), 0);
974+
ASSERT_EQ(harq_ent1.find_ul_harq_waiting_ack(current_slot + k2)->ul_crc_info(false), 0);
971975

972976
unsigned count = 0;
973977
for (dl_harq_process_handle h : cell_harqs.pending_dl_retxs()) {
@@ -1057,13 +1061,13 @@ TEST_F(single_ntn_ue_harq_process_test, harq_history_is_reachable_after_timeout)
10571061
ASSERT_FALSE(harq_ent.dl_harq(to_harq_id(0)).has_value());
10581062
ASSERT_FALSE(harq_ent.ul_harq(to_harq_id(0)).has_value());
10591063

1060-
h_dl = harq_ent.find_dl_harq(uci_slot, 0).value();
1061-
h_ul = harq_ent.find_ul_harq(pusch_slot).value();
1064+
h_dl = harq_ent.find_dl_harq_waiting_ack(uci_slot, 0).value();
1065+
h_ul = harq_ent.find_ul_harq_waiting_ack(pusch_slot).value();
10621066
ASSERT_FALSE(h_dl.empty() and h_ul.empty());
10631067
ASSERT_EQ(h_dl.get_grant_params().tbs_bytes, pdsch_info.codewords[0].tb_size_bytes);
10641068
ASSERT_EQ(h_ul.get_grant_params().tbs_bytes, pusch_info.tb_size_bytes);
10651069

1066-
ASSERT_EQ(h_ul.get_grant_params().tbs_bytes, harq_ent.total_ul_bytes_waiting_crc());
1070+
ASSERT_EQ(h_ul.get_grant_params().tbs_bytes, harq_ent.total_ul_bytes_waiting_ack());
10671071
}
10681072

10691073
TEST_F(single_ntn_ue_harq_process_test, when_harq_gets_acked_then_it_reports_the_correct_tbs)
@@ -1075,12 +1079,12 @@ TEST_F(single_ntn_ue_harq_process_test, when_harq_gets_acked_then_it_reports_the
10751079
run_slot();
10761080
}
10771081

1078-
h_ul = harq_ent.find_ul_harq(pusch_slot).value();
1079-
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_crc(), pusch_info.tb_size_bytes);
1082+
h_ul = harq_ent.find_ul_harq_waiting_ack(pusch_slot).value();
1083+
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_ack(), pusch_info.tb_size_bytes);
10801084
ASSERT_EQ(h_ul.ul_crc_info(true), pusch_info.tb_size_bytes);
1081-
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_crc(), 0);
1085+
ASSERT_EQ(harq_ent.total_ul_bytes_waiting_ack(), 0);
10821086

1083-
h_dl = harq_ent.find_dl_harq(uci_slot, 0).value();
1087+
h_dl = harq_ent.find_dl_harq_waiting_ack(uci_slot, 0).value();
10841088
ASSERT_EQ(h_dl.dl_ack_info(mac_harq_ack_report_status::ack, std::nullopt),
10851089
dl_harq_process_handle::status_update::acked);
10861090
ASSERT_EQ(h_dl.get_grant_params().tbs_bytes, pdsch_info.codewords[0].tb_size_bytes);

tests/unittests/scheduler/ue_scheduling/fallback_scheduler_test.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ TEST_P(fallback_scheduler_head_scheduling, test_ahead_scheduling_for_srb_allocat
829829
// Ack the HARQ processes that are waiting for ACK, otherwise the scheduler runs out of empty HARQs.
830830
const unsigned bit_index_1_harq_only = 0U;
831831
std::optional<dl_harq_process_handle> dl_harq =
832-
test_ue.get_pcell().harqs.find_dl_harq(current_slot, bit_index_1_harq_only);
832+
test_ue.get_pcell().harqs.find_dl_harq_waiting_ack(current_slot, bit_index_1_harq_only);
833833
if (dl_harq.has_value()) {
834834
dl_harq->dl_ack_info(mac_harq_ack_report_status::ack, std::nullopt);
835835
}
@@ -946,7 +946,8 @@ class fallback_scheduler_retx : public base_fallback_tester, public ::testing::T
946946
{
947947
// Ack the HARQ processes that are waiting for ACK, otherwise the scheduler runs out of empty HARQs.
948948
const unsigned bit_index_1_harq_only = 0U;
949-
std::optional<dl_harq_process_handle> dl_harq = test_ue.get_pcell().harqs.find_dl_harq(sl, bit_index_1_harq_only);
949+
std::optional<dl_harq_process_handle> dl_harq =
950+
test_ue.get_pcell().harqs.find_dl_harq_waiting_ack(sl, bit_index_1_harq_only);
950951
if (dl_harq.has_value()) {
951952
srsran_assert(dl_harq->id() == ongoing_h_id, "HARQ process mismatch");
952953
dl_harq->dl_ack_info(ack_outcome ? mac_harq_ack_report_status::ack : mac_harq_ack_report_status::nack, {});
@@ -1152,7 +1153,8 @@ class fallback_scheduler_srb1_segmentation : public base_fallback_tester, public
11521153
{
11531154
// Ack the HARQ processes that are waiting for ACK, otherwise the scheduler runs out of empty HARQs.
11541155
const unsigned bit_index_1_harq_only = 0U;
1155-
std::optional<dl_harq_process_handle> dl_harq = test_ue.get_pcell().harqs.find_dl_harq(sl, bit_index_1_harq_only);
1156+
std::optional<dl_harq_process_handle> dl_harq =
1157+
test_ue.get_pcell().harqs.find_dl_harq_waiting_ack(sl, bit_index_1_harq_only);
11561158
if (dl_harq.has_value()) {
11571159
static constexpr double ack_probability = 0.5f;
11581160
const bool ack = test_rgen::bernoulli(ack_probability);
@@ -1445,7 +1447,7 @@ TEST_F(fallback_sched_ue_w_out_pucch_cfg, when_srb0_is_retx_ed_only_pucch_common
14451447
// NACK the HARQ processes that are waiting for ACK to trigger a retransmissions.
14461448
const unsigned bit_index_1_harq_only = 0U;
14471449
std::optional<dl_harq_process_handle> dl_harq =
1448-
u.get_pcell().harqs.find_dl_harq(current_slot, bit_index_1_harq_only);
1450+
u.get_pcell().harqs.find_dl_harq_waiting_ack(current_slot, bit_index_1_harq_only);
14491451
if (dl_harq.has_value()) {
14501452
dl_harq->dl_ack_info(mac_harq_ack_report_status::nack, {});
14511453
}

0 commit comments

Comments
 (0)