Skip to content

Commit bc526f2

Browse files
AlaiaLcodebot
authored andcommitted
ofh: move the uplink strand inside OFH sector executor mapper
1 parent e28f029 commit bc526f2

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/ru/ofh/ru_ofh_executor_mapper.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ namespace {
2626
class ru_ofh_sector_executor_mapper_impl : public ru_ofh_sector_executor_mapper
2727
{
2828
public:
29-
ru_ofh_sector_executor_mapper_impl(task_executor& txrx_exec_,
30-
task_executor& downlink_exec_,
31-
task_executor& uplink_exec_) :
32-
txrx_exec(txrx_exec_), downlink_exec(downlink_exec_), uplink_exec(uplink_exec_)
29+
ru_ofh_sector_executor_mapper_impl(task_executor& txrx_exec_,
30+
task_executor& downlink_exec_,
31+
std::unique_ptr<task_executor> uplink_exec_) :
32+
txrx_exec(txrx_exec_), downlink_exec(downlink_exec_), uplink_exec(std::move(uplink_exec_))
3333
{
34+
srsran_assert(uplink_exec, "Invalid OFH uplink executor");
3435
}
3536

3637
// See interface for documentation.
@@ -40,12 +41,12 @@ class ru_ofh_sector_executor_mapper_impl : public ru_ofh_sector_executor_mapper
4041
task_executor& downlink_executor() override { return downlink_exec; }
4142

4243
// See interface for documentation.
43-
task_executor& uplink_executor() override { return uplink_exec; }
44+
task_executor& uplink_executor() override { return *uplink_exec; }
4445

4546
private:
46-
task_executor& txrx_exec;
47-
task_executor& downlink_exec;
48-
task_executor& uplink_exec;
47+
task_executor& txrx_exec;
48+
task_executor& downlink_exec;
49+
std::unique_ptr<task_executor> uplink_exec;
4950
};
5051

5152
/// Open Fronthaul RU executor mapper implementation managing executor mappers of the configured sectors.
@@ -76,10 +77,10 @@ class ru_ofh_executor_mapper_impl : public ru_ofh_executor_mapper
7677
: 1;
7778

7879
for (unsigned i = 0; i != config.nof_sectors; ++i) {
79-
auto& ul_strand = ul_strands.emplace_back(
80-
make_task_strand_ptr<concurrent_queue_policy::lockfree_mpmc>(*config.uplink_executor, default_queue_size));
8180
sector_mappers.emplace_back(
82-
*config.txrx_executors[i / nof_sectors_per_txrx_thread], *config.downlink_executor, *ul_strand);
81+
*config.txrx_executors[i / nof_sectors_per_txrx_thread],
82+
*config.downlink_executor,
83+
make_task_strand_ptr<concurrent_queue_policy::lockfree_mpmc>(*config.uplink_executor, default_queue_size));
8384
}
8485
}
8586

@@ -98,7 +99,6 @@ class ru_ofh_executor_mapper_impl : public ru_ofh_executor_mapper
9899

99100
private:
100101
task_executor* timing_exec;
101-
std::vector<std::unique_ptr<task_executor>> ul_strands;
102102
std::vector<ru_ofh_sector_executor_mapper_impl> sector_mappers;
103103
};
104104

0 commit comments

Comments
 (0)