Skip to content

Commit d63fb33

Browse files
frankistcodebot
authored andcommitted
gnb: add function to convert appconfig to DU SRB configuration
1 parent 2f22717 commit d63fb33

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,15 @@ std::map<five_qi_t, du_qos_config> srsran::generate_du_qos_config(const gnb_appc
991991
return out_cfg;
992992
}
993993

994+
std::map<srb_id_t, du_srb_config> srsran::generate_du_srb_config(const gnb_appconfig& config)
995+
{
996+
std::map<srb_id_t, du_srb_config> srb_cfg;
997+
998+
// TODO: Set SRB parameters based on the gNB appconfig.
999+
1000+
return srb_cfg;
1001+
}
1002+
9941003
/// Fills the given low PHY configuration from the given gnb configuration.
9951004
static void generate_low_phy_config(lower_phy_configuration& out_cfg,
9961005
const cell_appconfig& config,

apps/gnb/gnb_appconfig_translators.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "srsran/cu_up/cu_up_configuration.h"
1515
#include "srsran/du/du_cell_config.h"
1616
#include "srsran/du/du_qos_config.h"
17+
#include "srsran/du/du_srb_config.h"
1718
#include "srsran/e2/e2ap_configuration.h"
1819
#include "srsran/gateways/sctp_network_gateway.h"
1920
#include "srsran/mac/mac_config.h"
@@ -60,9 +61,12 @@ generate_preferred_integrity_algorithms_list(const gnb_appconfig& config);
6061
srsran::security::preferred_ciphering_algorithms
6162
generate_preferred_ciphering_algorithms_list(const gnb_appconfig& config);
6263

63-
/// Converts and returns the given gnb application QoS configuration to a DU configuration.
64+
/// Converts and returns the given gnb application QoS configuration to a DU QoS list configuration.
6465
std::map<five_qi_t, du_qos_config> generate_du_qos_config(const gnb_appconfig& config);
6566

67+
/// Converts and returns the given gnb application QoS configuration to a DU SRB list configuration.
68+
std::map<srb_id_t, du_srb_config> generate_du_srb_config(const gnb_appconfig& config);
69+
6670
/// Converts and returns the given gnb application configuration to a mac expert configuration.
6771
mac_expert_config generate_mac_expert_config(const gnb_appconfig& config);
6872

apps/gnb/gnb_du_factory.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,6 @@ std::vector<std::unique_ptr<du>> srsran::make_gnb_dus(const gnb_appconfig&
126126
tmp_cfg.cells_cfg.resize(1);
127127
tmp_cfg.cells_cfg[0] = gnb_cfg.cells_cfg[i];
128128

129-
// DU QoS config
130-
std::map<five_qi_t, du_qos_config> du_qos_cfg = generate_du_qos_config(gnb_cfg);
131-
132129
du_config du_cfg = {};
133130
std::vector<task_executor*> du_low_dl_exec;
134131
workers.get_du_low_dl_executors(du_low_dl_exec, i);
@@ -151,7 +148,8 @@ std::vector<std::unique_ptr<du>> srsran::make_gnb_dus(const gnb_appconfig&
151148
du_hi_cfg.phy_adapter = nullptr;
152149
du_hi_cfg.timers = &timer_mng;
153150
du_hi_cfg.cells = {du_cells[i]};
154-
du_hi_cfg.qos = du_qos_cfg;
151+
du_hi_cfg.srbs = generate_du_srb_config(gnb_cfg);
152+
du_hi_cfg.qos = generate_du_qos_config(gnb_cfg);
155153
du_hi_cfg.mac_p = &mac_p;
156154
du_hi_cfg.rlc_p = &rlc_p;
157155
du_hi_cfg.gnb_du_id = du_insts.size() + 1;

0 commit comments

Comments
 (0)