Skip to content

Commit 26d4e56

Browse files
frankistcodebot
authored andcommitted
rlc: implement rlc SRB default config generator function
1 parent d63fb33 commit 26d4e56

File tree

11 files changed

+47
-105
lines changed

11 files changed

+47
-105
lines changed

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "srsran/ran/prach/prach_configuration.h"
2020
#include "srsran/ran/prach/prach_helper.h"
2121
#include "srsran/ran/subcarrier_spacing.h"
22+
#include "srsran/rlc/rlc_config_factory.h"
2223
#include "srsran/scheduler/config/cell_config_builder_params.h"
2324
#include "srsran/scheduler/config/csi_helper.h"
2425
#include "srsran/scheduler/config/scheduler_expert_config_validator.h"
@@ -995,7 +996,13 @@ std::map<srb_id_t, du_srb_config> srsran::generate_du_srb_config(const gnb_appco
995996
{
996997
std::map<srb_id_t, du_srb_config> srb_cfg;
997998

998-
// TODO: Set SRB parameters based on the gNB appconfig.
999+
srb_cfg.insert(std::make_pair(srb_id_t::srb1, du_srb_config{}));
1000+
srb_cfg.at(srb_id_t::srb1).mac = make_default_srb_mac_lc_config(LCID_SRB1);
1001+
srb_cfg.at(srb_id_t::srb1).rlc = make_default_srb_rlc_config();
1002+
1003+
// Make SRB2/SRB3 config equal to SRB1.
1004+
srb_cfg.insert(std::make_pair(srb_id_t::srb2, srb_cfg.at(srb_id_t::srb1)));
1005+
srb_cfg.insert(std::make_pair(srb_id_t::srb3, srb_cfg.at(srb_id_t::srb1)));
9991006

10001007
return srb_cfg;
10011008
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
*
3+
* Copyright 2021-2023 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
#include "srsran/rlc/rlc_config.h"
14+
15+
namespace srsran {
16+
17+
/// \brief SRB1, SRB2 and SRB3 default configuration as per TS 38.331, 9.2.1.
18+
inline rlc_config make_default_srb_rlc_config()
19+
{
20+
rlc_config cfg = {};
21+
cfg.mode = rlc_mode::am;
22+
cfg.am.tx.sn_field_length = rlc_am_sn_size::size12bits;
23+
cfg.am.tx.t_poll_retx = 45;
24+
cfg.am.tx.poll_pdu = -1;
25+
cfg.am.tx.poll_byte = -1;
26+
cfg.am.tx.max_retx_thresh = 8;
27+
cfg.am.tx.queue_size = 256;
28+
cfg.am.rx.sn_field_length = rlc_am_sn_size::size12bits;
29+
cfg.am.rx.t_reassembly = 35;
30+
cfg.am.rx.t_status_prohibit = 0;
31+
cfg.metrics_period = std::chrono::milliseconds(0); // disable metrics reporting for SRBs
32+
return cfg;
33+
}
34+
35+
} // namespace srsran

include/srsran/rlc/rlc_config_messages.h

Lines changed: 0 additions & 82 deletions
This file was deleted.

include/srsran/rlc/rlc_rx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "srsran/adt/byte_buffer_chain.h"
1515
#include "srsran/ran/du_types.h"
1616
#include "srsran/ran/lcid.h"
17-
#include "srsran/rlc/rlc_config_messages.h"
1817

1918
/*
2019
* This file will hold the interfaces and notifiers for the RLC entity.

include/srsran/rlc/rlc_tx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "srsran/adt/optional.h"
1616
#include "srsran/ran/du_types.h"
1717
#include "srsran/ran/lcid.h"
18-
#include "srsran/rlc/rlc_config_messages.h"
1918

2019
/*
2120
* This file will hold the interfaces and notifiers for the RLC entity.

lib/du_manager/converters/rlc_config_helpers.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,6 @@
1313
using namespace srsran;
1414
using namespace srs_du;
1515

16-
rlc_config srsran::srs_du::make_default_srb_rlc_config()
17-
{
18-
rlc_config cfg = {};
19-
cfg.mode = rlc_mode::am;
20-
cfg.am.tx.sn_field_length = rlc_am_sn_size::size12bits;
21-
cfg.am.tx.t_poll_retx = 45;
22-
cfg.am.tx.poll_pdu = -1;
23-
cfg.am.tx.poll_byte = -1;
24-
cfg.am.tx.max_retx_thresh = 8;
25-
cfg.am.tx.queue_size = 256;
26-
cfg.am.rx.sn_field_length = rlc_am_sn_size::size12bits;
27-
cfg.am.rx.t_reassembly = 35;
28-
cfg.am.rx.t_status_prohibit = 0;
29-
cfg.metrics_period = std::chrono::milliseconds(0); // disable metrics reporting for SRBs
30-
return cfg;
31-
}
32-
3316
template <typename Bearer>
3417
static void fill_rlc_entity_creation_message_common(rlc_entity_creation_message& msg,
3518
uint32_t du_index,

lib/du_manager/converters/rlc_config_helpers.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ struct rlc_bearer_config {
3535
}
3636
};
3737

38-
/// \brief Generates default SRB RLC configuration for SRBs other than SRB0.
39-
rlc_config make_default_srb_rlc_config();
40-
4138
/// \brief Create configuration for RLC SRB entity.
4239
rlc_entity_creation_message make_rlc_entity_creation_message(uint32_t du_index,
4340
du_ue_index_t ue_index,

lib/du_manager/ran_resource_management/du_ran_resource_manager_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "du_ran_resource_manager_impl.h"
1212
#include "srsran/mac/config/mac_cell_group_config_factory.h"
1313
#include "srsran/mac/config/mac_config_helpers.h"
14+
#include "srsran/rlc/rlc_config_factory.h"
1415
#include "srsran/scheduler/config/serving_cell_config_factory.h"
1516

1617
using namespace srsran;

tests/unittests/du_manager/du_manager_test_helpers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "du_manager_test_helpers.h"
1212
#include "srsran/mac/config/mac_cell_group_config_factory.h"
1313
#include "srsran/mac/config/mac_config_helpers.h"
14+
#include "srsran/rlc/rlc_config_factory.h"
1415
#include "srsran/scheduler/config/serving_cell_config_factory.h"
1516

1617
using namespace srsran;

tests/unittests/du_manager/procedures/du_manager_procedure_test_helpers.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "du_manager_procedure_test_helpers.h"
1212
#include "lib/du_manager/procedures/ue_configuration_procedure.h"
1313
#include "lib/du_manager/procedures/ue_creation_procedure.h"
14+
#include "srsran/rlc/rlc_config_factory.h"
1415
#include "srsran/support/test_utils.h"
1516

1617
using namespace srsran;

0 commit comments

Comments
 (0)