Skip to content

Commit adc8a3e

Browse files
committed
cu_up_unit: added backoff timer property to CU-UP application unit.
1 parent 95aeb2d commit adc8a3e

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

apps/units/cu_up/cu_up_unit_config.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,17 @@ struct cu_up_unit_upf_config {
3434
bool no_core = false;
3535
};
3636

37+
/// F1-U configuration at CU_UP side
38+
struct cu_cp_unit_f1u_config {
39+
int32_t t_notify; ///< Maximum backoff time for discard notifications from CU_UP to DU (ms)
40+
};
41+
3742
/// QoS configuration.
3843
struct cu_up_unit_qos_config {
39-
five_qi_t five_qi = uint_to_five_qi(9);
40-
std::string mode = "am";
41-
unsigned rlc_sdu_queue = 4096;
44+
five_qi_t five_qi = uint_to_five_qi(9);
45+
std::string mode = "am";
46+
unsigned rlc_sdu_queue = 4096;
47+
cu_cp_unit_f1u_config f1u_cu_up;
4248
};
4349

4450
/// CU-UP application unit configuration.

apps/units/cu_up/cu_up_unit_config_cli11_schema.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,21 @@ static void configure_cli11_rlc_args(CLI::App& app, cu_up_unit_qos_config& qos_p
115115
configure_cli11_rlc_am_args(*rlc_am_subcmd, qos_params.rlc_sdu_queue);
116116
}
117117

118+
static void configure_cli11_f1u_cu_up_args(CLI::App& app, cu_cp_unit_f1u_config& f1u_cu_up_params)
119+
{
120+
app.add_option("--backoff_timer", f1u_cu_up_params.t_notify, "F1-U backoff timer (ms)")->capture_default_str();
121+
}
122+
118123
static void configure_cli11_qos_args(CLI::App& app, cu_up_unit_qos_config& qos_params)
119124
{
120125
add_option(app, "--five_qi", qos_params.five_qi, "5QI")->capture_default_str()->check(CLI::Range(0, 255));
121126

122127
// RLC section.
123128
CLI::App* rlc_subcmd = app.add_subcommand("rlc", "RLC parameters");
124129
configure_cli11_rlc_args(*rlc_subcmd, qos_params);
130+
131+
CLI::App* f1u_cu_up_subcmd = app.add_subcommand("f1u_cu_up", "F1-U parameters at CU_UP side");
132+
configure_cli11_f1u_cu_up_args(*f1u_cu_up_subcmd, qos_params.f1u_cu_up);
125133
}
126134

127135
void srsran::configure_cli11_with_cu_up_unit_config_schema(CLI::App& app, cu_up_unit_config& unit_cfg)

apps/units/cu_up/cu_up_unit_config_yaml_writer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ static void fill_cu_up_rlc_qos_section(YAML::Node node, const cu_up_unit_qos_con
8383
}
8484
}
8585

86+
static void fill_cu_up_f1_qos_section(YAML::Node node, const cu_cp_unit_f1u_config& config)
87+
{
88+
node["backoff_timer"] = config.t_notify;
89+
}
90+
8691
static void fill_cu_up_qos_entry(YAML::Node node, const cu_up_unit_qos_config& config)
8792
{
8893
node["five_qi"] = five_qi_to_uint(config.five_qi);
8994
fill_cu_up_rlc_qos_section(node["rlc"], config);
95+
fill_cu_up_f1_qos_section(node["f1u_cu_up"], config.f1u_cu_up);
9096
}
9197

9298
static YAML::Node get_last_entry(YAML::Node node)

include/srsran/adt/span.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,25 @@ namespace detail {
2929
/// Helper traits used by SFINAE expressions in constructors.
3030

3131
template <typename U>
32-
struct is_span : std::false_type {};
32+
struct is_span : std::false_type {
33+
};
3334
template <typename U>
34-
struct is_span<span<U>> : std::true_type {};
35+
struct is_span<span<U>> : std::true_type {
36+
};
3537

3638
template <typename U>
37-
struct is_std_array : std::false_type {};
39+
struct is_std_array : std::false_type {
40+
};
3841
template <typename U, std::size_t N>
39-
struct is_std_array<std::array<U, N>> : std::true_type {};
42+
struct is_std_array<std::array<U, N>> : std::true_type {
43+
};
4044

4145
template <typename U>
4246
using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<U>>;
4347

4448
template <class Container, class U, class = void>
45-
struct is_container_compatible : public std::false_type {};
49+
struct is_container_compatible : public std::false_type {
50+
};
4651
template <class Container, class U>
4752
struct is_container_compatible<
4853
Container,
@@ -60,7 +65,8 @@ struct is_container_compatible<
6065
// Check type compatibility between the contained type and the span type.
6166
std::enable_if_t<
6267
std::is_convertible_v<std::remove_pointer_t<decltype(std::declval<Container>().data())> (*)[], U (*)[]>,
63-
int>>> : public std::true_type {};
68+
int>>> : public std::true_type {
69+
};
6470

6571
} // namespace detail
6672

@@ -85,8 +91,8 @@ class span
8591
/// Constructs an empty span with data() == nullptr and size() == 0.
8692
constexpr span() noexcept = default;
8793

88-
constexpr span(const span&) noexcept = default;
89-
span& operator=(const span& other) noexcept = default;
94+
constexpr span(const span&) noexcept = default;
95+
span& operator=(const span& other) noexcept = default;
9096

9197
/// Constructs a span that is a view over the range [ptr, ptr + len).
9298
constexpr span(pointer ptr_, size_type len_) noexcept : ptr(ptr_), len(len_) {}

0 commit comments

Comments
 (0)