From 2f1cf8ee110550032db849f4eac7e6f22b7fdc57 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 4 Apr 2022 14:06:22 +0100 Subject: [PATCH] lib,rlc_am_nr: make max retx configurable in AM stress test --- lib/src/rlc/rlc_am_nr.cc | 2 +- lib/test/rlc/rlc_stress_test.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/src/rlc/rlc_am_nr.cc b/lib/src/rlc/rlc_am_nr.cc index 10e75d054..8f42f2b6c 100644 --- a/lib/src/rlc/rlc_am_nr.cc +++ b/lib/src/rlc/rlc_am_nr.cc @@ -846,7 +846,7 @@ void rlc_am_nr_tx::handle_control_pdu(uint8_t* payload, uint32_t nof_bytes) // NACK'ing full SDU. // add to retx queue if it's not already there if (not retx_queue->has_sn(nack_sn)) { - // Have we segmented the SDU alreaty? + // Have we segmented the SDU already? if ((*tx_window)[nack_sn].segment_list.empty()) { rlc_amd_retx_nr_t& retx = retx_queue->push(); retx.sn = nack_sn; diff --git a/lib/test/rlc/rlc_stress_test.cc b/lib/test/rlc/rlc_stress_test.cc index a69bc908f..016402f63 100644 --- a/lib/test/rlc/rlc_stress_test.cc +++ b/lib/test/rlc/rlc_stress_test.cc @@ -276,9 +276,11 @@ void stress_test(stress_test_args_t args) } else if (args.mode == "UM12") { cnfg_ = srsran::rlc_config_t::default_rlc_um_nr_config(12); } else if (args.mode == "AM12") { - cnfg_ = srsran::rlc_config_t::default_rlc_am_nr_config(12); + cnfg_ = srsran::rlc_config_t::default_rlc_am_nr_config(12); + cnfg_.am_nr.max_retx_thresh = args.max_retx; } else if (args.mode == "AM18") { - cnfg_ = srsran::rlc_config_t::default_rlc_am_nr_config(18); + cnfg_ = srsran::rlc_config_t::default_rlc_am_nr_config(18); + cnfg_.am_nr.max_retx_thresh = args.max_retx; } else { std::cout << "Unsupported RLC mode " << args.mode << ", exiting." << std::endl; exit(-1);