Skip to content

Commit d2f4b70

Browse files
author
codebot
committed
Update main
2 parents 9e0374d + 5359b05 commit d2f4b70

File tree

12 files changed

+174
-28
lines changed

12 files changed

+174
-28
lines changed

apps/helpers/metrics/json_generators/du_high/scheduler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ void to_json(nlohmann::json& json, const scheduler_cell_metrics& metrics)
121121
{
122122
// Cell metrics.
123123
auto& cell_json = json["cell_metrics"];
124+
cell_json["pci"] = metrics.pci;
124125
cell_json["error_indication_count"] = metrics.nof_error_indications;
125126
cell_json["average_latency"] = metrics.average_decision_latency.count();
126127
cell_json["max_latency"] = metrics.max_decision_latency.count();

apps/units/flexible_o_du/o_du_high/du_high/du_high_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct du_high_unit_scheduler_config {
101101
/// When \c nof_preselected_newtx_ues is lower than the total number of active UEs in the cell, the scheduler will
102102
/// operate as a hybrid between a Round-Robin scheduler and whichever scheduler policy was selected (e.g. QoS-aware).
103103
/// This parameter is useful to reduce the complexity of the scheduling decision, at the cost of some performance.
104-
unsigned nof_preselected_newtx_ues = 32;
104+
unsigned nof_preselected_newtx_ues = 1024;
105105
/// Scheduler policy employed to prioritize or deprioritize pre-selected UE candidates.
106106
std::optional<scheduler_policy_config> policy_cfg;
107107
};

apps/units/flexible_o_du/o_du_high/du_high/metrics/consumers/scheduler_metrics_consumers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ void scheduler_cell_metrics_consumer_log::handle_metric(const std::optional<sche
241241
cell.nof_failed_pdsch_allocs_late_harqs,
242242
cell.nof_failed_pusch_allocs_late_harqs,
243243
cell.pucch_tot_rb_usage_avg);
244-
if (cell.pusch_prbs_used_per_tdd_slot_idx.size()) {
244+
if (not cell.pusch_prbs_used_per_tdd_slot_idx.empty()) {
245245
fmt::format_to(
246246
std::back_inserter(buffer),
247247
" pusch_rbs_per_tdd_slot_idx=[{}]",
248248
fmt::join(cell.pusch_prbs_used_per_tdd_slot_idx.begin(), cell.pusch_prbs_used_per_tdd_slot_idx.end(), ", "));
249249
}
250-
if (cell.pdsch_prbs_used_per_tdd_slot_idx.size()) {
250+
if (not cell.pdsch_prbs_used_per_tdd_slot_idx.empty()) {
251251
fmt::format_to(
252252
std::back_inserter(buffer),
253253
" pdsch_rbs_per_tdd_slot_idx=[{}]",

include/srsran/scheduler/scheduler_metrics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct scheduler_cell_metrics {
181181
std::chrono::microseconds max_decision_latency{0};
182182
slot_point max_decision_latency_slot;
183183
std::array<unsigned, latency_hist_bins> latency_histogram{0};
184-
/// Number of RBs used for PUSCH per slot index in the TDD pattern.
184+
/// Average number of RBs used for PUSCH per slot index in the TDD pattern.
185185
std::vector<unsigned> pusch_prbs_used_per_tdd_slot_idx;
186186
std::vector<unsigned> pdsch_prbs_used_per_tdd_slot_idx;
187187
std::vector<scheduler_cell_event> events;

lib/pdcp/pdcp_entity_rx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ void pdcp_entity_rx::apply_reordering(pdcp_rx_pdu_info pdu_info)
400400
// Store PDU in Rx window
401401
pdcp_rx_sdu_info& sdu_info = rx_window.add_sn(rcvd_count);
402402
sdu_info.buf = std::move(pdu_info.buf);
403+
sdu_info.count = pdu_info.count;
403404
sdu_info.time_of_arrival = pdu_info.time_of_arrival;
404405

405406
// Update RX_NEXT

lib/phy/lower/lower_phy_factory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class lower_phy_factory_sw : public lower_phy_factory
171171
srsran_assert(controller, "Failed to create the lower PHY controller.");
172172

173173
// Prepare lower PHY configuration.
174-
ue_lower_phy_impl::configuration lower_phy_config;
174+
lower_phy_impl::configuration lower_phy_config;
175175
lower_phy_config.downlink_proc = std::move(dl_proc);
176176
lower_phy_config.uplink_proc = std::move(ul_proc);
177177
lower_phy_config.controller = std::move(controller);
@@ -180,7 +180,7 @@ class lower_phy_factory_sw : public lower_phy_factory
180180
lower_phy_config.error_notifier = config.error_notifier;
181181
lower_phy_config.metrics_notifier = config.metric_notifier;
182182

183-
return std::make_unique<ue_lower_phy_impl>(lower_phy_config);
183+
return std::make_unique<lower_phy_impl>(lower_phy_config);
184184
}
185185

186186
private:

lib/phy/lower/lower_phy_impl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
using namespace srsran;
2727

28-
ue_lower_phy_impl::ue_lower_phy_impl(configuration& config) :
28+
lower_phy_impl::lower_phy_impl(configuration& config) :
2929
downlink_proc(std::move(config.downlink_proc)),
3030
uplink_proc(std::move(config.uplink_proc)),
3131
handler_adaptor(downlink_proc->get_downlink_request_handler(),
@@ -54,27 +54,27 @@ ue_lower_phy_impl::ue_lower_phy_impl(configuration& config) :
5454
notification_adaptor.get_puxch_notifier());
5555
}
5656

57-
lower_phy_cfo_controller& ue_lower_phy_impl::get_tx_cfo_control()
57+
lower_phy_cfo_controller& lower_phy_impl::get_tx_cfo_control()
5858
{
5959
return downlink_proc->get_cfo_control();
6060
}
6161

62-
lower_phy_cfo_controller& ue_lower_phy_impl::get_rx_cfo_control()
62+
lower_phy_cfo_controller& lower_phy_impl::get_rx_cfo_control()
6363
{
6464
return uplink_proc->get_cfo_control();
6565
}
6666

67-
lower_phy_center_freq_controller& ue_lower_phy_impl::get_tx_center_freq_control()
67+
lower_phy_center_freq_controller& lower_phy_impl::get_tx_center_freq_control()
6868
{
6969
return downlink_proc->get_carrier_center_frequency_control();
7070
}
7171

72-
lower_phy_center_freq_controller& ue_lower_phy_impl::get_rx_center_freq_control()
72+
lower_phy_center_freq_controller& lower_phy_impl::get_rx_center_freq_control()
7373
{
7474
return uplink_proc->get_carrier_center_frequency_control();
7575
}
7676

77-
lower_phy_tx_time_offset_controller& ue_lower_phy_impl::get_tx_time_offset_control()
77+
lower_phy_tx_time_offset_controller& lower_phy_impl::get_tx_time_offset_control()
7878
{
7979
return downlink_proc->get_tx_time_offset_control();
8080
}

lib/phy/lower/lower_phy_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
namespace srsran {
4747

4848
/// Lower physical layer implementation.
49-
class ue_lower_phy_impl : public lower_phy, private lower_phy_controller
49+
class lower_phy_impl : public lower_phy, private lower_phy_controller
5050
{
5151
public:
5252
/// Collects the injected dependencies of the lower physical layer.
@@ -68,7 +68,7 @@ class ue_lower_phy_impl : public lower_phy, private lower_phy_controller
6868
};
6969

7070
/// Constructs a generic lower physical layer.
71-
ue_lower_phy_impl(configuration& config);
71+
lower_phy_impl(configuration& config);
7272

7373
// See interface for documentation.
7474
lower_phy_controller& get_controller() override { return *this; }

lib/ru/dummy/ru_dummy_sector.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane
8787

8888
// Set the current slot information.
8989
std::optional<resource_grid_context> late_context =
90-
dl_request[context.slot.system_slot() % dl_request.size()].new_request(
91-
context, grid.copy(), stop_control.get_token());
90+
dl_request[context.slot.system_slot() % dl_request.size()].new_request(context, grid.copy(), std::move(token));
9291
total_dl_request_count.fetch_add(1, std::memory_order_relaxed);
9392

9493
// If the previous slot is valid, it is a late.
@@ -113,7 +112,7 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane
113112

114113
std::optional<prach_buffer_context> late_context =
115114
prach_request[context.slot.system_slot() % prach_request.size()].new_request(
116-
context, &buffer, stop_control.get_token());
115+
context, &buffer, std::move(token));
117116
total_prach_request_count.fetch_add(1, std::memory_order_relaxed);
118117

119118
// Detect if there is an unhandled request from a different slot.
@@ -136,8 +135,7 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane
136135
}
137136

138137
std::optional<resource_grid_context> late_context =
139-
ul_request[context.slot.system_slot() % ul_request.size()].new_request(
140-
context, grid.copy(), stop_control.get_token());
138+
ul_request[context.slot.system_slot() % ul_request.size()].new_request(context, grid.copy(), std::move(token));
141139
total_ul_request_count.fetch_add(1, std::memory_order_relaxed);
142140

143141
// Detect if there is an unhandled request from a different slot.
@@ -303,9 +301,6 @@ class ru_dummy_sector : public ru_uplink_plane_handler, public ru_downlink_plane
303301
// Transition to available. The object will become available again.
304302
internal_state.store(internal_states::available);
305303

306-
// Reset the stop token.
307-
local_token.reset();
308-
309304
// Return the context and resource.
310305
return {current_context, std::move(current_resource)};
311306
}

lib/scheduler/logging/scheduler_metrics_handler.cpp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,23 @@ void cell_metrics_handler::report_metrics()
443443
// Note: PUCCH is only allocated on full UL slots.
444444
next_report->pucch_tot_rb_usage_avg =
445445
data.nof_ul_slots > 0 ? static_cast<float>(data.pucch_rbs_used) / data.nof_ul_slots : 0;
446-
for (unsigned rb_count : ul_prbs_used_per_tdd_slot_idx) {
447-
next_report->pusch_prbs_used_per_tdd_slot_idx.push_back(rb_count);
448-
}
449-
for (unsigned rb_count : dl_prbs_used_per_tdd_slot_idx) {
450-
next_report->pdsch_prbs_used_per_tdd_slot_idx.push_back(rb_count);
451-
}
446+
if (cell_cfg.tdd_cfg_common.has_value()) {
447+
const float nof_tdd_periods_per_metric_report =
448+
static_cast<float>(next_report->nof_slots) /
449+
static_cast<float>(nof_slots_per_tdd_period(cell_cfg.tdd_cfg_common.value()));
450+
451+
for (unsigned rb_count : ul_prbs_used_per_tdd_slot_idx) {
452+
const auto avg_nof_rbs =
453+
static_cast<unsigned>(std::round(static_cast<float>(rb_count) / nof_tdd_periods_per_metric_report));
454+
next_report->pusch_prbs_used_per_tdd_slot_idx.push_back(avg_nof_rbs);
455+
}
452456

457+
for (unsigned rb_count : dl_prbs_used_per_tdd_slot_idx) {
458+
const auto avg_nof_rbs =
459+
static_cast<unsigned>(std::round(static_cast<float>(rb_count) / nof_tdd_periods_per_metric_report));
460+
next_report->pdsch_prbs_used_per_tdd_slot_idx.push_back(avg_nof_rbs);
461+
}
462+
}
453463
// Reset cell-wide metric counters.
454464
data = {};
455465

0 commit comments

Comments
 (0)