Skip to content

Commit da63b6d

Browse files
committed
ofh: added a notifier for late downlink messages
1 parent f394481 commit da63b6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+650
-56
lines changed

apps/gnb/gnb.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ static void configure_ru_ofh_executors_and_notifiers(ru_ofh_configuration&
127127
const log_appconfig& log_cfg,
128128
worker_manager& workers,
129129
ru_uplink_plane_rx_symbol_notifier& symbol_notifier,
130-
ru_timing_notifier& timing_notifier)
130+
ru_timing_notifier& timing_notifier,
131+
ru_error_notifier& error_notifier)
131132
{
132133
srslog::basic_logger& ofh_logger = srslog::fetch_basic_logger("OFH", false);
133134
ofh_logger.set_level(srslog::str_to_basic_level(log_cfg.ofh_level));
@@ -136,6 +137,7 @@ static void configure_ru_ofh_executors_and_notifiers(ru_ofh_configuration&
136137
dependencies.rt_timing_executor = workers.ru_timing_exec;
137138
dependencies.timing_notifier = &timing_notifier;
138139
dependencies.rx_symbol_notifier = &symbol_notifier;
140+
dependencies.error_notifier = &error_notifier;
139141

140142
// Configure sector.
141143
for (unsigned i = 0, e = config.sector_configs.size(); i != e; ++i) {
@@ -486,6 +488,7 @@ int main(int argc, char** argv)
486488

487489
upper_ru_ul_adapter ru_ul_adapt(gnb_cfg.cells_cfg.size());
488490
upper_ru_timing_adapter ru_timing_adapt(gnb_cfg.cells_cfg.size());
491+
upper_ru_error_adapter ru_error_adapt(gnb_cfg.cells_cfg.size());
489492

490493
std::unique_ptr<radio_unit> ru_object;
491494
if (variant_holds_alternative<ru_ofh_configuration>(ru_cfg.config)) {
@@ -495,7 +498,8 @@ int main(int argc, char** argv)
495498
gnb_cfg.log_cfg,
496499
workers,
497500
ru_ul_adapt,
498-
ru_timing_adapt);
501+
ru_timing_adapt,
502+
ru_error_adapt);
499503

500504
ru_object = create_ofh_ru(variant_get<ru_ofh_configuration>(ru_cfg.config), std::move(ru_dependencies));
501505
} else if (variant_holds_alternative<ru_generic_configuration>(ru_cfg.config)) {
@@ -545,6 +549,7 @@ int main(int argc, char** argv)
545549
// Make connections between DU and RU.
546550
ru_ul_adapt.map_handler(sector_id, du->get_rx_symbol_handler());
547551
ru_timing_adapt.map_handler(sector_id, du->get_timing_handler());
552+
ru_error_adapt.map_handler(sector_id, du->get_error_handler());
548553

549554
// Start DU execution.
550555
du->start();

include/srsran/du/du.h

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,34 @@
1010

1111
#pragma once
1212

13-
#include "srsran/f1ap/common/f1ap_common.h"
14-
#include "srsran/phy/upper/upper_phy_rx_symbol_handler.h"
15-
#include "srsran/phy/upper/upper_phy_timing_handler.h"
16-
1713
namespace srsran {
1814

15+
class f1ap_message_handler;
16+
class upper_phy_error_handler;
17+
class upper_phy_rx_symbol_handler;
18+
class upper_phy_timing_handler;
19+
1920
class du
2021
{
2122
public:
2223
virtual ~du() = default;
2324

24-
/// \brief Start the DU.
25+
/// Starts the DU.
2526
virtual void start() = 0;
2627

27-
/// \brief Stop the DU.
28+
/// Stops the DU.
2829
virtual void stop() = 0;
2930

30-
/// \brief Get the handler for F1AP Rx PDUs coming from the CU-CP.
31+
/// Returns the handler for F1AP Rx PDUs coming from the CU-CP.
3132
virtual f1ap_message_handler& get_f1ap_message_handler() = 0;
3233

33-
/// \brief Gets handler in charge of processing uplink OFDM symbols.
34+
/// Returns a reference to the error handler of the DU.
35+
virtual upper_phy_error_handler& get_error_handler() = 0;
36+
37+
/// Returns handler in charge of processing uplink OFDM symbols.
3438
virtual upper_phy_rx_symbol_handler& get_rx_symbol_handler() = 0;
3539

36-
/// \brief Returns a reference to the timing handler of the DU.
40+
/// Returns a reference to the timing handler of the DU.
3741
virtual upper_phy_timing_handler& get_timing_handler() = 0;
3842
};
3943

include/srsran/fapi/message_builders.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,8 +1870,6 @@ inline slot_indication_message build_slot_indication_message(unsigned sfn, unsig
18701870
inline error_indication_message
18711871
build_error_indication(uint16_t sfn, uint16_t slot, message_type_id msg_id, error_code_id error_id)
18721872
{
1873-
srsran_assert(error_id != error_code_id::out_of_sync, "OUT OF SYNC error is not allowed in this builder");
1874-
18751873
error_indication_message msg;
18761874

18771875
msg.message_type = message_type_id::error_indication;

include/srsran/fapi_adaptor/phy/phy_fapi_adaptor.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class slot_message_gateway;
1919
class slot_time_message_notifier;
2020
} // namespace fapi
2121

22+
class upper_phy_error_notifier;
2223
class upper_phy_timing_notifier;
2324
class upper_phy_rx_results_notifier;
2425

@@ -35,22 +36,25 @@ class phy_fapi_adaptor
3536
public:
3637
virtual ~phy_fapi_adaptor() = default;
3738

38-
/// \brief Returns a reference to the timing notifier used by the adaptor.
39-
virtual upper_phy_timing_notifier& get_timing_notifier() = 0;
39+
/// Returns a reference to the error notifier used by the adaptor.
40+
virtual upper_phy_error_notifier& get_error_notifier() = 0;
4041

41-
/// \brief Returns a reference to the slot-based message gateway used by the adaptor.
42-
virtual fapi::slot_message_gateway& get_slot_message_gateway() = 0;
42+
/// Returns a reference to the timing notifier used by the adaptor.
43+
virtual upper_phy_timing_notifier& get_timing_notifier() = 0;
4344

44-
/// \brief Returns a reference to the results notifier used by the adaptor.
45+
/// Returns a reference to the results notifier used by the adaptor.
4546
virtual upper_phy_rx_results_notifier& get_rx_results_notifier() = 0;
4647

47-
/// \brief Configures the slot-based, time-specific message notifier to the given one.
48+
/// Returns a reference to the slot-based message gateway used by the adaptor.
49+
virtual fapi::slot_message_gateway& get_slot_message_gateway() = 0;
50+
51+
/// Configures the slot-based, time-specific message notifier to the given one.
4852
virtual void set_slot_time_message_notifier(fapi::slot_time_message_notifier& fapi_time_notifier) = 0;
4953

50-
/// \brief Configures the slot-based, error-specific message notifier to the given one.
54+
/// Configures the slot-based, error-specific message notifier to the given one.
5155
virtual void set_slot_error_message_notifier(fapi::slot_error_message_notifier& fapi_error_notifier) = 0;
5256

53-
/// \brief Configures the slot-based, data-specific message notifier to the given one.
57+
/// Configures the slot-based, data-specific message notifier to the given one.
5458
virtual void set_slot_data_message_notifier(fapi::slot_data_message_notifier& fapi_data_notifier) = 0;
5559
};
5660

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
*
3+
* Copyright 2021-2024 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
#include "srsran/ran/slot_point.h"
14+
15+
namespace srsran {
16+
namespace ofh {
17+
18+
/// Open Fronthaul error context.
19+
struct error_context {
20+
/// Slot context.
21+
slot_point slot;
22+
/// Radio sector identifier.
23+
unsigned sector;
24+
};
25+
26+
/// Open Fronthaul error notifier.
27+
class error_notifier
28+
{
29+
public:
30+
virtual ~error_notifier() = default;
31+
32+
/// \brief Notifies a late downlink message.
33+
///
34+
/// \param[in] context Context of the error.
35+
virtual void on_late_downlink_message(const error_context& context) = 0;
36+
};
37+
38+
} // namespace ofh
39+
} // namespace srsran

include/srsran/ofh/ofh_sector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace srsran {
1414
namespace ofh {
1515

1616
class controller;
17+
class error_notifier;
1718
class receiver;
1819
class transmitter;
1920

@@ -33,6 +34,9 @@ class sector
3334

3435
/// Returns the Open Fronthaul controller of this sector.
3536
virtual controller& get_controller() = 0;
37+
38+
/// Sets the error notifier of this sector to the given one.
39+
virtual void set_error_notifier(error_notifier& notifier) = 0;
3640
};
3741

3842
} // namespace ofh

include/srsran/ofh/ofh_sector_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ namespace ofh {
3030

3131
/// Open Fronthaul sector configuration.
3232
struct sector_configuration {
33+
/// Radio sector identifier.
34+
unsigned sector_id;
3335
/// Ethernet interface name or identifier.
3436
std::string interface;
3537
/// Promiscuous mode flag.

include/srsran/ofh/transmitter/ofh_downlink_handler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class resource_grid_reader;
1717

1818
namespace ofh {
1919

20+
class error_notifier;
21+
2022
/// Open Fronthaul downlink handler.
2123
class downlink_handler
2224
{
@@ -29,6 +31,9 @@ class downlink_handler
2931
/// \param[in] context Resource grid context.
3032
/// \param[in] grid Downlink data to transmit.
3133
virtual void handle_dl_data(const resource_grid_context& context, const resource_grid_reader& grid) = 0;
34+
35+
/// Sets the error notifier of this sector to the given one.
36+
virtual void set_error_notifier(error_notifier& notifier) = 0;
3237
};
3338

3439
} // namespace ofh

include/srsran/ofh/transmitter/ofh_transmitter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
namespace srsran {
1818
namespace ofh {
1919

20+
class error_notifier;
21+
2022
/// Open Fronthaul transmitter interface.
2123
class transmitter
2224
{
@@ -32,6 +34,9 @@ class transmitter
3234

3335
/// Returns the OTA symbol boundary notifier of this Open Fronthaul transmitter.
3436
virtual ota_symbol_boundary_notifier& get_ota_symbol_boundary_notifier() = 0;
37+
38+
/// Sets the error notifier of this sector to the given one.
39+
virtual void set_error_notifier(error_notifier& notifier) = 0;
3540
};
3641

3742
} // namespace ofh

include/srsran/ofh/transmitter/ofh_transmitter_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ struct symbol_handler_config {
5454

5555
/// Open Fronthaul transmitter configuration.
5656
struct transmitter_config {
57+
/// Radio sector identifier.
58+
unsigned sector;
5759
/// Channel bandwidth.
5860
bs_channel_bandwidth_fr1 bw;
5961
/// Subcarrier spacing.

0 commit comments

Comments
 (0)