582 Commits

Author SHA1 Message Date
Robert Schmidt
546fc0628b Merge remote-tracking branch 'bpodrygajlo/oru-fixes' into integration_2026_w28
O-RU first fix pass (#260)

Added several fixes requested in the original PR

- simplify code
- add example config files & test procedure

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-09 17:26:59 +02:00
Robert Schmidt
ddea885bc7 Merge remote-tracking branch 'bpodrygajlo/zmq-radio-speedup' into integration_2026_w28
fix(zmq): speedup zmq radio (#149)

- Utilize ZMQ "zero-copy" inteface on TX
- Skip one memcpy in RX
- Use AVX-512 optimized cf_t <-> c16_t conversion loops in tx and rx
- Parallelize TX and RX polling threads for faster execution

Closes: #118
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-09 17:26:00 +02:00
Robert Schmidt
afcd77108d Merge remote-tracking branch 'karimboutiba/xran_fdd' into integration_2026_w28
xran: fixes for FDD operation (#270)

Two fixes in the xran fronthaul found while bringing up an FDD cell
(Band n1, 10 MHz).  Verified on a Band n1 FDD 10 MHz cell using Keysight
RUsim/UEsim, End-to-end UE attach and traffic work.

- Derive TTI from the configured numerology instead of a hardcoded 20
  slots per frame: xran_fh_tx_send_slot() assumed 30 kHz SCS. Compute
  slots_per_frame as 10 << mu from the fronthaul config (mu_number[0]
  for K release, frame_conf.nNumerology for F release), so the TTI is
  correct for any numerology. With the original code, PRACH was not
  working properly.
- Fix DL transmission in FDD mode: the TDD DL/guard slot check skipped
  every DL slot in FDD, where no TDD pattern exists and all slots carry
  DL. The check is now only applied when the frame duplex type is not
  FDD. Without this, no DL traffic was sent.

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-09 17:10:29 +02:00
Karim Boutiba
3921017988 xran: fix FDD operations and avoid skipping DL/UL slots.
Previously, is_tdd_ul_symbol() and is_tdd_dl_symbol() returned true
unconditionally in FDD. This is correct for UL/DL presence (in FDD,
every symbol carries both UL and DL), but it breaks logic that relies
on the TDD property that a UL symbol is not a DL symbol (and vice
versa), e.g. the computation of the last DL symbol in mixed slots. In
FDD, this assumption does not hold, leading to incorrect behavior.

Remove the FDD shortcut from the TDD symbol helpers so they strictly
answer the TDD question, and make the FDD case explicit at each
function call (nFrameDuplexType != XRAN_FDD && ...). This harmonizes
the TDD and FDD paths: in FDD, no slot/symbol is skipped on RX or TX,
and guard-slot handling only applies to TDD.

Signed-off-by: Karim Boutiba <karim.boutiba@openairinterface.org>
2026-07-09 12:46:15 +02:00
Karim Boutiba
e6dd656e52 xran: derive TTI from configured numerology instead of hardcoded 20 slots/frame
The TTI computation in xran_fh_tx_send_slot() assumed 20 slots per
frame (30 kHz SCS only). Compute slots_per_frame as 10 << mu from the
fronthaul configuration instead, so the TTI is correct for any numerology.

Signed-off-by: Karim Boutiba <karim.boutiba@openairinterface.org>
2026-07-09 12:45:42 +02:00
Bartosz Podrygajlo
ebdedfffcf feat(oru): load radio library according to configuration
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 11:34:00 +02:00
Bartosz Podrygajlo
80a8b81e96 perf(zmq): parallelize TX and RX polling threads
Replace the single polling thread that handled all channels
with separate, dedicated polling threads per TX and RX channel.
This avoids calling `zmq_poll` across all sockets simultaneously,
reduces lock contention, and enables concurrent socket operations
on multiple antennas.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:40:04 +02:00
Bartosz Podrygajlo
8bed33d44e test(zmq): add SIMD sample validation
Add `TxRxSamplesSIMD` to validate the correctness of the new ZMQ
device transmit and receive paths with int16 complex samples.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:39:49 +02:00
Bartosz Podrygajlo
1ec719bd44 perf(zmq): optimize TX path using ZMQ zero-copy message queue
Optimize the TX path by converting int16 complex samples to float
complex format directly into ZMQ message buffers using SIMD. Queue
these ZMQ messages (`zmq_msg_t`) directly, avoiding temporary internal
copying and enabling ZMQ's zero-copy interface during actual transmit
in the polling thread.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:37:57 +02:00
Bartosz Podrygajlo
9e94084e9d perf(zmq): optimize RX path using SIMD conversion and direct storage
Optimize the RX path by converting float complex samples received on ZMQ
to int16 complex format using SIMD right inside the polling thread. This
allows storing int16 complex (c16_t) samples directly inside the overflow_buffer,
skipping a temporary float buffer allocation and a memcpy in the receive function.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:37:47 +02:00
Bartosz Podrygajlo
5fad2465f0 refactor(zmq): templatize ring_buffer and overflow_buffer
Support float and int16 complex types

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:14:27 +02:00
Bartosz Podrygajlo
75545fa2c1 feat(zmq): add SIMD sample conversion functions
Add AVX-512 and AVX2 optimized conversion loops between float complex (cf_t)
and int16 complex (c16_t) sample formats in radio/zmq/zmq_simd.h.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:12:47 +02:00
Bartosz Podrygajlo
dc35ce95b9 test(zmq): addthroughput benchmark tests
Add a performance benchmark `BenchmarkThroughput` to measure the sample rate capacity

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 08:12:47 +02:00
Bartosz Podrygajlo
6bdf1dde3d fix: Update xran version to 11.1.3
This update allows automatic discovery of target platform when building xran.

Supproted platforms: armv8 and x86_64 with avx512

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-08 15:34:05 +02:00
Bartosz Podrygajlo
3a3fd87633 fix: Make xran_DOWNLOAD=ON default
Make xran_DOWNLOAD ON by default - this simplifies work in the most common
usecase and still allows to overwrite xran directory with xran_LOCATION.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-08 13:10:40 +02:00
Robert Schmidt
465b57d8c5 Merge remote-tracking branch 'rorsc/more-cleanup-split8-api' into integration_2026_w27
Clean up openair0_device, remove eth_params usage in L2/L3 (#243)

This PR has three goals

- Remove the usage of eth_params in L2/L3 code, and replace with
  tailored data structures for IP connectivity where necessary
- Remove many of the includes of common_lib.h where possible
- Slightly clean up openair0_device and in particular move fields to
  eth_state_t where appropriate

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-07-02 14:55:07 +02:00
Robert Schmidt
58eebfe1d8 Merge remote-tracking branch 'origin/large-du-profile-k' into integration_2026_w27
[FHI72] Update the xran K release tag due to the PR openairinterface/o-du-phy#3 (#257)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 13:34:42 +02:00
Robert Schmidt
6d75ca8e9c Move fhstate into eth structure
fhstate is only used in the ETHERNET library, so move it to a smaller
scope. In AW2S it is write-only, so we can remove it.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 08:46:09 +02:00
Teodora Vladić
05af0556af Update the xran K release tag due to the PR https://github.com/openairinterface/o-du-phy/pull/3
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-07-01 13:29:10 +02:00
Bartosz Podrygajlo
2a3f0ffc02 fix: Address clang compiler warning in zmq_radio (non-c-typedef-for-linkage)
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-01 10:39:41 +02:00
Robert Schmidt
9c0577ad1e Remove unused is_init
This field is never used anywhere.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:09 +02:00
Robert Schmidt
102792c373 Move eCPRI fields to ethernet struct
These fields are only accessed from the ETHERNET library, which has a
dedicated ethernet struct (which is in device->priv). Move in there to
reduce visibility.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:09 +02:00
Robert Schmidt
61a1e8c0d8 Remove common_lib.h includes
After having removed eth_params_t from all L2/L3 files, we can reduce
the scope of common_lib.h, and remove the include from many files.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:09 +02:00
Robert Schmidt
c2dbfd79d5 Reformat ethernet_lib.c with clang-format
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
Robert Schmidt
6d4573905a Merge remote-tracking branch 'bpodrygajlo/test_vrtsim_stability' into integration_2026_w26
fix: Make test_vrtsim stable (#241)

Ensure all resources used by test_vrtsim are unique so that there is no
overlap, which might cause an issue in CI.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-29 11:51:15 +02:00
Robert Schmidt
dc01a3540a Merge remote-tracking branch 'bpodrygajlo/nr-oru' into integration_2026_w26
Add NR O-RU (#211)

This is a PR that will add a functional vrtsim-based nr-oru to the build
system. This is only slightly different SW to the one being presented at
the OAI summer 2026 workshop.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-06-29 11:50:01 +02:00
Bartosz Podrygajlo
ad5e941bc9 fix: Make test_vrtsim stable
Ensure all resources used by test_vrtsim are unique so that there is no overlap,
which might cause an issue in CI.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-27 06:45:39 +02:00
Bartosz Podrygajlo
75d7fa275d fix(vrtsim): Reduce OS scheduler pressure caused by vrtsim timing thread
Increase the usleep to 20 uS to reduce the pressure on the OS scheduler. This
reduces the number of context switches and increases performance. The value 20uS
is approximately half a symbol in mu1 and shouldn't cause too much extra delay.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-26 14:17:18 +02:00
Bartosz Podrygajlo
0aa3f89c52 feat(radio): add a function which loads the specified radio library
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:20:15 +02:00
Bartosz Podrygajlo
cd79eec3ec feat(vrtsim): add get_timestamp to openair_device_t and vrtsim
This function can be used to convert a timespec struct to a
openair0_timestamp. It can be used to synchronize the realtime
clock to the device sample number.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:20:06 +02:00
Robert Schmidt
47e9ad9cbd Merge remote-tracking branch 'origin/fhi72-k-version' into integration_2026_w25
[FHI72] Improve the fronthaul doc (#201)

- explicitly set the K_VERSION variable in the fronthaul doc, and update
  PTP configuration
- fix IQ decompression for ARM architecture

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-18 17:44:18 +02:00
Teodora Vladić
10ff25e530 Decompress IQ properly for ARM architecture
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: f65b8f564f ("Correctly extract the PUSCH PRBs from an internet frame (one fragment)")
2026-06-17 11:39:18 +02:00
Bartosz Podrygajlo
4ed41739c0 fix(vrtsim): Fixes for vrtsim
- Fix vrtsim uneven antenna configurations
- Fix shm_td_iq_channel client-server SHM race
- Set shm size to 2G in unit test docker run to prevent out-of-memory errors

Closes: #130
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 15:11:34 +02:00
Bartosz Podrygajlo
659d184265 fix(vrtsim): Change initial IPC from file to UDS
Move the initial IPC from file-based to Unix Domain Socket. The server
keeps a lightweights UDS accept / write thread while the clients attempt
to connect / read from the socket. This makes the communication more robust
because if the server process exits, it will always result in a failure to
connect from the client. With file-based IPC this was not always the case.

Assisted-by: Gemini-3.5:Flash
Closes: #125
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 10:08:19 +02:00
Bartosz Podrygajlo
d3688ce345 fix(format): Fix formatting in vrtsim
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-16 10:03:07 +02:00
Bartosz Podrygajlo
ad12c4f9a8 fix(fhi72): add observability to the O-DU
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-11 14:09:13 +02:00
Robert Schmidt
438de535fa doc: make clone instructions/issues/mailing lists/tags point to Github
- make internal links relative where applicable
- delete link to the wiki, as the documentation is in the main repo, not
  the wiki
- remove some "example in oai code" as the examples either don't exist,
  or are not in that place, and we can reasonably expect people to grep

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Teodora Vladić
bd0bb79997 Fix the undefined res parameter if not defined K_RELEASE
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/4144/diffs?commit_id=43433974aa48436a76d87a5b135b396f8d0f6ce7 ("fix(fhi72): Fix use-after-free bug in fhi_72 lib")
2026-05-29 14:19:22 +02:00
Robert Schmidt
b88a94ad6e Merge remote-tracking branch 'origin/fix-bad-extern-declaration-in-c-not-h-files' into integration_2026_w22 (!4141)
wrong usage of extern declaration in C files, and header cleanup

wrong usage of extern declaration in C files, instead of headers, and
fix hidden bugs by this wrong extern declaration duplication.

this fixes pure bugs because we cast variables to the wrong types, even
if the bug has no consequence

it also separates 4G/5G include files, as the error is also in the
headers mixup. Clean up header includes in F1AP.

Further remove some "CU/DUuniqinstances".

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-28 16:43:03 +02:00
Robert Schmidt
0c46337952 Merge remote-tracking branch 'origin/vrtsim-ptp-fix' into integration_2026_w22 (!4145)
fix(vrtsim): handle CLOCK_REALTIME jump after PTP sync

Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-05-28 13:21:17 +02:00
Robert Schmidt
0d32de0f4d Disable vrtsim unit tests
the vrtsim unit tests do not run reliably in the CI. Disable it for the
moment while investigating why.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 10:39:12 +02:00
Robert Schmidt
977e60751c Merge remote-tracking branch 'origin/use-after-free-fix' into integration_2026_w22 (!4144)
fix(fhi72): Fix use-after-free bug in fhi_72 lib

Reviewed-By: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 09:11:34 +02:00
Robert Schmidt
94f9ed5cab Merge remote-tracking branch 'origin/fhi-cusm-comp-hdr' into integration_2026_w22 (!4138)
[FHI72] [M-plane] Implement dynamic compression

- CUS: dynamic compression type implemented -> tested end-to-end with
  Benetel RU.
- CUSM: use compression parameters explicitly via gNB config file (if
  set) for RU configuration via M-plane -> DL C/U-plane packets are
  good. However, not tested with Benetel RU since not supported.

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 09:10:36 +02:00
Robert Schmidt
e60cb443ab Merge remote-tracking branch 'origin/fapi-spatial-stream-mapping' into integration_2026_w22 (!3827)
Antenna port indexing of txdataF using FAPI spatial stream indices

This MR implements the FAPI's spatial stream indexing to pass antenna
port indices to L1 for MU-MIMO.

Closes #1022.

Additional details in commit message.

Reviewed-By: Francesco Mani <email@francescomani.it>
Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Teodora Vladić <teodora.vladic@openairinterface.org>
Tested-By: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 09:08:16 +02:00
Teodora Vladić
856692b6aa [M-plane] Correct the MTU value
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: 88c74dc07f ("Correct the MTU for 7.2 config files")
2026-05-27 17:35:18 +02:00
Teodora Vladić
c87dd0cbcb [M-plane] Support xran K release if xran_DOWNLOAD=ON
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: e7c4d80a5d ("Create a cmake API for O_RAN SC xran forked repo")
2026-05-27 17:35:18 +02:00
Teodora Vladić
26b12e5aab [M-plane] Do not rely on regex in cmake
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Fixes: 3c6644134c ("Use VERSION_* binary test for checking the xran library E release")
2026-05-27 17:35:18 +02:00
Teodora Vladić
588adc46f8 [FHI72][M-plane] Implement dynamic compression
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-27 17:35:11 +02:00
Teodora Vladić
a9881ab560 [M-plane] Optionally use IQ bitwidth from the config file
* use uint8_t instead of int16_t for `iq_width` (the value cannot be
  negative)
* move <compression-type> outside the if condition since it's a mandatory
node
* use <compression-method> node

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-27 17:21:40 +02:00
Laurent THOMAS
3e6e6f0d27 wrong usage of extern declaration in C files, instead of headers, and fix hidden bugs by this wrong extern declaration duplication
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-05-27 12:21:51 +02:00