Skip to content

Commit f5da02d

Browse files
committed
e2,du: renaming rrm structs, adding explanatory comments
1 parent eab689e commit f5da02d

File tree

6 files changed

+48
-42
lines changed

6 files changed

+48
-42
lines changed

include/srsran/du_manager/du_configurator.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
namespace srsran {
1818

1919
struct control_config_params {
20+
// sets the number of HARQ processes to be used.
2021
optional<unsigned> num_harq_processes;
22+
// sets the number of HARQ retransmissions to be used.
2123
optional<unsigned> num_harq_retransmissions;
22-
optional<RRM_policy_ratio_group> rrm_policy_ratio_group;
24+
// set the radio resource management policy.
25+
optional<rrm_policy_ratio_group> rrm_policy_group;
2326
};
2427

2528
struct du_mac_sched_control_config {

include/srsran/ran/rrm.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@
1313
#include "srsran/ran/s_nssai.h"
1414

1515
namespace srsran {
16-
17-
struct RRM_policy_member {
16+
/// O-RAN.WG3.E2SM-RC-R003-v3.00 Section 8.4.3.6
17+
struct rrm_policy_member {
1818
std::string plmn_id;
1919
s_nssai_t s_nssai;
2020
};
2121

22-
struct RRM_policy_ratio_group {
23-
RRM_policy_member pol_member;
22+
struct rrm_policy_ratio_group {
23+
// used to identify the group to which the policy is applied.
24+
rrm_policy_member pol_member;
25+
// sets the minimum percentage of PRBs to be allocated to this group.
2426
int min_PRB_policy_ratio;
27+
// sets the maximum percentage of PRBs to be allocated to this group.
2528
int max_PRB_policy_ratio;
29+
// sets the percentage of PRBs to be allocated to this group.
2630
int ded_PRB_policy_ratio;
2731
};
2832

include/srsran/scheduler/scheduler_configurator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct sched_ue_resource_alloc_config {
109109
/// Maximum PUSCH HARQ retransmissions.
110110
unsigned max_pusch_harq_retxs = 4;
111111
// RRM policy for the UE.
112-
RRM_policy_ratio_group rrm_policy_ratio_group;
112+
rrm_policy_ratio_group rrm_policy_group;
113113
};
114114

115115
/// QoS and slicing information associated with a DRB provided to the scheduler.

lib/du_manager/procedures/du_ue_ric_configuration_procedure.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,12 @@ async_task<mac_ue_reconfiguration_response> du_ue_ric_configuration_procedure::h
7676
auto& res_alloc_cfg = mac_request.sched_cfg.res_alloc_cfg.value();
7777
// for now take first parameter set, in future we will have to support multiple parameter sets for different slices.
7878
control_config_params req = request.param_list[0];
79-
RRM_policy_ratio_group dummy = {};
80-
res_alloc_cfg.rrm_policy_ratio_group =
81-
req.rrm_policy_ratio_group.has_value() ? req.rrm_policy_ratio_group.value() : dummy;
79+
rrm_policy_ratio_group dummy = {};
80+
res_alloc_cfg.rrm_policy_group = req.rrm_policy_group.has_value() ? req.rrm_policy_group.value() : dummy;
8281
// TODO remove when RRM group support is added to scheduler.
8382
res_alloc_cfg.pdsch_grant_size_limits = {
84-
req.rrm_policy_ratio_group.has_value() ? req.rrm_policy_ratio_group.value().min_PRB_policy_ratio : 0,
85-
req.rrm_policy_ratio_group.has_value() ? req.rrm_policy_ratio_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 : 0,
84+
req.rrm_policy_group.has_value() ? req.rrm_policy_group.value().max_PRB_policy_ratio : MAX_NOF_PRBS};
8685

8786
res_alloc_cfg.max_pdsch_harq_retxs = req.num_harq_retransmissions.has_value()
8887
? req.num_harq_retransmissions.value()

lib/e2/e2sm/e2sm_rc/e2sm_rc_control_action_du_executor.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -101,72 +101,72 @@ void e2sm_rc_control_action_2_6_du_executor::parse_action_ran_parameter_value(co
101101
uint64_t ue_id,
102102
du_mac_sched_control_config& ctrl_cfg)
103103
{
104-
if (ran_param_id == 6) {
104+
if (action_params[ran_param_id] == "PLMN Identity") {
105105
control_config_params cur_control_params = {};
106-
cur_control_params.rrm_policy_ratio_group.emplace();
107-
cur_control_params.rrm_policy_ratio_group.value().pol_member.plmn_id.append(
106+
cur_control_params.rrm_policy_group.emplace();
107+
cur_control_params.rrm_policy_group.value().pol_member.plmn_id.append(
108108
ran_param.ran_p_choice_elem_false().ran_param_value.value_oct_s().to_string());
109109
ctrl_cfg.param_list.push_back(cur_control_params);
110110
} else if (ran_param_id == 8) {
111111
if (ctrl_cfg.param_list.size()) {
112-
if (ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().pol_member.s_nssai.sst) {
112+
if (ctrl_cfg.param_list.back().rrm_policy_group.value().pol_member.s_nssai.sst) {
113113
control_config_params cur_control_params = {};
114-
cur_control_params.rrm_policy_ratio_group.emplace();
114+
cur_control_params.rrm_policy_group.emplace();
115115
cur_control_params = ctrl_cfg.param_list.back();
116-
cur_control_params.rrm_policy_ratio_group.value().pol_member.s_nssai.sst =
116+
cur_control_params.rrm_policy_group.value().pol_member.s_nssai.sst =
117117
ran_param.ran_p_choice_elem_false().ran_param_value.value_oct_s().to_number();
118118
ctrl_cfg.param_list.push_back(cur_control_params);
119119
} else {
120-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().pol_member.s_nssai.sst =
120+
ctrl_cfg.param_list.back().rrm_policy_group.value().pol_member.s_nssai.sst =
121121
ran_param.ran_p_choice_elem_false().ran_param_value.value_oct_s().to_number();
122122
}
123123
}
124124
} else if (ran_param_id == 9) {
125125
if (ctrl_cfg.param_list.size()) {
126-
if (ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().pol_member.s_nssai.sd.has_value()) {
126+
if (ctrl_cfg.param_list.back().rrm_policy_group.value().pol_member.s_nssai.sd.has_value()) {
127127
control_config_params cur_control_params = {};
128-
cur_control_params.rrm_policy_ratio_group.emplace();
128+
cur_control_params.rrm_policy_group.emplace();
129129
cur_control_params = ctrl_cfg.param_list.back();
130-
cur_control_params.rrm_policy_ratio_group.value().pol_member.s_nssai.sd.emplace();
131-
cur_control_params.rrm_policy_ratio_group.value().pol_member.s_nssai.sd =
130+
cur_control_params.rrm_policy_group.value().pol_member.s_nssai.sd.emplace();
131+
cur_control_params.rrm_policy_group.value().pol_member.s_nssai.sd =
132132
ran_param.ran_p_choice_elem_false().ran_param_value.value_oct_s().to_number();
133133
ctrl_cfg.param_list.push_back(cur_control_params);
134134
} else {
135-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().pol_member.s_nssai.sd.emplace();
136-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().pol_member.s_nssai.sd =
135+
ctrl_cfg.param_list.back().rrm_policy_group.value().pol_member.s_nssai.sd.emplace();
136+
ctrl_cfg.param_list.back().rrm_policy_group.value().pol_member.s_nssai.sd =
137137
ran_param.ran_p_choice_elem_false().ran_param_value.value_oct_s().to_number();
138138
}
139139
}
140140
} else if (ran_param_id == 10) {
141141
if (ctrl_cfg.param_list.size()) {
142-
if (!ctrl_cfg.param_list.back().rrm_policy_ratio_group.has_value()) {
143-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.emplace();
142+
if (!ctrl_cfg.param_list.back().rrm_policy_group.has_value()) {
143+
ctrl_cfg.param_list.back().rrm_policy_group.emplace();
144144
}
145-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().min_PRB_policy_ratio =
145+
ctrl_cfg.param_list.back().rrm_policy_group.value().min_PRB_policy_ratio =
146146
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
147147
} else {
148148
control_config_params cur_control_params = {};
149-
cur_control_params.rrm_policy_ratio_group.emplace();
150-
cur_control_params.rrm_policy_ratio_group.value().min_PRB_policy_ratio =
149+
cur_control_params.rrm_policy_group.emplace();
150+
cur_control_params.rrm_policy_group.value().min_PRB_policy_ratio =
151151
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
152152
ctrl_cfg.param_list.push_back(cur_control_params);
153153
}
154154
} else if (ran_param_id == 11) {
155155
if (ctrl_cfg.param_list.size()) {
156-
if (!ctrl_cfg.param_list.back().rrm_policy_ratio_group.has_value()) {
157-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.emplace();
156+
if (!ctrl_cfg.param_list.back().rrm_policy_group.has_value()) {
157+
ctrl_cfg.param_list.back().rrm_policy_group.emplace();
158158
}
159-
ctrl_cfg.param_list.back().rrm_policy_ratio_group.value().max_PRB_policy_ratio =
159+
ctrl_cfg.param_list.back().rrm_policy_group.value().max_PRB_policy_ratio =
160160
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
161161
} else {
162162
control_config_params cur_control_params = {};
163-
cur_control_params.rrm_policy_ratio_group.emplace();
164-
cur_control_params.rrm_policy_ratio_group.value().max_PRB_policy_ratio =
163+
cur_control_params.rrm_policy_group.emplace();
164+
cur_control_params.rrm_policy_group.value().max_PRB_policy_ratio =
165165
ran_param.ran_p_choice_elem_false().ran_param_value.value_int();
166166
ctrl_cfg.param_list.push_back(cur_control_params);
167167
}
168168
} else {
169-
logger.error("Unknown RAN parameter ID %d", ran_param_id);
169+
logger.error("Unknown RAN parameter ID {}", ran_param_id);
170170
return;
171171
}
172172
}
@@ -247,17 +247,17 @@ e2sm_ric_control_response e2sm_rc_control_action_2_6_du_executor::convert_to_e2s
247247

248248
// TODO: fill outcome properly
249249
control_config_params req = du_config_req_.param_list[0];
250-
if (req.rrm_policy_ratio_group.has_value()) {
250+
if (req.rrm_policy_group.has_value()) {
251251
e2sm_rc_ctrl_outcome_format1_item_s min_prb_outcome;
252252
min_prb_outcome.ran_param_id = 10;
253-
min_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_ratio_group.value().min_PRB_policy_ratio;
253+
min_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().min_PRB_policy_ratio;
254254
ctrl_outcome.ran_p_list.push_back(min_prb_outcome);
255255
}
256256

257-
if (req.rrm_policy_ratio_group.has_value()) {
257+
if (req.rrm_policy_group.has_value()) {
258258
e2sm_rc_ctrl_outcome_format1_item_s max_prb_outcome;
259259
max_prb_outcome.ran_param_id = 11;
260-
max_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_ratio_group.value().max_PRB_policy_ratio;
260+
max_prb_outcome.ran_param_value.set_value_int() = req.rrm_policy_group.value().max_PRB_policy_ratio;
261261
ctrl_outcome.ran_p_list.push_back(max_prb_outcome);
262262
}
263263

tests/unittests/du_manager/procedures/du_ue_ric_configuration_procedure_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TEST_F(du_ue_ric_config_tester,
4646
when_new_ric_config_is_started_then_du_manager_starts_mac_config_and_waits_for_mac_response)
4747
{
4848
std::vector<control_config_params> param_list;
49-
RRM_policy_ratio_group pol;
49+
rrm_policy_ratio_group pol;
5050
pol.max_PRB_policy_ratio = 10;
5151
pol.min_PRB_policy_ratio = 5;
5252
param_list.emplace_back(control_config_params{nullopt, nullopt, pol});
@@ -66,7 +66,7 @@ TEST_F(du_ue_ric_config_tester,
6666
TEST_F(du_ue_ric_config_tester, when_mac_finished_configuration_then_procedure_finishes)
6767
{
6868
std::vector<control_config_params> param_list;
69-
RRM_policy_ratio_group pol;
69+
rrm_policy_ratio_group pol;
7070
param_list.emplace_back(control_config_params{nullopt, nullopt, pol});
7171
start_procedure(du_mac_sched_control_config{(uint64_t)test_ue->f1ap_ue_id, param_list});
7272

@@ -92,7 +92,7 @@ TEST_F(du_ue_ric_config_tester,
9292

9393
// Start RIC UE config.
9494
std::vector<control_config_params> param_list;
95-
RRM_policy_ratio_group pol;
95+
rrm_policy_ratio_group pol;
9696
param_list.emplace_back(control_config_params{nullopt, nullopt, pol});
9797
start_procedure(du_mac_sched_control_config{(uint64_t)test_ue->f1ap_ue_id, param_list});
9898

0 commit comments

Comments
 (0)