Skip to content

Commit e82e10a

Browse files
Merge branch 'dev' into agpl_main
2 parents d60e56c + 96f7e9f commit e82e10a

19 files changed

+184
-75
lines changed

.gitlab-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
# Ex: "Test Weekly", "Nighlty add feature"
2525

2626
include:
27-
- project: softwareradiosystems/testing-tools
28-
ref: "48"
27+
- project: softwareradiosystems/ci/tools
28+
ref: "2"
2929
file: .gitlab/ci-shared/setup/all.yml
30-
- project: softwareradiosystems/testing-tools
31-
ref: "48"
30+
- project: softwareradiosystems/ci/tools
31+
ref: "2"
3232
file: .gitlab/ci-shared/features/all.yml
33-
- project: softwareradiosystems/testing-tools
34-
ref: "48"
33+
- project: softwareradiosystems/ci/tools
34+
ref: "2"
3535
file: .gitlab/ci-shared/tools/test_reporter.yml
3636
- local: .gitlab/ci/build.yml
3737
- local: .gitlab/ci/e2e.yml
@@ -176,7 +176,7 @@ coverity:
176176
# In build.yml
177177

178178
intermediate commits:
179-
extends: .build_and_unit_big
179+
extends: .build_and_unit
180180
rules:
181181
- if: $ON_MR
182182
variables:

.gitlab/ci/build.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#
2020

2121
include:
22-
- project: softwareradiosystems/testing-tools
23-
ref: "48"
22+
- project: softwareradiosystems/ci/tools
23+
ref: "2"
2424
file: .gitlab/ci-shared/setup/all.yml
2525

2626
stages:
@@ -187,16 +187,10 @@ stages:
187187
- ccache
188188
policy: pull
189189

190-
.build_and_unit_big:
191-
extends: .build_and_unit
192-
variables:
193-
KUBERNETES_CPU_REQUEST: 7
194-
KUBERNETES_MEMORY_REQUEST: 13Gi
195-
196190
# Main combinations
197191

198192
.build_and_unit_main:
199-
extends: .build_and_unit_big
193+
extends: .build_and_unit
200194
variables:
201195
ASSERT_LEVEL: PARANOID
202196
parallel:
@@ -248,6 +242,20 @@ build clean:
248242

249243
# Alt combinations
250244

245+
build without rf:
246+
extends: .build_and_unit
247+
rules:
248+
- if: $CI_DESCRIPTION =~ /Nightly/
249+
variables:
250+
BUILD_TYPE: "" # Default one
251+
TEST_MODE: default
252+
ENABLE_ZEROMQ: "False"
253+
ENABLE_UHD: "False"
254+
parallel:
255+
matrix:
256+
- OS: [ubuntu-22.04, ubuntu-20.04]
257+
COMPILER: [gcc, clang]
258+
251259
.build_and_unit_alt:
252260
extends: .build_and_unit
253261
variables:

.gitlab/ci/e2e.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# and at http://www.gnu.org/licenses/.
1919
#
2020
include:
21-
- project: softwareradiosystems/testing-tools
22-
ref: "48"
21+
- project: softwareradiosystems/ci/tools
22+
ref: "2"
2323
file: .gitlab/ci-shared/setup/all.yml
2424

2525
.prepare_test:
@@ -35,7 +35,7 @@ include:
3535
timeout: 6h
3636
interruptible: false
3737
image:
38-
name: registry.gitlab.com/softwareradiosystems/retina/launcher/3.11-alpine:0.0.26
38+
name: registry.gitlab.com/softwareradiosystems/ci/retina/launcher:0.0.27
3939
entrypoint: ["/bin/sh", "-c"]
4040
variables:
4141
REQUEST: "" # Retina YAML request
@@ -109,8 +109,8 @@ zmq:
109109

110110
zmq-tsan:
111111
extends: zmq
112-
variables:
113-
PYTEST_ARGS: "-n 2"
112+
# variables:
113+
# PYTEST_ARGS: "-n 2"
114114
needs:
115115
- job: "avx2 [tsan, cached]"
116116
artifacts: true
@@ -124,8 +124,8 @@ zmq-tsan:
124124

125125
zmq-asan:
126126
extends: zmq
127-
variables:
128-
PYTEST_ARGS: "-n 2"
127+
# variables:
128+
# PYTEST_ARGS: "-n 2"
129129
needs:
130130
- job: "avx2 [asan]"
131131
artifacts: true

.gitlab/ci/retina_request_rf.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020

2121
- name: amarisoft-ue
2222
type: ue
23-
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2023-02-06_17b9ea2_220ca4502_0.2.13
24-
debug-labels: [retina.cpu.high]
23+
image: registry.gitlab.com/softwareradiosystems/ci/retina/amarisoftue:2023-02-06_9cbbc85_c231804b2_0.2.14
2524
resources:
2625
- type: sdr
2726
model: b200
@@ -30,14 +29,12 @@
3029

3130
- name: srs-gnb
3231
type: gnb
33-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.2_0.2.13
34-
debug-labels: [retina.cpu.low]
32+
image: registry.gitlab.com/softwareradiosystems/ci/retina/srsgnb:0.1.2_0.2.14
3533
resources:
3634
- type: sdr
3735
model: b200
3836
path: ../../build/apps/gnb/gnb
3937

4038
- name: open5gs
4139
type: epc
42-
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.10
43-
debug-labels: [retina.cpu.low]
40+
image: registry.gitlab.com/softwareradiosystems/ci/retina/open5gs:2.5.6_0.2.14

.gitlab/ci/retina_request_zmq.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
- name: amarisoft-ue
2222
type: ue
23-
image: registry.gitlab.com/softwareradiosystems/retina/images/amarisoftue:2023-02-06_17b9ea2_220ca4502_0.2.13
23+
image: registry.gitlab.com/softwareradiosystems/ci/retina/amarisoftue:2023-02-06_9cbbc85_c231804b2_0.2.14
2424
debug-labels: [retina.cpu.high]
2525
resources:
2626
- type: zmq
@@ -29,13 +29,12 @@
2929

3030
- name: srs-gnb
3131
type: gnb
32-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.2_0.2.13
32+
image: registry.gitlab.com/softwareradiosystems/ci/retina/srsgnb:0.1.2_0.2.14
3333
debug-labels: [retina.cpu.low]
3434
resources:
3535
- type: zmq
3636
path: ../../build/apps/gnb/gnb
3737

3838
- name: open5gs
3939
type: epc
40-
image: registry.gitlab.com/softwareradiosystems/retina/images/open5gs:2.5.6_0.2.10
41-
debug-labels: [retina.cpu.low]
40+
image: registry.gitlab.com/softwareradiosystems/ci/retina/open5gs:2.5.6_0.2.14

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::vector<du_cell_config> srsran::generate_du_cell_config(const gnb_appconfig&
6767
"SSB derived parameters for cell: {}, band: {}, dl_arfcn:{}, crbs: {} scs:{}, ssb_scs:{}:\n\t - SSB offset "
6868
"pointA:{} \n\t - k_SSB:{} \n\t - SSB arfcn:{} \n\t - Coreset index:{} \n\t - Searchspace index:{}",
6969
base_cell.pci,
70-
base_cell.band,
70+
*param.band,
7171
base_cell.dl_arfcn,
7272
nof_crbs,
7373
to_string(base_cell.common_scs),
@@ -240,7 +240,9 @@ lower_phy_configuration srsran::generate_ru_config(const gnb_appconfig& config)
240240

241241
out_cfg.srate = sampling_rate::from_MHz(config.rf_driver_cfg.srate_MHz);
242242

243-
out_cfg.ta_offset = band_helper::get_ta_offset(config.common_cell_cfg.band.value());
243+
out_cfg.ta_offset = band_helper::get_ta_offset(
244+
config.common_cell_cfg.band.has_value() ? *config.common_cell_cfg.band
245+
: band_helper::get_band_from_dl_arfcn(config.common_cell_cfg.dl_arfcn));
244246
if (config.rf_driver_cfg.time_alignment_calibration.has_value()) {
245247
// Selects the user specific value.
246248
out_cfg.time_alignment_calibration = config.rf_driver_cfg.time_alignment_calibration.value();

lib/mac/mac_ul/pdu_rx_handler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,17 @@ bool pdu_rx_handler::handle_crnti_ce(decoded_mac_rx_pdu& ctx, const mac_ul_sch_s
284284
// 2. Dispatch continuation of subPDU handling to execution context of previous C-RNTI.
285285
ue_exec_mapper.executor(ctx.ue_index).execute([this, ctx = std::move(ctx)]() mutable {
286286
// 3. Handle remaining subPDUs using old C-RNTI.
287-
handle_rx_subpdus(ctx);
287+
if (not handle_rx_subpdus(ctx)) {
288+
return;
289+
}
288290

289291
// 4. Scheduler should provide UL grant regardless of other BSR content for UE to complete RA.
290292
uci_indication uci{};
291293
uci.cell_index = ctx.cell_index_rx;
292294
uci.slot_rx = ctx.slot_rx;
293295
uci.ucis.resize(1);
294296
uci.ucis[0].ue_index = ctx.ue_index;
297+
uci.ucis[0].crnti = ctx.pdu_rx.rnti;
295298
uci.ucis[0].pdu = uci_indication::uci_pdu::uci_pucch_f0_or_f1_pdu{.sr_detected = true};
296299
sched.handle_uci_indication(uci);
297300
});

lib/radio/zmq/radio_session_zmq_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void radio_session_zmq_impl::transmit(unsigned
138138
tx_streams.size());
139139

140140
// Align stream to the new timestamp.
141-
bool timestamp_passed = tx_streams[stream_id]->align(metadata.ts);
141+
bool timestamp_passed = tx_streams[stream_id]->align(metadata.ts, TRANSMIT_TS_ALIGN_TIMEOUT);
142142

143143
// Notify that a timestamp is late.
144144
if (timestamp_passed) {
@@ -171,7 +171,7 @@ baseband_gateway_receiver::metadata radio_session_zmq_impl::receive(baseband_gat
171171

172172
// Align all transmit timestamps.
173173
for (auto& tx_stream : tx_streams) {
174-
tx_stream->align(passed_timestamp);
174+
tx_stream->align(passed_timestamp, RECEIVE_TS_ALIGN_TIMEOUT);
175175
}
176176

177177
// Actual reception.

lib/radio/zmq/radio_session_zmq_impl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class radio_session_zmq_impl : public radio_session,
3838
public baseband_gateway_receiver
3939
{
4040
private:
41+
/// Alignment timeout. Waits this time before padding zeros.
42+
const std::chrono::milliseconds RECEIVE_TS_ALIGN_TIMEOUT = std::chrono::milliseconds(100);
43+
/// Alignment timeout. Waits this time before padding zeros.
44+
const std::chrono::milliseconds TRANSMIT_TS_ALIGN_TIMEOUT = std::chrono::milliseconds(0);
4145
/// Default sockets send and receive timeout in milliseconds.
4246
static constexpr unsigned DEFAULT_TRX_TIMEOUT_MS = 10;
4347
/// Default linger timeout in milliseconds.

lib/radio/zmq/radio_zmq_tx_channel.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void radio_zmq_tx_channel::transmit_samples(span<radio_sample_type> data)
248248
sample_count += count;
249249
}
250250

251-
bool radio_zmq_tx_channel::align(uint64_t timestamp)
251+
bool radio_zmq_tx_channel::align(uint64_t timestamp, std::chrono::milliseconds timeout)
252252
{
253253
unsigned count = 0;
254254

@@ -261,6 +261,16 @@ bool radio_zmq_tx_channel::align(uint64_t timestamp)
261261
// Protect concurrent alignment and transmit.
262262
std::unique_lock<std::mutex> lock(transmit_alignment_mutex);
263263

264+
// If the channel has never transmitted, skip wait.
265+
if (is_tx_enabled && (timeout.count() != 0)) {
266+
// Otherwise, wait for the transmitter to transmit.
267+
bool is_not_timeout = transmit_alignment_cvar.wait_for(lock, timeout, [&]() { return sample_count >= timestamp; });
268+
if (is_not_timeout) {
269+
return sample_count > timestamp;
270+
}
271+
is_tx_enabled = false;
272+
}
273+
264274
std::array<cf_t, 1024> zero_buffer = {};
265275
// Transmit zeros until the sample count reaches the timestamp.
266276
while (sample_count < timestamp && state_fsm.is_running()) {
@@ -283,7 +293,14 @@ void radio_zmq_tx_channel::transmit(span<radio_sample_type> data)
283293
// Protect concurrent alignment and transmit.
284294
std::unique_lock<std::mutex> lock(transmit_alignment_mutex);
285295

296+
// Actual baseband transmission.
286297
transmit_samples(data);
298+
299+
// Indicate that transmit is enabled.
300+
is_tx_enabled = true;
301+
302+
// Notify transmission.
303+
transmit_alignment_cvar.notify_all();
287304
}
288305

289306
void radio_zmq_tx_channel::stop()

0 commit comments

Comments
 (0)