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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
- 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>
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>
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>
[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>
* 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>
This commit addresses several architectural issues in vrtsim, specifically
regarding how peer antenna counts are managed. Some additional changes
were made to allow unit tests and several fixes were delivered.
Key changes:
1. Refactored peer antenna management:
- Removed the redundant 'peer_info_t' structure which overlapped with
ue_config and client_info.
- Added explicit 'peer_tx_ant' and 'peer_rx_ant' fields to vrtsim_state_t.
- Server now pulls peer info from the UE config, while Client pulls it from
the GNB info published by the server.
2. Refactor taps_client to be thread safe
3. Fixed a bug where only the first antenna IQ was read from underlying SHM
mechanism
4. Test / usability related changes:
- Added support for configurable SHM channel names via
'--vrtsim.shm_channel_name' to prevent IPC conflicts between tests.
- Reduced the sleep() calls inside the code to reduce test runtime and
speedup vrtsim connection initialization and cleanup
- Added a unit tests for:
+ transparent channel mode
+ taps_client mode
+ cirdb mode
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted by Gemini
1. Beam index:
So far rxdataF and txdataF had beam number as first index to separate freq
domain samples of antenna ports when mulitple beams are served in a slot.
This works fine when the beam is applied to entire symbol / slot but not
suitable for digital beamforming. This commit removes the beam number index
from the data buffers and the buffers hold all the antenna ports in the first
dimension. The antenna port index to be used for each UE in a MU-MIMO or
concurrent analog beam scenario is signalled by L2 via dedicated fields in
the FAPI PDU.
2. Beam ID array changes:
- The gNB and RU struct has a 2D array to hold beam IDs for all symbols in a
frame and all antenna ports. The order is now changes to first: symbol index
and second: antenna port because the RU access all ports' beam IDs for each
symbol / slot at a time. This ordering is optimal for maximizing cache hits.
- The type is now changed from int to uint16_t. So far the L1 had to deduce
the beam number index (done in beam_index_allocation()) from the beam ID sent
by L2 and this is done by initializing the beam_id array to -1 which denoted
no beam id set. Now since L2 explicitely passes the port indices, there is no
need for denoting if a beam id is assigned or not to a slot in L1. And
uint16_t matches with the type used by FAPI to carry beam ID. Since the type
is uin16_t, beam_id array is initialized to 0 and the check for -1 when
passing beam ID 0 to xran is also removed.
3. Number of antenna ports:
The removal of beam index from rxdataF and txdataF buffers resulted in all
antenna ports to be in a single vector. The number of logical ports passed to
L1 is not N1*N2*XP*number of beams per period. The buffer initialization
function is updated to reflect this change. DAS reference config file is
updated in accordance with these changes.
4. oaioran.c:
Remove the check of beam ID = -1 for setting nPrbElm = 0. This is a hack for
LiteON to supposedely improve performance according to Mario. If it's true
then a proper fix would be to pass allocation information from L1 and use it
instead of beam ID.
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
an incorrect assertion that was enforcing symmetric antenna
configurations only. I removed the assertion and updated the logging for
UE antenna dimensions and the channel model antenna dimensions used to
search in CIRDB.
Signed-off-by: Merkebu Girmay <merkebu.girmay@openairinterface.org>
Preparatory changes for LDPC CUDA integration
This changeset is preparatory work to merge LDPC CUDA offload in !4097.
Notably, it includes changes for cleaning up some defines, updates to
the LDPC interface, and CI specific changes to prepare for the other MR.
The goal is to merge changes in a first step such that, in a second
step, only the actual LDPC CUDA implementation and ancillary changes
(CUDA memory allocations, CI files, ...) need to be merged.
Reviewed-By: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Rename this option from CUDA_ENABLE, as it might otherwise conflict with
another option for LDPC CUDA. For consistency, name the compile option
to CHANNEL_SIM_CUDA. This way, the LDPC CUDA option (ENABLE_LDPC_CUDA
and compile definition LDPC_CUDA) will not conflict, and the
corresponding code is clearly "labelled".
A further change is the use of target_sources to simplify the definition
of the channel_pipeline executable.
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
A RU can have multiple interfaces but for the M-plane purposes,
we need the ethernet interface.
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>