Skip to content

Commit 11907c2

Browse files
alvasMancodebot
authored andcommitted
gtpu: make queue size configurable
1 parent 3cefbe4 commit 11907c2

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

apps/gnb/gnb_appconfig.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,10 @@ struct cu_cp_appconfig {
656656
security_appconfig security_config;
657657
};
658658

659+
struct cu_up_appconfig {
660+
unsigned gtpu_queue_size = 2048;
661+
};
662+
659663
struct log_appconfig {
660664
std::string filename = "/tmp/gnb.log"; // Path to write log file or "stdout" to print to console.
661665
std::string all_level = "warning"; // Default log level for all layers.
@@ -1052,6 +1056,8 @@ struct gnb_appconfig {
10521056
amf_appconfig amf_cfg;
10531057
/// CU-CP configuration.
10541058
cu_cp_appconfig cu_cp_cfg;
1059+
/// CU-CP configuration.
1060+
cu_up_appconfig cu_up_cfg;
10551061
/// \brief E2 configuration.
10561062
e2_appconfig e2_cfg;
10571063
/// Radio Unit configuration.

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ static void configure_cli11_cu_cp_args(CLI::App& app, cu_cp_appconfig& cu_cp_par
376376
configure_cli11_security_args(*security_subcmd, cu_cp_params.security_config);
377377
}
378378

379+
static void configure_cli11_cu_up_args(CLI::App& app, cu_up_appconfig& cu_up_params)
380+
{
381+
app.add_option("--gtpu_queue_size", cu_up_params.gtpu_queue_size, "GTP-U queue size, in PDUs")->capture_default_str();
382+
}
383+
379384
static void configure_cli11_expert_phy_args(CLI::App& app, expert_upper_phy_appconfig& expert_phy_params)
380385
{
381386
auto pusch_sinr_method_check = [](const std::string& value) -> std::string {
@@ -2025,6 +2030,10 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
20252030
CLI::App* cu_cp_subcmd = app.add_subcommand("cu_cp", "CU-CP parameters")->configurable();
20262031
configure_cli11_cu_cp_args(*cu_cp_subcmd, gnb_cfg.cu_cp_cfg);
20272032

2033+
// CU-UP section
2034+
CLI::App* cu_up_subcmd = app.add_subcommand("cu_up", "CU-CP parameters")->configurable();
2035+
configure_cli11_cu_up_args(*cu_up_subcmd, gnb_cfg.cu_up_cfg);
2036+
20282037
// NOTE: CLI11 needs that the life of the variable lasts longer than the call of this function. As both options need
20292038
// to be added and a variant is used to store the Radio Unit configuration, the configuration is parsed in a helper
20302039
// variable, but as it is requested later, the variable needs to be static.

apps/gnb/gnb_worker_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void worker_manager::create_du_cu_executors(const gnb_appconfig& appcfg)
122122
{{concurrent_queue_policy::lockfree_mpmc, task_worker_queue_size},
123123
{concurrent_queue_policy::lockfree_mpmc, task_worker_queue_size},
124124
// The IO-broker is currently single threaded, so we can use a SPSC.
125-
{concurrent_queue_policy::lockfree_spsc, task_worker_queue_size}},
125+
{concurrent_queue_policy::lockfree_spsc, appcfg.cu_up_cfg.gtpu_queue_size}},
126126
std::chrono::microseconds{200},
127127
{{"ue_up_ctrl_exec", task_priority::max},
128128
{"ue_ul_exec", task_priority::max - 1, false},

0 commit comments

Comments
 (0)