Skip to content

Commit 364cf74

Browse files
committed
e2ap,du: making the different policy variables in the rrm policy struct optional
1 parent dcbd13c commit 364cf74

File tree

6 files changed

+43
-29
lines changed

6 files changed

+43
-29
lines changed

include/srsran/du_manager/du_configurator.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
namespace srsran {
1818

1919
struct control_config_params {
20-
// sets the number of HARQ processes to be used.
21-
optional<unsigned> num_harq_processes;
22-
// sets the number of HARQ retransmissions to be used.
23-
optional<unsigned> num_harq_retransmissions;
24-
// set the radio resource management policy.
20+
// Sets the number of HARQ processes to be used.
21+
optional<unsigned> num_harq_processes;
22+
// Sets the number of HARQ retransmissions to be used.
23+
optional<unsigned> num_harq_retransmissions;
24+
// Set the radio resource management policy.
2525
optional<rrm_policy_ratio_group> rrm_policy_group;
2626
};
2727

include/srsran/ran/rrm.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ struct rrm_policy_member {
2020
};
2121

2222
struct rrm_policy_ratio_group {
23-
// used to identify the group to which the policy is applied.
23+
// Used to identify the group to which the policy is applied.
2424
rrm_policy_member pol_member;
25-
// sets the minimum percentage of PRBs to be allocated to this group.
26-
int min_PRB_policy_ratio;
27-
// sets the maximum percentage of PRBs to be allocated to this group.
28-
int max_PRB_policy_ratio;
29-
// sets the percentage of PRBs to be allocated to this group.
30-
int ded_PRB_policy_ratio;
25+
// Sets the minimum percentage of PRBs to be allocated to this group.
26+
optional<int> min_prb_policy_ratio;
27+
// Sets the maximum percentage of PRBs to be allocated to this group.
28+
optional<int> max_prb_policy_ratio;
29+
// Sets the percentage of PRBs to be allocated to this group.
30+
optional<int> ded_prb_policy_ratio;
3131
};
3232

3333
} // namespace srsran

include/srsran/scheduler/scheduler_configurator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "srsran/ran/qos/five_qi_qos_mapping.h"
2222
#include "srsran/ran/qos/qos_info.h"
2323
#include "srsran/ran/rnti.h"
24-
#include "srsran/ran/s_nssai.h"
2524
#include "srsran/ran/rrm.h"
25+
#include "srsran/ran/s_nssai.h"
2626
#include "srsran/ran/sib/sib_configuration.h"
2727
#include "srsran/ran/slot_pdu_capacity_constants.h"
2828
#include "srsran/ran/slot_point.h"

lib/du_manager/procedures/du_ue_ric_configuration_procedure.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,20 @@ async_task<mac_ue_reconfiguration_response> du_ue_ric_configuration_procedure::h
7474
// Configure UE resource allocation parameters.
7575
mac_request.sched_cfg.res_alloc_cfg.emplace();
7676
auto& res_alloc_cfg = mac_request.sched_cfg.res_alloc_cfg.value();
77-
// for now take first parameter set, in future we will have to support multiple parameter sets for different slices.
78-
control_config_params req = request.param_list[0];
77+
// For now take first parameter set, in future we will have to support multiple parameter sets for different slices.
78+
control_config_params req = request.param_list[0];
7979
rrm_policy_ratio_group dummy = {};
8080
res_alloc_cfg.rrm_policy_group = req.rrm_policy_group.has_value() ? req.rrm_policy_group.value() : dummy;
8181
// TODO remove when RRM group support is added to scheduler.
8282
res_alloc_cfg.pdsch_grant_size_limits = {
83-
req.rrm_policy_group.has_value() ? req.rrm_policy_group.value().min_PRB_policy_ratio : 0,
84-
req.rrm_policy_group.has_value() ? req.rrm_policy_group.value().max_PRB_policy_ratio : MAX_NOF_PRBS};
83+
req.rrm_policy_group.has_value() ? (req.rrm_policy_group.value().min_prb_policy_ratio.has_value()
84+
? req.rrm_policy_group.value().min_prb_policy_ratio.value()
85+
: 0)
86+
: 0,
87+
req.rrm_policy_group.has_value() ? (req.rrm_policy_group.value().max_prb_policy_ratio.has_value()
88+
? req.rrm_policy_group.value().max_prb_policy_ratio.value()
89+
: MAX_NOF_PRBS)
90+
: MAX_NOF_PRBS};
8591

8692
res_alloc_cfg.max_pdsch_harq_retxs = req.num_harq_retransmissions.has_value()
8793
? req.num_harq_retransmissions.value()

lib/e2/e2sm/e2sm_rc/e2sm_rc_control_action_du_executor.cpp

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ void e2sm_rc_control_action_2_6_du_executor::parse_action_ran_parameter_value(co
142142
if (!ctrl_cfg.param_list.back().rrm_policy_group.has_value()) {
143143
ctrl_cfg.param_list.back().rrm_policy_group.emplace();
144144
}
145-
ctrl_cfg.param_list.back().rrm_policy_group.value().min_PRB_policy_ratio =
145+
ctrl_cfg.param_list.back().rrm_policy_group.value().min_prb_policy_ratio.emplace();
146+
ctrl_cfg.param_list.back().rrm_policy_group.value().min_prb_policy_ratio =
146147
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
147148
} else {
148149
control_config_params cur_control_params = {};
149150
cur_control_params.rrm_policy_group.emplace();
150-
cur_control_params.rrm_policy_group.value().min_PRB_policy_ratio =
151+
cur_control_params.rrm_policy_group.value().min_prb_policy_ratio.emplace();
152+
cur_control_params.rrm_policy_group.value().min_prb_policy_ratio =
151153
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
152154
ctrl_cfg.param_list.push_back(cur_control_params);
153155
}
@@ -156,12 +158,14 @@ void e2sm_rc_control_action_2_6_du_executor::parse_action_ran_parameter_value(co
156158
if (!ctrl_cfg.param_list.back().rrm_policy_group.has_value()) {
157159
ctrl_cfg.param_list.back().rrm_policy_group.emplace();
158160
}
159-
ctrl_cfg.param_list.back().rrm_policy_group.value().max_PRB_policy_ratio =
161+
ctrl_cfg.param_list.back().rrm_policy_group.value().max_prb_policy_ratio.emplace();
162+
ctrl_cfg.param_list.back().rrm_policy_group.value().max_prb_policy_ratio =
160163
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
161164
} else {
162165
control_config_params cur_control_params = {};
163166
cur_control_params.rrm_policy_group.emplace();
164-
cur_control_params.rrm_policy_group.value().max_PRB_policy_ratio =
167+
cur_control_params.rrm_policy_group.value().max_prb_policy_ratio.emplace();
168+
cur_control_params.rrm_policy_group.value().max_prb_policy_ratio =
165169
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
166170
ctrl_cfg.param_list.push_back(cur_control_params);
167171
}
@@ -249,16 +253,20 @@ e2sm_ric_control_response e2sm_rc_control_action_2_6_du_executor::convert_to_e2s
249253
control_config_params req = du_config_req_.param_list[0];
250254
if (req.rrm_policy_group.has_value()) {
251255
e2sm_rc_ctrl_outcome_format1_item_s min_prb_outcome;
252-
min_prb_outcome.ran_param_id = 10;
253-
min_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().min_PRB_policy_ratio;
254-
ctrl_outcome.ran_p_list.push_back(min_prb_outcome);
256+
min_prb_outcome.ran_param_id = 10;
257+
if (req.rrm_policy_group.value().min_prb_policy_ratio.has_value()) {
258+
min_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().min_prb_policy_ratio.value();
259+
ctrl_outcome.ran_p_list.push_back(min_prb_outcome);
260+
}
255261
}
256262

257263
if (req.rrm_policy_group.has_value()) {
258264
e2sm_rc_ctrl_outcome_format1_item_s max_prb_outcome;
259-
max_prb_outcome.ran_param_id = 11;
260-
max_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().max_PRB_policy_ratio;
261-
ctrl_outcome.ran_p_list.push_back(max_prb_outcome);
265+
max_prb_outcome.ran_param_id = 11;
266+
if (req.rrm_policy_group.value().max_prb_policy_ratio.has_value()) {
267+
max_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().max_prb_policy_ratio.value();
268+
ctrl_outcome.ran_p_list.push_back(max_prb_outcome);
269+
}
262270
}
263271

264272
if (!e2sm_response.success) {

tests/unittests/du_manager/procedures/du_ue_ric_configuration_procedure_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ TEST_F(du_ue_ric_config_tester,
4747
{
4848
std::vector<control_config_params> param_list;
4949
rrm_policy_ratio_group pol;
50-
pol.max_PRB_policy_ratio = 10;
51-
pol.min_PRB_policy_ratio = 5;
50+
pol.max_prb_policy_ratio = 10;
51+
pol.min_prb_policy_ratio = 5;
5252
param_list.emplace_back(control_config_params{nullopt, nullopt, pol});
5353
start_procedure(du_mac_sched_control_config{(uint64_t)test_ue->f1ap_ue_id, param_list});
5454

0 commit comments

Comments
 (0)