|
17 | 17 |
|
18 | 18 | using namespace srsran; |
19 | 19 |
|
| 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 | + |
20 | 38 | static void configure_cli11_cu_up_args(CLI::App& app, cu_up_unit_config& cu_up_params) |
21 | 39 | { |
| 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 | + |
22 | 44 | add_option(app, "--gtpu_queue_size", cu_up_params.gtpu_queue_size, "GTP-U queue size, in PDUs") |
23 | 45 | ->capture_default_str(); |
24 | 46 | add_option(app, |
@@ -70,24 +92,6 @@ static void configure_cli11_metrics_args(CLI::App& app, cu_up_unit_metrics_confi |
70 | 92 | ->capture_default_str(); |
71 | 93 | } |
72 | 94 |
|
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 | | - |
91 | 95 | static void configure_cli11_rlc_am_args(CLI::App& app, uint32_t& queue_size) |
92 | 96 | { |
93 | 97 | 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_ |
161 | 165 | CLI::App* metrics_subcmd = add_subcommand(app, "metrics", "Metrics configuration")->configurable(); |
162 | 166 | configure_cli11_metrics_args(*metrics_subcmd, unit_cfg.metrics); |
163 | 167 |
|
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 | | - |
168 | 168 | // QoS section. |
169 | 169 | auto qos_lambda = [&unit_cfg](const std::vector<std::string>& values) { |
170 | 170 | // Prepare the radio bearers |
|
0 commit comments