Skip to content

Commit ac9b2dc

Browse files
alvasMancodebot
authored andcommitted
app,cu: move upf configs out of root
1 parent c63ebe3 commit ac9b2dc

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

apps/units/cu_up/cu_up_unit_config_cli11_schema.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,30 @@
1717

1818
using namespace srsran;
1919

20+
static void configure_cli11_upf_args(CLI::App& app, cu_up_unit_upf_config& upf_params)
21+
{
22+
add_option(app, "--bind_addr", upf_params.bind_addr, "Local IP address to bind for N3 interface")
23+
->check(CLI::ValidIPV4 | CLI::IsMember({"auto"}));
24+
add_option(app, "--bind_interface", upf_params.bind_interface, "Network device to bind for N3 interface")
25+
->capture_default_str();
26+
add_option(app,
27+
"--ext_addr",
28+
upf_params.ext_addr,
29+
"External IP address that is advertised to receive GTP-U packets from UPF via N3 interface")
30+
->check(CLI::ValidIPV4 | CLI::IsMember({"auto"}));
31+
add_option(app, "--udp_max_rx_msgs", upf_params.udp_rx_max_msgs, "Maximum amount of messages RX in a single syscall");
32+
add_option(
33+
app, "--pool_threshold", upf_params.pool_threshold, "Pool accupancy threshold after which packets are dropped")
34+
->check(CLI::Range(0.0, 1.0));
35+
add_option(app, "--no_core", upf_params.no_core, "Allow gNB to run without a core");
36+
}
37+
2038
static void configure_cli11_cu_up_args(CLI::App& app, cu_up_unit_config& cu_up_params)
2139
{
40+
// UPF section.
41+
CLI::App* upf_subcmd = add_subcommand(app, "upf", "UPF parameters")->configurable();
42+
configure_cli11_upf_args(*upf_subcmd, cu_up_params.upf_cfg);
43+
2244
add_option(app, "--gtpu_queue_size", cu_up_params.gtpu_queue_size, "GTP-U queue size, in PDUs")
2345
->capture_default_str();
2446
add_option(app,
@@ -70,24 +92,6 @@ static void configure_cli11_metrics_args(CLI::App& app, cu_up_unit_metrics_confi
7092
->capture_default_str();
7193
}
7294

73-
static void configure_cli11_upf_args(CLI::App& app, cu_up_unit_upf_config& upf_params)
74-
{
75-
add_option(app, "--bind_addr", upf_params.bind_addr, "Local IP address to bind for N3 interface")
76-
->check(CLI::ValidIPV4 | CLI::IsMember({"auto"}));
77-
add_option(app, "--bind_interface", upf_params.bind_interface, "Network device to bind for N3 interface")
78-
->capture_default_str();
79-
add_option(app,
80-
"--ext_addr",
81-
upf_params.ext_addr,
82-
"External IP address that is advertised to receive GTP-U packets from UPF via N3 interface")
83-
->check(CLI::ValidIPV4 | CLI::IsMember({"auto"}));
84-
add_option(app, "--udp_max_rx_msgs", upf_params.udp_rx_max_msgs, "Maximum amount of messages RX in a single syscall");
85-
add_option(
86-
app, "--pool_threshold", upf_params.pool_threshold, "Pool accupancy threshold after which packets are dropped")
87-
->check(CLI::Range(0.0, 1.0));
88-
add_option(app, "--no_core", upf_params.no_core, "Allow gNB to run without a core");
89-
}
90-
9195
static void configure_cli11_rlc_am_args(CLI::App& app, uint32_t& queue_size)
9296
{
9397
CLI::App* tx_subcmd = app.add_subcommand("tx", "AM TX parameters");
@@ -161,10 +165,6 @@ void srsran::configure_cli11_with_cu_up_unit_config_schema(CLI::App& app, cu_up_
161165
CLI::App* metrics_subcmd = add_subcommand(app, "metrics", "Metrics configuration")->configurable();
162166
configure_cli11_metrics_args(*metrics_subcmd, unit_cfg.metrics);
163167

164-
// UPF section.
165-
CLI::App* upf_subcmd = add_subcommand(app, "upf", "UPF parameters")->configurable();
166-
configure_cli11_upf_args(*upf_subcmd, unit_cfg.upf_cfg);
167-
168168
// QoS section.
169169
auto qos_lambda = [&unit_cfg](const std::vector<std::string>& values) {
170170
// Prepare the radio bearers

0 commit comments

Comments
 (0)