Skip to content

Commit 5df5125

Browse files
alvasMancodebot
authored andcommitted
rlc: add queue size configuration parameters
1 parent 512368a commit 5df5125

File tree

10 files changed

+25
-8
lines changed

10 files changed

+25
-8
lines changed

apps/gnb/gnb_appconfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ struct cell_appconfig {
484484
/// RLC UM TX configuration
485485
struct rlc_tx_um_appconfig {
486486
uint16_t sn_field_length; ///< Number of bits used for sequence number
487-
int32_t t_reassembly; ///< Timer used by rx to detect PDU loss (ms)
487+
uint32_t queue_size; ///< RLC SDU queue size
488488
};
489489

490490
/// RLC UM RX configuration
@@ -507,6 +507,7 @@ struct rlc_tx_am_appconfig {
507507
int32_t poll_pdu; ///< Insert poll bit after this many PDUs
508508
int32_t poll_byte; ///< Insert poll bit after this much data (bytes)
509509
uint32_t max_window = 0; ///< Custom parameter to limit the maximum window size for memory reasons. 0 means no limit.
510+
uint32_t queue_size = 4096; ///< RLC SDU queue size
510511
};
511512

512513
/// RLC UM RX configuration

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,8 @@ static void configure_cli11_rlc_um_args(CLI::App& app, rlc_um_appconfig& rlc_um_
12811281
{
12821282
CLI::App* rlc_tx_um_subcmd = app.add_subcommand("tx", "UM TX parameters");
12831283
rlc_tx_um_subcmd->add_option("--sn", rlc_um_params.tx.sn_field_length, "RLC UM TX SN")->capture_default_str();
1284+
rlc_tx_um_subcmd->add_option("--queue-size", rlc_um_params.tx.queue_size, "RLC UM TX SDU queue size")
1285+
->capture_default_str();
12841286
CLI::App* rlc_rx_um_subcmd = app.add_subcommand("rx", "UM TX parameters");
12851287
rlc_rx_um_subcmd->add_option("--sn", rlc_um_params.rx.sn_field_length, "RLC UM RX SN")->capture_default_str();
12861288
rlc_rx_um_subcmd->add_option("--t-reassembly", rlc_um_params.rx.t_reassembly, "RLC UM t-Reassembly")
@@ -1297,11 +1299,12 @@ static void configure_cli11_rlc_am_args(CLI::App& app, rlc_am_appconfig& rlc_am_
12971299
->capture_default_str();
12981300
rlc_tx_am_subcmd->add_option("--poll-pdu", rlc_am_params.tx.poll_pdu, "RLC AM TX PollPdu")->capture_default_str();
12991301
rlc_tx_am_subcmd->add_option("--poll-byte", rlc_am_params.tx.poll_byte, "RLC AM TX PollByte")->capture_default_str();
1300-
rlc_tx_am_subcmd
1301-
->add_option("--max_window",
1302-
rlc_am_params.tx.max_window,
1303-
"Non-standard parameter that limits the tx window size. Can be used for limiting memory usage with "
1304-
"large windows. 0 means no limits other than the SN size (i.e. 2^[sn_size-1]).")
1302+
rlc_tx_am_subcmd->add_option(
1303+
"--max_window",
1304+
rlc_am_params.tx.max_window,
1305+
"Non-standard parameter that limits the tx window size. Can be used for limiting memory usage with "
1306+
"large windows. 0 means no limits other than the SN size (i.e. 2^[sn_size-1]).");
1307+
rlc_tx_am_subcmd->add_option("--queue-size", rlc_am_params.tx.queue_size, "RLC AM TX SDU queue size")
13051308
->capture_default_str();
13061309
CLI::App* rlc_rx_am_subcmd = app.add_subcommand("rx", "AM RX parameters");
13071310
rlc_rx_am_subcmd->add_option("--sn", rlc_am_params.rx.sn_field_length, "RLC AM RX SN")->capture_default_str();

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ std::map<five_qi_t, du_qos_config> srsran::generate_du_qos_config(const gnb_appc
865865
if (!from_number(out_rlc.um.tx.sn_field_length, qos.rlc.um.tx.sn_field_length)) {
866866
report_error("Invalid RLC UM TX SN: 5QI={}, SN={}\n", qos.five_qi, qos.rlc.um.tx.sn_field_length);
867867
}
868+
out_rlc.um.tx.queue_size = qos.rlc.um.tx.queue_size;
868869
} else if (out_rlc.mode == rlc_mode::am) {
869870
// AM Config
870871
//< TX SN
@@ -876,6 +877,7 @@ std::map<five_qi_t, du_qos_config> srsran::generate_du_qos_config(const gnb_appc
876877
out_rlc.am.tx.poll_pdu = qos.rlc.am.tx.poll_pdu;
877878
out_rlc.am.tx.poll_byte = qos.rlc.am.tx.poll_byte;
878879
out_rlc.am.tx.max_window = qos.rlc.am.tx.max_window;
880+
out_rlc.am.tx.queue_size = qos.rlc.am.tx.queue_size;
879881
//< RX SN
880882
if (!from_number(out_rlc.am.rx.sn_field_length, qos.rlc.am.rx.sn_field_length)) {
881883
report_error("Invalid RLC AM RX SN: 5QI={}, SN={}\n", qos.five_qi, qos.rlc.am.rx.sn_field_length);

include/srsran/du/du_cell_config_helpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ inline std::map<five_qi_t, du_qos_config> make_default_du_qos_config_list(int rl
130130
cfg.rlc.um.tx.sn_field_length = rlc_um_sn_size::size12bits;
131131
cfg.rlc.um.rx.sn_field_length = rlc_um_sn_size::size12bits;
132132
cfg.rlc.um.rx.t_reassembly = 100;
133+
cfg.rlc.um.tx.queue_size = 4096;
133134
cfg.rlc.metrics_period = std::chrono::milliseconds(rlc_metrics_report);
134135
// F1-U
135136
cfg.f1u.t_notify = 10;
@@ -146,6 +147,8 @@ inline std::map<five_qi_t, du_qos_config> make_default_du_qos_config_list(int rl
146147
cfg.rlc.am.tx.poll_pdu = 16;
147148
cfg.rlc.am.tx.poll_byte = 6500;
148149
cfg.rlc.am.tx.max_retx_thresh = 16;
150+
cfg.rlc.am.tx.max_window = 0;
151+
cfg.rlc.am.tx.queue_size = 4096;
149152
cfg.rlc.am.rx.sn_field_length = rlc_am_sn_size::size18bits;
150153
cfg.rlc.am.rx.t_reassembly = 40;
151154
cfg.rlc.am.rx.t_status_prohibit = 50;

include/srsran/rlc/rlc_config.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ struct rlc_tx_am_config {
156156
int32_t poll_byte; ///< Insert poll bit after this much data (bytes)
157157

158158
// Custom non-standard parameters
159+
uint32_t queue_size; ///< SDU queue size
159160
uint32_t max_window; ///< Custom parameter to limit the maximum window size for memory reasons. 0 means no limit.
160161
};
161162

@@ -177,6 +178,7 @@ struct rlc_rx_um_config {
177178
/// Ref: 3GPP TS 38.322 v15.3.0 Section 7
178179
struct rlc_tx_um_config {
179180
rlc_um_sn_size sn_field_length; ///< Number of bits used for sequence number
181+
uint32_t queue_size; ///< SDU queue size
180182
};
181183

182184
/// \brief Configurable parameters for RLC UM
@@ -303,7 +305,7 @@ struct formatter<srsran::rlc_tx_um_config> {
303305
template <typename FormatContext>
304306
auto format(srsran::rlc_tx_um_config cfg, FormatContext& ctx) -> decltype(std::declval<FormatContext>().out())
305307
{
306-
return format_to(ctx.out(), "tx_sn_size={}", cfg.sn_field_length);
308+
return format_to(ctx.out(), "tx_sn_size={}, queue_size={}", cfg.sn_field_length, cfg.queue_size);
307309
}
308310
};
309311

@@ -352,12 +354,13 @@ struct formatter<srsran::rlc_tx_am_config> {
352354
auto format(srsran::rlc_tx_am_config cfg, FormatContext& ctx) -> decltype(std::declval<FormatContext>().out())
353355
{
354356
return format_to(ctx.out(),
355-
"tx_sn_size={} t_poll_retx={} max_retx={} poll_pdu={} poll_byte={} max_window={}",
357+
"tx_sn_size={} t_poll_retx={} max_retx={} poll_pdu={} poll_byte={} queue_size={} max_window={}",
356358
cfg.sn_field_length,
357359
cfg.t_poll_retx,
358360
cfg.max_retx_thresh,
359361
cfg.poll_pdu,
360362
cfg.poll_byte,
363+
cfg.queue_size,
361364
cfg.max_window);
362365
}
363366
};

lib/du_manager/converters/rlc_config_helpers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rlc_config srsran::srs_du::make_default_srb_rlc_config()
2222
cfg.am.tx.poll_pdu = -1;
2323
cfg.am.tx.poll_byte = -1;
2424
cfg.am.tx.max_retx_thresh = 8;
25+
cfg.am.tx.queue_size = 256;
2526
cfg.am.rx.sn_field_length = rlc_am_sn_size::size12bits;
2627
cfg.am.rx.t_reassembly = 35;
2728
cfg.am.rx.t_status_prohibit = 0;

lib/rlc/rlc_tx_am_entity.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ rlc_tx_am_entity::rlc_tx_am_entity(du_ue_index_t du_index
2929
task_executor& ue_executor_) :
3030
rlc_tx_entity(du_index, rb_id, upper_dn_, upper_cn_, lower_dn_),
3131
cfg(config),
32+
sdu_queue(cfg.queue_size),
3233
retx_queue(window_size(to_number(cfg.sn_field_length))),
3334
mod(cardinality(to_number(cfg.sn_field_length))),
3435
am_window_size(window_size(to_number(cfg.sn_field_length))),

lib/rlc/rlc_tx_um_entity.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ rlc_tx_um_entity::rlc_tx_um_entity(du_ue_index_t du_index
2323
task_executor& pcell_executor_) :
2424
rlc_tx_entity(du_index, rb_id, upper_dn_, upper_cn_, lower_dn_),
2525
cfg(config),
26+
sdu_queue(cfg.queue_size),
2627
mod(cardinality(to_number(cfg.sn_field_length))),
2728
head_len_full(rlc_um_pdu_header_size_complete_sdu),
2829
head_len_first(rlc_um_pdu_header_size_no_so(cfg.sn_field_length)),

tests/unittests/rlc/rlc_tx_am_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class rlc_tx_am_test : public ::testing::Test, public ::testing::WithParamInterf
8888
config.poll_pdu = 4;
8989
config.poll_byte = 25;
9090
config.max_window = 0;
91+
config.queue_size = 4096;
9192

9293
// Create test frame
9394
tester = std::make_unique<rlc_tx_am_test_frame>(config.sn_field_length);

tests/unittests/rlc/rlc_um_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class rlc_um_test : public ::testing::Test, public ::testing::WithParamInterface
8080

8181
// Set Tx config
8282
config.tx.sn_field_length = sn_size;
83+
config.tx.queue_size = 4096;
8384

8485
// Create RLC entities
8586
rlc1 = std::make_unique<rlc_um_entity>(du_ue_index_t::MIN_DU_UE_INDEX,

0 commit comments

Comments
 (0)