Compare commits

...

815 Commits

Author SHA1 Message Date
Jaroslava Fiedlerova
70508ebaf5 Merge remote-tracking branch 'origin/integration_2026_w28' into develop
Integration: 2026.w28

- #235 RRC fixes
- #247 Enforce N_PRB=2^x3^y5^z in SC-FDMA uplink scheduler
- #274 Fix PSS correlation peak value and average value on the OAI UE logs
- #261 ci: Speedup fhi72 dockerfiles
- #273 Simplifications for xran builds
- #270 xran: fixes for FDD operation
- #281 Handle invalid input in nr_get_E
- #149 fix(zmq): speedup zmq radio
- #260 O-RU first fix pass
- #202 doc: add a Git guide (commit signing, branch management, rerere)
- #249 SDAP header handling fixes
- #199 UE: implement TRS processing in PHY
- #197 Bump SIMDE commit to the most up-to-date (1c68d9a)

Closes: #118
Closes: #127
Closes: #128
Closes: #148
Closes: #262
2026-07-10 19:05:22 +02:00
Jaroslava Fiedlerova
4a84b92d88 Merge remote-tracking branch 'luispereira106/bump-simde-commit' into integration_2026_w28
Bump SIMDE commit to the most up-to-date (1c68d9a) (#197)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-10 14:21:15 +02:00
Jaroslava Fiedlerova
9c7b3d02e0 Merge remote-tracking branch 'sakthivelvelumani/ue-trs-support' into integration_2026_w28
UE: implement TRS processing in PHY (#199)

This PR implements PHY layer processing for CSI-RS tracking signal that
estimates the CFO and sends a frequency correction command to the radio
when CFO goes above a threshold of 500Hz.

A CI test is added with a GNU radio script between OCUDU gNB and the UE
that simulates a continuous frequency offset. The test passes if the UE
sends a frequency correction command.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-07-10 13:48:18 +02:00
Luis Pereira
3acb40cb85 Bump SIMDE commit to the most up-to-date (1c68d9a)
Signed-off-by: Luis Pereira <lpereira@allbesmart.pt>
2026-07-10 09:37:20 +01:00
Robert Schmidt
aff84037a7 Merge remote-tracking branch 'GuidoCasati/sdap-header-fix' into integration_2026_w28
SDAP header handling fixes (#249)

OAI SDAP treated SDAP header presence as a single PDU-session flag
(enable_sdap), so a valid asymmetric RRC config (UL header present, DL
header absent) caused the UE to parse downlink payload as an SDAP QFI
and drop traffic (e.g. IPv4 0x45 -> bogus QFI 5).

SDAP now follows RRC SDAP-Config per DRB and per direction from (TS
38.331 / TS 37.324). Header presence, QFI-to-DRB mapping, and
default-DRB fallback all derive from what RRC configured for each DRB.

In the new implementation, RRC (SDAP-Config IE) fills sdap_config_t per
DRB (role, defaultDRB, mapped QFIs), SDAP entity stores it in
qfi2drb_table + default_drb row to be used in the TX/RX data path.

Also, simplify mapping logic, improves E1 QoS-flow remap, and completes
UE reflective QoS mapping with the correct entity_role on new QFI rows.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 19:45:58 +02:00
Sakthivel Velumani
0f45f471b2 Add timing stats for TRS processing
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-07-09 16:21:59 +00:00
Sakthivel Velumani
016ab2cfb3 fix: tracking CSI-RS measurement bitmap
measurement bitmap for CSI-RS is 0 means CSI-RS for tracking. So don't
return and proceed with processing the CSI-RS.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-07-09 16:21:59 +00:00
Sakthivel Velumani
7729bab5af feature: Estimate CFO from CSI-RS tracking signal
TRS resources if configured by gnb, is present in two consequtive slots
and two symbols per slot. LS estimates from the first symbol is saved
and in second symbol frequency offset and time offset is estimated. The
estimated FO is saved in UE global structure which is used in the last
TRS slot. If the FO is above a threshold, the radio's center frequency
is adjusted.

Time offset is estimated but not used because time is already tracked
using PBCH DMRS.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-07-09 16:21:51 +00:00
Robert Schmidt
fef2154525 Merge remote-tracking branch 'Thecave3/rerere-doc' into integration_2026_w28
doc: add a Git guide (commit signing, branch management, rerere) (#202)

Adds doc/git-guide.md, a single entry point for the practical Git
knowledge needed to contribute to OAI: commit signing setup (DCO +
verified commits), branch management (including fixup commits and
--autosquash), submodules, recovering from mistakes, and reusing
conflict resolutions with git rerere.

This started as a rerere-only guide. Review discussion (@luispereira106,
@rorsc, @sgarg00) converged on a broader scope: the Git how-tos are
scattered across the documentation (signing in CONTRIBUTING.md, branch
management in code-style-contrib.md), and configuring commit signing in
particular was reported as hard to get right. This PR consolidates the
how-tos in one guide while the policy documents stay authoritative for
the rules.

Single commit (review rounds squashed per the linear-history policy):

- New doc/git-guide.md with sections on commit signing (moved from
  CONTRIBUTING.md, led by a copy-pasteable SSH recipe), branch
  management (moved from code-style-contrib.md; git switch,
  fixup/--autosquash, --fixup=amend:), submodules (unintended
  pointer-update pitfall), recovering from mistakes
  (restore/reset/reflog), and git rerere.
- CONTRIBUTING.md keeps the normative DCO/Verified requirements and
  links to the guide; code-style-contrib.md keeps the workflow policy
  and links to the guide; doc/README.md lists the guide under Developer
  tools.
- Cross-references (not moved, since they are coupled to their own
  docs): clang-format.md pre-commit hook, GET_SOURCES.md branch/tag
  model, doc_best_practices.md docs: commit prefix.
- Small typo fix in the T tracer addconsoletrace.md documentation.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-07-09 17:27:56 +02:00
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
be4d64a576 Merge remote-tracking branch 'origin/get_E_crash' into integration_2026_w28
Handle invalid input in nr_get_E (#281)

This PR prevents the function nr_get_E to crash with an assertion for
invalid input by handling the scenario with an error code

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-09 17:12:34 +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
Robert Schmidt
dde7ecf994 Merge remote-tracking branch 'bpodrygajlo/xran-arm-build-fix' into integration_2026_w28
Simplifications for xran builds (#273)

- make xran_DOWNLOAD=ON default - skips an extra argument in cmake
  command
- Automatically detect aarch64 and select correct target for external
  xran build

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-07-09 17:09:27 +02:00
Andrea Lacava
4bff655952 doc: add a Git guide and fix addconsoletrace typo
Add doc/git-guide.md, a single entry point for the practical Git
knowledge needed to contribute to OAI, consolidating the how-tos
that were scattered across the documentation:

- Setting up commit signing: moved from CONTRIBUTING.md, which keeps
  the normative DCO/Verified requirements and links to the guide; led
  by a compact SSH recipe, with the allowed_signers troubleshooting
  and a note on repository-level configuration for shared servers.
- Managing your own branch: moved from code-style-contrib.md, which
  keeps the workflow policy and links to the guide; mentions git
  switch and covers fixup commits with git rebase --autosquash,
  including the --fixup=amend:<commit> variant.
- Working with submodules: the update command and the unintended
  submodule-pointer-update pitfall seen in past PRs.
- Recovering from mistakes: git restore --staged, git restore,
  git reset --soft/--hard, and git reflog.
- Reusing conflict resolutions with git rerere: enabling, typical
  flow, inspecting, seeding from existing history, sharing the cache,
  and caveats, clarifying that contribution branches must keep a
  linear history while forks may carry merge commits.

The guide is referenced from doc/README.md (Developer tools),
code-style-contrib.md, and CONTRIBUTING.md. Guidance coupled to its
own document is cross-linked instead of moved: clang-format.md
(pre-commit hook), GET_SOURCES.md (branch and tag model), and
doc_best_practices.md (docs: commit prefix).

Also fix a typo in the T tracer addconsoletrace documentation.

Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-09 10:43:17 -04:00
Guido Casati
14b5bcb600 doc: clarify enable_sdap as RRC SDAP header policy
Log, param help, and rrc-usage.md described enable_sdap as toggling the
SDAP layer, while it only sets sdap-HeaderUL/DL in RRC SDAP-Config.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 15:04:11 +02:00
Karim Boutiba
6e1bfb2c19 doc: document nr_scs_for_raster and sl_ahead in FHI 7.2 tutorial
Signed-off-by: Karim Boutiba <karim.boutiba@openairinterface.org>
2026-07-09 13:01:57 +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
Guido Casati
223fd132e0 sdap: rename pdcp_entity to drb_id
In nr_sdap_rx_entity, the RX callback receives the DRB identity from PDCP
(drb-Identity). Rename pdcp_entity to drb_id to be aligned with TS 37.324 terminology.

Changes:
- Rename the RX callback argument through the full SDAP RX surface:
sdap_data_ind(), the rx_entity function pointer table, and nr_sdap_rx_entity().

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
7d029ed5b1 fix (sdap): copy entity_role on reflective QoS mapping
After new per-DRB SDAP roles changes, UE downlink reflective mapping
(TS 37.324 §5.3.2) still stored only drb_id on the new QFI row.
entity_role stayed NO_SDAP_HEADER, so later uplink TX and §5.3.1
end-marker logic read the wrong header config from that row.

When storing the reflective UL rule, copy the receiving DRB entity_role
(from nr_sdap_drb_lookup) together with drb_id, matching qfi2drb_map_add.

Changes:
- nr_sdap_rx_entity(): set qfi2drb_table[qfi].entity_role on RDI store

Refs:
- TS 37.324 §5.3.1, §5.3.2
- TS 38.331 SDAP-Config (sdap-HeaderUL / sdap-HeaderDL)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
991ede5c59 rrc: simplify E1 SDAP header present flags in fill_e1_drb_to_setup
In fill_e1_drb_to_setup(), derive E1 SDAP-Config header-present booleans
with logical negation instead of redundant ternary expressions.

Changes:
- NGAP: sDAP_Header_UL/DL assignment in fill_e1_drb_to_setup()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
f34ecdd021 sdap: validate gNB UL RX QFI via qfi2drb_map and receiving DRB
Parent commits route QFI-to-DRB lookup through qfi2drb_map (including
default-DRB fallback per TS 37.324 clause 5.2.1), but gNB UL RX still
checked the raw mapping table and accepted any mapped QFI on whatever
DRB received the PDU.

On gNB UL SDAP PDUs with a header, nr_sdap_rx_entity resolves the QFI
through entity->qfi2drb_map, drops when no rule and no default DRB apply,
and drops when the resolved DRB does not match the receiving DRB before
GTP-U forwarding.

Changes:
- parse UL header with nr_sdap_ul_hdr_t
- call qfi2drb_map for QFI validation
- verify receiving-DRB match
- simplify gNB UL block

Refs:
- TS 37.324 clause 5.2.1 (Uplink), clause 6.2.2.3 (UL data PDU)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
96dc20010e sdap: pass sdap_config_t through E1 QoS-flow remap
E1 DRB-To-Modify already carries the new QFI list. The old
nr_sdap_entity_update_qos_flows() duplicated that as a bare qfi[] plus other params
while map_update expects a full sdap_config_t (add/release lists and per-DRB
role). Route the E1 path through one struct instead.

Changes:
- nr_sdap_entity_update_qos_flows(): take sdap_config_t *, caller fills the struct,
  function sets role and defaultDRB from qfi2drb_table, builds mappedQFIs2Release
  for QFIs dropped from the DRB, then calls qfi2drb_map_update()
- cucp_cuup_handler.c: build stack sdap_config_t from E1 qosFlows[] and call
  the new API

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
1edb0a09bb fix (sdap): select RX/TX SDAP headers on per-DRB RRC role
A DRB may have an uplink SDAP header but no downlink header (valid TS 38.331).
The old entity->enable_sdap flag was true if either direction had a header, so UE
downlink wrongly read byte 0 as QFI. IPv4 payloads start with 0x45 -> bogus QFI 5
and dropped traffic before the TUN (PR !158).

Header presence must follow TS 37.324 §5.2.1/§5.2.2 per DRB and direction, not a
single PDU-session-wide enable-sdap.

Also, store the default DRB as a `qfi2drb_t` mapping in the SDAP entity and use
it directly for fallback paths.

Changes:
- Add nr_sdap_drb_lookup() to return first qfi2drb_table row for a DRB
- nr_sdap_rx_entity(): parse QFI only when the receiving direction has a header,
  drop if the DRB has no table row
- nr_sdap_tx_entity(): UL/DL TX header bits from qfi2drb_map() (drb_id + entity_role),
  including default-DRB fallback
- nr_sdap_qfi2drb(): const qfi2drb_t *, remove SDAP_MAP_RULE_EMPTY
- nr_sdap_map_ctrl_pdu(): handle NULL from qfi2drb_map
- nr_sdap_qfi2drb_map_update(): sync entity_role on
  all QFIs for the DRB. At most one DRB when both headers absent.
- nr_sdap_entity_update_qos_flows(): keep per-DRB role from nr_sdap_drb_lookup(),
  skip update when DRB has no row
- Cleanup entity->enable_sdap
- nr_sdap.c: remove TUN-thread QFI drop, tx_entity owns unmappable-QFI handling
- replace default_drb with qfi2drb_t default_drb in SDAP entity and init
  default DRB id+role at SDAP entity creation

Refs:
- PR #158
- TS 37.324 §5.2.1, §5.2.2, §6.2.2.1
- TS 38.331 SDAP-Config (sdap-HeaderUL / sdap-HeaderDL)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Bartosz Podrygajlo
ff9b39145e doc(oru): Example config of OAI O-RU and OAI gNB with 7.2 interface
To run the test with OAI UE and vrtsim, use the following commands, assuming
the executables are in the build directory.

OAI O-RU:
  ./nr-oru -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ru.band77.mu1.106rb.1x1.conf --device.name vrtsim --vrtsim.role server

OAI 7.2 gNB:
  ./nr-softmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.band77.mu1.106rb.fhi.1x1.conf

OAI NR UE:
  ./nr-uesoftmodem -C 4049760000 -r 106 --numerology 1 --ssb 516 --device.name vrtsim

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 11:48:11 +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
486f4423d9 refactor(oru): improve readability of TDD config and prefix selection in fft_and_cp_insertion
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 11:33:52 +02:00
Bartosz Podrygajlo
bfeba0de48 refactor(oru): remove redundant extern/function declarations from main_nr_ru.c
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 11:33:45 +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
Francesco Mani
48b329d115 prevent nr_get_E function to crash with an assertion for invalid input
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-07-09 07:57:51 +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
c8e36d3968 Merge remote-tracking branch 'bpodrygajlo/ci-docker-speedup' into integration_2026_w28
ci: Speedup fhi72 dockerfiles (#261)

Move "COPY . ." down in 7.2 dockerfiles. This layer doesn't cache well
due to changes in docker context, moving it down allows docker builder
to cache other layers that are not affected by the context.

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-07-08 09:25:30 +02:00
Robert Schmidt
bf89f7997c Merge remote-tracking branch 'luispereira106/fix-pss-corr-metrics' into integration_2026_w28
Fix PSS correlation peak value and average value on the OAI UE logs (#274)

These metrics are very helpful to properly adjust the USRP gains on the OAI UE. There was a regression in the code, this commit just gets it showing properly again.

Current develop:

    [NR_PHY] Starting sync detection
    [PHY]    [UE thread Synch] Running Initial Synch
    [NR_PHY] Starting cell search with center freq: 3619200000, bandwidth: 106. Scanning for 1 number of GSCN.
    [NR_PHY] Scanning GSCN: 0, with SSB offset: 516, SSB Freq: 0.000000
    [PHY]    Initial sync: pbch decoded sucessfully, ssb index 0
    [PHY]    pbch rx ok. rsrp:51 dB/RE, adjust_rxgain:-1 dB
    [NR_PHY] Cell Detected with GSCN: 0, SSB SC offset: 516, SSB Ref: 0.000000, PSS Corr peak: 0 dB, PSS Corr Average: 0

This PR:

    [PHY]    SSB position provided
    [NR_PHY] Starting sync detection
    [PHY]    [UE thread Synch] Running Initial Synch
    [NR_PHY] Starting cell search with center freq: 3619200000, bandwidth: 106. Scanning for 1 number of GSCN.
    [NR_PHY] Scanning GSCN: 0, with SSB offset: 516, SSB Freq: 0.000000
    [PHY]    Initial sync: pbch decoded sucessfully, ssb index 0
    [PHY]    pbch rx ok. rsrp:51 dB/RE, adjust_rxgain:-1 dB
    [NR_PHY] Cell Detected with GSCN: 0, SSB SC offset: 516, SSB Ref: 0.000000, PSS Corr peak: 99 dB, PSS Corr Average: 61

Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-07-08 09:24:43 +02:00
Robert Schmidt
d86bad7915 Merge remote-tracking branch 'PC-OC/scfdma-uplink-scheduler-rbsize' into integration_2026_w28
Enforce N_PRB=2^x3^y5^z in SC-FDMA uplink scheduler (#247)

With SC-FDMA, the scheduler in uplink needs to schedule N_PRB=2^x3^y5^z.
Not enforcing it may lead to unwanted UE behavior like retransmissions
and re-establishments.

TS38.211 - 6.3.1.4

Reviewed-by: Francesco Mani <email@francescomani.it>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-06 18:28:55 +02:00
Robert Schmidt
fcf078b18c Merge remote-tracking branch 'GuidoCasati/rrc-fixes' into integration_2026_w28
RRC fixes (#225)

- Hardens NR RRC re-establishment handling on the gNB and UE:
  re-establishment requests with invalid PCI/C-RNTI or incomplete UE
  context are rejected or fall back to RRCSetup per TS 38.33.
- Fixes an invalid post-release connected state after PDU session
  teardown
- Stops gNB process aborts when a UE sends spare RRC establishment-cause
  values.
- Fix RRCSetup fallback: the UE MAC layer is reset before bearer
  teardown on RRCSetup fallback to avoid scheduler use of released RLC
  entities.

Closes: #127
Closes: #128
Closes: #148
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-07-06 18:28:16 +02:00
Luis Pereira
fcea45b215 Fix PSS correlation peak value and average value on the OAI UE logs
These metrics are very helpful to properly adjust the USRP gains on the OAI UE.
There was a regression in the code, this commit just gets it showing properly again

Signed-off-by: Luis Pereira <lpereira@allbesmart.pt>
2026-07-06 17:17:05 +01:00
Calvin Peyron
fe56b68514 Remove trailing spaces
Signed-off-by: Calvin Peyron <calvin.peyron@open-cells.com>
2026-07-06 11:54:57 +02:00
Calvin Peyron
ad304b62d6 With SC-FDMA, scheduler in uplink needs to schedule N_PRB=2^x3^y5^z
Signed-off-by: Calvin Peyron <calvin.peyron@open-cells.com>
2026-07-06 11:54:50 +02:00
Robert Schmidt
0dab3bb6a1 Merge remote-tracking branch 'origin/integration_2026_w27' into develop
Integration: 2026.w27

- #227 Cleanup: NGAP reconnection debug log
- #233 fix: proper SA/NSA mode detection
- #239 Fix function init_context_sss_nr()
- #256 ci: Move test pcaps to github
- #244 fix(zmq): Fix clang compiler warnings in zmq radio
- #220 fix(NR_UE): gate half-frame PBCH mirror on caller-provided ssb_period
- #257 [FHI72] Update the xran K release tag due to the PR https://github.com/openairinterface/o-du-phy/pull/3
- #192 DLSIM test for type0 PDSCH frequency allocation
- #238 minorfix(imscope): moving alignas from struct type to atomic variable
- #255 ci: Speedup unit test dockerfile
- #217 NAS: refactor Identity Request handler and enforce spec-compliant security checks
- #243 Clean up openair0_device, remove eth_params usage in L2/L3
- #204 Implementation of the E3 Agent for dApps and E3AP (no service models)
- #258 NR UE: add assert for reserved bits per symbol not multiple of Qm
- #253 CI: Collect amariue logs, update eNB configs
- #203 CI: Add label check and signature verification in GitHub Actions

Closes: #219
Closes: #82
2026-07-04 17:24:07 +02:00
Robert Schmidt
ecb98e575f Merge remote-tracking branch 'origin/ci-duranta-fixes' into integration_2026_w27
CI: Add label check and signature verification in GitHub Actions (#203)

- Update contributing guidelines for signing of commits
- Check for unsigned commits in the github actions workflow
- Skip CI when no mandatory CI label present on the PR
- Always remove retrigger-ci label when present - Like post-always or
  post-cleanup

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-07-03 15:56:17 +02:00
Shubhika Garg
f63c444bb7 ci: ensure maintainer approval job is evaluated correctly on push events
- The require-maintainer-approval job was being skipped on push event
    when upstream jobs (verify-signed-commits and check-labels) were skipped,
    even though detect-changes job successfully marked protected files as changed.
  - GitHub Actions may skip dependent jobs due to upstream skipped states before
    evaluating custom conditions.
  - Adding always() ensures the job condition is evaluated regardless of
    the status of upstream jobs, while still enforcing the rule that the job
    only runs when protected_files_changed == true.

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-07-03 13:19:58 +02:00
Robert Schmidt
1cbfef20f4 Merge remote-tracking branch 'origin/ci-various-adjustments' into integration_2026_w27
CI: Collect amariue logs, update eNB configs (#253)

- collect amarisoft UE logs
- improve stability in LTE pipelines with prach_dtx_threshold

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-03 08:42:50 +02:00
Jaroslava Fiedlerova
2828e63dd8 CI: Remove OAI-CN5G-COTS-UE-Test from parent pipeline
The executor machine for this test is currently unavailable. The test
will be re-enabled once the replacement machine is configured.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-07-03 08:32:51 +02:00
Jaroslava Fiedlerova
384186b0a6 CI: Configuration file adjustment for LTE-FDD-LTEBOX-Container
Try to reduce number of false RA attempts on eNB

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-07-03 08:32:51 +02:00
Jaroslava Fiedlerova
aa6f141498 CI: Configuration file adjustment for LTE-TDD-LTEBOX-Container
Try to reduce number of false RA attempts on eNB

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-07-03 08:32:51 +02:00
Jaroslava Fiedlerova
32847ee143 CI: Enable UE log collection in RAN-SA-FHI72-MPLANE-CN5G
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-07-03 08:32:51 +02:00
Robert Schmidt
b1c7bdf99b Merge remote-tracking branch 'alexjiao2021/assert_uci_on_pusch' into integration_2026_w27
NR UE: add assert for reserved bits per symbol not multiple of Qm (#258)

map_overlapped_ack() divides num_reserved_bits_on_sym by Qm to get the
number of reserved REs. Add assertion to catch cases where the reserved
bit count is not a multiple of Qm, which would indicate a bug in the
upstream UCI-on-PUSCH mapping.

This is a follow-up of comment after PR #221

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 18:40:17 +02:00
Robert Schmidt
69a017f57b Merge remote-tracking branch 'Thecave3/e3-agent-framework' into integration_2026_w27
Implementation of the E3 Agent for dApps and E3AP (no service models) (#204)

These changes introduce an E3 Agent for dApps in the OAI codebase. dApps
are real-time microservices designed to operate within the O-RAN
ecosystem, enabling sub-10 ms Artificial Intelligence (AI) routines in
the Radio Access Network (RAN).

The E3 Agent enables spectrum sensing, frequency-domain signal logging,
and dynamic PRB (Physical Resource Block) policies through IPC/ZMQ
communication with dApps or xApps.

The dApps are designed for co-location with the CU/DU, where it can
interact directly with user-plane data to enable different network
management scenarios such as optimizing network slicing, scheduling, and
resource management.  A python library for the creation of the dApps is
available here [1].

Additional information about dApps:

- Paper on the dApp architecture [2]
- dApp framework presentation [3]
- Tutorial on dApp deployment on OAI [4]

As agreed in the original MR [5], this PR includes only the agent lifecycle,
configuration parsing, build plumbing, and the nr-softmodem init/destroy
hook.

It registers zero service models, so it builds and runs as an idle
agent. Concrete service models (e.g. spectrum sensing) and the PHY/MAC
hooks that drive them follow in later PRs.

Opt-in and dependencies

- Gated behind the E3_AGENT CMake option (OFF by default) / the
  --build-e3 build flag.  The default build is unaffected — e3ap is only
  compiled and linked into nr-softmodem when E3_AGENT=ON.

- When enabled, requires the external libe3 library [6] (vendor-neutral
  E3AP C++ lib), discovered via pkg_check_modules(CLIBE3 REQUIRED
  libe3). It is not vendored.

  Install libe3 (Debian/Ubuntu):

      git clone https://github.com/wineslab/libe3 && cd libe3
      ./build_libe3 -I      # installs deps: build-essential cmake pkg-config libzmq3-dev asn1c nlohmann-json3-dev libsctp-dev ...
      ./build_libe3 --install      # release build + installation

Build & test

Tested in RFsim: the gNB initializes the E3 agent, opens its setup
socket (/tmp/dapps/setup), registers zero service models, and runs
without crashing.  Configuration

The agent reads an optional E3Configuration section from the gNB config
file (parsed only when E3_AGENT=ON). If absent, it falls back to
built-in defaults (posix/ipc).

    E3Configuration : {
        link = "zmq";        # posix | zmq
        transport = "ipc";   # tcp | sctp | ipc
    };

The same parameters can be overridden on the command line (no
config-file edit required):

    sudo ./nr-softmodem -O <gnb.conf> ... --E3Configuration.link zmq --E3Configuration.transport ipc

Validated link/transport combinations: (zmq,ipc) (zmq,tcp) (posix,tcp)
(posix,sctp) (posix,ipc).

Notes

- I have added a new log component E3AP specific for the ops performed
  by the E3 Agent.
- This PR ships no gNB config file; the E3Configuration block / CLI
  override above is the documented way to enable the agent. Example
  configs follow in the next PRs.

[1] https://pypi.org/project/dapps/
[2] https://arxiv.org/pdf/2501.16502
[3] https://openrangym.com/o-ran-frameworks/dapps
[4] https://openrangym.com/tutorials/dapps-oai
[5] https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3361
[6] https://github.com/wineslab/libe3

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 18:35:23 +02:00
Andrea Lacava
602d729d43 e3ap: add README with dApp overview, prerequisites, and startup guide
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-02 09:55:05 -04:00
Andrea Lacava
29c20ac232 e3ap: add E3 agent lifecycle and nr-softmodem init hook
Add the E3 agent lifecycle on top of libe3: configuration mapping,
agent creation/init/start, dApp report and status-change handlers,
and xApp control and subscription-query helpers. Wire e3_init() and
e3_destroy() into nr-softmodem under the E3_AGENT guard.

The agent registers no concrete service models: service models (such
as spectrum sensing) live in their own modules and register
themselves, keeping the framework decoupled from any specific use
case.

Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-02 09:53:52 -04:00
Andrea Lacava
0a885dcf5a e3ap: add E3 agent configuration and CMake target
Add the E3AP CMake target, which links the external libe3 library
discovered via pkg-config, and the E3Configuration parser that reads
the link and transport selection from the gNB configuration file and
validates the supported link/transport combinations.

libe3 is kept external and is only required when E3_AGENT is enabled.

Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-02 09:53:16 -04:00
Andrea Lacava
447ff67aba build: add opt-in E3_AGENT build option for the O-RAN E3 agent
Introduce the E3_AGENT CMake option (default OFF) and the matching
--build-e3 flag in build_oai so the E3 agent for O-RAN dApps can be
compiled opt-in. Gate the E3AP subdirectory and the nr-softmodem
linkage behind the option, and register an E3AP log component
together with its legacy T-tracer message IDs.

The E3 interface (nGRG) lets the gNB exchange real-time reports and
controls with external dApps. Keeping it behind a build flag leaves
the default CI build unchanged and avoids pulling in the external
libe3 dependency unless the agent is explicitly requested.

Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-02 09:51:58 -04: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
35cf1c91bb Merge remote-tracking branch 'GuidoCasati/issue-963' into integration_2026_w27
NAS: refactor Identity Request handler and enforce spec-compliant security checks (#217)

Align UE Identity Request handling with TS 24.501 by checking the NAS
security header and rejecting unprotected non-SUCI requests.

Also, refactor Identity Response identity selection based on the
requested identity types, add to a helper and handle unavailable
identities in the UE context.

Closes: #82
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org
2026-07-02 14:54:04 +02:00
Robert Schmidt
b58631ce79 Merge remote-tracking branch 'bpodrygajlo/ut-speedup' into integration_2026_w27
ci: Speedup unit test dockerfile (#255)

Use docker cache, reduce the number of installed apt packages and reduce
compilation scope.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 14:53:15 +02:00
Guido Casati
860232782a fix (NGAP/RRC): map spare RRC establishment causes to NGAP notAvailable
A UE RRCSetupRequest with establishmentCause in the spare range (10–15)
could abort nr-softmodem: RRC asserted on cause >= NGAP_RRC_CAUSE_LAST,
and cause 11 failed NGAP ASN.1 encode when passed through by index.

NR RRC (TS 38.331) and NGAP RRCEstablishmentCause (TS 38.413 §9.3.1.111)
do not share one integer namespace: spare values must not be sent
as NGAP causes.

Remove the RRC AssertFatal on causes. When building
InitialUEMessage, map RRC indices 0–9 to the matching NGAP cause
and map anything else to notAvailable, as specified for unmapped UE
causes.

Changes:
- Drop establishment-cause range AssertFatal in rrc_gNB_send_NGAP_NAS_FIRST_REQ
- Add rrc2ngap_establishment_cause() and use it for InitialUEMessage RRCEstablishmentCause
- Remove redundant DevCheck on establishment_cause in ngap_gNB_handle_nas_first_req
- Adopt mapping logic in rrc_gNB_send_NGAP_NAS_FIRST_REQ

Closes: #127

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
e179a6df8f fix (UE RRC): queue MAC reset before RLC teardown on RRCSetup fallback
When the gNB answers RRCReestablishmentRequest with RRCSetup (TS 38.331
clause 5.3.3.4 fallback), the UE must release all bearers except SRB0 before
applying the new masterCellGroup. CONFIG_RESET was queued after RLC release,
so the MAC slot thread kept polling LCID 1 from a stale lc_ordered_list while
the RLC entity was already NULL.

Queue NR_MAC_RRC_CONFIG_RESET (RRC_SETUP_REESTAB_RESUME) first, then release
PDCP, RLC, and SDAP. On the MAC thread, clear lc_ordered_list except SRB0
before release_mac_configuration() so the UL scheduler stops looping released
logical channels until CONFIG_CG re-adds SRB1.

Changes:
- rrc_UE.c: move CONFIG_RESET to the start of nr_rrc_rrcsetup_fallback()
- config_ue.c: drop non-SRB0 lc_ordered_list entries on RRC_SETUP_REESTAB_RESUME

Closes: #128

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
1c659403b7 fix (RRC): log in nr_rrc_rrcsetup_fallback
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
1a1502ac5a fix (gNB RRC): release RRC connection after last DRB
TS 38.331 §5.3.1.1 forbids RRC_CONNECTED with SRB2 and zero DRBs.
Releasing all DRBs must release the RRC connection.

After PDU session release (3GPP TS 23.502 §4.3.4.2), OAI left
SRB2 up and COTS UEs could re-establish into an invalid configuration.

On NGAP PDU Session Release Response, if no DRBs remain and SRB2 is
active, send NGAP UE Context Release Request. AMF Command drives
RRCRelease on the existing CU-CP path.

Closes: #148

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
cb9dab74e3 fix (gNB RRC): skip CU-UP notify on re-estab without DRBs
Avoid E1 bearer modification when the UE has no DRBs left (e.g. after PDU
session release). (TS 38.331 clause 5.3.5.6.5 DRB with reestablishPDCP)

Changes:
- cuup_notify_reestablishment(): return early if drbs is empty

Fixes: #148

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
f79f5087e5 RRCReestablishmentRequest: add doxygen documentation
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
f5aaacd9e8 RRCReestablishmentRequest: replace random value magic number with constant
Replace the magic number 0x7fffffffff used for masking 39-bit random
values with a named constant NR_RRC_RANDOM_VALUE_39_BIT_MASK defined
in nr_rrc_defs.h.

Refs:
- TS 38.331 5.3.3.3: Random UE identity (39-bit values)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:30 +02:00
Guido Casati
cde7d98a61 RRCReestablishmentRequest: add C-RNTI constants and fix spec compliance
Replace hardcoded C-RNTI range values (0x1, 0xffef) with named constants
NR_C_RNTI_MIN and NR_C_RNTI_MAX. Correct maximum value to 0xfff2 per TS 38.321
Table 7.1-1. Change invalid C-RNTI handling to return early instead of
fallback to RRCSetup for spec compliance.

Fallback to RRCSetup only occurs when UE context cannot be retrieved,
not for validation errors, which for out-of-range values could
come from malicious UEs.

Major changes:
- Add NR_C_RNTI_MIN (0x0001) and NR_C_RNTI_MAX (0xfff2) constants to
  common/platform_constants.h
- Replace magic numbers in C-RNTI validation with named constants
- Change error path from fallback_rrc_setup to return for invalid C-RNTI
- Early validation before further processing

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:12:29 +02:00
Guido Casati
d568920466 RRCReestablishmentRequest: add input parameters validation
Add defensive parameter checks at the start of
rrc_handle_RRCReestablishmentRequest to prevent NULL pointer
dereferences and invalid assoc_id handling.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:03:24 +02:00
Guido Casati
2716a5a3dc RRCReestablishmentRequest: add PCI range validation
Add validation of physCellId against valid range (0-1007) per TS 38.331
specification. Invalid PCI values are now rejected early in the
reestablishment procedure.

This prevents processing of invalid reestablishment requests with
out-of-range PCI values, improving robustness and spec compliance.

Major changes:
- Add NR_PHYS_CELL_ID_MAX to common/platform_constants.h
- Add PCI range check in rrc_handle_RRCReestablishmentRequest() before
  cell lookup, returning early on invalid values

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:03:24 +02:00
Guido Casati
ede596cfc7 RRCReestablishmentRequest: note RRCSetup fallback when UE context is missing
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:03:24 +02:00
Guido Casati
33ff225739 fix (RRC): add SRB2 and DRB validation checks for reestablishment
Add validation checks per TS 38.331 5.3.7.1 to ensure SRB2 and at
least one DRB are active before processing RRC reestablishment
requests. Use more specific NGAP cause code for procedure failures.

Reestablishment requests without SRB2 or DRB setup now properly
fall back to RRC setup with appropriate NGAP cause indication

Major changes:
- Add SRB2 active check before processing reestablishment
- Add DRB active check (at least one DRB required)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 14:03:24 +02:00
Robert Schmidt
11cf337b6a Merge remote-tracking branch 'turkeryilmaz/minorfix_imscope_psABInote' into integration_2026_w27
minorfix(imscope): moving alignas from struct type to atomic variable (#238)

I was receiving the note below when I built with "imscope_record", so
this is the simplest PR to avoid the psABI note while signing the new
individual CLA.

    [194/11156] Building CXX object openair1/PHY/TOOLS/imscope/CMakeFiles/imscope_record.dir/imscope_record.cpp.o
    In file included from /home/turker/Documents/OpenAirInterface/26w25/openair1/PHY/defs_nr_UE.h:12,
    from /home/turker/Documents/OpenAirInterface/26w25/openair1/PHY/TOOLS/imscope/imscope_internal.h:12,
    from /home/turker/Documents/OpenAirInterface/26w25/openair1/PHY/TOOLS/imscope/imscope_record.cpp:5:
    /usr/include/c++/13/atomic: In member function ‘_Tp std::atomic<_Tp>::exchange(_Tp, std::memory_order) [with _Tp = ImScopeDumpInstruction]’:
    /usr/include/c++/13/atomic:311:7: note: the ABI for passing parameters with 64-byte alignment has changed in GCC 4.6
    311 | exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept
    | ^~~~~~~~

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-02 13:34:58 +02:00
Robert Schmidt
c5d1895540 Merge remote-tracking branch 'origin/dlsim_type0_test' into integration_2026_w27
DLSIM test for type0 PDSCH frequency allocation (#192)

Adding the test requires some changes in gNB L2 structures but it
doesn't implement the full support of type0 allocation in L2

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 13:34:58 +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
Turker Yilmaz
3dbb22cad8 minorfix(imscope): moving alignas from struct type to atomic variable to avoid psABI note
Signed-off-by: Turker Yilmaz <turker87@gmail.com>
2026-07-02 12:47:57 +02:00
Guido Casati
3226e5bb34 doc (NAS): update doc/5Gnas.md
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 11:04:27 +02:00
Guido Casati
b61d41a440 tests: add --identity-guti to nr-ue-nas-simulator
Add an optional Identity Request test to the NAS/NGAP simulator.
With --identity-guti, the Initial UE Message carries a random 5G-GUTI
plus matching NGAP 5G-S-TMSI and GUAMI so the AMF requests SUCI per TS 23.502
registration step 6. The simulator then continues the usual attach, PDU
session, and deregistration flow.

Changes:
- nr-ue-nas-simulator: seed_unknown_guti(), identity_request BOOLPARAM,
  NGAP ue_identity fill in send_initial_ue_message()
- Update README

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 11:03:57 +02:00
Bartosz Podrygajlo
7b5baa5104 ci: Speedup fhi72 dockerfiles
Move COPY . . down in 7.2 dockerfiles. This layer doesn't cache well due to
changes in docker context, moving it down allows docker builder to cache other
layers that are not affected by the context.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-02 10:26:50 +02:00
Bartosz Podrygajlo
cea29f9c3f ci: Speedup unit test dockerfile
Use docker cache, reduce the number of installed apt packages, add docker ignore
entry for build directory

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-02 10:18:42 +02:00
Robert Schmidt
a65ddf5cd3 Merge remote-tracking branch 'ChrisAB/pbch_decoding_slot_five_before_phy_config' into integration_2026_w27
fix(NR_UE): gate half-frame PBCH mirror on caller-provided ssb_period (#220)

is_ssb_in_symbol() read cfg->ssb_table.ssb_period directly, but before
the FAPI PHY config request arrives (received_config_request == false)
that field is still 0, which it interprets as a 5ms period and enables
the half-frame PBCH mirror. get_ssb_index_in_symbol() already assumes
the 20ms default period for its frame-periodicity test, so the two
disagree and the UE attempts a spurious PBCH decode in the second
half-frame (slot 5 for mu=0) before being configured.

Closes: #219
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-07-02 09:04:35 +02:00
Robert Schmidt
e47e28301f Merge remote-tracking branch 'bpodrygajlo/zmq-warning-cleanup' into integration_2026_w27
fix(zmq): Fix clang compiler warnings in zmq radio (#244)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 09:00:33 +02:00
Robert Schmidt
8c4e48a670 Merge remote-tracking branch 'bpodrygajlo/pcap-to-github' into integration_2026_w27
ci: Move test pcaps to github (#256)

Move fronthaul capture artifact to my github fork to improve CI
stability.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-02 08:59:00 +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
Robert Schmidt
0d4a4a6d78 Merge remote-tracking branch 'rmagueta/fix_init_context_sss_nr' into integration_2026_w27
Fix function init_context_sss_nr() (#239)

Reduce of the size of the d_sss matrix.  This PR resolves a regression
found in the PR #152

Reviewed-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-07-02 07:59:09 +02:00
Guido Casati
0abc46b708 NAS: refactor Identity Request handler and enforce spec-compliant security checks
Align UE Identity Request handling with TS 24.501 by checking the NAS
security header and rejecting unprotected non-SUCI requests.

Also, refactor Identity Response identity selection based on the
requested identity types, add to a helper and handle unavailable
identities in the UE context.

Closes #82

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-01 19:09:48 +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
Alex Jiao
14ec3a930f NR UE: add assert for reserved bits per symbol not multiple of Qm
map_overlapped_ack() divides num_reserved_bits_on_sym by Qm to get the
number of reserved REs. Add assertion to catch cases where the reserved
bit count is not a multiple of Qm, which would indicate a bug in the
upstream UCI-on-PUSCH mapping.

Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
2026-07-01 19:23:41 +08:00
Bartosz Podrygajlo
cd376c904b ci: Move test pcaps to github
Move fronthaul capture artifact to my github fork to improve CI stability.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-01 11:37:43 +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
Roberto Louro Magueta
e59473f8fe Fix function init_context_sss_nr() and reduction of the size of the d_sss matrix
Signed-off-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-06-30 17:01:32 +01:00
Francesco Mani
ea3e1dbaf2 remove negative init for dlsim parameters
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-30 14:08:03 +02:00
Robert Schmidt
326f2a0cfb Merge remote-tracking branch 'aswanthkc/fix-check-sa/nsa' into integration_2026_w27
fix: proper SA/NSA mode detection (#233)

Use IS_SA_MODE(get_softmodem_params()) for proper SA/NSA check

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 12:30:58 +02:00
Robert Schmidt
fd794a85c1 Merge remote-tracking branch 'aswanthkc/issue-911-fix-3' into integration_2026_w27
Cleanup: NGAP reconnection debug log (#227)

I was using this print statement just for debugging Also this debug
statement should be shown only after reconnecting not at the first
connection.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 12:29:20 +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
bc32bf8875 Remove eth_params_s from nr_mac_gNB.h
We don't actually configure ethernet paramaters, only IP. Further, the
appropriate type f1ap_net_config_t already exists, so use this instead.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
Robert Schmidt
9f5ac5ac8e Remove eth_params_t from configure_nr_nfapi_vnf()
There are no ethernet parameters to be configured, and it can be
simplified.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
Robert Schmidt
ac738ae714 Remove RRC eth_params
In 4G, it's not used.
In 5G, there is no need, as we can pass it directly to the CU task.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
Robert Schmidt
6f7a26d681 Remove duplicate code
The same code is further up.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
Robert Schmidt
6d437cffcf Remove unused MAC.eth_params_s
This field is used as an intermediate "storage facility", but is never
really used. Besides, in the MAC, we store IP information, not Ethernet
information, so it's wrong anyway.

Also remove memory leaks through strdup(), the pointer lifetime is
smaller than that of MacRLC_ParamList.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-30 11:34:08 +02:00
aswanthkc
52c53c868f fix: proper SA/NSA mode detection
- Use IS_SA_MODE(get_softmodem_params()) for proper SA/NSA check

Signed-off-by: aswanthkc <a.kallangaattuvalasu@northeastern.edu>
2026-06-29 21:33:16 +00:00
aswanthkc
274d999526 Cleanup: NGAP reconnection debug log
This debug log should be shown only after
reconnecting not at the first connection.

Signed-off-by: aswanthkc <a.kallangaattuvalasu@northeastern.edu>
2026-06-29 21:25:31 +00:00
Robert Schmidt
c4125d1c74 Fix license in files from PR #211
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-29 16:27:21 +02:00
Francesco Mani
919b61f147 move default rbSize and rbStart selection in dlsim before call to ptrs config
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:39 +02:00
Francesco Mani
5b2a75f518 add dlsim test for type0 pdsch frequency allocation
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:39 +02:00
Francesco Mani
0b7c6bbb95 fixes in DLSCH RB extraction
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:39 +02:00
Francesco Mani
d81d30af28 remove unnecessary indentation
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:39 +02:00
Francesco Mani
7b2252d52d fix UE CSI-RS unavailable resources for type0 PDSCH
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:39 +02:00
Francesco Mani
fe211685ec setup DLSIM to test type0 DLSCH allocation
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:21:38 +02:00
Francesco Mani
29e75444e6 cleanup dlsim input parameters
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:07:18 +02:00
Francesco Mani
eba9f272ce include options for allocation type in sched_pdsch
(set to type1 in all scenarios)

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-29 16:07:15 +02:00
Robert Schmidt
09c9bb998f Merge remote-tracking branch 'origin/integration_2026_w26' into develop
Integration: 2026.w26

- #221 Fix for issue 216
- #224 Bugfix PUCCH Format 2
- #210 Cleanup NR RU options
- #223 fix (f1ap): DRB-Information criticality and non-dynamic fiveQI handling in DU
- #218 fix (nas): parse UE Registration Reject and add NAS connection release
- remove OAI logo (image) due to possible trademark problems
- #194 NGAP Procedures for Xn Handover: Path Switch Request and Path Switch Request Acknowledge
- #235 fix(vrtsim): Reduce OS scheduler pressure caused by vrtsim timing thread
- #211 Add NR O-RU
- #241 fix: Make test_vrtsim stable

Closes: #216
Closes: #212
Closes: #174
2026-06-29 15:41:14 +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
Robert Schmidt
c3f6af1008 Merge remote-tracking branch 'bpodrygajlo/vrtsim-perf-fix' into integration_2026_w26
fix(vrtsim): Reduce OS scheduler pressure caused by vrtsim timing thread (#235)

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.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-29 09:20:07 +02:00
Robert Schmidt
633b6de92a Merge remote-tracking branch 'venkatareddy453/ngap-pathswitch-and-ack-for-xnho' into integration_2026_w26
NGAP Procedures for Xn Handover: Path Switch Request Path Switch Request Acknowledge (#194)

This PR adds the following NGAP Path Switch procedures to support Xn
handover in accordance with 3GPP TS 38.413v16.2.0.

NGAP Path Switch Request: add encode and ITTI support

- Add a case in TASK_NGAP to support ITTI message from RRC to NGAP
- Add Path Switch Request message type definitions
- Implement encoder for Path Switch Request (3GPP TS 38.413v16.2.0
  §9.2.3.8)
  * RAN UE NGAP ID (M)
  * Source AMF UE NGAP ID (M)
  * User Location Information (M)
  * UE Security Capabilities (M)
  * PDU Session Resource to be Switched in Downlink List (M)
- Add required ASN.1 header includes for Path Switch Request IEs

NGAP Path Switch Request Acknowledge: add decode and handler

- Add handler at NGAP for Path Switch Request Acknowledge from AMF
- Add Path Switch Request Acknowledge message type definitions
- Implement decoder for Path Switch Request Acknowledge (3GPP TS
  38.413v16.2.0 §9.2.3.9)
  * AMF UE NGAP ID (M)
  * RAN UE NGAP ID (M)
  * Security Context (M)
  * PDU Session Resource Switched List (M)
  * Allowed NSSAI (M)
- Add required ASN.1 header includes for Path Switch Request Acknowledge
  IEs

Notes:

- Added a case NGAP_PATH_SWITCH_REQ in task_ngap to support ITTI message
  from RRC, and this will be allocated at
- RRC when the target gNB receives the RRC complete message from the UE
  during Xn handover.
- OAI CN5G does not support any of the NGAP path switch procedures
  (request, ack, and failure) as of today to test Xn Handover.
- We tested the procedures in an E2E setup at IISc with two gNBs in
  E1+F1+7.2x split containing the Xn handover code and connected to the
  same 5G core (used Open5GS & Aether-OnRamp separately), and also did
  not observe any Path Switch Failure.
- The implementation of Path Switch Failure at OAI RAN will be done
  along with the implementation of Path Switch procedures in OAI CN5G
  once the XNAP integration in OAI RAN is complete.

Acknowledgement:

> This work has been partially carried out as part of Xn Handover
development at the Indian Institute of Science (IISc), Bengaluru.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Guido Casati <guido.casati@openairinterface.org>
2026-06-29 09:17:07 +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
Shubhika Garg
328968cecf ci: ensure retrigger-ci label is cleaned up after every CI run
- Previously the label was only removed when it was the labeled event
    that triggered the workflow. If a PR was synchronized or reopened
    while the label was already present, it would not be removed by
    the workflow.
  - Created a dedicated cleanup job that depends on all other jobs
    with if: always(), ensuring it runs regardless of whether upstream
    jobs succeeded, failed, or were skipped.
  - Now the cleanup runs on every pull_request_target event and removes
    the label if present, ensuring it is always cleared after CI completes.

Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-26 13:56:32 +02:00
Shubhika Garg
a5f60811c5 doc: improve commit signing guidelines in CONTRIBUTING.md
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-26 13:56:31 +02:00
Shubhika Garg
840abd0048 ci: Add check for unsigned commits in the PR
- Add verify-signed-commits job that runs on PR
  - check-labels and all downstream jobs are skipped
    if signed commmit verifications fails
  - Fetch all commits in the PR via GitHub API
    and check verification status
  - Fail and print the unsigned commit SHAs if any
    unsigned commits are found.

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-26 13:56:30 +02:00
Venkatareddy Akumalla
829d6fe7cf NGAP Path Switch Request Acknowledge: add decode and handler
- Add handler at NGAP for Path Switch Request Acknowledge from AMF
- Add Path Switch Request Acknowledge message type definitions
- Implement decoder for Path Switch Request Acknowledge
  (Reference: 3GPP TS 38.413 §9.2.3.9)
    - AMF UE NGAP ID (M)
    - RAN UE NGAP ID (M)
    - Security Context (M)
    - PDU Session Resource Switched List (M)
    - Allowed NSSAI (M)
- Add required ASN.1 header includes for Path Switch Request Acknowledge IEs

Co-authored-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
Signed-off-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
2026-06-26 10:09:29 +00:00
Venkatareddy Akumalla
db7dbda8e2 NGAP Path Switch Request: add encode and ITTI support
- Add a case in TASK_NGAP to support ITTI message from RRC to NGAP
- Add Path Switch Request message type definitions
- Implement encoder for Path Switch Request (3GPP TS 38.413v16.2.0 §9.2.3.8)
    - RAN UE NGAP ID (M)
    - Source AMF UE NGAP ID (M)
    - User Location Information (M)
    - UE Security Capabilities (M)
    - PDU Session Resource to be Switched in Downlink List (M)
- Add required ASN.1 header includes for Path Switch Request IEs

Co-authored-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
Signed-off-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
2026-06-26 10:09:12 +00:00
Robert Schmidt
f448088c8d docs: remove OAI logo due to trademark issues
Duranta is a Linux Foundation networking project and does not have
permission to display the trademarked OAI logo
(https://openairinterface.org/logo/), which belongs to the
OpenAirInterface Software Alliance (legal entity "OPENAIRINTERFACE").

Remove logo to avoid any legal problems.

Remove some superfluous text with HTML code in some documentation.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-26 11:56:30 +02:00
Robert Schmidt
a3268a9c2f Merge remote-tracking branch 'GuidoCasati/issue-174' into integration_2026_w26
fix (nas): parse UE Registration Reject and add NAS connection release (#218)

The nrUE NAS task read the Registration Reject cause at a hardcoded
offset and called exit(1). This commits adds processing of
plain/security-protected 5GMM headers, decoding of the mandatory cause
per TS 24.501 §8.2.7, set 5GMM state.

Softmodem is stopped via termination_procedure and local AS detach
(send_nas_detach_req without wait_release -> 1) RRC IDLE 2)
NR_NAS_CONN_RELEASE_IND 3) itti_wait_tasks_unblock).

Changes:

- Add fgmm_registration_reject enc/dec
- Add handle_registration_reject()
- Replace inline FGS_REGISTRATION_REJECT case
- Fix unprotected_allowed() for plain Registration Reject
- Add nas_lib_test round-trip (Illegal_UE / 0x03)

Note: optional IEs (T3346, T3502, EAP) not decoded, §5.5.1.2.5 procedure TODO

Closes: #174
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-26 11:56:06 +02:00
Robert Schmidt
716c29fe1f Merge remote-tracking branch 'GuidoCasati/issue-212' into integration_2026_w26
fix (f1ap): DRB-Information criticality and non-dynamic fiveQI handling in DU (#223)

Aligns OAI F1AP encoding with TS 38.473 for DRB-Information criticality
on UE Context Modification, and clarifies how non-dynamic fiveQI is
handled across F1AP/E1AP decode and CU RRC.

Non-dynamic fiveQI may name standardized or pre-configured profiles on
the wire (0..255). F1/E1 libs now accept the full ASN range and reject
only out-of-range values. Pre-configured and other non-standardized
non-dynamic 5QI remain unsupported at RRC via the existing
is_5qi_standardized() skip.

DU is now gracefully handling unsupported 5QIs instead of crashing.

Closes: #212
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-26 11:55:34 +02:00
Guido Casati
3cbf777835 fix (nas): parse UE Registration Reject and stop UE cleanly
The nrUE NAS task mishandled FGS_REGISTRATION_REJECT: it read the 5GMM
cause at a hardcoded offset and called exit(1) from the NAS ITTI task,
which could abort the process while PHY threads were still running.

This commit adds processing of plain/security-protected 5GMM headers,
decoding of the mandatory cause per TS 24.501 §8.2.7, set 5GMM state.

Softmodem is stopped via termination_procedure and local AS detach
(send_nas_detach_req without wait_release -> 1) RRC IDLE 2)
NR_NAS_CONN_RELEASE_IND 3) itti_wait_tasks_unblock).

Ignore duplicate rejects once termination has started.

Changes:
- Add fgmm_registration_reject enc/dec
- Add handle_registration_reject()
- Replace inline FGS_REGISTRATION_REJECT case
- Fix unprotected_allowed() for plain Registration Reject
- Add nas_lib_test round-trip (Illegal_UE / 0x03)

Note: optional IEs (T3346, T3502, EAP) not decoded, stop-on-reject
replaces 21a7f99 exit(1), full §5.5.1.2.5 procedure remains TODO.

Closes #174

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-25 16:59:29 +02:00
Robert Schmidt
813a90bd21 Merge remote-tracking branch 'origin/cleanup_ru_options' into integration_2026_w26
Cleanup NR RU options (#210)

This PR is part of the effort to split LTE and NR code to avoid
cross-compilation as described in #110.

In nr-ru.c, up to now, we relied on if4_tools.c for some if4p5 functions
but what's in that file is strictly LTE using LTE frame parameters, so
it shouldn't work in NR. As a matter of fact, after some investigation
and feedback from @teodora-vladic about 7.2 split, none of those
functions are used in practice in NR and they can be removed. If this
works, we move one step closer to the full compilation split of LTE and
NR.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-06-25 13:20:02 +02:00
Robert Schmidt
0548191fac Merge remote-tracking branch 'sakthivelvelumani/bugfix-pucchf2' into integration_2026_w26
Bugfix PUCCH Format 2 (#224)

Fix RE offset computation in PUCCH format 2 generation. This fixes DL
retx with OCUDU in the CI.

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-25 13:18:22 +02:00
Robert Schmidt
145ab730c0 Merge remote-tracking branch 'alexjiao2021/fix-issue-216' into integration_2026_w26
Fix for issue 216 (#221)

When O_ACK <= 2, the reserved HARQ-ACK positions are selected from the
codeword using a d-factor stepping algorithm. The d-factor was computed
and applied at bit granularity, causing it to step through the flat
positions array mid-modulation-group when Qm > 1.

This scattered ACK/placeholder bits across more REs than intended,
mismatching the RE selection of the demultiplexer which operates at RE
granularity. As a result, placeholder positions were marked on REs that
the gNB treats as pure ULSCH, causing those positions to be transmitted
without the normal scrambling sequence XOR. This corrupts the ULSCH soft
bits at the gNB side, leading to PUSCH CRC failure.

Fix: compute the d-factor in RE units and step through the positions
array in strides of d_factor_re * Qm so that whole Qm-bit modulation
groups are always selected or skipped together.

Observed with O_ACK=1, MCS27 (256QAM), beta_offset_idx=11 where
Q_dash_ACK=6 (reserved) vs Q_dash_ACK_actual=3, giving d_factor=2. PUSCH
CRC was KO at third-party signal analyzers (MATLAB/WaveJudge) while the
OCUDU gNB could still decode due to soft LDPC margin.

Closes: #216
Reviewed-by: Francesco Mani <email@francescomani.it>
Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-25 13:18:22 +02:00
Guido Casati
5f2108edb0 fix (mac): gracefully handle unsupported 5QIs on DRB setup
When a CU sends a DRB with a non-dynamic 5QI that is not in the
DU MAC lookup table, get_non_dynamic_priority() used to AssertFatal and
abort. Return -1 and log a warning instead, and skip flows with negative
priority when deriving the logical-channel priority so setup can continue.

A more spec-aligned fix would require F1AP UE Context Setup/Modification
Failure (not implemented) in case of a logical error in the DU:

> Where the logical error occurs in a request message of a class 1 procedure,
> and the procedure has a message to report this unsuccessful outcome,
> this message shall be sent with an appropriate cause value.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-25 12:53:24 +02:00
Bartosz Podrygajlo
b7ab31854e feat(oru): PUSCH reception
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-24 13:48:23 +02:00
Sakthivel Velumani
f7d0ec0960 ue,phy,pucchf2: fix re offset calculation
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-23 13:55:18 +00:00
Sakthivel Velumani
7032477784 log: fix typo in printing mac stats
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-23 13:54:46 +00:00
Guido Casati
7e0c0fe18b fix (f1ap,e1ap,rrc): accept ASN non-dynamic fiveQI at lib decode
Non-dynamic fiveQI on F1AP/E1AP may name standardized or pre-configured
profiles (TS 38.473), the range is 0..255. Decode now accepts
MIN_FIVEQI..MAX_FIVEQI (0..255) and fails only when fiveQI is outside
that range. Pre-configured and other non-standardized non-dynamic values
remain unsupported: RRC still skips them via is_5qi_standardized().

Changes:
- F1AP/E1AP: range-check 0..255 only
- improve documentation

Refs:
- 3GPP TS 38.473 §9.3.1.49 (non-dynamic standardized or pre-configured 5QI)
- 3GPP TS 23.501 §5.7.2.1

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-23 12:55:42 +02:00
Guido Casati
5a478deac4 fix (f1ap): encode DRB-Information with ignore criticality in setup-mod
UE Context Modification DRB setup-mod encoding sent id_DRB_Information
with reject criticality. TS 38.473 defines that IE as ignore
(QoSInformation-ExtIEs, id-DRB-Information).

Changes:
- Set QoSInformation extension id_DRB_Information criticality to ignore
  in encode_drbs_to_setupmod()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-23 11:08:41 +02:00
Alex Jiao
40024d4caa fix(NR_UE): UCI on PUSCH ACK mapping d-factor uses RE granularity
When O_ACK <= 2, the reserved HARQ-ACK positions are selected from
the codeword using a d-factor stepping algorithm. The d-factor was
computed and applied at bit granularity, causing it to step through
the flat positions array mid-modulation-group when Qm > 1.

This scattered ACK/placeholder bits across more REs than intended,
mismatching the RE selection of the demultiplexer which operates at
RE granularity. As a result, placeholder positions were marked on
REs that the gNB treats as pure ULSCH, causing those positions to be
transmitted without the normal scrambling sequence XOR. This corrupts
the ULSCH soft bits at the gNB side, leading to PUSCH CRC failure.

Fix: compute the d-factor in RE units and step through the positions
array in strides of d_factor_re * Qm so that whole Qm-bit modulation
groups are always selected or skipped together.

Observed with O_ACK=1, MCS27 (256QAM), beta_offset_idx=11 where
Q_dash_ACK=6 (reserved) vs Q_dash_ACK_actual=3, giving d_factor=2.
PUSCH CRC was KO at third-party signal analyzers (MATLAB/WaveJudge)
while the OCUDU gNB could still decode due to soft LDPC margin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
2026-06-22 22:41:08 +08:00
ChrisAB
dcae0070a6 fix(NR_UE): gate half-frame PBCH mirror on caller-provided ssb_period
is_ssb_in_symbol() read cfg->ssb_table.ssb_period directly, but before the FAPI PHY config request arrives (received_config_request == false) that field is still 0, which it interprets as a 5ms period and enables the half-frame PBCH mirror. get_ssb_index_in_symbol() already assumes the 20ms default period for its frame-periodicity test, so the two disagree and the UE attempts a spurious PBCH decode in the second half-frame (slot 5 for mu=0) before being configured.

Closes: #219
Signed-off-by: ChrisAB <cristianbatrin@gmail.com>
2026-06-22 16:53:36 +03:00
Bartosz Podrygajlo
3fb74dc66e feat(oru): PRACH reception
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:23:49 +02:00
Bartosz Podrygajlo
82c3c04018 feat(phy): Allow per-repetition PRACH reception
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:22:56 +02:00
Bartosz Podrygajlo
df5a9facbe fix(oru): Fix timestamp generation in O-RU
Instead of guessing what is the absolute timestamp of each symbol returned
from fronthaul, add absolute hyper frame from GPS Epoch to the O-RU. The
O-RU can calculate the absolute sample index from hyper frame reliably
regardless of the frame/slot/symbol ordering.

Add config file for 1x1 O-DU that matches the edited O-RU config.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:22:30 +02:00
Bartosz Podrygajlo
71c692d727 fix(oru): Clean exit of the O-RU
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:21:02 +02:00
Bartosz Podrygajlo
159c219bdd feat(oru): DL FH processing
Implemented downlink fronthaul processing: symbol rotation, dft and cp insertion

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:20:51 +02:00
Bartosz Podrygajlo
ecfe769205 feat(phy): add a new tx_rf_symbols function to allow per symbol transmission
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:20:41 +02:00
Bartosz Podrygajlo
21329e1b70 feat(oru): Load vrtsim in O-RU and start reading samples
Added oru_south_read_thread that reads samples from vrtsim.
No UL FH processing is done as of this commit.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:20:25 +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
Bartosz Podrygajlo
a1049e8dd1 feat(oru): Add north read thread
Start O-RU fronthaul library inside the O-RU application and start
reading DL IQ data.

Added configuration elements to the ORUs section to support configuring
the library.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:19:51 +02:00
Bartosz Podrygajlo
28786af8bf feat(oru): Setup frame params according to new configuration
Added initialization of frame params according to configuration added
in the new ORUs section. Only one ORU is supported right now.

Added example config that allows starting the ORU and verifying manually
that the config is read.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:16:24 +02:00
Bartosz Podrygajlo
eb1ae91051 ci: Build O-RU fronthaul in ubuntu fhi72 build image
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-20 08:16:13 +02:00
Robert Schmidt
31eb466a7d Merge remote-tracking branch 'origin/integration_2026_w25' into develop
Integration: `2026.w25`

- #150 fronthaul library fixes
- #176 Change ambigous language in Aerial_FAPI_Split_Tutorial.md
- #144 Fix vrtsim antenna configs
- #178 XNAP: Add encode/decode+unit tests for Xn HO Cancel, HO Success, RAN Paging
- #154 Fix UE PUCCH resource multiplexing
- #189 Add nr_dlbench: standalone DL scheduler + PHY TX benchmark
- #151 Complete NR L2/L3 Paging path from F1AP to NAS (gNB and UE)
- #201 [FHI72] Improve the fronthaul doc
- #139 Improvements in UCI on PUSCH implementation at UE
- #206 RAN and UE Roadmap
- #188 CI: Add UE timing phytest

Closes: #74
Closes: #90
Closes: #125
Closes: #130
Closes: #181
2026-06-19 16:45:41 +02:00
Robert Schmidt
bbd8b295cf Fix: don't abort if TUN attach fails
Remove an assert on successful dup() of a socket. At least when running
in phy-test mode without noS1, the socket does not exist, and the call
to dup() fails. In that case, we should carry on instead of simply
failing, similarly how the process does not abort when TUN setup fails.

Fixes: 8d2895463b ("Paging UE (SDAP): reattach TUN after idle reset")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 15:46:22 +02:00
Robert Schmidt
2d57ec1987 Merge remote-tracking branch 'origin/ci-ue-timing-stats' into integration_2026_w25
CI: Add UE timing phytest (#188)

Add a new XML file to also measure UE timings, similarly how we do with
gNB.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 14:05:03 +02:00
Robert Schmidt
26553423ac Merge remote-tracking branch 'arora-sagar/roadmap' into integration_2026_w25
RAN and UE Roadmap (#206)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-19 14:04:01 +02:00
Francesco Mani
0f50702483 remove dependence from LTE if4p5 functions
fh_if4p5_south_in and fh_if4p5_south_out are called in NR for 7.2 split but never actually executed
they are overwritten at runtime in ru_thread

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-19 11:35:50 +02:00
Francesco Mani
7a0489842b cleanup nr-ru set_functions to leave only used options in NR
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-19 09:46:38 +02:00
Jaroslava Fiedlerova
a211c0ef5a CI: add configs for vrtsim timing phytest
Check timing thresholds on both UE and gNB side. If this commit works as
expected, it can replace xml_files/gnb_phytest_usrp_run.xml.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-19 08:59:59 +02:00
Jaroslava Fiedlerova
9fd43efaf2 CI: support configurable stats files in AnalyzeRTStats_Object
Allow XML test cases to specify one or more files with timing stats that
define which container log paths to collect and analyze. AnalyzeRTStatsObject
loops over the provided list, falling back to the default gNB files
(nrL1_stats.log, nrMAC_stats.log) when none are specified.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-19 08:59:58 +02:00
Robert Schmidt
037c5dae31 Merge remote-tracking branch 'origin/improv_uci_on_pusch' into integration_2026_w25
Improvements in UCI on PUSCH implementation at UE (#139)

This MR improves the implementation of UCI on PUSCH at UE side and fixes
some issues found while testing and fixing the revised version.

Tested in ULSIM with MATLAB vectors provided by @sakthivelvelumani in
the following scenarios (bits)

- 2 ACK no CSI
- 7 CSI part1 no ACK no CSI part2
- 1 ACK 7 CSI part1 7 CSI part2
- 3 ACK 4 CSI part1 4 CSI part2

using the command line

    ./nr_ulsim -m 27 -u 1 -R 51 -r 51 -s 30 -o(path to the file containing the vector)

Closes: #181
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-18 17:45:56 +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
Sagar Arora
d776779509 RAN and UE Roadmap
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-18 16:38:51 +02:00
Jaroslava Fiedlerova
3516ed3b5e Merge remote-tracking branch 'GuidoCasati/nr-paging' into integration_2026_w25
Complete NR L2/L3 Paging path from F1AP to NAS (gNB and UE) (#151)

This MR wires a 5G‑NR paging flow across the stack, from F1AP Paging on
the DU down to PCCH scheduling in MAC/RLC, RRC/ASN encode/decode, and
UE‑side NAS Service Request triggering, including the NR UE changes in
L1/L2.

It centralises paging PF/PO computation and PCCH scheduling in MAC,
using shared SSB/Type0‑PDCCH and common PDSCH helpers that are also
reused by SIB1. On the UE, it enables decoding of NR PCCH messages,
matching ng‑5G‑S‑TMSI/fullI‑RNTI, and conditionally initiating a
network‑triggered Service Request when 5GMM state allows it. The change
set includes focused refactors and ASN.1 tests to validate the new
paging encode/decode path.

Changes:
- MAC gNB common helpers: Move SSB/Type0‑PDCCH utilities from the
  BCH scheduler into shared MAC primitives and introduce a reusable 
Type0‑occasion helper and common PDSCH RB/MCS/TBS sizing
- MAC paging PF/PO responsibility: Add a dedicated PCCH scheduler module
  that implements TS 38.304 §7 PF/PO computation (defaultPagingCycle,
nAndPagingFrameOffset, Ns, SFN‑based PF formula and PO slot mapping)
and owns the “is this (frame,slot) a paging occasion for UE_ID?”
decision.
- F1AP -> MAC -> RLC PCCH path (gNB/DU): Have the DU decode F1AP Paging
  with CN UE identity, build an NR RRC Paging message (PCCH) in MAC, and
hand it to RLC as a dedicated PCCH SDU together with UE_ID (5G‑S‑TMSI
mod 1024), using per‑module PCCH storage. RAN UE paging identity
is explicitly rejected.
- Direct CU to DU paging path: Implement direct F1 Paging handling
  in the NR RRC DL direct interface for RLC PCCH storage for later 
scheduling.
- PCCH scheduling and NFAPI integration (gNB MAC): Integrate 
  schedule_nr_pcch() into the DL scheduler so that when a stored PCCH
SDU exists and the current (frame,slot) is a paging occasion, MAC 
resolves the paging search space and CORESET, selects a beam (from SSB),
allocates CCEs and PDSCH resources, builds NFAPI DL_TTI PDUs 
(PDCCH + PDSCH with P‑RNTI, DCI 1_0), and populates the matching
TX_DATA PDU, then clears the cached PCCH.
- DCI handling for P‑RNTI paging: Adjust DCI payload preparation
  to treat P‑RNTI specially, returning after setting DMRS and antenna 
ports and skipping HARQ and UE scheduling state that do not exist for
paging, so paging DCIs no longer touch UE HARQ data structures.
- PHY UE RX Chain: DCI handling for P‑RNTI on UE, monitor DCI on Paging
  Occasions, process DCI 1_0 with CRC scrambled by P‑RNTI on the paging 
search space, trigger PDSCH decoding for PCCH based on that DCI, deliver
decoded PCCH to upper layers from the PHY/MAC side
- RRC/ASN paging encode API: Replace the legacy buffer‑based do_NR_Paging 
with a nr_paging_params_t‑based API returning a byte_array_t,
supporting both ng‑5G‑S‑TMSI and fullI‑RNTI identities, and optional IEs
(e.g. accessType non‑3GPP and pagingCause v17), and encoding via 
uper_encode_to_new_buffer, with ownership and failure semantics clearly 
defined for callers.
- UE‑side PCCH reception and matching: Add UE MAC to RRC logic
  to deliver PCCH SDUs to RRC, decode NR PCCH via a new nr_pcch_decode() 
helper into an array of nr_paging_params_t, iterate PagingRecordList on 
the UE, compare M‑TMSI/fullI‑RNTI against local identity, and log whether 
a paging match was found.
- NAS integration for network‑triggered Service Request: On a UE paging
  match, send a NAS_PAGING_IND from RRC to NAS and, when the UE has a
GUTI, is 5GMM‑REGISTERED and in 5GMM‑IDLE, generate and send a Service
Request uplink NAS message
- Tests and validation helpers: Extend nr_asn1 paging tests
  to encode Paging via do_NR_Paging, decode it via nr_pcch_decode,
and verify round‑trips for multiple ng‑5G‑S‑TMSI values, accessType,
and fullI‑RNTI bit patterns, using a shared encode/decode helper that 
exercises the same decoder path used by the UE.

Notes:
Paging handling currently supports CN UE paging
identity (5G‑S‑TMSI) only. RAN UE paging identity is logged and ignored.
A paging match triggers a Service Request only when the UE has a GUTI,
is 5GMM‑REGISTERED, and in 5GMM‑IDLE. T3346 and suspend‑indication
handling are documented as future work and not implemented here.

Testing:
Tested with Open5gs. How to trigger Paging in Open5GS lab setup:

- Use gNB telnet to request NGAP UE Context Release: `rrc ctx_rel_req
  <RRC_UE_ID>`
- Wait until AMF reports CM-IDLE (for example gNB-UEs is now 0).
- Generate downlink data from the Linux host to the UE IP: `ping
  <UE_IP>`
- Host-originated downlink data will trigger paging.

Closes #74

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-18 15:43:27 +02:00
Francesco Mani
4e92eabc18 fix starting symbol for CSI on PUSCH (Closes #181)
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
c0f6e70259 for placeholder bit Y (1 HARQ bit) we need to use the scrambled bit, not the original one
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
3205c9a367 advance CSI2 index when puncturing with ACK/NACK
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
90c85e8b9c fix to avoid advancing ULSCH bit counter when ACK punctures CSIp2
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
a3b077a30f fix for CSIp1 UCI on PUSCH mapping
we need to remove the reserved elements from the pool of the avalable ones to compute position of the CSIp1 elements

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
b04fa5f7ae fix for actual coded ACK bits in case of A < 2
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
8542b813e1 rework the UCI on PUSCH template flags for better understanding of the procedure
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
Francesco Mani
89d578e7bb make function apply_template_to_codeword use bit-packed vectors to make the output uniform as the case without uci on pusch
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
francescomani
78b92485ee improvement for UCI on PUSCH code
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-06-18 14:49:33 +02:00
Francesco Mani
84bbe66c07 rework UCI encoding for UCI on PUSCH to always have bit-packed output
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-18 14:49:33 +02:00
Shubhika Garg
910f8cef33 ci: skip ci when no mandatory ci label present on PR
- Add check-labels job that runs first on the PR events
  - Fail early if none of the mandatory CI labels are present
    (BUILD-ONLY, documentation, 4G-LTE, 5G-NR, nrUE, CI, retrigger-ci)
  - Skip detect-changes, require-maintainer-approval and trigger-jenkins
    when no mandatory CI label is found
  - Push events are unaffected by the label check
  - For labeled events, only retrigger-ci triggers the pipeline;
    any other label addition is skipped

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-18 14:20:59 +02:00
Jaroslava Fiedlerova
d8744c52f2 Merge remote-tracking branch 'melkael/dlbench-develop' into integration_2026_w25
Add nr_dlbench: standalone DL scheduler + PHY TX benchmark (#189)

This PR updates the MR from here:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/4028
Besides, it adds separate modes to test AM and UM, as I have another PR
which accelerates the scheduler through refactoring how MAC accesses RLC
indications that needs AM for testing

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-18 09:49:18 +02:00
Guido Casati
5d309b93d1 doc: update FEATURE_SET.md, 5Gnas.md, rrc-dev.md
- added Paging documentation
- updated to latest NGAP, F1AP, E1AP, NAS status
- fixed spelling errors

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
294599d327 Add useful log lines
- Add a LOG_I to 'nr_sdap_add_entity' to inform the user
  a SDAP entity is being created
- Add LOG_W to `nr_sdap_get_entity` to warn about
  empty SDAP entity list

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
ddccd57e5c telnet: add UE context release request command
Add an RRC telnet command that sends a RAN-initiated NGAP UE Context Release
Request with a user-inactivity cause.

Register ctx_rel_req in the RRC telnet command table.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
6cb51988b1 Paging UE (NAS): clear Service Request pending state when SR ends
After the UE answers a network page with a NAS Service Request, it waits
in 5GMM-SERVICE-REQUEST-INITIATED until the AMF replies or the radio
connection drops.
While that wait is active, duplicate pages must be ignored. When SR ends,
NAS must return to 5GMM-REGISTERED so a later page can start a new SR
(TS 24.501).

Changes:
- handle_service_accept(): set FGS_REGISTERED on SERVICE ACCEPT (TS 24.501 §5.6.1.4)
- handle_service_reject(): if SR was pending, set FGS_REGISTERED (§5.6.1.5)
- NR_NAS_CONN_RELEASE_IND: if SR was pending, set FGS_REGISTERED (§5.3.1.3 and §5.6.1.7 l)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
8d2895463b Paging UE (SDAP): reattach TUN after idle reset
UE paging can recreate the AS-side SDAP entity while NAS still keeps the
PDU session established. Per TS 38.304 clause 7.1 and TS 24.501 clauses
5.6.2.2.1,5.6.1.2 paging/service request restores user-plane resources
for an established PDU session, it does not imply deleting the UE IP/TUN
interface.

Deleting the UE TUN with SDAP entity teardown breaks user-plane continuity
after re-attach. We need SDAP entity lifetime and UE TUN lifetime to be
decoupled. This commit keeps a UE/PDU-session TUN registry outside the
SDAP entity lifetime. When a UE SDAP entity is recreated, reattach it
to the preserved TUN socket and restart the reader thread. On first PDU
session setup, NAS registers the TUN before attaching the reader.

The sequence is the following: (1) NAS register the iface
(2) sdap entity attaches to the iface (3) UE goes IDLE, SDAP
entity is destroyed, iface is deatched and brought down (4)
UE Service Request, SDAP entity is created (5) iface reattaches
to the SDAP entity and is brought up

UE reattach assumes the PDU session TUN interface was registered
before the SDAP entity is recreated.

DL/UL data is intentionally dropped when SDAP is not yet attached
or QFI is unavailable, rather than queued in this layer.

Changes:
- `nr_sdap.c`: keep a UE/PDU-session TUN registry, duplicate the stored
  socket into each SDAP entity, and add attach/detach/destroy helpers.
- `nr_sdap_entity.c`: detach SDAP entities from their TUN reader on
  deletion, preserve UE TUN interfaces across idle cleanup, and destroy
  gNB TUN interfaces when the gNB entity is removed. Drop downlink SDUs
  if the UE SDAP entity is not attached to a TUN socket yet.
- `openair3/NAS/NR_UE/nr_nas_msg.c`: set QFI before UE TUN creation so
  first attach can pick up cached QFI.
- `common/utils/tuntap_if.c`: add `tuntap_set_up`/`tuntap_set_down` helpers
  for UE interface state reflection and initialize `flags` in `tuntap_destroy`
  to avoid maybe-uninitialized build failures.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Robert Schmidt
f51e47b1c2 Merge remote-tracking branch 'temp-remote/issue-90' into integration_2026_w25
Fix UE PUCCH resource multiplexing (#154)

TS 38.213 9.5.2 specifies that if the UE wants to send HARQ-ACK and CSI
report on format 2/3/4, then the resource is selected by the PUCCH
resource indicator for sending HARQ-ACK.

In this case the resource set must be >= 1 because O_UCI has HARQ-ACK
and CSI report and is > 2.

So far we use the PUCCH resource of CSI report if HARQ-ACK format is < 2
and CSI report is >= 2. This PR fixes it.

Closes: #90
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-17 15:36:01 +02:00
Robert Schmidt
7b93b83fd4 Merge remote-tracking branch 'temp-remote/xnap-class-2-procedures' into integration_2026_w25
XNAP: Add encode/decode+unit tests for Xn HO Cancel, HO Success, RAN Paging (#178)

Extends the XNAP encode/decode library with three class 2 procedures
from 3GPP TS 38.423 v16.2.0, each with full encode/decode/eq/free
support and an APER round-trip unit test.

Handover Cancel (§9.1.1.6): Sent by the source node to abort an
in-progress handover before the UE has accessed the target cell.

- Source NG-RAN node UE XnAP ID (M)
- Cause (M)

Handover Success (§9.1.1.12): Sent by the target node to confirm the UE
has successfully accessed the target cell.

- Source NG-RAN node UE XnAP ID (M)
- Target NG-RAN node UE XnAP ID (M)
- Requested Target Cell Global ID (M)

RAN Paging (§9.1.1.7): Requests a neighbouring NG-RAN node to page a UE
in RRC_INACTIVE state.

- UE Identity Index Value (M) — 10-bit BIT STRING
- UE RAN Paging Identity (M) — 40-bit I-RNTI BIT STRING
- Paging DRX (M)
- RAN Paging Area (M) — cell-list variant, one PLMN + NR cell IDs

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 15:33:07 +02:00
Maxime Elkael
0d118c9821 Add nr_dlbench: standalone DL scheduler + PHY TX benchmark
Assisted-by: Claude-Code:Opus-4.8
Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-06-17 07:36:56 -04:00
Mohammed Safwan
b31846c62f XNAP: add encode/decode and unit test for Xn RAN Paging
- Add RAN Paging message type definitions, including paging DRX
  enumeration (§9.2.3.66) and RAN paging area cell-list
  structure (§9.2.3.38)
- Implement encoder and decoder for RAN Paging
    RAN Paging (3GPP TS 38.423v16.2.0 §9.1.1.7)
    - UE Identity Index Value (M)
    - UE RAN Paging Identity (M)
    - Paging DRX (M)
    - RAN Paging Area (M)
- Add equality check and memory management helpers
- Add required ASN.1 header includes for RAN Paging IEs
- Extend XNAP library unit tests to cover RAN Paging

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:51:34 +05:30
Mohammed Safwan
e7f12fdd61 XNAP: add encode/decode and unit test for Xn Handover Success
- Add Handover Success message type definitions
- Implement encoder and decoder for Handover Success
    Handover Success (3GPP TS 38.423v16.2.0 §9.1.1.12)
    - Source NG-RAN node UE XnAP ID (M)
    - Target NG-RAN node UE XnAP ID (M)
    - Requested Target Cell Global ID (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Success

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:41:55 +05:30
Mohammed Safwan
7cf0e252b3 XNAP: add encode/decode and unit test for Xn Handover Cancel
- Add Handover Cancel message type definitions
- Implement encoder and decoder for Handover Cancel
    Handover Cancel (3GPP TS 38.423v16.2.0 §9.1.1.6)
    - Source NG-RAN node UE XnAP ID (M)
    - Cause (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Cancel

Reviewed-by: Venkatareddy Akumalla <venkatareddy.akumalla@openairinterface.org>
Signed-off-by: Mohammed Safwan <mohammed.safwan@openairinterface.org>
2026-06-17 16:41:55 +05:30
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
Sagar Arora
a52883c051 [doc FHI72]: update ptp configuration for verion 4.4
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-17 11:31:50 +02:00
Teodora Vladić
4b767c3ab1 [FHI72] Set the K_VERSION explicitely in the doc
Shall be always up to date according to the cmake variable.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-06-17 11:31:50 +02:00
Jaroslava Fiedlerova
8cd7dc4f04 Merge remote-tracking branch 'bpodrygajlo/fix-vrtsim-antenna-configs' into integration_2026_w25
Fix vrtsim antenna configs (#144)

This PR fixes three issues: #130 #125, and an unreported issue related
to flaky vrtsim tests. With the new unix domain socket initialization
the unit test framework should be much more robust and not fail
randomly.

Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-17 10:38:31 +02:00
Jaroslava Fiedlerova
2241af180f Merge remote-tracking branch 'rubensoaressilva/Issue_1103_Ambiguous_language' into integration_2026_w25
Change ambigous language in Aerial_FAPI_Split_Tutorial.md (#176)

This PR addresses Issue 1103
(https://gitlab.eurecom.fr/oai/openairinterface5g/-/work_items/1103),
changing one note in Aerial_FAPI_Split_Tutorial.md regarding CN core
allocation when running on the same server.  The original wording could
be interpreted as allocating a separate core to each of the core network
functions, when that's not the intended interpretation.

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-17 10:34:29 +02:00
Rúben Soares da Silva
37cef0e2cb Change ambigous language in Aerial_FAPI_Split_Tutorial.md note on CN core allocation.
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-06-17 09:19:21 +01:00
Jaroslava Fiedlerova
ff2e6f8425 Merge remote-tracking branch 'bpodrygajlo/fix-gps-offset' into integration_2026_w25
fronthaul library fixes (#150)

three fixes:
- add missing spdx license identifier for some files
- fix utc-to-gps offset
- make fh_timer robust in case of PTP Sync

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-06-16 19:33:56 +02:00
Sakthivel Velumani
d8c1f68da4 ue-sched: fix harq csi report pucch multiplexing
As per 38.213 9.5.2 when multiplexing pucch resources of harq ack and csi
report, the resource is selected from the set id >= 1.

Closes: 90

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-16 16:21:08 +00:00
Sakthivel Velumani
9651a571d9 ue-sched: refactor pucch resource multiplexing
Refactored the function merge_resources() to minimize code repetition.
The function logic is unchanged.

Assisted-by: Claude Sonnet 4.6

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-16 16:20:48 +00: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
Guido Casati
74f661f3d6 Paging UE (MAC): monitor P-RNTI DCI only on PFs/POs in camped idle
Prior commits stored PCCH parameters and can decode P-RNTI,
this commit schedules PDCCH monitoring at the right TTIs.

In camped idle the UE must listen for network paging on P-RNTI only on
the correct paging frame (PF) and paging occasion (PO), only if the
paging common search space is set.

On monitor_paging_dci() success it adds P-RNTI to the downlink DCI
config for the existing PHY/MAC paging decode path.

Changes:
- Add monitor_paging_dci():
  - resolve paging_SS_id, call config_dci_pdu(TYPE_P_RNTI_) only
    when monitor_paging_dci() is true.
  - require is_ss_monitor_occasion on the paging search space
  - validate T/N/Ns from mac->paging_cfg
  - apply TS 38.304 §7.1 PF and i_s
  - PF via nr_pcch_sfn_is_pf
  - PO index i_s via nr_pcch_po_index
  - non-zero type-2 PO window via nr_pcch_type2_po_mo_in_range

Refs:
- 3GPP TS 38.304 §7.1 (PF/PO)
- 3GPP TS 38.213 §10.1 (PDCCH monitoring for paging)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
5e37598e02 Paging UE (RRC/MAC): preserve camped idle context
Keep normal no-redirection RRCRelease on the acquired
camped-cell context while preserving the existing full
GO_TO_IDLE cell-selection path for other idle transitions.

Changes:
- Add UE_IDLE and GO_TO_IDLE_KEEP_CAMPED to represent camped
  idle without starting RA.
- Map no-redirection RRCRelease to GO_TO_IDLE_KEEP_CAMPED and
  keep SIB1 validity for that path.
- Release connected-mode MAC/BWP0 dedicated config while
  preserving common BWP0 and paging PDCCH context.
- Keep the existing full GO_TO_IDLE cleanup for idle transitions
  that must perform cell selection.

Refs:
- TS 38.331 §5.3.11
- TS 38.304 §5.2.5, §5.2.6, §7.1
- TS 38.321 §5.12

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
e5c95a2d7e Paging UE (RRC/NAS): initial NAS UL transfer without SRB for paging
Route paging-triggered Service Request through NAS_INITIAL_UL_TRANSFER_REQ so
RRC can buffer the PDU for RRCSetupComplete (dedicatedNAS-Message, TS 38.331)
when no UL-DCCH SRB exists, start MAC RA from RRC_IDLE, or drop the ITTI PDU
with LOG_W if SRB1/SRB2 is already established (NAS paging path is 5GMM-IDLE
only).

Changes:
- Define ITTI NAS_INITIAL_UL_TRANSFER_REQ and
  NAS_INITIAL_UL_TRANSFER_REQ() (rrc_messages_def.h,
  rrc_messages_types.h).
- Extend NR_UE_RRC_INST_t with pending_initial_nas for setup-complete
  transport (rrc_defs.h).
- Refactor ULInformationTransfer+PDCP send into
  nr_rrc_ue_send_ul_information_transfer_nas(): on NAS_UPLINK_DATA_REQ,
  refuse PDCP when neither SRB1 nor SRB2 is established (free PDU).
- On NAS_INITIAL_UL_TRANSFER_REQ: store NAS in pending_initial_nas when
  no SRB, in RRC_STATE_IDLE_NR set ra_trigger to RRC_CONNECTION_SETUP,
  call nr_rrc_ue_prepare_RRCSetupRequest(), and nr_rrc_send_msg_to_mac()
  with NR_MAC_RRC_START_RA, otherwise replace pending and send on SRB.
- Use forwarded initial NAS messafe in rrc_ue_generate_RRCSetupComplete():
  if pending_initial_nas is set, move it into the NAS payload and refresh
  security keys when integrity context exists, else generateRegistrationRequest().
- In nr_nas_msg.c, add send_nas_initial_ul_transfer_req() and use it for
  paging Service Request instead of send_nas_uplink_data_req()

Refs: TS 24.501, TS 38.331 §5.3.3.4, TS 33.501 §6.8.1.2

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
c9e82d6a12 Refactor UE (RRC/MAC): typed NR_MAC_RRC_START_RA for T300 and re-estab
RRC starts random access via NR_MAC_RRC_START_RA with an explicit
cause. RA trigger is no longer piggybacked on NR_MAC_RRC_CONFIG_RESET.
T300 expiry and RRC re-establishment are the call sites switched in this
commit. MAC handles setup/T300 and re-establishment paths in
nr_mac_start_ra().

Changes:
- Add nr_mac_rrc_types.h (nr_mac_ra_start_cause_t)
- Add nr_mac_rrc_start_ra_t in rrc_messages_types.h
- In rrc_UE.c, add nr_rrc_trigger_mac_ra(), call it from
  handle_t300_expiry and nr_rrc_initiate_rrcReestablishment
- In config_ue.c:
  - add nr_mac_start_ra() entry point with causes switch
  - add nr_rrc_mac_start_ra() handler
  - remove T300_EXPIRY, RE_ESTABLISHMENT reset handling
    in nr_rrc_mac_config_req_reset, now delegated to
    nr_mac_start_ra
- mac_defs.h: drop T300_EXPIRY from NR_UE_MAC_reset_cause_t

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
bae10b8831 Paging UE (RRC/NAS): trigger Service Request from UE paging
Transfer UE-side paging matches from RRC to NAS so a registered idle UE
can generate and send a Service Request after `NAS_PAGING_IND`. Guard
the path with explicit cause, identity, state, and mode checks so
unsupported cases are logged and ignored.

Changes:
- in `rrc_UE.c`, send `NAS_PAGING_IND` to TASK_NAS_NRUE with cause
  `AS_CONNECTION_ESTABLISH` from `rrc_nrue()` when a paging match is found
- in `nr_nas_msg.c`, implement `NAS_PAGING_IND` handling in `nas_nrue()`
- accept only paging indications with cause
  `AS_CONNECTION_ESTABLISH`, then require `nas->guti`,
  `FGS_REGISTERED`, and `FGS_IDLE` before proceeding
- generate the Service Request with `generateServiceRequest()` and send
  it through `send_nas_uplink_data_req()`

Refs:
- TS 23.502 §4.2.3.3 (Network Triggered Service Request)
- TS 24.501 §5.6.2.2.1 (Paging for 5GS services)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:46 +02:00
Guido Casati
21b901aefc Paging (RRC): handle PCCH in RRC
In NR RRC idle or inactive, decode PCCH SDUs from MAC and scan Paging
records (TS 38.331 §5.3.2.3) for ng-5G-S-TMSI against the UE M-TMSI
(lower 32 bits of fiveG_S_TMSI). PCCH is ignored in other states.

Changes:
- Add nr_rrc_ue_decode_pcch(): call nr_pcch_decode(), compare each
  ng-5G-S-TMSI M-TMSI to (fiveG_S_TMSI & UINT32_MAX), return on match
  or failure
- In rrc_nrue(), handle NR_RRC_MAC_PCCH_DATA_IND by wrapping sdu/
  sdu_size in byte_array_t, calling nr_rrc_ue_decode_pcch()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:27:45 +02:00
Guido Casati
6cba089c34 Paging UE (MAC/PHY): forward PCCH to RRC and gate DLSCH on paging
When PHY reports a successful P-RNTI PDSCH decode as
FAPI_NR_RX_PDU_TYPE_PCCH, MAC must deliver the TB to RRC as a raw PCCH
SDU. Add the ITTI indication and a dedicated RX handler in the PHY
interface module, mirroring how BCCH/SIB paths are kept separate
from C-RNTI DLSCH.

Changes:
- Add NR_RRC_MAC_PCCH_DATA_IND ITTI message, NRRrcMacPcchDataInd, and
  NR_RRC_MAC_PCCH_DATA_IND() accessor.
- Add send_pcch_rrc() to queue the PCCH SDU toward TASK_RRC_NRUE.
- Add handle_pcch() in NR_IF_Module.c: on successful decode forward the
  TB with send_pcch_rrc(), log and drop on LDPC failure.
- Dispatch FAPI_NR_RX_PDU_TYPE_PCCH in nr_ue_dl_processing().

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:22:19 +02:00
Guido Casati
dc32077fe9 Paging UE (MAC): decode P-RNTI DCI 1_0 and build paging DL grant
Implement UE-side DCI format 1_0 for CRC scrambled by P-RNTI: decode the
P-RNTI-specific bitfield, validate the short message indicator,
compute the DL-SCH grant (TBS, TB scaling, fixed
RV/HARQ), and append the DL config PDU when the grant is accepted.

Changes:
- Add extract_10_p_rnti and call it from nr_extract_dci_00_10 for TYPE_P_RNTI_
  (replacing AssertFatal).
- In nr_ue_process_dci_dl_10: ignore dedicated pdsch_Config for TYPE_P_RNTI_,
  reject reserved SMIs that do not apply. After MCS apply
  nr_ue_process_dci_dl_10_p_rnti for TBS/Qm/code rate, RV/HARQ defaults,
  tb_scaling scaling factor, and guards. On success set bump the DLSCH DL
  config PDU count.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:11:00 +02:00
Guido Casati
ec24751adb Paging UE (MAC): harden DCI symbol parsing and configure P-RNTI in DCI PDU
Improve UE DCI PDU configuration robustness by validating monitoring-symbol
inputs before extraction, and add explicit P-RNTI DCI setup for paging
search-space monitoring.

Changes:
- Add guard checks for `monitoringSymbolsWithinSlot` presence, buffer, and
  minimum size before computing symbol masks in `config_dci_pdu()`
- Factor out monitoringSymbolsWithinSlot which is common across RNTI cases
  and reuse local `monitoringSymbols` pointer for symbol-mask extraction
- Implement `TYPE_P_RNTI_` branch to set symbol mask, `rel15->rnti =
  P_RNTI`, and `SubcarrierSpacing` for paging DCI configuration

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:11:00 +02:00
Guido Casati
fff0ced519 Paging UE (MAC): derive paging UE_ID from 5G-S-TMSI
Push the 5G-S-TMSI received by UE RRC down to MAC so paging can use
the TS 38.304 UE_ID.

Changes:
- add a paging UE_ID field to the UE MAC paging configuration
- add nr_rrc_mac_config_req_paging_ue_id() to derive UE_ID from
  5G-S-TMSI and store it under the MAC interface mutex
- update the NAS_5GMM_IND handling in rrc_nrue() to pass the received
  5G-S-TMSI to MAC for paging PF/PO derivation

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:11:00 +02:00
Guido Casati
8aa2f1b965 Paging UE (MAC): parse and store SIB1 PCCH config
Populate UE MAC paging state from SIB1 PCCH-Config so PF/PO-related
parameters are available to the rest of the UE MAC.

Changes:
- Add nr_ue_paging_cfg_t to NR_UE_MAC_INST_s with parsed paging fields
  (T, N, Ns, PF_offset, X) and the optional
  firstPDCCH-MonitoringOccasionOfPO list (first_mo_of_po[],
  first_mo_of_po_count)
- Add configure_pcch_config() to decode SIB1 PCCH-Config via the
  common helpers nr_pcch_default_paging_cycle_rf,
  nr_pcch_n_and_paging_frame_offset, nr_pcch_ns_per_pf and
  nr_pcch_first_pdcch_start_mo
- Add NR_PCCH_MAX_PO constant (TS 38.331 PCCH-Config) and size the
  first_mo_of_po[]
- Invoke configure_pcch_config() from nr_rrc_mac_config_req_sib1()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:11:00 +02:00
Guido Casati
6dac6fed13 Paging UE (PHY): handle P-RNTI DLSCH in UE RX indication path
Map P-RNTI scheduled DLSCH to the UE DLSCH receive indication flow so
paging traffic is also classified like DLSCH together with C-RNTI.

Changes:
- Set `dlsch0->rnti_type` from DLSCH RNTI in scheduled response, using
  `TYPE_P_RNTI_` when RNTI is `P_RNTI`
- Extend `nr_ue_dlsch_procedures()` RX indication mapping to include
  `TYPE_P_RNTI_` in the DLSCH indication case

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-15 18:11:00 +02:00
Robert Schmidt
f3589d97c2 Merge remote-tracking branch 'origin/integration_2026_w24' into develop
Integration: `2026.w24`

- #145 RLC data req: Use API to fill multiple RLC PDUs at gNB
- #160 ci: maintainer approval for additional file changes and update maintainer's contact
- #146 Unit tests for bit functions
- #142 UE DL Channel compensation and LLR optimization
- #166 CI OCUDU configuration changes
- #170 fix(fhi72): add observability to the O-DU
- #173 fix(f1): DRB Information has criticality ignore
- #171 Local ssb detection
2026-06-12 10:46:17 +02:00
Robert Schmidt
05a2fdf095 Merge remote-tracking branch 'origin/local-ssb-detection' into integration_2026_w24
Local ssb detection (#171)

PSS/SSS detection in the UE code uses a global structure that describe
the cell parameters it is not logical because we will populate this
information from what we read in the MIB and the SIB1 later it also
blocks us to make a cell scanner in a logical manner, just calling pss
detection function with a set of detection parameters and a buffer of
digital radio

this MR fixes this and simplifies the code.

Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-11 18:08:53 +02:00
Robert Schmidt
945fe9a756 Merge remote-tracking branch 'rorsc/f1-drb-info-crit' into integration_2026_w24
fix(f1): DRB Information has criticality ignore (#173)

See 38.473: this IE is supposed to be "ignore".

Closes: #172
Reviewed-By: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 16:52:05 +02:00
Robert Schmidt
443f580153 Merge remote-tracking branch 'temp-remote/fhi_72-observability' into integration_2026_w24
fix(fhi72): add observability to the O-DU (#170)

This change adds printout to packet error/timing counters for the O-DU K
release. In F release these counters are either not present or not
implemented properly.

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-06-11 16:49:09 +02:00
Robert Schmidt
43fc8c084c Merge remote-tracking branch 'sakthi/ocudu-ci-config' into integration_2026_w24
CI OCUDU configuration changes (#166)

1. Enable more logs in ocudu gnb.
2. Reduce tx amplitude to prevent clipping in OAI DFT.

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-11 16:34:50 +02:00
Robert Schmidt
4b32f4d161 fix(f1): DRB Information has criticality ignore
See 38.473.

Closes: #172

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-11 16:00:03 +02:00
Guido Casati
f19b44639d Paging (MAC): schedule PCCH in DL path at PF/PO
At each DL slot, schedule_nr_pcch() scans pcch_queue for records whose
UE paging occasion matches (frame, slot), encodes one PCCH-Message via
do_NR_Paging(), and fills P-RNTI PDCCH/PDSCH NFAPI PDUs.

Paging occasion detection is now owned by MAC via PCCH scheduler
helper that implements PF/PO computation per TS 38.304
§7. Computation is determined by defaultPagingCycle (T),
nAndPagingFrameOffset (N), ns (Ns), with PF formula
(SFN + PF_offset) mod T = (T div N) * (UE_ID mod N),
and PO slot mapping for Ns = 1/2/4. Paging is transmitted only
when (frame, slot) is the UE's paging occasion
(TS 38.304 §7.1) and when a Type2-PDCCH CSS is configured via
pagingSearchSpace, so the UE can receive it.

The RRC PCCH path is simplified accordingly.

Changes

In `openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_pcch.c`:
- Add paging-specific scheduling logic, including `is_paging_occasion()`,
  paging-search-space resolution, and `nr_fill_nfapi_dl_PCCH_pdu()`
- Add `schedule_nr_pcch()` implementation to allocate CCE/PDSCH
  resources, populate DL/TX NFAPI requests, encode at PO via do_NR_Paging()

In gNB scheduler:
- Invoke `schedule_nr_pcch()` in SA-mode DL scheduling

In `openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c`:
- Add PCCH scheduling helpers to be reused at UE side

Also:
- Remove no longer relevant `rrc_gNB_generate_pcch_msg()` from `rrc_gNB.c`

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 15:54:14 +02:00
Laurent THOMAS
48806d032a remove extra fo compensation after SSB detection, as it is never used after
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:10 +02:00
Laurent THOMAS
d75e99af63 keep T tracer optional
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:10 +02:00
Laurent THOMAS
b9fc7cc5d2 replace a useless and inefficient pointer argument to a const direct value passing
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:10 +02:00
Laurent THOMAS
f1e5d1fb4f try to work around compiler bug (internal segv)
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:10 +02:00
Laurent THOMAS
885e5e8895 make sss detection readable
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:10 +02:00
Laurent THOMAS
11b8ba54ea make a decent struct for pss detection results instead of a mess
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:09 +02:00
Laurent THOMAS
8eeb1b125f make all functions for pss detection independant of global context such as frame_parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:09 +02:00
Laurent THOMAS
ad44ee75f6 use specific paramters for rx_sss() instead of global frame parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:09 +02:00
Laurent THOMAS
1360217cae remove static global tables that can become race condition in scanning context. Also difficult to understand for about no cpu saving
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:50:09 +02:00
Laurent THOMAS
b7cba9d266 use specific paramters for apply_nr_rotation_symbol_RX() instead of global frame parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 15:48:49 +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
Bartosz Podrygajlo
31084d6698 fix(fronthaul): Make fh_timer robust in case of PTP sync
Make fh_timer_tick robust against CLOCK_REALTIME jumps. In case of
forward jump the symbol callback will be called for each missed symbol.
In case of backwards jump the function will return without calling
any callbacks. This continues until the local timer catches up to the
last callback symbol.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-11 12:52:14 +02:00
Bartosz Podrygajlo
0bcc3b3229 fix(fronthaul): Fix UTC-to-GPS timestamp conversion
Add missing leap second offsert for UTC-to-GPS coversion.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-11 12:52:14 +02:00
Bartosz Podrygajlo
8b04c038f1 fix(fronthaul): Add missing SPDX headers to files in fronthaul directory
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-06-11 12:52:14 +02:00
Guido Casati
9163c8b2bd Paging (MAC): skip HARQ fields for P-RNTI DL DCI preparation
Ensure DL DCI payload preparation for paging with P-RNTI returns,
avoiding use of UE scheduling state and HARQ processes that do
not exist for paging.

Changes:
- Add early return in prepare_dci_dl_payload for TYPE_P_RNTI_
- Defer NR_UE_sched_ctrl_t lookup until after the P-RNTI path to avoid
accessing UE context and HARQ state for paging

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
5fae4b3c29 Paging (F1AP/MAC): queue paging records in MAC from F1AP paging
When the core pages an idle UE, the DU queues paging records unti
MAC can send it on PCCH at the right PF/PO. This commit moves that
buffering into gNB MAC and connects the existing F1AP Paging entry points.

The CN UE paging is therefore routed from F1AP inputs into a MAC-managed
PCCH queue. The unused RRC PCCH generator stub is dropped. This makes paging
delivery path explicit in MAC for later PF/PO scheduling.

Changes:
- f1ap_du_paging.c: decode F1AP Paging and call f1_paging()
- mac_rrc_dl_handler.c: add f1_paging()-  CN UE identity only, reject RAN UE,
  call nr_mac_pcch_enqueue
- gNB_scheduler_pcch.c (new): queue init/free/enqueue, store identity only
  (nr_mac_pcch_record_t: ue_id, fiveg_s_tmsi) in spsc_q
- nr_mac_gNB.h: add nr_mac_pcch_record_t and pcch_queue on NR_COMMON_channels_t
- mac_rrc_dl_direct.c: f1_paging_transfer_direct(), call f1_paging()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
29d31cde8e Paging UE (RRC/ASN): decode Paging
Add PCCH decoding and use in ASN.1 tests.

Changes:
- add `nr_pcch_decode()`
- extend `test_asn1_msg.cpp` with `encode_decode_paging()` round trips
  for multiple `ng-5G-S-TMSI` values, `accessType`, and `fullI-RNTI`

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
dfb0c61c62 Paging (RRC/ASN): refactor do_NR_Paging and extend UE identity support
Replace the old buffer-based do_NR_Paging API with a params struct and
byte_array_t return; add support for fullI-RNTI and optional accessType/
pagingCause. Encoding uses uper_encode_to_new_buffer, callers own and
free the returned buffer.

Changes:
- asn1_msg.h:
  - Add nr_paging_params_t (ue_identity_type, union ue_identity union
    { m_tmsi or full_i_rnti }, access_type, paging_cause),
  - Add NR_PAGING_FULL_I_RNTI_SIZE define.
- asn1_msg.c:
  - Implement do_NR_Paging with nr_paging_params_t.
  - Support ng-5G-S-TMSI (48-bit, M-TMSI in bytes 2–5)
    and fullI-RNTI (40-bit, 5 bytes).
  - Set optional accessType (non3GPP) and optional nonCriticalExtension
    (pagingRecordList-v1700 with pagingCause-r17).
  - Use asn1cCalloc for ASN.1 allocations and encode via
    uper_encode_to_new_buffer. On failure free buffer and return empty
    byte_array_t.
- rrc_gNB.c: disable do_NR_Paging call in rrc_gNB_generate_pcch_msg
  with #if 0 (will be removed in a descendant commit, no need to update
  call site yet).
- test_asn1_msg.cpp: update caller in asn1 tests (minimal change, test
  will be updated in a later commit)
- common/platform_constants.h: add NR_PCCH_MAX_PAGING_RECORDS

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
854090632f MAC gNB: move RB/MCS/TBS selection helper for common PDSCH to scheduler primitives
Expose the RB/MCS/TBS selection helper as a shared MAC function for
common PDSCH instead of keeping as static variant for SIB-specific use
in the BCH scheduler. It will be reused by the PCCH code path in a descendant
commit.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
a1162f9fd3 MAC gNB: implement and use is_type0_occasion()
Implement the Type0-PDCCH occasion helper for reusability and
use it in schedule_nr_sib1. Adopt in a descendant commit
in PCCH scheduling as well.

Changes:
- gNB_scheduler_primitives.c: add is_type0_occasion()
- gNB_scheduler_bch.c: in schedule_nr_sib1, replace inline code
  with is_type0_occasion
- Rename check_frame_sib1 to check_frame_type0, as it is not
  limited to sib1 but applies to PCCH as well.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
096a107704 MAC gNB: use get_max_ssbs() in BCH scheduler
gNB_scheduler_bch.c now calls the shared get_max_ssbs() instead of
duplicating the SSB bitmap size logic in schedule_nr_sib1

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Guido Casati
63af7fcfb8 MAC gNB: move SSB/Type0-PDCCH helpers from BCH to scheduler primitives
Move get_max_ssbs and the Type0-PDCCH frame-check logic from
gNB_scheduler_bch.c to gNB_scheduler_primitives.c so they can be
reused (e.g. for both paging and SIB1).

Changes:
- check_frame_sib1() with NULL check for ssb_periodicityServingCell
  and clearer logic
- Improved documentation

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-11 12:25:26 +02:00
Laurent THOMAS
911f069709 use specific paramters for init_timeshift_rotation() instead of global frame parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 09:59:29 +02:00
Laurent THOMAS
2c7530e0bf use specific paramters for perform_symbol_rotation() instead of global frame parms
Signed-off-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-06-11 09:59:20 +02:00
Sakthivel Velumani
4b79c55ce6 ci: redirect ocudu gnb logs to stdout
CI script saves only stdout logs.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-11 01:21:05 +00:00
Sakthivel Velumani
2ff86cfb27 ci: reduce tx amplitude in zmq radio
OAI DFT has scaling issues when the signal is very strong or close to
full scale. So reduce amplitude by 10dB in gnb to prevent
overflow/clipping.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-10 17:24:43 +00:00
Sakthivel Velumani
0a0de88ff8 ci: enable all info logs in ocudu gnb
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-10 17:24:30 +00:00
Robert Schmidt
fa237ffab4 Merge remote-tracking branch 'origin/oai_ue_perf_opt' into integration_2026_w24
UE DL Channel compensation and LLR optimization (#142)

- Common channel compensation: Extracted nr_channel_compensation() as a
  shared function (AVX2/MRC inline) used by both gNB and UE PDSCH/PUSCH
  paths, eliminating duplicated compensation logic.
- Common ML/MMSE 2-layer MIMO: Created shared ML LLR and MMSE routines
  for 2-layer spatial multiplexing, shared between gNB and UE
  demodulation.
- File segregation: Moved common LLR and channel compensation functions
  into dedicated source files for better modularity and reuse.
- nr_dlsim -E flag: Added a command-line argument to enable/disable
  ML/MMSE equalization at runtime (MMSE default), enabling side-by-side
  performance comparison without recompilation.
- Persistent UE buffer allocation: pdsch_dl_ch_estimates, rxdataF_comp,
  dl_ch_mag,dl_ch_magb,dl_ch_magr and rho_dl are now allocated once in
  PHY_VARS_NR_UE on first use, resize automatically when dimensions
  change (resizeAllowed=true), and are freed at UE teardown in
  term_nr_ue_signal. Eliminates per-slot heap allocation/free overhead.
- PTRS restricted to one antenna port: PTRS phase tracking is only valid
  for a single port; processing now correctly restricted to avoid
  unnecessary computation.
- Reduce rxdataF_comp buffer size: MRC combines all Rx antenna
  contributions into a per-layer output, so the first dimension was
  reduced from Nl * nb_antennas_rx to Nl, reducing buffer footprint
  proportionally.
- 256QAM segfault fix: nr_256qam_llr() on gNB side used a VLA for LLRs
  without alignment, causing AVX2 load faults. Fixed with
  attribute((aligned(32))).

Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-06-10 17:48:44 +02:00
Robert Schmidt
8c255558f0 Merge remote-tracking branch 'origin/unit_bits' into integration_2026_w24
Unit tests for bit functions (#146)

Unit tests for bit functions in file bits.h using randomized values to
make the tests dynamic

Migrated from
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/4139

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Rupanjali Srivastava <rupanjali.srivastava@openairinterface.org>
2026-06-10 15:41:28 +02:00
Rupanjali
460cbf954d 256 QAM: Fixing the segmentation fault in nr_256qam_llr() the input llr buffer is not 32 byte aligned for AVX2 instructions on gNB side
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
80451a917f Reduce buffer size of rxdataF_comp
nr_channel_estimation() produces combined output of all antenna ports for each layer. So reduced the buffer size from no. of layer times no. of antennas to no. of layers.

Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
d2bbf09121 ptrs: limit PTRS processing to one antenna port
The current state of PTRS will not work for multiple antenna ports because the function assumes rxdataF_comp has signal for all antenna ports but it doesn't as we do MRC after DMRS compensation.

Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
039b008676 Added a command line argument -E to enable/disable ML/MMSE for nr_dlsim with MMSE being default to compare performances during runtime
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
1b77adcb10 Segregate the LLR and channel compensation related common functions into different files
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
7db4dfec73 Created common ML LLR and MMSE for 2 layers functions being shared by both gNB and UE. Disabled ML based LLR due to lareg compute time
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
e2676b5159 Create common channel compensation function shared by both gNB and UE
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 09:25:37 -04:00
Rupanjali
ce4a9da3ca Refactor rxdataF_comp/dl_ch_mag to flattened array layout
Signed-off-by: Rupanjali <rupanjali.srivastava@openairinterface.org>
2026-06-10 08:52:41 -04:00
Robert Schmidt
79171c19af Merge remote-tracking branch 'origin/ci-fixes-duranta' into integration_2026_w24
ci: maintainer approval for additional file changes and update maintainer's contact (#160)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-10 14:38:51 +02:00
Robert Schmidt
0a9d817d9c fix(ci): infer branch name if only commit given
After migration of github, we only use the commit ID for the
pre-ci-check script. This is problematic, because it checks for merges,
excluding the integration branch (expected to have merges), based on the
branch _name_.

In this commit, if a full SHA is detected as the branch "name", use "git
branch --points-at" to get a branch name, then use that to exclude
integration branches (or not).  If no branch name is found, the branch
name "" is used, which will trigger the normal merge check (because ""
does not match the integration branch name).

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-10 14:38:09 +02:00
Robert Schmidt
33e09d7e3e Merge remote-tracking branch 'rorsc/nr-rlc-multi-req' into develop
RLC data req: Use API to fill multiple RLC PDUs at gNB (#145)

Use the RLC API to fill a transport block for a given LCID with a single
lock-unlock cycle.

This is a (partial) recommit of 4426fb1 which had been reverted later in
commit 8ed54d7.

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-10 14:38:00 +02:00
Francesco Mani
d6e9492b6f add unit tests for bit manipulation functions
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-10 11:12:38 +02:00
Shubhika Garg
29be39948c ci: protect deployment/build files and update maintainer contact
- Add ci-approval protection for docker/, charts/, openshift/,
    and build_oai and build_helper files
  - Update oai email contact to `oaicicdteam@openairinterface.org`
  - Change GitLab to GitHub in `GET_SOURCES.md`

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-10 10:15:45 +02:00
Robert Schmidt
d4d494d0d3 Merge remote-tracking branch 'origin/update-duranta-ci' into develop
ci: remove first-time contributor job in workflow and update Jenkins job badges #147

- Remove the first-time contributor GitHub Actions workflow
- Update Jenkins image builder badge URLs to match the current job
  names.

The first-time contributor workflow posts an automated welcome message
through github-actions[bot], creating additional bot activity on pull
requests. Contributor onboarding information is better maintained
through project announcements and documentation, where it is easier to
update and more visible to new contributors.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-09 09:34:19 +02:00
Shubhika Garg
62846a9311 ci: remove first-time contributor job in workflow and update Jenkins badges
- Remove the automated welcome message for first-time contributors.
    Contributor related information will be maintained in project
    announcements instead, avoiding additional bot activity on PRs.
  - Update badge links for the Jenkins image builder jobs.

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-09 09:22:15 +02:00
Francesco Mani
db5c84e864 add assertion in count_bits64_with_mask and fix undefined behavior for size 64
Signed-off-by: Francesco Mani <email@francescomani.it>
Assisted-by: Claude:claude-sonnet-4-6
2026-06-09 09:17:01 +02:00
Robert Schmidt
acab173950 RLC data req: Use API to fill multiple RLC PDUs at gNB
Use the RLC API to fill a transport block for a given LCID with a single
lock-unlock cycle.

This is a (partial) recommit of 4426fb1a2e
which had been reverted later in commit 8ed54d7077.

See: 4426fb1a2e ("RLC data req: Add API to fill multiple RLC PDUs in
    one TB, use at gNB")
Fixes: 8ed54d7077 ("Refactor DL scheduler into staged pipeline with
    pluggable function pointers")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-09 08:50:16 +02:00
Sagar Arora
19a8a0d1d4 Merge pull request #133 from duranta-project/ci-migration-test
ci: change github action event from pull_request to pull_request_target
2026-06-08 17:57:11 +02:00
Shubhika Garg
8e30ec8031 ci: migrate Jenkins dispatch to pull_request_target
Migrate the Jenkins dispatch workflow from `pull_request` to
`pull_request_target` so that secrets are available for PRs from forks,
enabling CI to run on external contributions.

- Switch trigger from `pull_request` to `pull_request_target`
- Add `github.event.action` to concurrency group to prevent the `opened`
  event from cancelling in-progress CI runs, which caused `detect-changes`
  to be skipped on new PRs
- Remap `pull_request_target` back to `pull_request` in the
  `X-Github-Event` header for Jenkins compatibility
- Remove `pr-retrigger-ci-instructions`

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-08 17:40:47 +02:00
Robert Schmidt
ba9b9b217a Merge remote-tracking branch 'origin/integration_2026_duranta' into develop
Integration: Duranta Migration

* #2 CI: GitLab to GitHub Migration
* #4 docs: GitLab to GitHub Migration

See pull request duranta-project/openairinterface5g#14
2026-06-05 17:37:55 +02:00
Robert Schmidt
416248f951 Merge remote-tracking branch 'origin/github-migration-doc' into develop
4: docs: GitLab to GitHub Migration

Update documentation to match migration to Duranta.

Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 17:31:43 +02:00
Robert Schmidt
1c850b622d Merge remote-tracking branch 'origin/ci-migration' into develop
2: CI: GitLab to GitHub Migration

Integrates the existing Jenkins pipeline into the new Github
duranta-project/openairinterface5g project.

For more information, see pull request #2.

New pipelines:

- https://jenkins-oai.eurecom.fr/job/RAN-GitHub-Container-Parent/
- https://jenkins-oai.eurecom.fr/job/RAN-Internal-Repo-Push/
- https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-Image-Builder/ (renamed
  from RAN-Ubuntu18-Image-Builder)
- https://jenkins-oai.eurecom.fr/job/RAN-RHEL-Cluster-Image-Builder/
  (renamed from RAN-RHEL8-Cluster-Image-Builder)

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-05 17:27:56 +02:00
Robert Schmidt
de00110649 fix: update GET_SOURCES with Duranta workflow
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
4ed6de5dd5 fix: update typo in Fedora 44
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reported-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-05 17:16:41 +02:00
Jaroslava Fiedlerova
867cb7f7d0 CI: Reflect build pipeline renaming (#2) in TESTBenches.md
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
f8ecc3befa doc: contrib: update release strategy
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
01fb12cfbd doc: clarify the role of AI coding assistants
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
55e0693beb doc: Improve style guide with function and variable declaration hints
Reported-by: Laurent THOMAS <laurent.thomas@open-cells.com>
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
b4c9f67b30 doc: add information on git commit trailer, including mandatory -s
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
ef35085329 doc: remove outdated/inexistant pipeline from test bench overview
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
165ceb983b doc: Update labels in Test bench overview
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +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
Robert Schmidt
00e7cd49fa doc: contrib: update for Duranta
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
568898e80a doc: fix link to MIT license
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
f8ebed5cad doc: add Duranta logo, name, intro in main README.md
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Shubhika Garg
1bf3fd674e doc: Update contributing guidelines for GitHub
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-05 17:16:40 +02:00
Jaroslava Fiedlerova
ce6a54ab94 CI: Use GitHub Actions workflow for CI build trigger
Add GitHub Actions workflow with 5 jobs:
- detect-changes: uses dorny/paths-filter to check whether files under
  ci-scripts/ or .github/ were modified
- welcome-first-time-contributor: getting started and useful links for
  first time contributors
- pr-retrigger-ci-instructions: instructions on how to retrigger the CI
  without any PR changes
- require-maintainer-approval: requires manual approval via the
  ci-approval GitHub environment when protected files changed,
  preventing untrusted changes from triggering Jenkins automatically
- trigger-jenkins: triggers Jenkins by forwarding the GitHub event
  payload via curl, skipping the approval gate when no protected files
  changed

Add support for retriggering CI by adding a label to a PR. The label is
removed automatically after Jenkins is triggered, regardless of success
or failure, so it can be re-added at any time for subsequent retriggers.

Assisted-By: Claude:claude-sonnet-4-6
Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 16:28:13 +02:00
Jaroslava Fiedlerova
18efff1ca4 CI: append commit ID to testBranch in Jenkinsfile-scheduled-run
Make the image tag unique per scheduled run and consistent with the branch
naming convention used in the other pipelines by suffixing the commit hash:

  testBranch = "${sourceBranch}-${commitID}"

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 16:28:13 +02:00
Jaroslava Fiedlerova
053365ad77 CI: adapt Jenkinsfile-push-local-repo for GitHub PR merge refs
Replace the manual fetch-and-merge approach with pre-built PR merge
refs to simplify checkout and eliminate explicit remote management:
- Add Job init stage to set build name and description for traceability
- Add Checkout stage that fetches refs/pull/<N>/merge for PR builds and
  checks out targetBranch directly for push builds
- Remove sourceRepo parameter and "Add source repo & fetch branches" stage
- Remove "Merge target into source" stage (merge is handled by the GitHub
  PR merge ref at checkout time)

Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 16:28:13 +02:00
Jaroslava Fiedlerova
98d829e535 CI: migrate main Jenkinsfile from GitLab to GitHub
Replace GitLab-specific CI infrastructure with GitHub-compatible
equivalents in the main OAI RAN pipeline:
- Rename Jenkinsfile-GitLab-Container to Jenkinsfile-GitHub-Container
- Replace GitLab CI env vars with GitHub PR equivalents provided by
  GitHub Integration plugin and GitHub Plugin
- Replace addGitLabMRComment / gitlabCommitStatus with githubPRComment
  and githubNotify for PR comments and commit status reporting
- label validation within Jenkinsfile, remove the now-unused
  checkGitLabMergeRequestLabels.sh helper script
- Remove git fetch from the pre-ci-check script as we now use
  GITHUB_PR_HEAD_SHA. Fetching is redundant and may not retrieve
  the PR head commit for fork-based contributions.

Move githubNotify for downstream jobs from triggerDownstreamJob into
finalizeDownstreamJob so each status check links directly to the HTML
test report artifact rather than the generic build page:
- Add downstreamResults map to pass job results (SUCCESS/FAILURE)
  from trigger functions to finalizeDownstreamJob without changing the
  existing always/failure post-block structure
- Map any non-success result (UNSTABLE, ABORTED) to FAILURE for GitHub
- Add targetUrl: BUILD_URL to the pipeline-level success/failure
  githubNotify calls so the top-level check also links to the build

Consolidate GitHub PR comments to reduce noise:
- Buffer mrValidationWarning instead of posting it as a separate comment,
  fold it into the final success or failure comment
- Remove the inline Local-Repo-Push-Dev failure comment, append to
  failingStages so it appears in the single final failure comment
- Drop the success PR comment for clean builds - post only when there is
  a validation warning to report

Assisted-By: Claude:claude-sonnet-4-6
Co-authored-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 12:16:28 +02:00
Jaroslava Fiedlerova
26efcc4989 Merge branch 'integration_2026_w22' into 'develop'
Integration: `2026.w22`

* !4140 Fix evaluation of PMI and CQI report when there is no RI report
* !4125 fix(phy): prevent division by zero in nr_csi_rs_pmi_estimation
* !4134 Add SRS LS and RSRP measurement logging for indoor positioning research
* !4086 vrtsim: Refactor peer antenna configuration and taps_client
* !4108 XNAP: Add encode/decode+unit tests for Xn HO Ack, Prep Failure, SN Status Transfer, UE Context Release
* !4096 O-RU fronthaul library
* !4147 1-port CQI report
* !4133 fix(config): fix memory safety, memory leaks, and add unit test coverage
* !4084 gold_cache: replace linear search with open-addressing hash table
* !4150 fix a few issues with unit tests
* !3827 Antenna port indexing of txdataF using FAPI spatial stream indices
* !4138 \[FHI72\] \[M-plane\] Implement dynamic compression
* !4144 fix(fhi72): Fix use-after-free bug in fhi_72 lib
* !3890 Fixes for multiplexing pattern 3 operations in FR2
* !4145 fix(vrtsim): handle CLOCK_REALTIME jump after PTP sync
* !4151 minor: fix nr rlc test make-based compilation
* !4141 wrong usage of extern declaration in C files, header cleanup
* !4153 doc: update 7.2 tutorial hardware and os configuration and add a doc to list supported hardware and OS
* !4066 Separate nfapi_p5.c into LTE and NR implementations
* !4098 \[CI OAI-FlexRIC\] Improve CI pipeline
* !3723 Support for aperiodic SRS at gNB
* !4076 Fix imscope and tracy build
* Fix the undefined `res` parameter if not defined K_RELEASE
* CI: Adjust timing thresholds in RAN-gNB-N300-Timing-Phytest-LDPC
* !3553 Add automated FHI72 4x4 nightly testing
* !4142 CI: Cleanup of Jenkinsfiles and parameters
* Adjust do_SRS after merge of !3723

Closes #1086, #1097, #1022, and #1076

See merge request oai/openairinterface5g!4146
2026-05-29 20:59:33 +00:00
Robert Schmidt
e62114043b Adjust do_SRS after merge of !3723
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-29 17:05:03 +02:00
Jaroslava Fiedlerova
2e2f2df9ff Merge remote-tracking branch 'jfiedler/ci-clone-repo-3' into integration_2026_w22 (!4142)
CI: Cleanup of Jenkinsfiles and parameters

- pass pre-computed branch from orchestrator to downstream jobs
- pass repository from orchestrator to downstream jobs, repository is now
  configurable via ciRepositoryURL parameter of RAN-Container-Parent
- remove eNB_/ran-prefixed Jenkinsfile parameters
- address !4129 (comment 221898) and !4129 (comment 221900) and
  !4129 (comment 221927)

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-29 17:03:59 +02:00
Jaroslava Fiedlerova
ab5d11c30d Merge remote-tracking branch 'origin/ci-add-fhi72-t2-test' into integration_2026_w22 (!3553)
Add automated FHI72 4x4 nightly testing

Add configuration files (conf, YAML, XML) for a new pipeline targeting
nightly high-throughput testing with FHI7.2 RUs.  This pipeline is
designed to perform daily performance and stability testing using
either:

- the integration branch (to detect regressions in high-throughput
  scenarios), or
- the develop branch (to collect up-to-date performance
  metrics and observe long-term stability trends)

Details:
- testing with F1 split: DU runs on stonechat, CU runs on OC
- 4x4 MIMO, 4 DL layers layers with VVDN, LiteON, Metanoia, Bennetel550
  and Benetel650 FHI7.2 RUs
- T2 card for LDPC processing
- TDD: DDDSU (special: DDDDDDDDGGGGUU) / DDDSU (special: DDDDDDGGGGUUUU)
  for Benetel configrations

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-29 16:43:34 +02:00
Jaroslava Fiedlerova
1b9ef3105c CI: Adjust timing thresholds in RAN-gNB-N300-Timing-Phytest-LDPC
!3827 improved feprx processing time in 2x2 setup with 60MHz BW. Update
the timing thresholds accordingly.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:33:42 +02:00
Jaroslava Fiedlerova
c9d789d13f CI: Prevent error when artifact file not found during copyArtifacts
Avoid the following error in the always post condition:

  Error when executing always post condition:
  Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 1540dd3e-f4ca-410c-8c37-8977ada45325
  hudson.AbortException: Failed to copy artifacts from RAN-ARM-Cross-Compile-Builder with filter: test_results*.html

Add "optional: true" to copyArtifacts so that a missing HTML report
is handled by the existing placeholder fallback instead of aborting
the post condition.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
16ea7f3d9a CI: Minor cleanup of test-runner test
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
4612eacbd6 CI: Change naming convention for downstream jobs
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
7df11a5373 CI: Stop publishing L2sim proxy image to Docker Hub
Since MR !4116 removed support for building the L2sim proxy, there is no
longer a need to publish the proxy image to Docker Hub.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
25a5992202 CI: Sanitize testBranch name
Branch names containing '/' are invalid in Docker image tags. Compute a
sanitized testBranch variable once (replacing '/' with '-') in the
Verify Guidelines stage and pass it to both triggerSlaveJob (as the new
testBranch parameter) and triggerCN5GSlaveJob (as fullRanTag).

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
55125d453b CI: Perform SCM checkout during the Build Init step
This change enables configuring the repository and branch to test
directly from Jenkins.

The default checkout performed by the testing pipeline is now skipped,
since it does not support parameterized git URLs. Instead, the SCM
checkout is executed during the Build Init step, allowing dynamic
repository selection.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
7b94256bde CI: Remove unused Python CLI arguments
Assisted-By: Claude:claude-sonnet-4-6
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
d1fdea2aea CI: Cleanup unused Jenkins parameters from Jenkinsfile-GitLab-Container
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
9617344464 CI: pass pre-computed branch from orchestrator to downstream jobs
Jenkinsfile-GitLab-Container now constructs CI testing branch as
{sourceBranch}-{sourceCommit} and passes it explicitly to all downstream
jobs. Both Jenkinsfile and Jenkinsfile-push-local-repo consume it via
params.branch instead of independently reconstructing the name, ensuring
that the branch pushed by RAN-Local-Repo-Push and the branch checked out
by test jobs are always identical.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 16:16:59 +02:00
Jaroslava Fiedlerova
b82b545f47 CI: Add configuration files for 8x8 test with Benetel RUs
UP3 development UE is used since no dedicated CI UE is available for outdoor
testing. CN with PLMN 20899 can be deployed locally on demand, however for
now always-on CN is used (AMF IP address 172.21.6.5).

The gNB is currently configured with pdsch_AntennaPorts_N1 = 2 instead
of 4, as the proper 8x8 antenna configuration triggers an assertion in
polar procedures (see issue 1067). This will be corrected once the assertion
is resolved.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
3f33b8e1ba Increase dl_min_mcs to 20
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
3850e00ace CI: add configuration files for Benetel test
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
9f7e1f126e CI: Add FHI7.2 test with nFAPI split
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
fde3ac01dd Add Jenkinsfile for nightly 4x4 run
Introduce a dedicated Jenkinsfile for nightly 4x4 runs. Increase the timeout
per test step to 150 minutes (vs. standard 60 minutes). Support dynamic branch
selection - if eNB_CommitID or eNB_Branch is set to "latest", the pipeline
resolves the latest develop or integration branch using get-latest-ref.sh script.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
50c0d60c7c CI: add configuration files for Metanoia test
Test description:
- FHI7.2 test with Metanoia RU and Quectel module
- 4 DL layers, 2 UL layers
- stonechat as DU host, CU running on OC
- LDPC processing on the T2 card

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
1d579040c8 CI: add configuration files for LiteON testing
Test description:
- FHI7.2 test with LiteON RU and Quectel module
- 4 DL layers, 2 UL layers
- stonechat as DU host, CU running on OC
- LDPC processing on the T2 card

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
750392b63c CI: add configuration files for VVDN monolithic gNB deployment
This commit is intended primarily for comparison with CU/DU split deployments,
enabling data collection and performance evaluation across both configurations.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
89f64fb772 CI: add configuration files for VVDN test
Test description:
- FHI7.2 test with VVDN RU and Quectel module
- 4 DL layers, 2 UL layers
- stonechat as DU host, CU running on OC
- LDPC processing on the T2 card

Enable automatic retry of DU deployment to recover in case of following failure
during T2 initialization:
  EAL: Unable to reset device! Error: 11 (Resource temporarily unavailable)
  EAL: 0000:01:00.0 setup device failed
  EAL: Driver cannot attach the device (01:00.0)
  EAL: Failed to attach device on primary process
  [PHY]   T2 card 01:00.0 not found

  Assertion (itf->nrLDPC_coding_init() == 0) failed!
  In load_nrLDPC_coding_interface() /oai-ran/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface_load.c:66
  error starting LDPC library ldpc (null)

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
4f0d6887e8 CI: add OC CN deployment on stonechat
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +02:00
Jaroslava Fiedlerova
6a9b4b58a4 CI: Add XML and Dockerfile for FHI7.2 gNB with T2 support
Use taskset with a dynamic range based on the number of detected processors
for OAI and DPDK build. This ensures both DPDK and OAI build steps use all
available CPU cores on the machine.

Build with XRAN K release

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 15:14:08 +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
747041990c Merge remote-tracking branch 'origin/issue1076' into integration_2026_w22 (!4076)
Fix imscope and tracy build

Make headers required in imscope includable in C++ sources by removing
direct and indirect inclusions of VLAs.

Closes: #1076
Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-29 13:12:27 +02:00
Jaroslava Fiedlerova
c02c3daad9 CI: Make a generic function for (un)deployment with script
Add simple unit tests for the new functions.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-29 12:54:51 +02:00
Robert Schmidt
e36edd047e Merge remote-tracking branch 'origin/aperiodic_SRS' into integration_2026_w22 (!3723)
Support for aperiodic SRS at gNB

Add support for aperiodic SRS, which currently, if activated, is
hardcoded to be periodically scheduled every 160 TTIs. The configuration
file has been changed, and instead of

    do_SRS = 0/1

is now

    do_SRS = "none"/"periodic"/"aperiodic"

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-29 08:53:56 +02:00
Robert Schmidt
054a5e44aa Merge remote-tracking branch 'origin/ci-oai-flexric' into integration_2026_w22 (!4098)
[CI OAI-FlexRIC] Improve CI pipeline

1. Run the iperf instead of ping
2. SIGTERM added for nearRT-RIC so it shall gracefully stop in CI;
   modify the line for nearRT-RIC service analysis

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-28 19:00:41 +02:00
Robert Schmidt
ed79679a85 Merge remote-tracking branch 'origin/nfapi_4g_5g_separation' into integration_2026_w22 (!4066)
Separate nfapi_p5.c into LTE and NR implementations

This MR aims to separate the implementation of the nFAPI P5 and P7
message pack/unpack procedures into 4G and 5G implementations.

This will be followed up with a separation of the VNF and PNF
implementations in 4G and 5G versions as well.

The final goal is to achieve a clean separation between 4G and 5G,
foregoing the need to compile 4G components when we only want to compile
5G ones.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 18:59:55 +02:00
Robert Schmidt
38e508d9e9 Merge remote-tracking branch 'origin/7.2-tutorial-update' into integration_2026_w22 (!4153)
doc: update 7.2 tutorial hardware and os configuration and add a doc to list supported hardware and OS

1. The hardware details in the tutorial were very old; now we are using
   some new systems
2. There is no need now to mention the old kernel version and firmware
   version
3. I removed the configuration with tuned-adm, as it is confusing
   sometimes. So it is better to use just GRUB. I have an OAI tuned
   profile ready, but I will do it on another MR. I will check if it
   works well on kernel 7.X before pushing
4. Add a document to list the tested/supported hardware on which we have
   tested OAI. In another MR I will use that document as reference for
   other tutorials as well.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 16:47:50 +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
Sagar Arora
15b888158c doc: update 7.2 tutorial hardware and os configuration
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-05-28 16:41:00 +02:00
Sagar Arora
2184d96033 doc: add new doc to maintain OAI supported/tested hardware and OS
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-05-28 16:23:06 +02:00
Teodora Vladić
eccae5bd52 Fix the arithmetic exception
When calculating PRB DL/UL usage per UE, the division with 0 might occur
even though the scheduler was locked. It is expected to happen only while
the last UE is disconnecting.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 14:27:07 +02:00
Teodora Vladić
161b94b0cb Lock the scheduler when reading MAC/RLC UE information for E2AP
For the E2SM-RLC REPORT service, return false if all connected UEs have 0 RBs.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 14:27:07 +02:00
Teodora Vladić
a914b74ea8 Update the FlexRIC submodule commit
Notably due to the FlexRIC MR https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/84.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 14:27:07 +02:00
Teodora Vladić
dabbb47eb3 [CI OAI-FlexRIC] Modify the line for nearRT-RIC service analysis
Reference: https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/84/diffs?commit_id=66b301b221d957f5b07e6f1fa89aec418b3a0205

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 14:27:07 +02:00
Teodora Vladić
616aa6bc81 [CI OAI-FlexRIC] Run iperf instead of ping
With FlexRIC MR https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/84 the xApp default duration has changed to infinite.

Therefore, the traffic is captured by xapp-kpm-moni xApp.

Also, renamed `node` value from `carabe` to `localhost` for UE attach/detach tests.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-28 14:25:16 +02:00
Robert Schmidt
a7fdf3c185 Merge remote-tracking branch 'origin/fix-rlc-test-compilation' into integration_2026_w22 (!4151)
minor: fix nr rlc test make-based compilation

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 13:21:51 +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
b79dd8bcfc Merge remote-tracking branch 'origin/issue1048' into integration_2026_w22 (!3890)
Fixes for multiplexing pattern 3 operations in FR2

The standard (section 13 of 38.213) defines 3 SSB and CORESET 0
multiplexing patterns, which differ based on how the two channels are
respectively positioned in time and frequency. For MUX pattern 3, SSB
and CORESET 0 are transmitted in the same slot/symbols but on different
frequencies. With CORESET 0 being directly above or below in frequency
of SSBs, this means it does not start from symbol 0. This configuration
is important for more than 8 SSBs (FR2) to accommodate SIB1 in the
available DL slots (SIB1 in the same slot as its relative SSB), but it
is impractical for anything else. So for any other channel except SSB,
it is necessary to use a different common CORESET than CSET0 (namely
commonControlResourceSet).

This MR attempts to fix an issue in case the CORSET being smaller than
48 PRBs, triggering 2 symbol CORESET configuration, but the BWP being
larger than 48 PRBs so not taking into account the 2 symbol CORESET when
configuring other channels, e.g. PDSCH.

Reviewed-By: Luis Pereira <lpereira@allbesmart.pt>
2026-05-28 13:20:25 +02:00
Robert Schmidt
b1f8e5e7a1 Increase nr-cuup-functional-test timeout for increased reliability
This test runs the CU-UP, which has a default reconnection timeout of
1s. The test being limited, the following can happen:

- the CU-UP tries to connect, but the load tester did not start yet, so
  waits one second
- test for 3s, and additional sleep at the end of 1s (to ensure all
  packets are received).
- sum is 5s => timeout hits

Increase the timeout to improve stability.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 10:41:29 +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
Rúben Soares Silva
eebc9839a3 Suppress unused argument warnings in nfapi_vnf.c
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
c1aaf1ef4a Suppress unused argument warnings in PNF files
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
38557656fa Suppress unused argument warnings in NR nfapi files
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
1ef8f1b932 Suppress unused argument warnings in LTE nfapi files
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
8c638756d1 Ensure only one transport mechanism gets linked to nr-softmodem in CMakeLists.txt
Socket transport was getting imported everytime WLS was not.
This would lead to socket transport to be compiled when Aerial was compiled as well, now only one of the transports gets imported.

Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
0a5b9e5997 Move nFAPI CMakeLists build rules into their own subdirectories
The relevant block for each library is now located in the CMakeLists.txt in the same directory as its sources, instead of the root CMakeLists.txt

The libraries have been renamed to follow a lowercase naming

Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
be955b4f46 Separate NFAPI_LIB into nfapi_nr_lib and nfapi_lte_lib
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
08b029993b Separate nfapi_p7.c into LTE and NR implementations.
Update NFAPI_LIB declaration to include both files.

Remove declaration of UE release functions from nr_nfapi_p7.h as those messages aren't part of 5G related SCF specification

Add NR_TIMING_INFO case to check_nr_fapi_unpack_length

Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
0a429537db Separate nfapi_p5.c into LTE and NR implementations.
Update NFAPI_LIB declaration to include both files.

Move measurement request functions from nfapi.c to nfapi_lte_p5.c, as the message is not part of SCF225 (5G), only SCF 082 (LTE)

Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01:00
Rúben Soares Silva
dc48260d2a Add tty: true to Aerial related docker-compose.yaml
For some reason, it's needed to have tty:true on the gNB section of the Aerial docker-compose files, if not, the following error occurs:
The L2 is not able to send messages to the L1, (nfapi_vnf_pnf_list_find(): could not find P5 connection for p5_idx 1)

By making sure the option tty is true on the docker-compose.yaml files, this error does not present itself.

Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-28 09:29:37 +01: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
francescomani
f374da786e configure multiple SRS resource set with different trigger offset in case of multiple K2 for PUSCH
Signed-off-by: francescomani <email@francescomani.it>
2026-05-27 19:25:30 +02:00
francescomani
7eb8d784ea fixes to transmit and receive aperiodic SRS
Signed-off-by: francescomani <email@francescomani.it>
2026-05-27 19:25:30 +02:00
francescomani
a24b959a4d procedure to schedule aperiodic SRS in the same slot as a given PUSCH to be scheduled
Signed-off-by: francescomani <email@francescomani.it>
2026-05-27 19:25:28 +02:00
Robert Schmidt
e6c48b886f Merge remote-tracking branch 'origin/unit-test-fixes' into integration_2026_w22 (!4150)
fix a few issues with unit tests

1. fix unused argument warnings - running ninja tests fails on my system
   due to too many warnings.
2. fix google benchmark build - sometimes, when building from scratch
   the build will fail due to compiler warnings. I don't know why it
   only happens sometimes but I've instead added a warning suppression
   as this is not an issue in our code.
3. fix memory leak I've found here: !3827 (comment 224369)
4. fix running two testcases with ninja test or ctest -R. Due to them
   being dependent on dlopen they would automatically fail if the user
   environemnt was not modified manually outside cmake. I've modified
   LD_LIBRARY_PATH for those test cases, meaning you no longer need to
   run it with LD_LIBRARY_PATH=. or similar prefix.

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-27 18:03:01 +02:00
Robert Schmidt
27aaa76d94 Merge remote-tracking branch 'origin/gold-cache-hashtable' into integration_2026_w22 (!4084)
gold_cache: replace linear search with open-addressing hash table

When many UEs are active, the gold sequence cache has to be looked up
frequently for each UE's scrambling. The linear scan gets slower as the
table grows. Its periodic table reorder causes unpredictable latency
spikes. This MR replaces it with a hash table

Here is a benchmark with 128 UEs (done with the tool of !4028 adapted to
work with !3902 (merged))

Before

=== Results: 128 UEs, 273 RBs, MCS 28, 10000 slots (warmup 5) ===
  Avg PDSCH/slot: 0.3 / 128 UEs
  Slot budget: 500 us (mu=1)

  Phase            mean      p50      p90      p99      max
                   (us)     (us)     (us)     (us)     (us)
  ------------------------------------------------------------------
  Scheduler       137.0    103.3    356.7    458.0    873.3
  PHY TX           30.9     13.4     55.6    546.4   1053.6
  Total           167.9    116.0    421.4    689.1   1126.1
  ------------------------------------------------------------------
  Max total 1126.1 us at slot 3 (iter 115)
  WARNING: max total (1126 us) exceeds slot budget (500 us)!

  Breakdown                            /slot     /call       max   calls
                                        (us)      (us)      (us)
  ---------------------------------------------------------------------------
  Scheduler:
    Total                              136.9     136.8     873.0   10000
      RA scheduling                        -           -           -       0
      UL scheduling                      0.0       0.0       0.1   10000
      DL scheduling (PDCCH+PDSCH)       79.3      79.3     537.9   10000
        RLC data req                     0.3       1.1       7.4    2357
  PHY TX:
    Total                                  -           -           -       0
      DCI generation                       -           -           -       0
      DLSCH encoding                     7.3      25.6      90.2    2852
        segmentation                     0.1       0.2       1.0    2967
        rate matching                    3.0       9.9      22.0    2967
        scrambling                       6.1      20.7     689.4    2967
      DLSCH modulation                   0.9       3.2       9.7    2967
      layer mapping                      1.7       5.8       8.5    2967
      precoding                          1.7       0.5       1.1   30827
      resource mapping                   3.5       1.1       1.4   30827
      phase compensation                 3.4       3.4       4.9   10000
  ---------------------------------------------------------------------------

Done.

After:

=== Results: 128 UEs, 273 RBs, MCS 28, 10000 slots (warmup 5) ===
  Avg PDSCH/slot: 1.1 / 128 UEs
  Slot budget: 500 us (mu=1)

  Phase            mean      p50      p90      p99      max
                   (us)     (us)     (us)     (us)     (us)
  ------------------------------------------------------------------
  Scheduler        56.4     47.3     97.9    133.1    274.7
  PHY TX           53.3     47.9     72.9     87.6    320.3
  Total           109.7     97.1    142.6    187.3    435.8
  ------------------------------------------------------------------
  Max total 435.8 us at iter 8528

  Breakdown                            /slot     /call       max   calls
                                        (us)      (us)      (us)
  ---------------------------------------------------------------------------
  Scheduler:
    Total                               60.6      48.5     223.5   12498
      RA scheduling                        -           -           -       0
      UL scheduling                      0.0       0.0       0.1   12498
      DL scheduling (PDCCH+PDSCH)       41.4      33.1     111.4   12498
        RLC data req                     0.8       0.9       6.9    9150
  PHY TX:
    Total                                  -           -           -       0
      DCI generation                       -           -           -       0
      DLSCH encoding                    24.2      24.2     289.2   10000
        segmentation                     0.2       0.2       0.8   11440
        rate matching                   10.5       9.2     275.5   11440
        scrambling                       0.8       0.7      16.5   11440
      DLSCH modulation                   2.9       2.6       9.0   11440
      layer mapping                      6.3       5.5       8.2   11440
      precoding                          6.6       0.5       1.0   138760
      resource mapping                   2.2       0.2       3.0   138760
      phase compensation                 3.3       3.3       3.5   10000
  ---------------------------------------------------------------------------

Reviewed-By: Laurent THOMAS <laurent.thomas@open-cells.com>
2026-05-27 17:59:46 +02:00
Robert Schmidt
046b63cd24 Merge remote-tracking branch 'origin/fix-config-cmdline' into integration_2026_w22 (!4133)
fix(config): fix memory safety, memory leaks, and add unit test coverage

- Fix an out-of-bounds/segmentation fault in config_getlist when parsing
  command-line options that do not specify bracket offsets (e.g.
  --rfsimulator.serveraddr). Added index bracket verification and
  guarded memcpy against NULL pointers on list reallocation.
- Initialize valid_idx to ParamList->numelt in config_getlist to
  properly support overriding and appending elements when a
  configuration file has existing array items.
- Fix memory leaks in end_configmodule
- Add test cases in test_config_cmdline.cpp

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-27 17:59:04 +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
Robert Schmidt
9f0394b3a7 Merge remote-tracking branch 'origin/1portCQI' into integration_2026_w22 (!4147)
1-port CQI report

MR to extend the support for CQI reporting to CSI-RS with single port

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-27 17:03:35 +02:00
Bartosz Podrygajlo
04ced37be6 fix(tests): fix some tests that call dlopen
Fix dft_test and nr_cuup_functional_test by adding CMAKE_BINARY_DIR to
LD_LIBRARY_PATH. This allows running the tests with `ninja test` or
`ctest -R` without modifying the environment manually.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-27 16:24:59 +02:00
Bartosz Podrygajlo
275df8c175 fix(build): Fix google benchmark build sometimes failing
Ignore compiler warnings when building google benchmark library.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-27 16:24:59 +02:00
Bartosz Podrygajlo
af4994f1f8 fix(tests): fix memory leak in test_tpool_vs_actors
Replace malloc with static memory to reduce possible memory leaks in
test_tpool_vs_actors.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-27 16:24:59 +02:00
Bartosz Podrygajlo
efdab585e2 fix(build): Fix unused argument warnings in unit tests
Assisted-by: Gemini:Flash-3.5
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-27 16:24:18 +02:00
Cedric Roux
ddcbfc6b0e minor: fix rlc (lte) test compilation
./run_tests.sh was failing in openair2/LAYER2/rlc_v2/tests

Signed-off-by: Cedric Roux <cedric.roux@eurecom.fr>
2026-05-27 16:17:40 +02:00
Cedric Roux
81186a4db4 minor: fix nr rlc test make-based compilation
./run_tests.sh was failing in openair2/LAYER2/nr_rlc/tests

Signed-off-by: Cedric Roux <cedric.roux@eurecom.fr>
2026-05-27 16:17:28 +02:00
Robert Schmidt
131b52408f Merge remote-tracking branch 'origin/fronthaul-lib' into integration_2026_w22 (!4096)
This introduces 7.2 ORAN fronthaul library components that will be used
to implement an O-RU.

Directory Structure

- core/: Low-level networking and timing primitives.
  * fh_recv: DPDK-based packet reception with callback support.
  * fh_send: Immediate packet transmission utilities.
  * fh_timer: GPS/System-aligned timing for symbol-accurate operations.
- oru/: O-RU specific application logic.
  * oru_packet_processor: Manages C-Plane/U-Plane synchronization, IQ
    data (un)packing, and TDD pattern validation
  * oru_io: High-level I/O manager that integrates core primitives with
    the packet processor.
  * oru_fh: future integration that will provide a unified interface for
    the entire fronthaul stack
- xran_pkt/: Protocol definition and API.

Architecture Overview

The library is designed for low latency and high throughput, leveraging
DPDK for direct hardware access. A key design principle is the
serialization of timer events and packet reception on the same thread,
which simplifies state management in the packet processor by avoiding
complex locking mechanisms.

For a pictoral representation, check MR !4096

Thread Deployment

1. Fronthaul Worker Thread (DPDK lcore)

This thread runs the fh_recv_run loop. It is responsible for:

- Polling the NIC for incoming eCPRI packets.
- Executing initial packet parsing and processing callbacks.
- Ticking the symbol timer.

2. Application threads

The O-RU application threads can utilize the thread-safe nature of
get_dl_iq and write_ul_iq to do parallel processing as needed.

Testing

Many unit tests were added, most notably a testcase against a PCAP
capture of the OAI O-DU C+UPlane configured with the liteon 4x4 config
(273 prb/jumbo frame)

Assisted-By: Gemini:Flash-3
Assisted-By: Gemini:Flash-3.5
Assisted-By: Gemini:Pro-3.1
Reviewed-By: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-27 14:35:49 +02:00
Robert Schmidt
967b814b0a Merge remote-tracking branch 'origin/xn_encdec_ho_messages' into integration_2026_w22 (!4108)
XNAP: Add encode/decode+unit tests for Xn HO Ack, Prep Failure, SN Status Transfer, UE Context Release

This MR extends XnAP message support in accordance with 3GPP TS 38.423 v16.2.0 for the following procedures:

- Xn Handover Request Acknowledge
- Xn Handover Preparation Failure
- Xn SN Status Transfer
- Xn UE Context Release

Additional updates include:

- Implementation of ASN.1 encoder and decoder functions for all listed
  procedures
- Addition of equality check helpers for all newly introduced message
  structures
- Implementation of memory management (free) helpers
- Extension of XNAP unit tests to cover all implemented procedures
- Harmonization of AS key BIT_STRING conversion macro

Acknowledgement:

> This work was carried out as part of research and development at
> Indian Institute of Science (IISc), Bengaluru.

Reviewed-By: Guido Casati <guido.casati@openairinterface.org>
2026-05-27 14:33:09 +02:00
Francesco Mani
371dd58fde fix to use commonControlResourceSet in common search space instead of cset0 in case of mux3
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-27 12:49:51 +02:00
francescomani
28c2bbf5c6 revert RFSIM configuration file for FR2 test back to full iniitial BWP now that issue preventing it from working is fixed
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-27 12:49:51 +02:00
francescomani
099ab4b49b fixes for CSET not at the bottom of BWP at OAI UE
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-27 12:49:51 +02:00
francescomani
53dd027a97 option to change TDA in case of MUX23
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-27 12:49:50 +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
Robert Schmidt
d8d4480b93 Remove CU/DU GTP global variable and look up context
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-27 12:21:41 +02:00
Robert Schmidt
79d5bdd761 Remove F1AP includes from f1ap_common.h
Most of the encoder/decoder F1 operation has been moved to a library
under openair2/F1AP/lib/. Thus, these includes are not actually
necessary, and are even problematic if code includes this header that is
not linked to F1AP (see next commit).

Remove all header includes, and put only the necessary ones into the
various source files instead (where they belong, as otherwise we get
massive include files that might even affect compile time).

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-27 12:20:56 +02:00
francescomani
611b38c82b timer to trigger aperiodic SRS
Signed-off-by: francescomani <email@francescomani.it>
2026-05-27 11:58:46 +02:00
Bartosz Podrygajlo
b0ff7c089e fix(config): fix memory safety, memory leaks, and add unit test coverage
- Fix an out-of-bounds/segmentation fault in `config_getlist` when parsing
  command-line options that do not specify bracket offsets (e.g.
  `--rfsimulator.serveraddr`). Added index bracket verification and guarded
  `memcpy` against `NULL` pointers on list reallocation.
- Initialize `valid_idx` to `ParamList->numelt` in `config_getlist` to
  properly support overriding and appending elements when a configuration
  file has existing array items.
- Fix memory leaks in  `end_configmodule`
- Add  test cases in `test_config_cmdline.cpp`

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-27 11:35:15 +02:00
Rakesh BB
e33ffd5e8c refactor: harmonize AS key BIT_STRING macro
Replace duplicated KENB_STAR_TO_BIT_STRING and
KGNB_STAR_TO_BIT_STRING macros with the unified
AS_KEY_STAR_TO_BIT_STRING helper across X2AP,
XNAP, M2AP, and M3AP code paths.

Also switch allocation to calloc_or_fail for
safer memory handling.

No functional change intended.

Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:35 +05:30
Rakesh BB
6d6930ce20 XNAP: add encode/decode and unit test for Xn UE Context Release
- Add UE Context Release message type definitions
- Implement encoder and decoder for UE Context Release
    UE Context Release (3GPP TS 38.423v16.2.0 §9.1.1.5)
    - Source NG-RAN node UE XnAP ID (M)
    - Target NG-RAN node UE XnAP ID (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover UE Context Release

Co-authored-by: Venkatareddy Akumalla <venkatareddy@fsid-iisc.in>
Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:35 +05:30
Rakesh BB
3e240de03f XNAP: add encode/decode and unit test for Xn SN Status Transfer
- Add Xn SN Status Transfer message type definitions
- Implement encoder and decoder for Xn SN Status Transfer
    Xn SN Status Transfer (3GPP TS 38.423v16.2.0 §9.1.1.4)
    - Source NG-RAN node UE XnAP ID (M)
    - Target NG-RAN node UE XnAP ID (M)
    - DRBs Subject To Status Transfer List (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover SN Status Transfer

Co-authored-by: Venkatareddy Akumalla <venkatareddy@fsid-iisc.in>
Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:34 +05:30
Rakesh BB
acd08eef5d XNAP: add encode/decode and unit test for Xn Handover Preparation Failure
- Add Xn Handover Preparation Failure message type definitions
- Implement encoder and decoder for Xn Handover Preparation Failure
    Xn Handover Preparation Failure (3GPP TS 38.423v16.2.0 §9.1.1.3)
    - Source NG-RAN node UE XnAP ID (M)
    - Cause (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Preparation Failure

Co-authored-by: Venkatareddy Akumalla <venkatareddy@fsid-iisc.in>
Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:34 +05:30
Rakesh BB
2402ff8239 XNAP: add encode/decode and unit test for Xn Handover Request Acknowledge
- Add Xn Handover Request Acknowledge message type definitions
- Implement encoder and decoder for Xn Handover Request Acknowledge
    Xn Handover Request Acknowledge (3GPP TS 38.423v16.2.0 §9.1.1.2)
    - Source NG-RAN node UE XnAP ID (M)
    - Target NG-RAN node UE XnAP ID (M)
    - PDU Session Resources Admitted List (M)
    - Target NG-RAN node To Source NG-RAN node Transparent Container (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Handover Request Acknowledge

Co-authored-by: Venkatareddy Akumalla <venkatareddy@fsid-iisc.in>
Signed-off-by: Rakesh BB <rakesh.bb@fsid-iisc.in>
2026-05-27 13:01:34 +05:30
Robert Schmidt
e24bbcd6f6 Merge remote-tracking branch 'origin/taps-client-rewrite' into integration_2026_w22 (!4086)
vrtsim: Refactor peer antenna configuration and taps_client

Refactor peer antenna configuration and taps_client

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:
  - transpartent channel mode
  - taps_client mode
  - cirdb mode

Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-05-27 09:22:41 +02:00
Maxime
7de1eaf7b8 gold_cache: replace linear search with common/utils/ds/hashtable 2026-05-26 22:31:26 -04:00
Bartosz Podrygajlo
8f624d0212 fix(vrtsim): Refactor peer antenna configuration and taps_client
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
2026-05-26 19:44:45 +02:00
francescomani
7bcb2e1cd4 extend support for CQI report to 1 port scenario
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-26 18:19:08 +02:00
Robert Schmidt
1c58af5aa2 Merge remote-tracking branch 'origin/feature/rsrp-srs-measurement-logging' into integration_2026_w22 (!4134)
Add SRS LS and RSRP measurement logging for indoor positioning research

This MR adds measurement logging support for indoor positioning research
based on OAI gNB radio measurements.

The goal is to collect timestamped SRS LS channel estimates and averaged
RSRP values during experiments. These measurements are used offline for

Add T traces to store raw RSRP reports and SRS LS estimates

Reviewed-By: Francesco Mani <email@francescomani.it>
Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org
2026-05-26 17:11:42 +02:00
Sakthivel Velumani
71dada53d1 fix: patch to fix prach num of ports
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-26 15:06:37 +00:00
Sakthivel Velumani
3e6289b0cf ru: remove num_beams_period from RU section
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-26 15:06:36 +00:00
Sakthivel Velumani
304252784a doc: update beamforming documentation
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-26 15:06:35 +00:00
Sakthivel Velumani
783084c6fb phy: remove beam idx from rxdataF txdataF
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>
2026-05-26 15:06:34 +00:00
Sakthivel Velumani
9dc6a35405 mac: pass antenna port mapping for MU-MIMO to PHY
1. Added new config parameter to read RU port indices to be used via config
   file.
2. When scheduling multiple UE on different beams in a slot, the antenna ports
   used for each UE is explicitely passed down via fapi.
3. Fix dig_bf_interface_list by filling beam id for all logical ports used.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-26 15:06:08 +00:00
Bartosz Podrygajlo
a5aaf4a96b fix(build): Remove extraneous -std=c++11 flag
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-26 13:10:17 +02:00
Bartosz Podrygajlo
6bac3ed235 fix(vrtsim): clang-format vrtsim.c
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-26 13:09:06 +02:00
Robert Schmidt
8d0ab5cb7e Merge remote-tracking branch 'origin/issue_1097' into integration_2026_w22 (!4140)
Fix evaluation of PMI and CQI report when there is no RI report

Closes: #1097
Reviewed-By: Luis Pereira <lpereira@allbesmart.pt>
2026-05-26 10:51:09 +02:00
Robert Schmidt
d06d0eff3b Merge remote-tracking branch 'origin/issue_1086' into integration_2026_w22 (!4125)
fix(phy): prevent division by zero in nr_csi_rs_pmi_estimation

In simulated environments like ZMQ, interference_plus_noise_power (IPN)
can be computed as zero, which could lead to a division-by-zero crash.

Fix this by ensuring interference_plus_noise_power is at least 1 at the
beginning of nr_csi_rs_pmi_estimation().

Closes: #1086
Reviewed-By: Francesco Mani <email@francescomani.it>
2026-05-26 10:50:35 +02:00
Bartosz Podrygajlo
ec0c3901ba fix(vrtsim): handle CLOCK_REALTIME jump after PTP sync
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-25 16:07:21 +02:00
Bartosz Podrygajlo
acf7e6d91d feat(fronthaul): Add oru fronthaul library
Add an O-RU centered fronthaul library that includes components
from the fronthaul directory.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:51:54 +02:00
Bartosz Podrygajlo
16850a3794 feat(fronthaul): pcap parsing unit test
Test the new O-RU packet processor against PCAP capture.

There are two testcases added:
 - test_oru_pcap_1 - which tests DL & UL fragmentation using jumbo frames (9600 mtu)
 - test_oru_pcap_frag - which injects the same pcap but tests the mtu to 1500 to force
   large amounts of UL UPlane fragments

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:51:49 +02:00
Bartosz Podrygajlo
f1d16fd85d feat(fronthaul): implement O-RU packet processor and unit tests
This commit introduces the O-RU (O-RAN Radio Unit) packet processor
implementation for handling UL & DL C-plane and U-plane

Key features include:
 - Processing of eCPRI headers and Section Type 1 radio app headers.
 - Strict timing validation against T2a minimum and maximum bounds for
   both C-plane and U-plane symbols.
 - A DPDK ring-based job queue for managing symbol processing state
   (`dl_symbol_job_t`) across multiple concurrent symbol windows.
 - Reordering of received CP & UP data so that produced IQ is always
   in order.
 - Extraction and buffering of IQ samples for downlink.
 - Supports up to 4 fragments per symbol

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:48:38 +02:00
Bartosz Podrygajlo
f82b051fe8 feat(fronthaul): oru_io library
Added a library that encompasses all dpdk requirements for a single O-RU.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:48:38 +02:00
Bartosz Podrygajlo
78b96e8ec1 fix(ci): Add Apache 2.0 license to list of allowed licenses
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-25 09:48:38 +02:00
Bartosz Podrygajlo
e5fa429e06 feat(fronthaul): refactor xran_pkt directory
Added xran_pkt which is a library of imported ORAN/eCPRI packet utilities
from xran library.

 - merged xran_up_api.h/c and xran_cp_api.h/c into xran_pkt_api.h/c.
 - reformatted the code.
 - added unit test
 - added an optional executable xran_pcap_dump which can extract some
fields of an ORAN pcap capture to stdout

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:48:38 +02:00
Bartosz Podrygajlo
83c9116145 feat(fronthaul): Add xran packet manipulation code
Add sources from xran library containing Split 7.2 packet manipulation
tools.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-25 09:48:38 +02:00
Bartosz Podrygajlo
fc78a643f1 feat(fronthaul): add 7.2 split fronthaul core libraries
This commit introduces a set of component libraries that can
be used to implement packet processing library for 7.2 fronthaul
interface.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> and assisted-by Gemini
2026-05-25 09:48:24 +02:00
Bartosz Podrygajlo
43433974aa fix(fhi72): Fix use-after-free bug in fhi_72 lib
Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-25 09:40:12 +02:00
Francesco Mani
fc2a9ecf7d fix evaluation of PMI and CQI report when there is no bit for RI
because max number of layers is 1

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-24 11:31:41 +02:00
francescomani
99e85c6cb2 function to schedule aperiodic SRS
Signed-off-by: francescomani <email@francescomani.it>
2026-05-24 10:16:29 +02:00
francescomani
71ef2dd8fb renaming of SRS scheduler to periodic
Signed-off-by: francescomani <email@francescomani.it>
2026-05-24 10:16:29 +02:00
francescomani
26010819ad use srs_request field in DCI
Signed-off-by: francescomani <email@francescomani.it>
2026-05-24 10:16:29 +02:00
francescomani
a95211a4b2 improvements in aperiodic/periodic configuration using a string as input of do_SRS
Signed-off-by: francescomani <email@francescomani.it>
2026-05-24 10:16:29 +02:00
Sakthivel Velumani
5b2169d157 fapi: add spatial steam mapping for MU-MIMO
Update copy functions and ctest.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-23 14:36:05 +00:00
Sakthivel Velumani
e57e5cd209 fapi: better message copy functions
Copying large struct one element at a time generates much more assembly code
than memcpy and the code becomes less maintainable. This commit copies parts of
structs using memcpy.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-23 14:36:05 +00:00
Robert Schmidt
cb0e501293 Merge branch 'integration_2026_w21' into 'develop'
Integration `2026.w21`

* !4130 Add RHEL 9.8 to list of supported distributions
* !4135 fix(clang): disable default-const-init-field-unsafe
* !4118 NR UE: remove hardcoded 64KB limit for UE capability file
* !4120 bugfix: fix A3 event configuration
* !4056 restructuring of UE DLSCH code to handle 2 codewords
* !4132 Cleanup conflict leftover in doc/SW_archi.md
* !4113 move vrtsim channel and per-UE param configuration from CLI flags to config file
* !4127 Bugfix overflow uint16_t variable when FFT size is 6144
* !3902 Refactor DLSCH/ULSCH scheduler: extract proportional fair policy behind function pointer interface
* !4136 hotfix for correct GFNI detection
* !4112 NAS UE Service Request fixes and improvements for Paging
* !4128 Iterate all NZP-CSI-RS resources per ResourceSet in scheduler
* !4131 Fix 8 DL ports
* !4137 changes in cudaMemadvise/cudaPrefetch API for v13
* !4122 Add Fedora 44/Ubuntu 26 to list of supported distributions
* !4117 NR_MAC/PHY: align SRS time_start_position semantics between L2 and L1
* !4129 CI: Clone from internal git repo
* !4124 Preparatory changes for LDPC CUDA integration

See merge request oai/openairinterface5g!4123
2026-05-23 09:29:41 +00:00
Merkebu Girmay
726293c3d4 vrtsim: Fix incorrect assertion
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>
2026-05-23 11:14:09 +02:00
Robert Schmidt
c9958bef59 Merge remote-tracking branch 'origin/ldpc_cuda_prep' into integration_2026_w21 (!4124)
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>
2026-05-23 10:17:17 +02:00
Robert Schmidt
470a5316e8 Remove superfluous memset() in UE DLSCH decoding
This memset() seems to be superfluous: following the code flow,
d_to_be_cleared is set on the same condition which guards the memset.
Following nrLDPC_coding_decoder() -> nrLDPC_prepare_TB_decoding() ->
nr_process_decode_segment() -> nr_rate_matching_ldpc_rx(), another
memset() is done using d_to_be_cleared.

Reported-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 19:06:26 +02:00
Jaroslava Fiedlerova
6afbb081a9 Merge remote-tracking branch 'origin/ci-clone-repo-2' into integration_2026_w21 (!4129)
CI: Clone from internal git repo

This MR refactors the CI pipeline as a preparatory step for the GitLab
--> GitHub migration.  The core idea is to use a dedicated stage
RAN-Local-Repo-Push (introduced in !4017 (merged)) to clone source and
target branches, merges them and push a resulting branch into internal
git mirror. All downstream test jobs then check out exclusively from
that mirror.  This makes the CI subpipelines independent of the remote
repository and improves stability in case of disruptions - test jobs
always check out from the internal mirror, not from GitLab/GitHub
directly.

Changes:
- doGitLabMerge.sh removed - merge is now done once in
  RAN-Local-Repo-Push, slave jobs check out the pre-merged branch from
  the internal mirror via SCM RAN-Local-Repo-Push extended:
- mergeWithTarget boolean parameter makes the merge optional (skipped on
  direct push events) source/target remotes replace reliance on origin,
- targetRepo is now a configurable parameter to support fork-based MRs
- CreateTag() removed from Python - testBranch and testRepository
  (default: internal mirror) are computed in the Jenkinsfile and passed
  directly, two optional override parameters (customBranch,
  customRepository) allow targeting a non-default branch or repo
- create_workspace.sh is reduced to git clone --depth=1 --branch
- all eNB_/ran-prefixed Jenkinsfile parameters and Python CLI arguments
  renamed to neutral names (sourceBranch, sourceCommit, workspace,
  repository,...), both old and new names accepted during the transition
  period

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 17:09:35 +02:00
Bingyu Zhou
86744b8d01 Expose SRS and RSRP measurements through T tracer
Add T trace events for SRS least-squares channel estimate samples and individual MAC RSRP reports. These traces support indoor positioning research and offline dataset generation through the existing OAI tracing workflow instead of custom CSV logging.

Signed-off-by: Bingyu Zhou <s240331012@stu.cqupt.edu.cn>
2026-05-22 22:14:30 +08:00
Robert Schmidt
40028ef0ce Remove unused variables d_to_be_cleared
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 15:26:01 +02:00
Robert Schmidt
b506115bf9 cmake: Move physim macros to global scope
A later commit (for LDPC CUDA) will reuse add_physim_test(), but is in a
completely different location than the existing physim test definitions.
Hence, move it to global scope for later reuse.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 15:26:01 +02:00
Raymond Knopp
a47d958636 Add a log to signal LDPC segment decode NOK
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 15:26:01 +02:00
Raymond Knopp
aaf2e2aed9 LDPC interface: init: provide number of PxSCH
Provide the memory buffer size for storing LLRs across HARQ rounds. then
we don't need to check for this in the API users.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 15:26:01 +02:00
Raymond Knopp
28cff29178 Simplify TB_parameters, c, d, d_to_be_cleared
The upcoming LDPC CUDA offload library needs a contiguous buffer instead
of individual segments. Correspondingly, change the interface to
accommodate this need, in the CPU slot decoding library and AAL.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 15:26:01 +02:00
Raymond Knopp
aab585900b LLR type and optimization
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 09:35:08 +02:00
Robert Schmidt
528da705df Increase measurement coverage for better reporting
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 09:35:08 +02:00
Raymond Knopp
a53545da38 Align to 64 bytes
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 09:35:07 +02:00
Robert Schmidt
dc3011c298 Remove #ifndef PHYSIM from openairinterface5g_limits.h
git grep -w PHYSIM shows no definition of PHYSIM anywhere.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 09:35:07 +02:00
Robert Schmidt
d7531cfe15 Remove usage of non-existing EMOS define
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-22 09:35:07 +02:00
Robert Schmidt
77db1ac9c0 Rename CUDA channel sim cmake option to ENABLE_CHANNEL_SIM_CUDA
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>
2026-05-22 09:34:36 +02:00
Jaroslava Fiedlerova
137fa62d6c CI: Shorten HTML header
Information about sourceBranch and sourceCommit is already encoded in
the testBranch name, making it redundant in the HTML header.
Also remove the Job Trigger and Target Branch lines, as these parameters
provide limited value and are not particularly relevant for the report.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 23:53:02 +02:00
Jaroslava Fiedlerova
78108290ab CI: drop server index from workspace description in XML test files
"Create new Workspace for server 0/1" no longer makes sense now that
workspace creation is not tied to a specific server index.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 23:47:55 +02:00
Jaroslava Fiedlerova
5a4c1c5fd9 CI: Rename and cleanup python main args
eNB_SourceCodePath --> workspace
ranRepository      --> repository
ranBranch          --> branch
ranCommitID        --> commitID
ranTargetBranch    --> targetBranch

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 23:47:55 +02:00
Robert Schmidt
ac6c40b1f2 Merge remote-tracking branch 'origin/aerial-srs-time-position-fix' into integration_2026_w21 (!4117)
NR_MAC/PHY: align SRS time_start_position semantics between L2 and L1

Problem

nfapi_nr_srs_pdu_t::time_start_position was being interpreted
inconsistently between OAI MAC (the producer) and the various L1
consumers:

- MAC populated the field with SRS-ResourceMapping.startPosition from
  the RRC config — the value 3GPP defines as an offset counted backwards
  from the end of the slot (TS 38.331).
- L1 consumers (openair1/PHY/NR_TRANSPORT/srs_rx.c,
  openair1/SCHED_NR/phy_procedures_nr_gNB.c) and the MAC's own VRB-map
  consumer (gNB_scheduler_srs.c) all re-derived the absolute symbol
  index with NR_SYMBOLS_PER_SLOT - 1 - time_start_position.

This works for OAI's in-tree soft L1 (every consumer applies the same
inversion), but external FAPI L1s (NVIDIA Aerial / cuBB) treat
time_start_position as the absolute symbol index per the SCF FAPI 222
PDU semantics. The MAC and external L1 therefore disagreed by one symbol
inversion. Net effect: SRS was scheduled on the wrong OFDM symbol, the
RU sampled noise instead of the SRS, and the channel-matrix returned in
SRS.indication was all zeros for almost every occasion.  Fix

Move the inversion to the producer side. MAC populates the PDU with the
absolute symbol index (NR_SYMBOLS_PER_SLOT - 1 - startPosition), and
every consumer uses srs_pdu->time_start_position directly as l0.

The two semantics are mathematically equivalent for OAI's soft L1 (l0 =
NR_SYMBOLS_PER_SLOT - 1 - startPosition either way), so the symbol index
used internally is unchanged on non-Aerial builds. External L1 consumers
now receive the value they expect.  Testing status

- [x] OAI L1 + L2
- [x] Aerial L1 in CAT-B / mMIMO mode
- [x] Aerial L1 in CAT-A mode
- [x] RFsim / nrUE end-to-end loopback:

Reviewed-By: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-21 19:01:59 +02:00
Robert Schmidt
c2e43c025d Merge remote-tracking branch 'origin/u26-f44' into integration_2026_w21 (!4122)
Add Fedora 44/Ubuntu 26 to list of supported distributions

See commits for more details. Includes a minor cleanup. What I tested
for U22/U24/U26 and F44 is

    ./build_oai --ninja -c -I -w USRP --gNB --nrUE

Reviewed-By: Luis Pereira <lpereira@allbesmart.pt>
2026-05-21 17:33:24 +02:00
Robert Schmidt
e518d49517 Merge remote-tracking branch 'origin/cuda13_channel_pipeline_hotfix' into integration_2026_w21 (!4137)
changes in cudaMemadvise/cudaPrefetch API for v13.

Build fails on DGX spark or any Blackwell GPU target without this fix.
It just checks the CUDA version in a couple of places where GPU offload
is used for channel simulation (nr_dlsim,nr_ulsim and
channel_pipeline.cu) and adapts the usage of the CUDA API accordingly.

Reviewed-By: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-21 17:32:47 +02:00
Robert Schmidt
68d9258b54 Merge remote-tracking branch 'origin/make_8x8_work_again' into integration_2026_w21 (!4131)
Fix 8 DL ports

In current develop 8 CSI ports scenario doesn't work because of #1067.
This MR works around that issue by decreasing number of PRBs for PUCCH
F2.

Tested-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 17:32:05 +02:00
Jaroslava Fiedlerova
22365c3d28 CI: Rename and cleanup Jenkinsfile parameters, remove eNB_ prefix
eNB_Repository   --> targetRepo
SourceRepo       --> sourceRepo
eNB_Branch       --> sourceBranch
eNB_CommitID     --> sourceCommit
eNB_MR           --> requestNumber
eNB_mergeRequest --> mergeWithTarget
eNB_TargetBranch --> targetBranch

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:48:41 +02:00
Jaroslava Fiedlerova
f4c8158825 CI: Allow to skip merge with target in RAN-Local-Repo-Push
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:46:38 +02:00
Jaroslava Fiedlerova
63c550802a CI: Make target repo configurable in RAN-Local-Repo-Push
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:46:38 +02:00
Jaroslava Fiedlerova
04c5113bc1 CI: Minor cleanup of Jenkinsfile
Remove duplicated InitiateHtml step

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:46:38 +02:00
Jaroslava Fiedlerova
84299bcd27 CI: replace CreateTag and merge-based workspace logic with explicit branch/repo
Remove CreateTag() and the merge/targetBranch parameters from
CreateWorkspace, passing the final branch name and repository directly
from Jenkins instead. Jenkinsfile computes testBranch and testRepository
(with INTERNAL_REPO as default). create_workspace.sh now does a simple
shallow clone by branch name.

Introduce two optional Jenkins parameters that allow overriding the
default branch reference and git repository URL used across the CI
pipeline.
- customBranch: when set, replaces the entire computed
  {sourceBranch}-{commitID}
- customRepository: when set, replaces INTERNAL_REPO as the git remote
  used by Create_Workspace to clone the source code onto the test node.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-21 16:46:12 +02:00
Robert Schmidt
076c722eb9 build_oai UHD source installation: default to UHD v4.8
Use the current OAI CI default UHD version. Update the documentation to
show how to install a recent version.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:21 +02:00
Robert Schmidt
19e3cbd66a Extend UHD patch to v4.9/v4.10, remove sed
The existing patch (generated through sed) works also in UHD versions
beyond 4.8, so allow to use that.

Further, since sed is confusing, store the patch directly. Update the
dockerfiles so that docker copies the right file for UHD 4.8.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00
Robert Schmidt
3192251471 Add Ubuntu 26 to list of supported distributions
Also, for UHD install from packages, add the right version for both
Ubuntu 24 and Ubuntu 26: in U24, use the currently recommended 4.8, and
bump to latest in U26.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00
Robert Schmidt
2e54a90ad0 build_helper: Remove retry mechanism
The CI does not use installation of UHD from package, hence this
mechanism is not needed (and should not be, anyway).

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00
Robert Schmidt
c803643fad Add Fedora 44 to list of supported distributions
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00
Robert Schmidt
10f94ac56e Merge remote-tracking branch 'origin/fix-csirs-multi-resource' into integration_2026_w21 (!4128)
Iterate all NZP-CSI-RS resources per ResourceSet in scheduler

It was necessary to use 2 CSI-RS resources, but it was discovered that
gNB only transmitted the first one.

nr_csirs_scheduling() was comparing nzp_CSI_RS_ResourceId against an
NZP-CSI-RS-ResourceSetId picked from the first entry of the first
matching CSI-ResourceConfig. This silently filtered out every Resource
whose ID did not happen to match the ResourceSet ID, making setups with
more than one NZP-CSI-RS-Resource per UE impossible: only the first
resource was ever transmitted, while the UE kept scheduling reception
for the remaining ones and reported them as missing (RSRP at the noise
floor).

This MR fixes it, and allows multiple Resources per Set.

Reviewed-By: Francesco Mani <email@francescomani.it>
2026-05-21 10:39:53 +02:00
Robert Schmidt
7da624fc80 Merge remote-tracking branch 'origin/gfni_fix' into integration_2026_w21 (!4136)
hotfix for correct GFNI detection

Currently, GFNI will be activated for all x86 builds which fails on
older machines (prior to skylake or Zen4). This patch just detects GFNI
from the CPUFLAGS and adds only if it is supported by the x86 target.

Includes two ancillary fixes for correctly using CPUFLAGS and DFTS
compiler optimization flag.

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 10:08:23 +02:00
Robert Schmidt
b5179e3c50 Merge remote-tracking branch 'origin/nas-paging' into integration_2026_w21 (!4112)
NAS UE Service Request fixes and improvements for Paging

This MR improves the NAS UE Service Request path and makes
paging-related resume handling more robust. It fixes KSI/KgNB
synchronization, corrects 5G-S-TMSI and encoder/decoder length handling,
and adds Service Accept handling in the NAS_CONN_ESTABLI_CNF path.

It also zero-initializes the initial NAS buffer used during RRC setup
complete to avoid carrying stale data into early NAS message handling.

Reviewed-By: Cedric Roux <cedric.roux@eurecom.fr>
2026-05-21 10:07:57 +02:00
Robert Schmidt
8698186d47 Merge remote-tracking branch 'origin/dl-scheduler-refactor' into integration_2026_w21 (!3902)
Refactor DLSCH/ULSCH scheduler: extract proportional fair policy behind function pointer interface

Motivation

The current `pf_dl()` is a ~600-line monolithic function that mixes
infrastructure concerns (UE iteration, HARQ management, CCE allocation,
MAC PDU generation) with the scheduling policy (PF priority, RB
allocation, MCS selection). This makes it hard to modify the scheduling
strategy, test alternatives, or offload scheduling to a GPU (cuMAC).

This MR refactors the DL and UL schedulers into a clean separation
between **infrastructure** and **policy**, using function pointers for
beam allocation and scheduling decisions. The data structures
(`nr_dl_candidate_t`, `nr_dl_sched_params_t`) are also designed to map
directly to cuMAC's
`cumacCellGrpUeStatus`/`cumacSchdSol`/`CumacCellGrpPrms`, to make future
integration smooth.

Changes

Goodput tracking fix

`dl_thr_ue` now tracks actual goodput in bps (EWMA of SDU byte deltas
per frame) instead of accumulating raw byte counts per slot, which are
not as straightforward to interpret (due to variations in TDD patterns
mostly). The new calculation matches closely with the throughput
measured with e.g. iperf.

Helper extraction from `pf_dl()` and `post_process_dlsch()`

- `find_first_available_rbs()` — first-fit contiguous RB allocation
- `setup_dl_harq_process()` — HARQ process management
- `generate_dl_mac_pdu()` — MAC CE + RLC data + padding
- `fill_dl_tx_request()` — FAPI TX_req filling

New scheduling interface

- **`nr_dl_candidate_t`** — per-UE flat struct with all immutable inputs
  (buffer status, BLER, MCS limits, beam, BWP) and outputs (scheduled,
  rbStart, rbSize, MCS). Kept relatively minimal for now, but it should
  be easy to add more input metrics in the future.
- **`nr_dl_sched_params_t`** — per-beam cell-level context (VRB map,
  available RBs, slot bitmap)

Function pointers (DL)

| Pointer | Default implementation | Role |
|---------|----------------------|------|
| `dl_ri_pmi_select` | `nr_dl_ri_pmi_select_default` | Rank/PMI selection |
| `dl_beam_select` | `nr_dl_beam_select_default` | Beam direction assignment |
| `dl_tda_select` | `nr_dl_tda_select_default` | Time-domain allocation |
| `dl_mcs_select` | `nr_dl_mcs_select_default` | MCS from BLER/SINR |
| `dl_rb_alloc` | `nr_dl_proportional_fair` | PRB allocation (PF policy) |

Function pointers (UL)

| Pointer | Default implementation | Role |
|---------|----------------------|------|
| `ul_ri_tpmi_select` | `nr_ul_ri_tpmi_select_default` | Rank/TPMI from SRS feedback |
| `ul_beam_select` | `nr_ul_beam_select_default` | Beam direction assignment |
| `ul_tda_select` | `nr_ul_tda_select_default` | Time-domain allocation |
| `ul_mcs_select` | `nr_ul_mcs_select_default` | MCS from BLER/SINR |
| `ul_rb_alloc` | `nr_ul_proportional_fair` | PRB allocation (retx first, then PF-sorted new-tx) |

All default implementations are in `gNB_scheduler_dlsch.c` (DL) and
`gNB_scheduler_ulsch.c` (UL).

MCS selection flow

The old `get_mcs_from_bler()` entangled two concerns: updating the BLER
estimate from HARQ feedback and deciding the MCS. These are now split:

- **BLER tracking is infrastructure's job**: `collect_dl_candidates()`
  calls `update_dl_bler_stats()` which updates the BLER estimate from
  HARQ round statistics.
- **MCS selection is the policy's job**: the proportional fair policy
  calls `select_mcs_from_bler()` internally to adapt MCS based on the
  BLER value. A different policy could use an entirely different MCS
  strategy (e.g. cuMAC has its own `mcsSelectionLUT` + OLLA, one could
  decide to opportunistically lower the MCS while increasing the PRB
  allocation for reliability in some cases, etc).

For retransmissions, MCS/number of PRBs are passed as hints so the
policy can use them as-is if desired, but we don't enforce it (adaptive
HARQ possible too: the standard requires us to maintain TBS but in
theory it could be achieved via changing the MCS and number of RBs if we
wanted to).

Refactored flow

`nr_dl_schedule()` (formerly `pf_dl()`):

```
collect_dl_candidates()     → build candidate array from UE list
schedule_dl_ues()           → beam alloc + per-beam policy calls
  for each scheduled candidate → CCE/PUCCH/TBS validation + post_process
```

Beam allocation and scheduling policy are two separate function
pointers, allowing each to be developed and tested independently (with
the goal in the future to add a parameter in the config file for each,
and telnet commands to hotswap).

`schedule_dl_ues()` wraps both into a single function: it first calls
beam allocation to assign candidates to beams, then iterates over beams
and calls the scheduling policy for each one. cuMAC performs joint beam
+ PRB allocation on the GPU, so when integrating later it will replace
`schedule_dl_ues()`.

Future work

- Channel matrix H from SRS on candidates for beam-aware scheduling
- Per-RB channel magnitude derived from SRS on candidates
- Config file parameters and telnet commands for hotswapping policies
- cuMAC integration via `schedule_dl_ues()` replacement

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 19:10:44 +02:00
Bartosz Podrygajlo
4ad9bac90f feat(ci): build tracy-enabled softmodems
Add tracy-enabled softmodems build as part of the optional features
build pipeline.

To build:
docker build . -f ci-scripts/docker/Dockerfile.build.optional.ubuntu --target build-tracy
docker build . -f ci-scripts/docker/Dockerfile.build.optional.ubuntu --target build-imscope

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-20 16:29:52 +02:00
Bartosz Podrygajlo
49b9a15105 feat(ci): add dockerfile for imscope builds
Add a new Dockerfile for optional features of OAI. Currently only imscope
is added but other features could be added in separate stages.

Build using:

docker build . -f ci-scripts/docker/Dockerfile.build.optional.ubuntu

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-20 16:29:52 +02:00
Robert Schmidt
f1043aecfd pbch: tracy: moving TracyCZone() to right function
The TracyCZone() macro stayed, but the function containing it changed in
a previous commit.

Fixes: e4b2125f1e ("Refactor PBCH & PSBCH UE procedures")

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 16:29:52 +02:00
Bartosz Podrygajlo
e518e96fbe fix(imscope): fix build for imscope
This commit moves certain functions and structs around to prevent including
functions taking VLA arguments in imscope C++ source files.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-20 16:29:52 +02:00
Raymond Knopp
7d099f7918 Use no-semantic-interposition for DFTS
This helps the performance: In the FFTs there is a chain like
dft1024->dft256->dft64->dft16 with nested function calls. This improves
the compilers behaviour when handling the nesting.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 15:56:19 +02:00
Raymond Knopp
92b3d5fa87 Correct CPUFLAGS variable
Use the correct variable, CPUINFO does not exist.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 15:52:50 +02:00
Raymond Knopp
7e444cb544 Fix GFNI detection
Currently, GFNI will be activated for all x86 builds which fails on
older machines (prior to skylake or Zen4). Properly detect based on CPU
flags.

Signed-off-by: Raymond Knopp <raymond.knopp@eurecom.fr>
2026-05-20 15:52:35 +02:00
Guido Casati
7c62ed582f NAS UE: handle Service Accept in NAS_CONN_ESTABLI_CNF path
Process Service Accept when it is delivered through NAS connection
establish confirm.

Changes:
- add `FGS_SERVICE_ACCEPT` branch in `NAS_CONN_ESTABLI_CNF` message
  dispatch and call `handle_service_accept

Refs:
- TS 24.501 5.6.1.4, 8.2.17 (Service accept)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-20 11:05:24 +02:00
Guido Casati
607f9c0f33 fix (NAS UE): add Service Request NAS container with PDU status and align security and KgNB sync
Extend the UE 5GS Service Request path to carry `PDU session status`
inside a NAS message container and cipher only that container value when
valid NAS contexts exist. This aligns the initial Service
Request handling with the TS 24.501 rules for non-cleartext IEs.

Treat the generated Service Request as integrity-protected whenever an
integrity context is available, and keep the post-request KgNB refresh
aligned with the NAS UL count used for that protected message.

Changes:
- update `generateServiceRequest()` in `nr_nas_msg.c` to derive a
  `PDU session status` bitmap from configured UE PDU sessions and treat
  it as the non-cleartext trigger for the initial Service Request
- build an inner plain Service Request carrying `PDU session status`,
  place it in the `NAS message container`, cipher only the container
  value with the NAS ciphering context, and keep the outer Service
  Request integrity protected
- extend `fgs_service_request` lib to support optional `PDU session status`
  and `NAS message container` fields
- decode known optional Service Request TLV IEs with a `switch` and skip
  unsupported ones
- add `free_fgs_service_request()` and `eq_fgs_service_request()`
- extend `nas_lib_test` to cover Service Request encoding and decoding
  with `PDU session status`, `NAS message container`, and skipped
  optional IEs, and initialize the test logging/config stubs
- set the outgoing ngKSI with `set_fgs_ksi(nas)` instead of hardcoding
  `NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE`
- move `initialNasMsg->nas_data` allocation into the protected and plain
  branches so each path allocates after its final size accounting
- increment `nas->security.nas_count_ul` after integrity MAC computation
- derive a refreshed KgNB with `derive_kgnb()` and send it through
  `nas_itti_kgnb_refresh_req()` after the protected Service Request is
  built

Refs:
- TS 24.501 §4.4.6 (protection of initial NAS signalling messages)
- TS 24.501 §4.4.4.1 and §4.4.6 allow an initial Service Request to be
  integrity protected and unciphered when a valid 5G NAS security
  context exists and no NAS message container is included.
- TS 24.501 §8.2.16.1 (Service Request message content)
- TS 24.501 §8.2.16.3 (PDU session status)
- TS 24.501 §9.11.3.33 (NAS message container)
- TS 33.501 §6.4.3.1 (NAS integrity inputs)
- TS 33.501 §6.4.4.1 (NAS confidentiality inputs)
- TS 33.501 §6.8.1.2.2 derives KgNB from the UL NAS COUNT of the NAS
  message that moves the UE from CM-IDLE to CM-CONNECTED, unless a
  subsequent NAS Security Mode Complete exists, in which case that newer
  UL NAS COUNT becomes the freshness input.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-20 11:05:24 +02:00
Roberto Louro Magueta
b54afbbc36 Iterate all NZP-CSI-RS resources per ResourceSet in scheduler
Signed-off-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-05-20 09:25:14 +01:00
Jaroslava Fiedlerova
db3b89b5da Merge remote-tracking branch 'origin/bugfix-fft_shift' into integration_2026_w21 (!4127)
Bugfix overflow uint16_t variable when FFT size is 6144

When using USRP X310 and 100 MHz, the sampling rate is 184320000 Msps,
this leads in a FFT size of 6144 that was causing an overflow in the
fft_shift function (6144 * 14 = 86016 > UINT16_MAX)

This bug was introduced recently, by !3834

Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-20 10:13:07 +02:00
Raymond Knopp
bc2029b62a changes in cudaMemadvise/cudaPrefetch API for v13. Build fails on DGX spark or any Blackwell GPU target without this fix.
Signed-off-by: Raymond Knopp <raymond.knopp@eurecom.fr>
2026-05-20 10:02:18 +02:00
Luis Pereira
973db30ea2 Bugfix overflow uint16_t variable when FFT size is 6144
When using USRP X310 and 100 MHz, the sampling rate is 184320, this leads in a FFT size of 6144 that was causing an overflow in the fft_shift function (6144 * 14 = 86016 > MAX_INT_16)

Signed-off-by: Luis Pereira <lpereira@allbesmart.pt>
2026-05-20 08:47:03 +01:00
Robert Schmidt
abb7cbe2bd Merge branch 'clang-20-no-const-init-field-unsafe' into 'develop'
fix(clang): disable default-const-init-field-unsafe

See merge request oai/openairinterface5g!4135
2026-05-20 07:34:24 +00:00
Robert Schmidt
9feed9f4d1 fix(clang): disable default-const-init-field-unsafe
clang was silently upgraded in CI to v21, and now warns

    openair2/RRC/NR/rrc_gNB_UE_context.c:70:24: error: default initialization of an object of type 'rrc_gNB_ue_context_t' (aka 'struct rrc_gNB_ue_context_s') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    openair2/RRC/NR/rrc_gNB_UE_context.c:70:24: error: default initialization of an object of type 'rrc_gNB_ue_context_t' (aka 'struct rrc_gNB_ue_context_s') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    openair2/RRC/NR/rrc_gNB_cuup.c:183:13: error: default initialization of an object of type 'seq_arr_t' (aka 'struct seq_arr_s') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    openair2/RRC/NR/rrc_gNB_cuup.c:185:13: error: default initialization of an object of type 'seq_arr_t' (aka 'struct seq_arr_s') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    openair2/RRC/NR/rrc_gNB_du.c:864:13: error: default initialization of an object of type 'seq_arr_t' (aka 'struct seq_arr_s') with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]

Since this warning is new, and due to -Werror being used, the build now
fails on the same code base. Disable this warning to get it build.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 09:33:38 +02:00
Jaroslava Fiedlerova
92805a4624 Merge remote-tracking branch 'origin/vrtsim-config-file-params' into integration_2026_w21 (!4113)
move vrtsim channel and per-UE param configuration from CLI flags to config file

Add vrtsim channel and per-UE parameter configuration to the gNB config
file. Previously, running a multi-UE vrtsim test required a long list of
CLI flags; these can now be configured directly in the config file under
a vrtsim: section. The gNB can be started with simply:

  sudo ./nr-softmodem -O gnb.sa.band78.106prb.vrtsim.2x2.yaml --device.name vrtsim

Reviewed-By: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-20 08:46:02 +02:00
Robert Schmidt
8a5960461e Merge branch 'rhel-9.8' into 'develop'
!4130: Add RHEL 9.8 to list of supported distributions

See merge request oai/openairinterface5g!4130
2026-05-20 05:55:47 +00:00
Jaroslava Fiedlerova
dc28488e0a Merge remote-tracking branch 'origin/cleanup-sw-archi' into integration_2026_w21 (!4132)
Cleanup conflict leftover in doc/SW_archi.md

Coming from 5c480ffd.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-19 22:19:22 +02:00
Guido Casati
2d05db4819 Cleanup conflict leftover in doc/SW_archi.md
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-19 18:07:20 +02:00
Francesco Mani
fc25f6b075 prevent asserion on PUCCH polar for 8 port CSI by decreasing the number of PRBs in PUCCH F2
Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-19 17:13:13 +02:00
Robert Schmidt
458fd3623a Add RHEL 9.8 to list of supported distributions
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-19 16:26:29 +02:00
francescomani
39812064d4 call functions to configure TDA in nr_mac_config_scc
this is done to be able to set DL TDA after calling config_sched_ctrlSIB1 and knowing the potential configuration of commonControlResourceSet for MUX pattern 3 which duration doesn't depend on the BWP size

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-19 14:21:04 +02:00
Jaroslava Fiedlerova
06fa702c7c CI: switch to full commit ID in DockerHub push stage
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-19 14:11:58 +02:00
Jaroslava Fiedlerova
0a147851b7 CI: Remove doGitLabMerge.sh
Checkout to tested branch is performed via Jenkins SCM checkout from
internal git repository (git@asterix:/home/git/openairinterface5g.git).
Target branch to checkout is given as {sourceBranch}-{sourceCommit},
which was created and pushed to the internal repository in
RAN-Local-Repo-Push stage.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-19 14:11:48 +02:00
Bartosz Podrygajlo
1de706528f fix(phy): prevent division by zero in nr_csi_rs_pmi_estimation
In simulated environments like ZMQ, interference_plus_noise_power (IPN)
can be computed as zero, which could lead to a division-by-zero crash.

Fix this by ensuring `interference_plus_noise_power` is at least 1 at
the beginning of `nr_csi_rs_pmi_estimation()`.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-19 08:49:34 +02:00
Gabriele Gemmi
da5e5892e4 NR_MAC/PHY: align SRS time_start_position semantics between L2 and L1
3GPP RRC SRS-ResourceMapping.startPosition is defined as an offset
counted backwards from the end of the slot (TS 38.331). OAI MAC was
previously passing the raw RRC value straight into the FAPI SRS PDU's
time_start_position field, and every L1 consumer was then re-deriving
the absolute symbol via NR_SYMBOLS_PER_SLOT - 1 - time_start_position.

External L1 implementations (e.g. NVIDIA Aerial / cuBB) interpret
time_start_position as the absolute symbol index where the SRS lives,
which left the MAC and external L1 disagreeing by one inversion. The
result was SRS being scheduled on the wrong OFDM symbol and the
returned channel matrix being all-zero for most occasions.

Make MAC populate time_start_position with the absolute symbol index
(NR_SYMBOLS_PER_SLOT - 1 - startPosition) and remove the matching
inversion from the L1 consumers so the value flows through unchanged.
The UE side and the shared SRS generator are harmonized to the same
absolute-symbol convention so generate_srs_nr can read nr_srs_info->
l_offset directly regardless of caller (gNB or UE).

* gNB MAC: gNB_scheduler_srs.c invert at PDU-build time; consume the
  already-inverted value when computing l0 for the VRB mask.
* gNB PHY: srs_rx.c (fill + get_signal) and SCHED_NR/phy_procedures_
  nr_gNB.c use srs_pdu->time_start_position directly as l0.
* UE MAC: nr_ue_scheduler.c invert at PDU-build time.
* UE PHY: phy_procedures_nr_ue.c consumes srs_config_pdu->time_start_
  position directly as l0.
* Shared SRS generator: nr_phy_common_srs.c reads nr_srs_info->l_offset
  as the absolute symbol index, matching both gNB and UE call sites.
* Simulators: srssim.c and ulsim.c populate both the gNB-side and
  UE-side SRS PDUs with the absolute symbol index so the nr_srssim
  and nr_ulsim unit tests pass with the new convention.

Signed-off-by: Gabriele Gemmi <g.gemmi@northeastern.edu>
2026-05-19 00:52:08 -04:00
Maxime
0c782e3ee3 Add scheduler architecture documentation
Assisted By Claude Code:Opus-4.6

Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-18 16:44:20 -04:00
Maxime
410f1a18d7 Refactor UL scheduler into staged pipeline with pluggable function pointers
Assisted By Claude Code:Opus-4.6

Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-18 16:44:20 -04:00
Maxime
8ed54d7077 Refactor DL scheduler into staged pipeline with pluggable function pointers
Assisted By Claude Code:Opus-4.6

Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-18 16:44:20 -04:00
Merkebu Girmay
fd6c9efa72 move vrtsim channel and per-UE param configuration from CLI flags to config file
Signed-off-by: Merkebu Girmay <merkebu.girmay@openairinterface.org>
2026-05-18 11:45:31 -07:00
Jaroslava Fiedlerova
e5f30d9033 Merge remote-tracking branch 'origin/NR_UE_2_CW_PDSCH' into integration_2026_w21 (!4056)
restructuring of UE DLSCH code to handle 2 codewords

While making changes in another MR I realized the mess in the handling
of 2 codewords in UE DLSCH code. The intention of the MR is not much to
support 2 codewords at the UE but the cleanup the code which currently
in many parts is written confusedly in between support and non-support.

The key point is that the two codewords need to be treated separately as
they have their own modulation and coding scheme and their own
retransmission information.

Reviewed-By: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-18 19:52:55 +02:00
Jaroslava Fiedlerova
ac6443d9ae Merge remote-tracking branch 'origin/bugfix-a3-config' into integration_2026_w21 (!4120)
bugfix: fix A3 event configuration

Reviewed-by: Cedric Roux <cedric.roux@eurecom.fr>
2026-05-18 19:51:07 +02:00
francescomani
e41766d7f6 restructuring of UE DLSCH code to handle 2 codewords
even if 2 codewords are currently not supported and not tested, the way UE handled the possibility of having 2 codewords was messy, in between support and non-support
the intention of this MR is to cleanup the code more than extend the support

Signed-off-by: Francesco Mani <email@francescomani.it>
2026-05-18 17:36:34 +02:00
Daniele Pugliese
418ef390ca bugfix: fix A3 event configuration
Signed-off-by: Daniele Pugliese <daniele.pugliese@poliba.it>
2026-05-18 12:55:03 +02:00
Jaroslava Fiedlerova
f3acdef63a Merge remote-tracking branch 'origin/ue-cap-file-size-fix' into integration_2026_w21 (!4118)
NR UE: remove hardcoded 64KB limit for UE capability file

When trying to parse UE capability file (xml converted from a COTS UE),
there will be an error:

  [NR_RRC] UE Capabilities XER file /home/ue_caps/ue_cap_20260514_172636.xml is too large (65536)

This is fixed by replacing fixed-size stack buffer with heap allocation
sized to the actual file, allowing large UE capability XER files to be
loaded without hitting the previous 65536-byte limit.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-18 11:15:46 +02:00
Robert Schmidt
6fc2d06077 Merge branch 'integration_2026_w20' into 'develop'
Integration `2026.w20`

- !4110 T-tracer: fix UE_PHY_PDSCH_IQ event fields
- !4114 nrUE: fix noise_power_dB field name in config
- !4109 prepare FAPI PUCCH PDU for MSG4 ACK in advance
- !4115 gNB specific RC
- !4042 Fix Wt (orthogonal code) multiplication for PUSCH DMRS length 2 and noise power estimation
- !4101 bug: LTE: avoid RRC use-after-free, NR: gNB-DU config update: verify cell's origin DU
- ci: skip merge commits when validating Signed-off-by
- !4047 XNAP: add encode/decode, helpers, and unit test for Xn Handover Request
- !4119 Remove PUCCH formar limitation in PRB size function
- !4083 nr_rate_matching: replace byte-by-byte repetition loop with memcpy chunks
- !4121 Collect iperf logs if command fails
- !4116 CI: Cleanup of parameters, change of branch and image naming, remove BuildProxy
- CI: Adjust RAN-PhySim-GraceHopper-5G timing thresholds

Closes #1082, #1081, #1087, and #1077

See merge request oai/openairinterface5g!4111
2026-05-16 09:12:55 +00:00
Jaroslava Fiedlerova
428ed54db4 CI: Adjust RAN-PhySim-GraceHopper-5G timing thresholds
!4083 improved encoding time in some nr_dlsim tests running in
RAN-PhySim-GraceHopper-5G pipeline. Update the timing thresholds
accordingly.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-16 10:20:24 +02:00
Jaroslava Fiedlerova
a2719bd9d7 Merge remote-tracking branch 'origin/ci-clone-repo-1' into integration_2026_w20 (!4116)
CI: Cleanup of parameters, change of branch and image naming, remove BuildProxy

MR Summary:

1. Remove merge step from Jenkinsfile-GitLab-Container

Removes the manual git merge step that was previously performed inside
the `RAN-Container-Parent` pipeline before running CI. The
`doGitLabMerge.sh` call and its merge-conflict failure handler are
dropped from the init stage. The `RAN-Local-Repo-Push` stage no longer
wraps triggerSlaveJob in catchError, instead, its failure posts an MR
comment directly on GitLab to report the issue, and abort the follow-up
test stages.

2. Switch to full commit IDs for image and branch naming

Replaces abbreviated 8-character commit hashes with full commit IDs
everywhere they are used to construct Docker image tags and CI branch
names in internal git repository.

3. Remove L2sim proxy build support

For the `RAN-L2-Sim-Test-4G`, the CI now assumes that the required proxy
image is already present on the testing machine. Build proxy step is no
longer needed, since there haven't been any recent updates in the proxy
repo, and the proxyCommit we currently use is outdated anyway.

4. Rename and clean up parameters in Python scripts

Renames legacy ran* / eNB* prefixed attributes to generic names across
all CI Python classes. Also removes duplicate and unused legacy CLI
argument aliases (--eNBRepository, --eNBBranch, --eNBIPAddress, etc.)
from args_parse.py.

|Old name	 |New name        |
|----------------|----------------|
|ranRepository	 |repository      |
|ranBranch	 |branch          |
|ranCommitID	 |commitID        |
|ranAllowMerge	 |merge           |
|ranTargetBranch |targetBranch    |
|eNBSourceCodePath|workspace      |

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-15 14:57:18 +02:00
Jaroslava Fiedlerova
5f4aff8a1d Merge remote-tracking branch 'origin/ci-iperf-fail-logs' into integration_2026_w20 (!4121)
Collect iperf logs if command fails

The Iperf_Module() checks that the iperf3 command succeeds successfully,
but in case of failure, does not collect the actual logs. Thus, only a
somewhat unhelpful

  Iperf client command failed on X -> Y (return code: ZZZ)

is logged, and it might not be clear why it fails. In this command,
always try to collect the logs, which might contain the actual error.

Fixes: f02c84fc ("CI: enable PCF-based dual-DNN multi-QoS in 25PRB
RFSim")

Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:54:50 +02:00
Jaroslava Fiedlerova
9e4308030b CI: Rename and cleanup parameters inside python
isMergeRequest     --> merge
eNB_SourceCodePath --> workspace
ranBranch          --> branch
ranCommitID        --> commitID
ranTargetBranch    --> targetBranch
ranRepository      --> repository

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:11:00 +02:00
Jaroslava Fiedlerova
228dad1ec2 CI: Remove L2sim proxy build support
Remove the `BuildProxy` method, `Build_Proxy` action, `proxyCommit`
attribute, and all associated XML configuration and unit tests.

The oai-lte-5g-multi-ue-proxy repository has not received any updates
in over two years, and the proxy commit currently used for the build
is outdated as well. Although the proxy image is still required by
RAN-L2-Sim-Test-4G and must remain available on the test machine,
building it as part of the CI pipeline is dropped in this commit.

Instead, the CI will now assume that the corresponding proxy image is
already present as an external dependency, similarly to how CN images
are handled.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:11:00 +02:00
Jaroslava Fiedlerova
d39a40dba2 CI: Switch to full commit IDs for image naming
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:11:00 +02:00
Jaroslava Fiedlerova
181b5d89f8 CI: Switch to full commit IDs for branch naming
Simplify branch handling in CI by removing reliance on shortened commit
hashes and using full commit IDs. This allows to specify branch during
SCM checkout in Jenkins pipeline.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:11:00 +02:00
Jaroslava Fiedlerova
870454d13d CI: Remove merge step from Jenkinsfile-GitLab-Container
The RAN-Container-Parent pipeline retrieves the Jenkinsfile-GitLab-Container
from the develop branch (or from the branch specified for SCM checkout).

The only potential impact of this change concerns modifications to
ci-scripts/checkGitLabMergeRequestLabels.sh. In such cases, updates from the
source branch would not be considered, and the version from develop would be
used instead. This limitation is acceptable, as this script is going to be
removed in the future.

Merge conflict checks are handled in the Local-Repo-Push stage, where the
source branch is merged with the target branch, and the resulting testing
branch is pushed to the internal repository.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-15 14:11:00 +02:00
Robert Schmidt
dd424a2e0c Collect iperf logs if command fails
The Iperf_Module() checks that the iperf3 command succeeds successfully,
but in case of failure, does not collect the actual logs. Thus, only a
somewhat unhelpful

    Iperf client command failed on X -> Y (return code: ZZZ)

is logged, and it might not be clear why it fails. In this commit,
always try to collect the logs, which might contain the actual error,
and only add the diagnostic message at the end of the Iperf report
message.

Fixes: f02c84fcfc ("CI: enable PCF-based dual-DNN multi-QoS in 25PRB
    RFSim")

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-15 13:28:36 +02:00
Robert Schmidt
e83867a505 Merge remote-tracking branch 'origin/rate-matching-memcpy' into integration_2026_w20 (!4083)
nr_rate_matching: replace byte-by-byte repetition loop with memcpy chunks

Currently, in the rate matching, in the low MCS case, we copy byte by
byte which is slow and causes jitter with high number of UEs.

This replaces the loop with chunked memcpy

Here is a benchmark with 128 UEs (done with the tool of !4028 adapted to
work with !3902)

Before:

    === Results: 128 UEs, 273 RBs, MCS 28, 10000 slots (warmup 5) ===
      Avg PDSCH/slot: 1.1 / 128 UEs
      Slot budget: 500 us (mu=1)

      Phase            mean      p50      p90      p99      max
                       (us)     (us)     (us)     (us)     (us)
      ------------------------------------------------------------------
      Scheduler        56.4     47.3     97.9    133.1    274.7
      PHY TX           53.3     47.9     72.9     87.6    320.3
      Total           109.7     97.1    142.6    187.3    435.8
      ------------------------------------------------------------------
      Max total 435.8 us at iter 8528

      Breakdown                            /slot     /call       max   calls
                                            (us)      (us)      (us)
      ---------------------------------------------------------------------------
      Scheduler:
        Total                               60.6      48.5     223.5   12498
          RA scheduling                        -           -           -       0
          UL scheduling                      0.0       0.0       0.1   12498
          DL scheduling (PDCCH+PDSCH)       41.4      33.1     111.4   12498
            RLC data req                     0.8       0.9       6.9    9150
      PHY TX:
        Total                                  -           -           -       0
          DCI generation                       -           -           -       0
          DLSCH encoding                    24.2      24.2     289.2   10000
            segmentation                     0.2       0.2       0.8   11440
            rate matching                   10.5       9.2     275.5   11440
            scrambling                       0.8       0.7      16.5   11440
          DLSCH modulation                   2.9       2.6       9.0   11440
          layer mapping                      6.3       5.5       8.2   11440
          precoding                          6.6       0.5       1.0   138760
          resource mapping                   2.2       0.2       3.0   138760
          phase compensation                 3.3       3.3       3.5   10000
      ---------------------------------------------------------------------------

After:

    === Results: 128 UEs, 273 RBs, MCS 28, 10000 slots (warmup 5) ===
      Avg PDSCH/slot: 1.1 / 128 UEs
      Slot budget: 500 us (mu=1)

      Phase            mean      p50      p90      p99      max
                       (us)     (us)     (us)     (us)     (us)
      ------------------------------------------------------------------
      Scheduler        57.9     48.4    100.4    134.2    462.5
      PHY TX           53.7     48.3     73.3     87.9    131.9
      Total           111.6     99.0    145.9    189.0    512.4
      ------------------------------------------------------------------
      Max total 512.4 us at iter 8367
      WARNING: max total (512 us) exceeds slot budget (500 us)!

      Breakdown                            /slot     /call       max   calls
                                            (us)      (us)      (us)
      ---------------------------------------------------------------------------
      Scheduler:
        Total                               62.3      49.8     226.3   12498
          RA scheduling                        -           -           -       0
          UL scheduling                      0.0       0.0       0.1   12498
          DL scheduling (PDCCH+PDSCH)       42.3      33.8     111.4   12498
            RLC data req                     0.8       0.8       6.6    9150
      PHY TX:
        Total                                  -           -           -       0
          DCI generation                       -           -           -       0
          DLSCH encoding                    24.3      24.3      86.8   10000
            segmentation                     0.2       0.2       0.8   11440
            rate matching                   10.5       9.2      22.0   11440
            scrambling                       0.8       0.7      15.2   11440
          DLSCH modulation                   3.0       2.6       9.6   11440
          layer mapping                      6.4       5.6       8.3   11440
          precoding                          6.6       0.5       1.0   138760
          resource mapping                   2.2       0.2       3.1   138760
          phase compensation                 3.3       3.3       3.5   10000
      ---------------------------------------------------------------------------

Reviewed-By: Francesco Mani <email@francescomani.it>
2026-05-15 08:48:07 +02:00
Robert Schmidt
76b7972bc0 Merge remote-tracking branch 'origin/issue_1077' into integration_2026_w20 (!4119)
Remove PUCCH formar limitation in PRB size function

F3 can be handled same way as F2 according to 9.2.5.2 of 38.213

Closes #1077

Reviewed-By: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-15 08:41:06 +02:00
Alex Jiao
ebd5fc9a5f NR UE: fix UECapabilityInformation encoding buffer size in UL-DCCH message
Replace hardcoded 500-byte stack buffer with MAX_UE_NR_CAPABILITY_SIZE + 16

Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
2026-05-15 10:19:20 +08:00
Robert Schmidt
782ede870e Merge remote-tracking branch 'origin/xn-encdec-handover-messages' into integration_2026_w20 (!4047)
XNAP: add encode/decode, helpers, and unit test for Xn Handover Request

- Add Xn Handover Request message type definitions.
- Implement encoder and decoder for Xn Handover Request. Xn Handover
  Request (3GPP TS 38.423 v16.2.0 §9.1.1.1)
  * Source NG-RAN node UE XnAP ID (M)
  * Cause (M)
  * Target Cell Global ID (M)
  * GUAMI (M)
  * UE Context Information (M)
  * UE History Information (M)
* Add equality check and memory management helpers.
* Extend XNAP library unit tests to cover Handover Request encode/decode
* Add required ASN.1 includes.
* Add utility conversions for:
  * KGNB* handling.
  * BIT_STRING_TO_NR_CELL_IDENTITY (modified to avoid upperbound overflow).

Reviewed-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-14 19:32:44 +02:00
Alex Jiao
9a858c4387 NR UE: remove hardcoded 64KB limit for UE capability file
Replace fixed-size stack buffer with heap allocation sized to the
actual file, allowing large UE capability XER files to be loaded
without hitting the previous 65536-byte limit.

Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
2026-05-14 23:38:37 +08:00
francescomani
9d35b9028c remove format limitation in compute_pucch_prb_size
F3 can be handled same way as F2 according to 9.2.5.2 of 38.213

Signed-off-by: francescomani <email@francescomani.it>
2026-05-14 15:23:07 +02:00
Rakesh BB
8a0be83745 XNAP: add Xn Handover Request enc-dec+unit_test
- Add Xn Handover Request message type definitions.
- Implement encoder and decoder for Xn Handover Request.
  Xn Handover Request (3GPP TS 38.423 v16.2.0 §9.1.1.1)
  - Source NG-RAN node UE XnAP ID (M)
  - Cause (M)
  - Target Cell Global ID (M)
  - GUAMI (M)
  - UE Context Information (M)
  - UE History Information (M)
- Add equality check and memory management helpers.
- Extend XNAP library unit tests to cover Handover Request encode/decode
- Add required ASN.1 includes.
- Add utility conversions for:
  - KGNB* handling.
2026-05-13 16:12:57 +00:00
Rakesh BB
7c29d27487 fix: cast buf bytes to uint64_t before shifting in BIT_STRING_TO_NR_CELL_IDENTITY
Without explicit casts, each buf byte was promoted to a 32-bit signed
int before shifting. For NR Cell Identity (36-bit, per 3GPP TS 38.423
§9.2.2.9), this causes two problems:

  - Shifting buf[0] left by 28 can push bits into or past the sign bit,
    producing undefined/implementation-defined behavior.
  - The 32-bit intermediate result is too narrow to hold a 36-bit value,
    causing silent truncation before the OR-reduction.

Fix by casting each byte to uint64_t prior to the shift, ensuring all
intermediate expressions are evaluated in a 64-bit unsigned domain and
all 36 bits are preserved without overflow.
2026-05-13 15:14:24 +00:00
Shubhika Garg
5fd1f07e7e ci: skip merge commits when validating Signed-off-by
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-05-13 13:58:35 +02:00
Jaroslava Fiedlerova
c0835cca75 CI: remove unused parameters from args_parse.py
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-13 12:17:16 +02:00
Jaroslava Fiedlerova
f39fb4a84b Merge remote-tracking branch 'origin/lte-nr-fixes' into integration_2026_w20 (!4101)
bug: LTE: avoid RRC use-after-free, NR: gNB-DU config update: verify
cell's origin DU

See commits for more details

Reviewed-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-13 11:45:10 +02:00
Jaroslava Fiedlerova
2d9ed6adc4 Merge remote-tracking branch 'origin/pusch_dmrs_bug_fix' into integration_2026_w20 (!4042)
Fix Wt (orthogonal code) multiplication for PUSCH DMRS length 2 and
noise power estimation

This MR:
- Introduce PUSCH DMRS length as a configurable parameter in nr_ulsim.
- Fix bugs related to the use of PUSCH DMRS length 2.
- Fix the noise power estimation.

Note:
- Still cannot validate PUSCH DMRS length 4, since we need more than 5
  layers (DMRS type 1) / 6 layers (DMRS type 2) to test the orthogonal
  spreading over time.
- Yet to implement time domain averaging for PUSCH DMRS length 2 to
  separate orthogonally over time.
- The main bug here is the noise power estimation (removes the duplicate
  division with the number of antennas).

    Reviewed-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-05-13 11:44:32 +02:00
Jaroslava Fiedlerova
b5c460b17f Merge remote-tracking branch 'origin/gnb_ran_context' into integration_2026_w20 (!4115)
gNB specific RC

This is the framework of #1065 towards remove LTE cross compilation in
NR

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-13 11:43:57 +02:00
Jaroslava Fiedlerova
2214ecd81a Merge remote-tracking branch 'origin/issue_1087' into integration_2026_w20 (!4109)
prepare FAPI PUCCH PDU for MSG4 ACK in advance

Closes #1087

Reviewed-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-13 11:43:21 +02:00
Jaroslava Fiedlerova
c555682fdc Merge remote-tracking branch 'origin/fix-typo-config' into integration_2026_w20 (!4114)
nrUE: fix `noise_power_dB` field name in config

Fixes 0b684732 (!2869)

Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-13 11:42:26 +02:00
Jaroslava Fiedlerova
c89fe9737f Merge remote-tracking branch 'origin/fix-ue-t-tracer' into integration_2026_w20 (!4110)
T-tracer: fix UE_PHY_PDSCH_IQ event fields

1. The field was named N_RB_UL and used fp->N_RB_UL in both LTE and NR
   demodulation code, but it should use N_RB_DL for PDSCH
2. The tracer ue.c referenced the wrong buffer field name "pusch_comp"
   instead of "pdsch_comp", causing a crash on startup

Reviewed-by: Cedric Roux <cedric.roux@eurecom.fr>
2026-05-13 11:41:27 +02:00
francescomani
36ed4d9ff1 get gnb ownership of RC to avoid compiling ENB_APP_SRC in NR
Signed-off-by: francescomani <email@francescomani.it>
2026-05-12 18:42:58 +02:00
Guido Casati
d59a0a1a37 fix (NAS UE): decode FGC NAS container length as 16-bit IE
Decode the FGC NAS message container length from the encoded 2-octet
field before validating and copying the payload. This matches TS
24.501, where the NAS message container is a type 6 TLV and its length
is carried in octets 2-3.

Changes:
- add `<arpa/inet.h>` for `ntohs`
- change `ielen` from `uint8_t` to `uint16_t` in
  `decode_fgc_nas_message_container()`
- read the encoded length with `memcpy`, convert it from network byte
  order, and advance the decode pointer by `sizeof(uint16_t)`

Refs:
- TS 124 501 clause 9.11.3.33 "NAS message container"

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-12 16:02:15 +02:00
Shubhika Garg
04a9145fe1 nrue: fix noise_power_dB field in config file
- Fixes 0b684732ee ("YAML as a drop-in replacement for libconfig")

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-05-12 10:52:03 +02:00
Guido Casati
cc8124837a fix (NAS UE): derive outgoing KSI from integrity context
Use the stored NAS KSI only when a valid integrity context is present,
instead of treating idle mode alone as proof that no KSI is available.
This keeps outgoing initial NAS messages aligned with the actual NAS
security state tracked by the UE (including when in IDLE state).

Changes:
- update `set_fgs_ksi()` in `openair3/NAS/NR_UE/nr_nas_msg.c` to return
  `*nas->ksi & 0x07` only when `security_container`,
  `integrity_context`, and `nas->ksi` are present
- remove the unconditional `FGS_IDLE` check and the hardcoded `0x0`
  return path
- keep `NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE` as the fallback when no
  valid integrity context is available

Refs:
- TS 24.501 (Service Request and ngKSI/security context handling)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 17:55:52 +02:00
Guido Casati
3a3629f88a fix (NAS UE): expose kgnb refresh API in NAS header
Move the `nas_itti_kgnb_refresh_req()` declaration to the NAS UE header
so call sites use a single shared prototype.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 17:51:30 +02:00
Guido Casati
db3a2b42cd fix (NAS UE): account for proper 5G-S-TMSI size in Service Request builder
Correct the encoded-size contribution returned by `fill_fgstmsi()` so
Service Request buffer sizing includes the full 5GS mobile identity field.

Changes:
- update `fill_fgstmsi()` return value from 10 to 11 octets: 2-octet length
  field plus 7-octet 5G-S-TMSI payload

Refs:
- TS 24.501 8.2.16 (Service request)
- TS 24.501 9.11.3.4 (5GS mobile identity)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 17:49:00 +02:00
Guido Casati
8a6f1a6775 fix (NAS UE): harden Service Request decode length checks
Add defensive initialization and minimum-length validation in Service
Request decoding.

Changes:
- zero-initialize `fgs_service_request_msg_t` at decode entry
- return error when input length is shorter than the first mandatory octet
- add guard before decoding 5GS mobile identity length field to prevent
  out-of-bounds access

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 17:48:37 +02:00
Guido Casati
12c6d8d3e4 fix (NAS UE): account for Service Request encoder length
Fix remaining length tracking in Service Request encoding so IE
encoding uses the proper buffer budget per step.

Changes:
- decrement `len` by fixed per-field sizes instead of cumulative `encoded`

Refs:
- TS 24.501 8.2.16 (Service request)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 17:47:35 +02:00
Guido Casati
220ef3cdeb fix (RRC UE): zero-initialize initial NAS buffer in RRC setup complete
Initialize the local NAS message container before it is used in the
RRCSetupComplete generation path to avoid undefined state from stack data.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-11 16:58:44 +02:00
Alex Jiao
7026366b5d T-tracer: fix UE_PHY_PDSCH_IQ event fields
1. The field was named N_RB_UL and used fp->N_RB_UL in both LTE and NR
  demodulation code, but it should use N_RB_DL for PDSCH
2. The tracer ue.c referenced the wrong buffer field name "pusch_comp"
  instead of "pdsch_comp", causing a crash on startup

Signed-off-by: Alex Jiao <alex.jiao@keysight.com>
2026-05-11 11:15:35 +08:00
francescomani
b29e7bc2c6 prepare FAPI PUCCH PDU for MSG4 ACK in advance
Signed-off-by: francescomani <email@francescomani.it>
2026-05-10 10:33:11 +02:00
Rakesh Mundlamuri
4e6e0e529d Minor fixes and harmonize maximum number of segments for DL and UL
Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-09 12:24:03 +05:30
Jaroslava Fiedlerova
d191447a01 Merge branch 'integration_2026_w19' into 'develop'
Integration `2026.w19`

* ci: post MR validation comments only on warnings or errors in pre-ci-check
* ci: skip merge-commit validation for integration branches
* !4088 fixing wrong logic for SIMO and MISO AWGN channels
* !4052 Add OAI - WNC gNB config file
* !4091 Fix build with unit tests, build all in CI
* !4089 Fixing broken nr-cu-nrppa-test simulator and nr-ue-nas-simualtor
* !4099 Allow control signal level at input of OFDM modulator
* !4092 Remove more unused parameters
* !4102 nr-cuup-load-test: avoid unaligned memory access
* !4077 Update microamp FR2 doc for firmware 0.1.174
* !3960 fix: issue 1054 - Config: Creating New Array members via command line arguments
* !3810 UE symbol based PBCH, PSBCH receiver
* !4103 Update CN5G images to stable release `v2.2.1`
* !3814 Multi-QoS Handling and PDU Session Modify
* !4064 FAPI: fix UCI payload byte length for bit_len multiples of 8
* !4078 [M-plane] Improvements, fixes + Add CI M-plane pipeline

Closes #1054, #1075, and #541

See merge request oai/openairinterface5g!4095
2026-05-07 19:07:13 +00:00
Rakesh Mundlamuri
5fcf815c56 Fix time domain averaging to average over number of layers
Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-07 22:20:52 +05:30
Rakesh Mundlamuri
e557ffdc57 Fix Wt (orthogonal code) multiplication for PUSCH DMRS length 2
Also fixes noise power computation removing the duplicate division over
number of antennas

Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-07 22:20:50 +05:30
Jaroslava Fiedlerova
328c4bc5fa Merge remote-tracking branch 'origin/ci-test-mplane' into integration_2026_w19 (!4078)
[M-plane] Improvements, fixes + Add CI M-plane pipeline

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-07 15:28:57 +02:00
Jaroslava Fiedlerova
58942c31a5 Merge remote-tracking branch 'origin/cubb_rusim_uci_unpack' into integration_2026_w19 (!4064)
FAPI: fix UCI payload byte length for bit_len multiples of 8

Problem
When testing with cuBB as the FAPI PNF (L1) and ruSIM, the VNF (OAI L2)
was consistently failing to unpack UCI.indication messages containing
PUCCH format 2/3/4 PDUs with CSI-1 reports:

  vnf_handle_nr_uci_indication: Failed to unpack message
  pullarray8: pullarray8 no space in buffer

Root cause
All variable-length payload fields in the UCI pack/unpack functions
(HARQ, SR, CSI-1, CSI-2) computed their byte length as:
  const uint16_t csi_len = bit_len / 8 + 1;
This formula seems wrong for any bit_len that is an exact multiple of 8.
For example, bit_len=8 gives csi_len=2, but 8 bits fit in exactly 1
byte. The correct ceiling division is (bit_len + 7) / 8.
cuBB packs CSI-1 payload bytes using the correct formula, so for an
8-bit CSI codebook it sends 1 byte. OAI's unpacker computed csi_len=2
and called pullarray8 requesting 2 bytes from a buffer with only 1
remaining, triggering the error.
The failure was also specific to PUCCH 2/3/4 (and would affect PUSCH
UCI) because PUCCH 0/1 carries no variable-length byte arrays — its HARQ
payload is packed as individual uint8 values per ACK bit, so pullarray8
is never called.

Diagnosis
Added NFAPI_TRACE_NOTE logging throughout the unpack chain (enabled via
NFAPI_TRACE_LEVEL=note) to trace PDU type, bitmap, computed lengths, and
buffer remaining bytes at each branch. The following sequence confirmed
the exact failure site:

  [N] unpack_nr_uci_indication: sfn=592 slot=9 num_ucis=1 buf_remaining=21
  [N] unpack_nr_uci_indication: unpacking UCI[0/1] buf_remaining=21
  [N] unpack_nr_uci_indication_body: pdu_type=2 pdu_size=21 buf_remaining=17
  [N] unpack_nr_uci_pucch_2_3_4: PUCCH-2/3/4 rnti=0x5c2d pucch_format=0 pduBitmap=0x04 buf_remaining=4
  [N] unpack_nr_uci_pucch_2_3_4: PUCCH-2/3/4 CSI-1 csi_part1_bit_len=8 csi_len=2 buf_remaining=1
  [N] unpack_nr_uci_pucch_2_3_4: PUCCH-2/3/4 CSI-1 about to pullarray8 csi_len=2 buf_remaining=1
  [E] pullarray8: pullarray8 no space in buffer

This was also cross-checked against a pcap capture of the nvipc
interface, which confirmed cuBB sends PDUSize=21 with 1 byte for the
8-bit CSI-1 payload — consistent with (8+7)/8 = 1.

Tentative Fix
Replace bit_len / 8 + 1 with (bit_len + 7) / 8 at all 14 affected sites
across both pack and unpack functions for PUSCH, PUCCH 0/1 (SR/HARQ),
and PUCCH 2/3/4 (SR, HARQ, CSI-1, CSI-2) in nr_fapi_p7.c.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-05-07 15:03:21 +02:00
Jaroslava Fiedlerova
3b8f5c7191 Merge remote-tracking branch 'origin/rrc-qos-handling' into integration_2026_w19 (!3810)
Multi-QoS Handling and PDU Session Modify

This MR implements comprehensive QoS flows handling and PDU Session
Modify procedures in the RRC layer, enabling full support for multiple
QoS flows per DRB and dynamic QoS management per 3GPP specs. Key
changes:

1. Multi-QoS Flows Support

- Multiple QoS flows per DRB: Support for multiple QoS flows mapped to a
  single DRB
- Intelligent QoS-to-DRB mapping: Implements resource-type-aware
  multiplexing based on 3GPP TS 23.501 Table 5.7.4-1
  - DC-GBR flows (5QI 82-90): Dedicated DRB, max 1 flow per DRB
  - GBR flows (5QI 1-4, 65-67, 71-76): Max 2 flows per DRB
  - Non-GBR flows (5QI 5-11, 69-70, 79-80): Max 5 flows per DRB
  - Aggregate cap: Maximum 5 flows per DRB
- 5QI validation: Early validation of standardized 5QI values (1-9,
  65-90) during QoS flow setup/modify

2. PDU Session Modify Procedures

- Complete E1AP/RRC integration: Full Bearer Context Modification
  support with DRB lifecycle management
  - DRB To Setup/Modify/Remove lists: Complete support for all DRB
    operations in Bearer Context Modification
- QoS flow operations: Support for QoS flow add, modify, and release
  operations
  - QoS flow mapping: Proper handling of QoS flow modifications in
    DRB To Modify List
- Automatic DRB management: DRB setup, modification, and removal
  based on QoS flow changes. Reuse existing DRBs if the incoming QoS
  flow is compatible.
- Delayed transactions: PDU Session Modify added to delayed
  transactions list for proper sequencing

3. GTP-U Tunnel Refactoring

- Architecture alignment:
  - N3 tunnels: 1 per PDU session with QFI marking, container for
    multiple bearers, supporting multiple QoS flows
  - F1-U tunnels: 1 per DRB without QFI marking
- SDAP ownership of QoS: move QoS management to be fully owned by
  SDAP

4. QoS Enhancements

- Dynamic5QI support: Full support for Dynamic5QI with packet delay
  budget and packet error rate
- GBR QoS flows: Support for Guaranteed Bit Rate QoS flows with
  GFBR/MFBR parameters
- DRB QoS aggregation: DRB-level QoS computed from all mapped QoS
  flows using ARP priority (not 5QI priority)
- QoS priority level refactoring: Proper type definitions per 3GPP
  TS 23.501 (QoS Priority Level: 1-127, ARP Priority Level: 1-15)

Technical Changes

RRC Layer

- Refactored `nr_rrc_add_bearers()` to support intelligent QoS-to-DRB
  mapping
- Added `nr_rrc_update_qos()` for QoS flow add/modify with automatic DRB
  assignment
- Implemented `nr_rrc_update_pdusession()` for QoS flow release and DRB
  cleanup
- Consolidated F1 UE Context Modification Request handling
- Simplified PDU status tracking by removing intermediate states
- Added QoS flow and DRB removal utilities
- Updated RRC bearers tests with comprehensive multi-QoS testing
- Adapted `nr-cuup-load-test.c` to new GTP design

NGAP Layer

- Extended PDU Session Resource Modify Request Transfer with QoS
  add/modify/release lists
- Added proper type definitions (`pdusession_mod_req_transfer_t`,
  `qos_flow_to_release_t`)
- Fixed NGAP PDU Session Modify transfer encoding

GTP-U Layer

- Refactored tunnel creation API: scalar fields instead of arrays
- Split tunnel creation into `n3_gtpu_create()` and
  `f1_drb_gtpu_create()`
- Added bearer-to-QFI mapping structure (`gtpv1u_rb_t`)
- Implemented QFI de-duplication and one-to-one QFI-to-bearer mapping
- Reduced inter-dependencies between LTE and NR

SDAP Layer

- Fixed default DRB tracking: Only one default DRB per SDAP entity per
  PDU session (TS 37.324)
- Set default DRB to first DRB added when creating bearers

F1AP Layer

- Added GBR QoS Flow Information IE handling in CU
- Implemented DRB QoS aggregation from multiple QoS flows
- Extended F1AP test cases to support multiple QoS flows

Code Quality Improvements

- Improved error handling throughout the stack
- Enhanced logging and debugging capabilities
- Added comprehensive unit tests for multi-QoS scenarios
- Improved type safety and validation

Testing

The code was validated with Open5gs v2.7.6, OAI CN5G and COTS UE.

How to reproduce with Open5gs:

1. Start Open5gs
2. From the Open5gs web UI: add multiple QFIs to the same DNN.
3. Restart Open5gs
4. Run gNB and UE

The user will see the following:

1. QoS flows arrive via NGAP PDU Session Setup/Modify requests, each
   with a QFI and 5QI.
2. The gNB assigns each flow to a DRB, creating a new DRB or reusing an
   existing one based on 5QI compatibility (compatible flows, i.e. same
   5QI characteristics, share a DRB)
3. At the SDAP layer, packets are tagged with QFI headers; at the GTP-U
   layer, uplink packets include QFI in the PDU Session Container for
   core network mapping.

Documentation

- Added comprehensive QoS flows handling documentation with 3GPP
  standards references
- Updated PDU Session Modify sequence diagrams

Note

* This implementation aligns with:
  - 3GPP TS 23.501 (QoS framework)
  - 3GPP TS 38.413 (NGAP)
  - 3GPP TS 37.324 (SDAP)
  - 3GPP TS 38.463 (F1AP)
  - 3GPP TS 29.281 (GTP-U)
  - 3GPP TS 38.331 (RRC)
* Multi-QoS and PDU Session Modify are both added to this MR since QoS
  flows update is triggered by PDU Session Modify in some scenarios
  (e.g. with Open5gs, used for validation).
* Core functional changes introduced by commits with prefix "QoS
  Handling" or "PDU Session Modify"
* This MR replaces the old !2703.
* This MR adopts relevant CU changes from !2836, namely:
  * Adds new shared QoS types
  * Add standardized 5QI table and helper
  * Dynamic5QI support + validation
  * Computation of DRB QoS (aggregate QoS) and priority/GBR
  * F1AP DRB-level QoS
* Closes #541 (5QI validation)
* Closes #1075 (Optional NAS-PDU in PDU Session Setup Request)

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-07 14:52:10 +02:00
Jaroslava Fiedlerova
c42928773b CI: Add RAN-SA-FHI72-MPLANE-CN5G into CI doc
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:05:31 +02:00
Jaroslava Fiedlerova
439d0d9d8d CI: Add RAN-SA-FHI72-MPLANE-CN5G into parent CI pipeline
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:05:31 +02:00
Teodora Vladić
695cdb4b38 Update RU FW versions
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:05:31 +02:00
Teodora Vladić
9050b3eb3c Update Benetel FW to the latest stable
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:05:31 +02:00
Jaroslava Fiedlerova
7827ac38b0 CI: Test with AmariUE in RAN-SA-FHI72-MPLANE-CN5G pipeline
- new configuration for PLMN 00105, 40MHz and 100 MHz added on AmariUE
- helm charts for OC CN with PLMN 00105 added to cacofonix, new CN added
  to ci_infra.yaml, IP address range of the new CN: 172.21.6.116-118
- test with 1 AmariUE (to be extended in future MR), with SISO

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:01:48 +02:00
Teodora Vladić
4ab102c680 [M-plane] Add new Benetel FW supported and reference the new CI pipeline
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:00:09 +02:00
Jaroslava Fiedlerova
4f74b2c7eb CI: Increase service deployment timeout
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:00:09 +02:00
Jaroslava Fiedlerova
3959e80f4e CI: add configs for 4x4 40 MHz test with M-plane
Running container in privileged mode and host network mode is needed
for running fhi72 gNB with M-plane

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:00:09 +02:00
Jaroslava Fiedlerova
8d6e3e4387 CI: add configs for 2x2 100 MHz test with M-plane
Running container in privileged mode and host network mode is needed
for running fhi72 gNB with M-plane

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:00:09 +02:00
Jaroslava Fiedlerova
df21063668 docker: enable FHI72 mplane build
- Build and install libyang (v2.1.111) and libnetconf2 (v2.1.37) from source.
- Build ran-build-fhi72 image with M-plane enabled
- Copy YANG models required for M-plane operation into the container.
- Update gNB Dockerfile to work without M-plane

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:00:09 +02:00
Jaroslava Fiedlerova
73d2b9c7e2 Merge remote-tracking branch 'origin/update-cn5g' into integration_2026_w19 (!4103)
Update CN5G images to stable release `v2.2.1`

- Updated CN5G image tags to a stable release v2.2.1
- Upgrade MySQL image to 9.6
- Updated image oaisoftwarealliance/trf-gen-cn5g to latest tag
  supporting multi-architecture platforms

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 10:07:36 +02:00
Guido Casati
51c773f411 CI (n2-ho): ping ext-DN from NR-UE before ext-DN toward UE
After attach, run UL ping so N3 UL traffic hits the UPF
before the first DL ping. That triggers UL PDR classification
in the UPF and avoids DL GTP-U using the default QFI.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-07 10:02:02 +02:00
Guido Casati
4a325ccf09 RRC: add UE ID to QoS-related logs and fix LOG_W in Modify transaction
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-07 10:02:02 +02:00
Guido Casati
f02c84fcfc CI: enable PCF-based dual-DNN multi-QoS in 25PRB RFSim
Expand the 25PRB RFSim CI scenario to validate two PDU sessions with
PCF-driven QoS rules and deterministic per-flow traffic ports. Update
iperf execution to use `-B`/`-p` from test args.

Changes:
- Update `container_5g_rfsim_u0_25prb.xml` to add dual-session
  validation steps, routing setup, and multi-flow UDP iperf
  for UL/DL with explicit bind/port arguments.
- Change `cls_oaicitest.py` to parse bind/port from
  `iperf_args`, and return a clear error when the iperf client exits non-zero.
- Update `nrue.uicc.2pdu.conf` to configure
  session 2 on `openairinterface` with distinct `nssai_sd` values.
- Extend `5g_rfsimulator/mini_nonrf_config.yaml`
  with PCF endpoints, dual slices, dual DNN entries, and PCF policy paths,
  and disable local PCC rules in SMF.
- Update `5g_rfsimulator_u0_25prb/docker-compose.yaml`
  to add the `oai-pcf` service, mount policy directories, and add ext-dn
  route for the second UE subnet.
- Add PCF policy data files for this scenario, in :
  `policies/policy_decisions/policy_decision.yaml`
  `policies/pcc_rules/pcc_rules.yaml`
  `policies/qos_data/qos_data.yaml`

About the ci-scripts:

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-07 10:02:02 +02:00
Jaroslava Fiedlerova
b11cf166af Merge remote-tracking branch 'origin/ue-pbch-symbol-rx' into integration_2026_w19 (!3810)
UE symbol based PBCH, PSBCH receiver

This is a subset of !2895 with PBCH & PSBCH refactoring to process
symbol by symbol.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-07 09:38:57 +02:00
Jaroslava Fiedlerova
ea1376a5c1 Merge remote-tracking branch 'origin/issue-1054-fix' into integration_2026_w19 (!3960)
fix: issue 1054 - Config: Creating New Array members via command line arguments

Before this change, if you wanted to use --rfsimulator.[0].serveraddr
server on the command line but if you had no rfsimulator block in your
config file, it would just ignore it and print:

[CONFIG] unknown option: --rfsimulator.[0].serveraddr
[CONFIG] unknown option: server

This is because the config module only processes array members that
already exist in the config file. If the array is empty, the command
args are never checked.

What I changed is, in config_getlist() in config_userapi.c, after it
finishes processing existing array parameters, it checks whether a new
parameter is needed. If so, it matches with the list of parameters
first, then the highest index is found for that parameter using the
strtol,

"--rfsimulator.[0].serveraddr",
"--rfsimulator.[2].serveraddr",

What I changed is, in config_getlist() in config_userapi.c, after it
finishes processing existing array parameters, it checks whether a new
parameter is needed. If so, it matches with the list of parameters
first, then the highest index is found for that parameter using the
strtol,

"--rfsimulator.[0].serveraddr",
"--rfsimulator.[2].serveraddr",
"--rfsimulator.[4].serverport",
"--rfsimulator.[1].serveraddr",

It sets the index as 4, allocates 4 slots, memory is managed via
standard functions then it fills the gap of all the indices.

this closes #1054

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-07 09:36:58 +02:00
Jaroslava Fiedlerova
00d6cc034d Merge remote-tracking branch 'origin/microamp_update_doc' into integration_2026_w19 (!4077)
Update microamp FR2 doc for firmware 0.1.174

MR updates the documentation of the Microamp FR2 unit with firmware
0.1.174 or later.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-05-07 09:31:06 +02:00
karim
5eb2480122 Update microamp FR2 doc for firmware 0.1.174
Signed-off-by: karim <karim.boutiba@openairinterface.org>
2026-05-06 16:40:35 +02:00
Gabriele Gemmi
80088121d3 nfapi: fix UCI payload byte length for bit_len multiples of 8
bit_len / 8 + 1 overcounts by 1 when bit_len is an exact multiple of 8.
Replace with (bit_len + 7) / 8 across all pack/unpack sites for PUSCH
and PUCCH 2/3/4 SR/HARQ/CSI payloads, and in the utility functions
(eq, copy, size calculator, dump) and unit test fill functions.

Fixes UCI.indication unpack failure against cuBB when CSI-1 report
is 8 bits.

Signed-off-by: Gabriele Gemmi <g.gemmi@northeastern.edu>
2026-05-06 13:15:23 +00:00
Shubhika Garg
e95992927c chore: replace cn5g images with latest stable release v2.2.1
- upgrade MySQL image to 9.6
    - Update trf-gen-cn5g Docker images to latest tag

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-05-06 14:56:47 +02:00
Jaroslava Fiedlerova
04e9fcbef9 Merge remote-tracking branch 'origin/ubsan-load-test' into integration_2026_w19 (!4102)
nr-cuup-load-test: avoid unaligned memory access

Use memcpy() instead of unaligned pointer access

tests/nr-cuup/nr-cuup-load-test.c:431:16: runtime error: store to misaligned address 0x756d02eca1a2 for type 'uint32_t', which requires 4 byte alignment
tests/nr-cuup/nr-cuup-load-test.c:267:14: runtime error: load of misaligned address 0x756d095edcf6 for type 'uint32_t', which requires 4 byte alignment

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-06 12:16:19 +02:00
Jaroslava Fiedlerova
22bc4f690a Merge remote-tracking branch 'origin/moreunused' into integration_2026_w19 (!4092)
Remove more unused parameters

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-06 12:13:32 +02:00
Robert Schmidt
4103703f56 nr-cuup-load-test: avoid unaligned memory access
Use memcpy() instead of unaligned pointer access

    tests/nr-cuup/nr-cuup-load-test.c:431:16: runtime error: store to misaligned address 0x756d02eca1a2 for type 'uint32_t', which requires 4 byte alignment
    tests/nr-cuup/nr-cuup-load-test.c:267:14: runtime error: load of misaligned address 0x756d095edcf6 for type 'uint32_t', which requires 4 byte alignment

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-06 09:07:32 +02:00
Teodora Vladić
d843877123 [M-plane] FFT offset is a positive value in [Ts]
In the future, adapt to long PRACH format.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-05 16:50:32 +02:00
Teodora Vladić
3c4081489a [M-plane] Get the right interface name
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>
2026-05-05 16:50:32 +02:00
Teodora Vladić
188d186ef9 [M-plane] Extract the current running U-plane configuration
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-05 16:50:27 +02:00
Jaroslava Fiedlerova
1b1b5397c1 Merge remote-tracking branch 'origin/fix_test_simulators' into integration_2026_w19 (!4089)
Fix broken nr-cu-nrppa-test simulator and nr-ue-nas-simualtor

This MR fixes the simulators broken due to the changes from !3993 and
!4010. The changes were related to storing service network name in nas
and routing indicator in uicc

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-05 14:01:36 +02:00
Jaroslava Fiedlerova
1df35d7994 Merge remote-tracking branch 'origin/dlsim_tx_amp' into integration_2026_w19 (!4099)
Allow control signal level at input of OFDM modulator

This simple fix removes an error floor in nr_dlsim tests with 256QAM. It
adds -Q to nr_dlsim to control gNB TX amplitude (like tx_backoff_dB in
gNB RU section). With

./nr_dlsim -R273 -b273 -s30 -e27 -I10 -q1 -n100 -Q30

has 0 errors. The default in nr_dlsim remains -36 dBFs.

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-05 14:00:28 +02:00
Jaroslava Fiedlerova
9e95495c36 Merge remote-tracking branch 'origin/fix-build-unit-test-all' into integration_2026_w19 (!4091)
Fix build with unit tests, build all in CI

- Fix a build error when ENABLE_TESTS=ON
- Build everything in unit test build

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-05 13:59:19 +02:00
Jaroslava Fiedlerova
3016ada216 Merge remote-tracking branch 'origin/oai-wnc' into integration_2026_w19 (!4052)
Add OAI - WNC gNB config file

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-05 13:58:07 +02:00
Robert Schmidt
30bd2c183b gNB-DU config update: Verify cell's origin DU
Verify that a given cell's assoc_id (i.e., it's "host DU") is the
assoc_id of the currently treated DU to avoid treating a config update
of another (potentially malicious) DU.

Closes: #1081
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-05 12:26:04 +02:00
Robert Schmidt
e17823649a Avoid LTE RRC use-after-free
rrc_eNB_free_UE() frees all memory, so set any house-keeping before.

Closes: #1082
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-05 12:19:07 +02:00
Reem Bahsoun
0a58095692 Add WNC RU configuration section to FHI 7.2 tutorial.
Signed-off-by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2026-05-05 12:08:16 +02:00
Teodora Vladić
8097b4a479 [M-plane] Pass the default operation for <edit-config> RPC
Possible options:
```bash
typedef enum {
    NC_RPC_EDIT_DFLTOP_UNKNOWN = 0, /**< unknown default operation */
    NC_RPC_EDIT_DFLTOP_MERGE,       /**< default operation merge */
    NC_RPC_EDIT_DFLTOP_REPLACE,     /**< default operation replace */
    NC_RPC_EDIT_DFLTOP_NONE         /**< default operation none */
} NC_RPC_EDIT_DFLTOP;
```

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-05 11:23:24 +02:00
Teodora
275afe7d16 [M-plane] Set variable PRACH offset for Benetel RU
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-05 11:23:24 +02:00
Teodora
89deb54384 [M-plane] Hack 2x2 mode to use every other antenna
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-05 11:23:19 +02:00
Reem Bahsoun
12d6f6eccd Add a OAI-WNC config file in targets.
Signed-off-by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2026-05-05 11:15:21 +02:00
Rakesh Mundlamuri
c9587a8876 Modify nr-cu-nrppa-test simulator to use UE data from config file
Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-05 10:18:43 +05:30
Raymond Knopp
12ac3ace12 add -Q to nr_dlsim to control gNB TX amplitude (tx_backoff_dB). with -Q30
./nr_dlsim -R273 -b273 -s30 -e27 -I10 -q1 -n100 -Q30

has 0 errors.
2026-05-04 21:09:57 +02:00
Jaroslava Fiedlerova
534ec1755f Merge remote-tracking branch 'origin/hotfix_SIMO' into integration_2026_w19 (!4088)
fixing wrong logic for SIMO and MISO AWGN channels

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-05-04 16:50:25 +02:00
Shubhika Garg
084b02a38b ci: skip merge-commit validation for integration branches
- use regex to match integration_YYYY_wWW branches

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-05-04 16:49:20 +02:00
Shubhika Garg
95a9438d44 ci: post MR validation comments only on warnings or errors in pre-ci-check
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-05-04 16:49:12 +02:00
Guido Casati
5a1af1a7db doc: add QoS flows handling and PDU Session Modify documentation
Also, move PDU Session Release diagram to new PDU Session Management section in rrc-dev.md.

Changes:

PDU Session Modify:
- Update PDU session modification sequence diagram
- Add DRB-To-Remove/To-Modify/To-Setup list handling
- Document E1AP Bearer Context Modification flow
- Add RRC reconfiguration trigger after E1AP response

QoS Flows Handling:

- Complete overview with 3GPP standards references (TS 23.501, 37.324, 38.463, 29.281, 38.331)
- Comprehensive Mermaid sequence diagram covering control and data plane

Technical details:
- Multiple QoS flows per DRB supported
- QFI to DRB mapping at RRC and SDAP layer
- F1-U tunnels: 1 per DRB, no QFI marking
- N3 tunnels: 1 per PDU session, with QFI marking

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
5f0f68caf8 PDU Session Modify: list only add/modify QFIs in NGAP modify response
Issue:

With a commercial UE, NGAP traces showed the PDU Session Resource Modify
Response carrying a QoSFlowAddOrModifyResponseList that did not match the
preceding Modify Request: the gNB listed every QoS flow already stored on the
PDU session instead of only the flows present in QoS Flow Add or Modify Request
List for that modify.

e.g. QoSFlowAddOrModifyResponseList including QFI 1,2
QoSFlowAddOrModifyRequestList QFI 2
AMF ErrorIndication with semantic_error after modify

That breaks the intended semantics in TS 38.413, which
expects QoSFlowAddOrModifyResponseList to carry the QFIs from this
procedure’s QoS Flow Add or Modify Request List only.

Changes:

Add a per-flow ngap_pending flag set in nr_rrc_update_qos when a request
item is applied, clear it before each new modify, and build the response
from marked flows only.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
3ad1b5c701 PDU Session Modify: add PDU Session Modify to the delayed transactions list
* Extend delay_transaction() and rrc_delay_transaction() to support NGAP_PDUSESSION_MODIFY_REQ

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
74decfcf30 PDU Session Modify: complete E1AP/RRC integration with DRB lifecycle management
This commit extends PDU Session Modify handling with E1AP Bearer Context
Modification integration for QoS flow add/modify/release and DRB lifecycle
updates (setup, modification, removal).

E1AP Bearer Context Modification - DRB Setup Support:
- Extend CU-UP handler (e1_bearer_context_modif) to process DRBs to setup/to remove:
  create F1-U tunnels, create/release PDCP-SDAP resources, and update QoS flow mappings
- Extend CU-CP response handler to process DRBs to setup: save F1-U tunnel info,
  mark PDU sessions for RRC reconfiguration, and trigger F1 UE Context
  Modification Request with both setup and release DRBs
- Update rrc_gNB_process_e1_bearer_context_modif_resp to collect DRBs to
  setup/release from E1 response, send F1 UE Context Modification when needed,
  and otherwise trigger direct RRC reconfiguration or NGAP modify response.
- Populate the E1AP Bearer Context Modification request with DRB-To-Setup and
  DRB-To-Modify lists derived from QoS flow processing. For CP->UP E1 Bearer
  Context Modification, Flow Mapping Information in DRB-To-Modify carries
  the QoS Flow QoS Parameters List for that DRB: per TS 38.463, when present,
  CU-UP replaces the previous mapping for that DRB, and this behavior is now enforced.

RRC PDU Session Modify - QoS and DRB Management:
- Add nr_rrc_apply_qos_add_modify() to process QoS add/modify and map flows to
  existing or new DRBs
- Add nr_rrc_apply_qos_release() and nr_rrc_apply_pdusession_modify() to
  process QoS release, build E1 DRB setup/modify/remove lists, and prepare
  bearer-context modification.
- Refactor nr_rrc_update_qos() processing for QoS add/modify,
  with DRB mapping to existing or new DRBs through the modify path helpers
- Extend nr_rrc_update_pdusession() with helpers for QoS
  add/modify/release, building E1 DRB modify/setup/remove lists, and
  sending bearer-context modification.
- Integrate E1 Bearer Context Modification into PDU Session Modify flow to
  propagate DRB changes to CU-UP
- Update default DRB in SDAP configuration after QoS changes
- Add `nr_sdap_entity_update_qos_flows` to replace DRB flow
  mappings from E1 flow information and clear stale SDAP role/mapping
  state when QFIs are removed.

Code Refactoring:
- Add find_or_add_pdu_session_mod() to create/reuse session entries
  in the E1 Bearer Context Modification request while building message.
- Add nr_rrc_send_e1_after_qos_update() to detect DRBs left without mapped
  QoS flows, remove them from UE state, and append them to E1 DRBs-to-remove.
- Use rrc_gNB_generate_dedicatedRRCReconfiguration instead of
  rrc_gNB_modify_dedicatedRRCReconfiguration, drop the old function

End-to-End PDU Session Modify Flow:

1. AMF -> CU-CP: NGAP PDU Session Resource Modify Request (QoS add/modify/release)
2. CU-CP (RRC): Process QoS flows -> map to DRBs (reuse existing or create new) ->
   populate E1AP Bearer Context Modification Request (DRBs to setup/modify/remove)
3. CU-CP -> CU-UP: E1AP Bearer Context Modification Request
4. CU-UP: Create F1-U tunnels for new DRBs -> create/release PDCP-SDAP
   resources -> update DRB/QFI mapping information
5. CU-UP -> CU-CP: E1AP Bearer Context Modification Response (F1-U tunnel info)
6. CU-CP: If DRB setup/release exists, send F1 UE Context Modification Request
7. CU-CP: Else if QoS/NAS requires it, send direct RRC Reconfiguration
8. CU-CP: Else complete modify directly with NGAP PDU Session Resource Modify Response
9. UE -> CU-CP: RRC Reconfiguration Complete
10. CU-CP -> AMF: NGAP PDU Session Resource Modify Response

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
8125f8a2eb PDU Session Modify: extend PDU Session Modify Transfer (NGAP/RRC) with QoS add/modify/release
This commit extends the PDU Session Resource Modify Request handling (within
PDU Session Modify) to fully support QoS Flow add/modify and release operations
(3GPP TS 38.413 section 9.3.4.3) via the Transfer IE. This is propagated to
RRC which performs PDU Session update, which occurs upon PDU Session Modify.

Refactoring was necessary since type `pdusession_transfer_t` and
`pdusession_resource_item_t` both for setup, were inaccurately used for the modify procedure.

The implementation adds proper type definitions, decoding logic,
and error handling for QoS flow management during PDU session modification transfer,
namely:
- Adds QoS add/modify and release lists to the NGAP Modify Request Transfer type
- Introduces QoS Flow With Cause IE
- Decode new IEs and propagate QoS changes to RRC session state

NGAP PDU Session Modify Request Transfer:
- Add qos_flow_to_release_t structure to represent QoS Flow to Release Items IE
  with QFI and release cause (per 3GPP TS 38.413 section 9.3.1.13)
- Introduce pdusession_mod_req_transfer_t structure to properly represent
  PDU Session Resource Modify Request Transfer IEs:
  * QoS Flow Add or Modify Request List (mandatory)
  * QoS Flow to Release List (optional)
- Add pdusession_resource_mod_item_t structure for PDU Session Resource
  Modify Request Items, replacing pdusession_resource_item_t, which is for setup
- Update ngap_pdusession_modify_req_t to use the new type-specific structure
- Refactor decodePDUSessionResourceModify() to return
  pdusession_mod_req_transfer_t instead of pdusession_transfer_t
  - Implement proper decoding of QosFlowAddOrModifyRequestList IE
  - Add decoding support for QosFlowToReleaseList (QosFlowListWithCause) IE:
    * Extract QFI and cause for each QoS flow to be released
- Improve error handling throughout

ngap_msg_includes.h:
- Add includes for NGAP_QosFlowListWithCause.h and
  NGAP_QosFlowWithCauseItem.h to support QoS flow release decoding

NGAP/RRC:
- Update nr_rrc_update_pdusession() function signature to accept
  pdusession_resource_mod_item_t instead of pdusession_resource_item_t
- Remove references to unnecessary pdu_session_type and n3_incoming
  fields that are not part of the Modify Request Transfer structure
- Update QoS flow update logic to use nb_qos_to_add_modify and
  qos_to_add_modify fields from the new transfer structure

This implementation aligns NGAP with 3GPP TS 38.413 specifications
and provides a foundation for handling QoS flow modifications and releases
during PDU session resource modification procedures.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
652a9e455b QoS Handling: add multi-QoS unit tests
- Update F1AP test cases to support multiple QoS flows
- Extend RRC bearers test with comprehensive multi-QoS testing
- Extend PDU sessions test to 2 PDU sessions per test
- Introduce template helpers to minimize duplicated code

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
c8b99ce011 GTPU: move QFI handling to send path and update tunnel API usage
Refactor GTP-U tunnel and send APIs so QFI is handled when sending packets,
not stored in tunnel creation state. Update SDAP and CU-UP integration to
use PDU-session keyed N3 mappings and explicit QFI-marked sends.

This commit clarifies layering ownership: GTP-U stays transport-only (TEID
lookup, decapsulation, extension parsing, callback dispatch), while SDAP
owns QoS semantics (QFI handling, QoS-flow-to-DRB policy, default DRB behavior,
and mapping updates); GTP-U does not perform runtime QFI-to-DRB mapping or
synthesize QFI.

Changes:
- remove `outgoing_qfi` from `gtpv1u_gnb_create_tunnel_req_t` and stop storing
  QFI as tunnel creation metadata; `newGtpuCreateTunnel(...)` now carries only
  transport/tunnel identity parameters (incoming_bearer_id, outgoing_bearer_id,
  outgoing_teid, remote address, callbacks)
- add `gtpv1uSendDirectWithQFI()` and pass QFI into `_gtpv1uSendDirect`
  to build UL PDU Session Container extensions
- shift QFI handling from tunnel provisioning to per-packet TX APIs: QFI is passed
  explicitly only when sending (`gtpv1uSendDirectWithQFI(...)`) and is absent from
  non-SDAP/F1 sends (`gtpv1uSendDirect(...)`)
- align N3 tunnel request semantics with session-level keys by setting incoming_rb_id
  to PDU session ID on N3 paths, while F1 paths keep DRB ID
- keep `gtpv1uSendDirect()` and `gtpv1uSendDirectWithNRUSeqNum()` on
  `NO_QFI`, and enforce non-SDAP RX callback path only when QFI is absent
- update `nr_sdap_rx_entity` to extract/validate QFI from SDAP UL headers,
  send UL data with `gtpv1uSendDirectWithQFI`, and use non-QFI send when
  SDAP header is disabled
- add disabled-SDAP safety checks in SDAP entity setup/mapping to enforce
  single-DRB and single-flow constraints per PDU session
- extend `test_gtp.cpp` with a `multi_qos_flows` scenario and QFI-aware send calls
- update `nr-cuup-load-test.c` bearer setup fields and tunnel creation calls
  to match the new API
- update tests/nr-cuup/nr-cuup-load-test.c to set explicit PDU session and
  QoS/SDAP parameters (sessionType, qosFlows[0], SDAP header flags), and to
  migrate both N3 and F1 tunnel creation calls to the new newGtpuCreateTunnel(...)
  signature (without outgoing_qfi)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
6786df3102 QoS handling: add F1 QoS Flow Information IE (GBR) handling in the CU
GBR information is optional in F1AP and is only present for GBR flows
(5QI < 5 for NonDynamic5QI, or Dynamic5QI flows with GBR characteristics).

Changes:

- Add optional gbr_qos_flow_information field to f1ap_qos_flow_param_t
  structure to propagate NGAP GBR QoS parameters to the DU, for scheduling
  resource allocation via nr_rrc_get_f1_qos_flow_param.

- Add GBR QoS flow information IE enc/dec in F1AP lib:
  - update encode_qos_flow_param() and decode_qos_flow_param()
  - update cp/eq/free
  - add GBR tests to f1ap_lib_test.c

This commit is a refactoring of commit 398ae02ab9 from !2836

Co-authored-by: Sriharsha Korada <sriharsha.korada@iis.fraunhofer.de>

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
17ff43168f QoS handling: add GBR QoS flow information decoding from NGAP QoS Flow Setup Request List
Implement GBR (Guaranteed Bit Rate) QoS flow information extraction from NGAP.
This enables handling in CU of GBR QoS flows
(e.g., voice, video) that require guaranteed and maximum bit rates.

Changes:
- Define qos_bitrate_t structure to encapsulate GFBR and MFBR
- Define gbr_qos_flow_information_t structure for GBR QoS parameters
- Add optional gbr_qos_flow_information field to pdusession_level_qos_parameter_t
- Extract GBR information from NGAP_QosFlowLevelQosParameters in fill_qos()
- Add NGAP_GBR-QosInformation.h include to ngap_msg_includes.h

GBR information is optional in NGAP and is only present for GBR flows
(5QI < 5 for NonDynamic5QI, or Dynamic5QI flows with GBR characteristics).
Bit rates are in kbps.

This commit is a refactoring of commit 398ae02ab9 from !2836

Co-authored-by: Sriharsha Korada <sriharsha.korada@iis.fraunhofer.de>

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
ef971849bd QoS handling: add Dynamic5QI QoS support/validation, split QoS characteristics by 5QI type
Model non-dynamic vs dynamic 5QI characteristics explicitly and propagate the
new layout through NGAP decode and RRC bearer/QoS handling.

Changes:
- Define `non_dynamic_5qi_t`/`dynamic_5qi_t`, PER/PDB bounds, and embed a
  `qos_characteristics` union in `pdusession_level_qos_parameter_t`
- Populate the new QoS structures in `fill_qos()`, including optional
  allocations for Dynamic 5QI `fiveQI` and NonDynamic `priorityLevelQos`
- Map QoS params to F1AP with `nr_rrc_get_f1_qos_flow_param()` and add range
  validation for dynamic priority/PDB/PER and non-dynamic 5QI
- Populate E1 QoS characteristics from the new layout and update QoS modify
  handling to manage optional pointer fields (`openair2/RRC/NR/rrc_gNB_NGAP.c`)
- Derive a numeric 5QI via `get_qos_fiveqi()`, handle missing-5QI dynamic flows
  conservatively, and extend dedicated-DRB decisions to fall back to dynamic
  characteristics
- Add a 5QI range assert in F1AP QoS encoding and extend bearer tests with a
  Dynamic 5QI flow

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
4ad557a0e3 QoS handling: add F1AP DRB QoS (IE) aggregation
DRB QoS IE (mandatory in DRB-Information IE) represents the DRB level QoS,
which shall be computed from multiple QoS flows mapped to the DRB instead
of using only the first QoS flow.

ARP is for admission control/preemption (1-15, 1 = highest priority) and
DRB-level QoS selection should use ARP for admission control decisions.

Changes:
- Use ARP priority (not 5QI priority) for selection (admission control decision)
- Iterate through all flows to find the flow with highest ARP priority (lowest ARP priority_level value
- Add fill_f1_drb_qos to return DRB QoS by value, i.e. QoS characteristics (5QI, priority, delay budget, error rate)
- Replace 'drb.nr.drb_qos = drb.nr.flows[0].param' with proper aggregation

Example: DRB with Flow1 (ARP=10) and Flow2 (ARP=5)
- Old: Would incorrectly use Flow1's QoS
- New: Correctly uses Flow2 (ARP=5) which has higher priority

This commit is a refactoring of commit 398ae02ab9 from !2836

Co-authored-by: Sriharsha Korada <sriharsha.korada@iis.fraunhofer.de>

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
e041a2a078 QoS Handling: set default DRB in SDAP entity to first DRB added
According to 3GPP TS 37.324, there shall be only one default DRB per
SDAP entity (per PDU session). The previous implementation incorrectly
marked all DRBs as default, violating this requirement.

Changes:
- Add default_drb field to nr_sdap_configuration_t to track the default
  DRB ID per PDU session
- Arbitrary set default DRB to the first DRB added when creating bearers in a
  PDU session
- Update nr_rrc_build_sdap_config_ie() to accept defaultDRB (bool) parameter
  instead of hardcoding true
- Use tracked default_drb value when building RRC SDAP Config IE
- Use tracked default_drb value when building E1AP DRB setup structure

Also:
- Fix include style in nr_sdap_configuration.h (<stdbool.h> instead of
  "stdbool.h")

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
04126759aa QoS handling: add 5QI validation during QoS flow setup/modify
Move 5QI validation from RRC reconfiguration message generation to
where QoS flows are actually added/updated, ensuring validation
happens early in the process.

Changes:
- Remove redundant 5QI validation from rrc_gNB_modify_dedicatedRRCReconfiguration():
  that was checking values right before RRC message generation
- Add 5QI validation in add_qos() to reject unsupported 5QI values
  during PDU session setup
- Add 5QI validation in nr_rrc_update_qos to skip unsupported 5QI
  values during PDU session modify (continues to next flow)
- Add is_5qi_supported() function in rrc_gNB_radio_bearers.c:
  validates standardized 5QI values (1-9, 65-90) per 3GPP TS 23.501
  Table 5.7.4-1 and checks against the classification map

Also, remove remaining limit to 1 QoS flow per DRB.

Closes #541

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
8ceb7ec37b QoS Handling: implement intelligent QoS-to-DRB mapping based on 3GPP TS 23.501
Implement QoS flow multiplexing logic that optimizes DRB usage by classifying
5QI values per 3GPP TS 23.501 Table 5.7.4-1 and applying resource-type-aware
multiplexing limits. The changes are adopted in nr_rrc_add_bearers, which
is the RRC function responsible for adding PDU Sessions and DRBs in RRC.

Key features:
- Classify 5QI by resource type (DC-GBR, GBR, Non-GBR)
- Reuse existing DRBs when QoS characteristics are compatible
- Dedicated DRBs for DC-GBR (5QI 82-90) and high-priority services
- Per-type multiplexing limits: DC-GBR=1, GBR=2, Non-GBR=5
- Aggregate cap: max 5 flows per DRB

Implementation:
- nr_rrc_get_5qi_resource_type():
  Maps 5QI values to resource types using lookup table.
  DC-GBR: 5QI 82-90, GBR: 5QI 1-4,65-67,71-76, Non-GBR: 5QI 5-11,69-70,79-80.
  Unknown 5QIs default to Non-GBR with warning.

- nr_rrc_qos_dedicated_drb():
  Identifies 5QIs requiring isolated DRBs (high priority, low-PER).
  Includes: DC-GBR: 5QI 82-90, 5QI 4,6-10 (video), 5QI 70 (mission-critical),
  5QI 71-73 (live streaming), 5QI 80 (low-latency).

- nr_rrc_count_qos_flows_by_type():
  Counts QoS flows mapped to a specific DRB, grouped by resource type.
  Used to check capacity and enforce multiplexing limits.

- nr_rrc_find_suitable_drb_for_qos():
  Searches existing DRBs in the same PDU session for available capacity.
  Checks resource type compatibility, per-type limits, and aggregate cap.
  Returns DRB ID if suitable, -1 if new DRB needed.
  DC-GBR flows always return -1 (require dedicated DRB).

- nr_rrc_assign_drb_to_qos_flow(), which either reuses a DRB
  selected by nr_rrc_find_suitable_drb_for_qos() or creates a new DRB via
  nr_rrc_add_drb, assigns its ID to the QoS flow

Note: this commit is multi-QoS ready.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
302c1c0450 CU-UP: refactor DRB to be setup logic (E1 bearer context) into reusable helper functions
The new bearer context setup logic is looping through the PDU sessions
to be setup list first and then through the DRB to be setup list.
The function has still room for improvement since e1_bearer_context_setup
is calling a getter for NR_DRB_ToAddModList_t which has another nested
DRB loop. The goal of this commit is to further simplify the logic
by minimizing unnecessary nested loops, improving clarity and preparing
for reuse in Bearer Context Modification.

Main changes:

- Build DRB_ToAddMod list in the DRBs loop and centralize SDAP/PDCP configuration
- Add helpers to fill DRB to be setup and QoS flow handling, to improve organization
  and enable reuse in bearer context modification procedures.

Implementation:
- Replace fill_DRB_configList_e1() with fill_rrc_drb_to_addmod()
  * Build one NR_DRB_ToAddMod item per DRB from E1 DRB_nGRAN_to_setup
  * Accumulate all DRBs into a single NR_DRB_ToAddModList_t per PDU session
- Call e1_add_bearers() once per PDU session with the aggregated list,
- Introduce fill_e1_qos_flows_setup() to populate DRB_nGRAN_setup_t
  * Iterate E1AP QoS flows and copy QFIs into the E1 response
- Introduce fill_e1_drb_setup() to encapsulate DRB_nGRAN_setup_t filling
  via fill_rrc_drb_to_addmod()
- Refactor e1_bearer_context_setup() to use new helper functions

Note: supports multiple QoS flows per DRB (TS 38.331 compliant)
  * Move security parameters setup to caller scope
  * Simplify DRB loop logic for better readability

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
773e62077b GTPU: refactor tunnel creation API for N3 (per PDU session) and F1-U (per DRB)
Refactor GTP-U tunnel creation to align for 3GPP architecture where N3
tunnels are created per PDU session (supporting multiple QoS flows) and
F1-U tunnels are created per DRB. This change simplifies the API and
prepares the codebase for supporting multiple DRBs and QoS flows per
PDU session.

This is the first step of a final design that will consist of:
- 1 GTP-U tunnel create call for each PDU session, each with a DRB mapping
- 1 GTP-U tunnel create call for each DRB (i.e. no QFI, no internal mapping)

API Changes:
- Convert gtpv1u_gnb_create_tunnel_req_t and gtpv1u_gnb_create_tunnel_resp_t
  from array-based to scalar fields
  * Remove num_tunnels field and array fields (outgoing_teid[], pdusession_id[], etc.)
  * Use scalar fields: outgoing_teid, pdusession_id, incoming_rb_id, etc.
- Simplify gtpv1u_create_ngu_tunnel() to handle single tunnel per call
  * Remove internal loop that processed multiple tunnels
  * Call newGtpuCreateTunnel() once per invocation
  * Update response handling to fill single tunnel response

Function Refactoring:
- Split generic drb_gtpu_create() into specialized functions:
  * n3_gtpu_create(): Creates N3 tunnel (CU-UP to UPF/core network)
    - callback assigned internally: nr_pdcp_data_req_drb, sdap_data_req
    - One tunnel per PDU session
    - QFI marking
    - Supports multiple QoS flows per PDU session
  * f1_drb_gtpu_create(): Creates F1-U tunnel (CU-UP to DU or DU side)
    - callback assigned internally (cu_f1u_data_req or DURecvCb)
    - One tunnel per DRB
    - No QFI marking (QFI not used in F1-U)
    - Each DRB can carry multiple QoS flows
- Update e1_bearer_context_setup() to loop over DRBs per PDU session
  Each item in the PDU Session list contains a list of DRBs, thus
  the function helper was adjusted to reflect that:
  * Move DRB loop inside PDU session loop
  * Create F1-U tunnel for each DRB individually
  * Create single N3 tunnel per PDU session (outside DRB loop, with DRB mapping)

Also:
- Add comments to document and improve log messages for clarity
- Consistent error handling with AssertFatal checks
- Update NSA code path (rrc_gNB_nsa.c) to use new scalar API

Note: this commit is already taking into account the multi-QoS flows design

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
f17b2bb805 GTPU: reduce inter-dependencies between LTE and NR in GTP-U header
This header is pulled by both LTE and NR libraries, therefore is
advised to minimise cross dependencies in LTE/NR. With this change
the only include is common/platform_types.h

Also, remove redundant comments.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
f1b8d45bf9 fix (nas): call set_qfi before PDU session interface setup on Session Accept
Apply QoS flow id as soon as the accept message is parsed, before interface
setup and before any code path that starts the per-session interface thread,
so the first SDUs are not sent with the default 0-initialized QFI 0.

Changes:
- In handle_pdu_session_accept, move set_qfi(...) to immediately before
  interface setup.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
43ec237a4f fix (NGAP): encode optional QoS list when not empty
Only build QoSFlowAddOrModifyResponseList when at least one QFI is present
and fail fast if PDUSessionResourceModifyResponseTransfer encoding does not
produce a valid buffer. This avoids sending malformed modify responses and
makes encoding failures explicit in the NGAP modify response path.

Changes:
- do QoS add/modify response list allocation when nb_of_qos_flow > 0
- add ASN.1 encode result validation

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
428859f218 fix (NGAP): decode PDUSessionResourceHandoverList with correct IE id
Use the PDUSessionResourceHandoverList protocol IE identifier when
decoding HandoverCommand optional session resources.

Changes:
- replace IE lookup id_HandoverType with
  id_PDUSessionResourceHandoverList in decode_ng_handover_command()

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
c97820622a fix (NGAP): guard optional PDUSessionNAS-PDU in PDU Session Setup Request handler
Avoid NULL dereference when AMF omits the optional pDUSessionNAS-PDU
IE in PDUSessionResourceSetupRequest.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
77aff40af7 fic (NGAP): double allocation and ASN free in PDU Session Modify Response
Remove redundant allocation and duplicate add for AMF_UE_NGAP_ID (asn1cSequenceAdd
already allocates), fixing encoding failure and leak. Fix ASN_STRUCT_FREE_CONTENTS_ONLY
in the unsuccessful-transfer path to free the correct struct.

Changes:
- In ngap_gNB_pdusession_modify_resp(), for AMF_UE_NGAP_ID IE: remove redundant
  calloc() and duplicate asn1cSeqAdd() after asn1cSequenceAdd (avoids uninitialized
  list element, encoding assertion, and leak).
- In PDU Session Resource Modify Unsuccessful Transfer handling: pass
  &pdusessionTransfer to ASN_STRUCT_FREE_CONTENTS_ONLY instead of the unused
  NULL pointer pdusessionTransfer_p;

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
835c80b39d SDAP: fix PDU session ID range validation logic
Replace incorrect mathematical range check with explicit bounds
validation in nr_sdap_delete_entity(). The previous condition
(pdusession_id) * (pdusession_id - NR_MAX_NB_PDU_SESSIONS) > 0
was mathematically incorrect and could fail to properly validate
PDU session IDs.

PDU session ID validation now correctly rejects values outside
the valid range [0, NR_MAX_NB_PDU_SESSIONS]

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
522fb88c6e E1AP: make ActivityNotificationLevel configurable in Bearer Context Setup
This is a mandatory IE.

Replace hardcoded ActivityNotificationLevel value with configurable field
in e1ap_bearer_setup_req_t structure, enabling proper encoding/decoding
and testability of different notification levels. ActivityNotificationLevel
is now properly encoded from message structure instead of hardcoded value,
enabling different notification levels (DRB, PDU Session, UE) to be
specified per bearer setup request.

Changes:
- Add activity_notification_level_t enum with values: drb, pdu_session, ue
- Add anl field to e1ap_bearer_setup_req_s structure
- Replace hardcoded E1AP_ActivityNotificationLevel_pdu_session with
  dynamic value from msg->anl in encode_E1_bearer_context_setup_request
- Add ActivityNotificationLevel IE dec/eq/cp
- Update test and RRC call sites to initialize anl field
- Add E1AP_ActivityNotificationLevel.h include to e1ap_lib_includes.h

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
971436030d E1AP: convert PDU session arrays to dynamic allocation
Replace fixed-size PDU session arrays with dynamically allocated
pointers in E1AP bearer context request/response types to reduce
memory footprint and improve scalability.

Memory usage is now proportional to actual PDU session count
instead of always allocating for maximum capacity.

Impact:
- Callers must allocate and free PDU session arrays; E1AP decode/cp
  allocate, free_e1ap_context_setup_request/mod_request free them.

Major changes:
- Request/response types (e1ap_messages_types.h): pduSession, pduSessionMod,
  pduSessionRem as pointers in setup/mod request and setup/modif response structs.
- E1AP lib: decode allocates with bounds check; cp/eq/free handle pointer members;
  e1ap.c frees setup request after handling.
- CU-UP (cucp_cuup_handler): allocate resp.pduSession and modif.pduSessionMod.
- CU-CP side (cuup_cucp_direct, rrc_gNB, rrc_gNB_NGAP): allocate at E1 request
  build and call free after send where needed; rrc_gNB_NGAP includes E1AP free decls.
- Tests (e1ap_lib_test, nr-cuup-load-test): allocate PDU session arrays in helpers.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
d085bb0ba0 fix (E1AP): allocate DRB-To-Modify list once in PDU session encode
When building E1AP PDU Session Resource To Modify items, create
dRB_To_Modify_List_NG_RAN only once if there are DRBs to modify, and add
modify items to that list.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
ab00b2ff94 fic (E1AP): remove single-DRB limit in PDU session DRB setup list decode (PDU session setup/modify)
Decode paths for PDU Session Resource To Setup and To Setup/Modify must
accept multiple DRB list entries, aligned with multi-DRB RRC behaviour.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
24dd7b5b9e fix (E1AP): iterate DRB Setup List by numDRBSetup in mod response
Fix wrong bound in the setup list loop: Bearer Context Modification
Response encoding must populate dRB_Setup_List_NG_RAN from
DRBnGRanSetupList[0..numDRBSetup), not numDRBModified.

In encode_E1_bearer_context_mod_response(), change the DRB Setup List
encoding loop from pdu->numDRBModified to pdu->numDRBSetup.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
d4c1731e97 Platform types (QoS): refactor QoS Priority Level type per 3GPP TS 23.501
QoS Priority Level range is 1-127, fits in uint8_t (3GPP TS 23.501 §5.7.3.3).

Refactor qos_priority field in pdusession_level_qos_parameter_t to use
qos_priority_level_t typedef (uint8_t) instead of uint64_t. Also,
improve documentation.

Changes:
- Add qos_priority_level_t typedef (uint8_t), more efficient than uint64_t
- Change pdusession_level_qos_parameter_t.qos_priority from uint64_t
  to qos_priority_level_t
- Add MIN_QOS_PRIORITY_LEVEL (1) and MAX_QOS_PRIORITY_LEVEL (127)
  defines for range checks

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
6560403d3c Platform types (QoS): refactor ARP priority level type
Since qos_priority_t reprensents the ARP priority level, an integer
(1..15), this commit is renaming it to qos_arp_priority_level_t
typedef (uint8_t) for better clarity and cleaning up unnecessary enum definition.

Changes:
- Rename qos_priority_t to qos_arp_priority_level_t (uint8_t typedef)
  for type safety and semantic meaning
- Remove enum with 15 explicit values (not needed, matches spec as integer)
- Add MIN_QOS_ARP_PRIORITY_LEVEL (1) and MAX_QOS_ARP_PRIORITY_LEVEL (15) defines
  for bound checks, simpler and more efficient
- Update qos_arp_t struct to use new typedef

References:
- 3GPP TS 23.501 §5.7.2.2!

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
4b5d5c1ae6 Platform constants: consolidate PDU session limit constants
Replace NGAP_MAX_PDU_SESSION and E1AP_MAX_NUM_PDU_SESSIONS with
shared NR_MAX_NB_PDU_SESSIONS constant. The value (256) is consistent
with both TS 38.331, TS 38.413 and TS 38.463

All protocol layers (NGAP, E1AP, RRC, SDAP) now use a single
shared constant for maximum PDU sessions per UE, ensuring
consistency across the codebase

E1AP_MAX_NUM_PDU_SESSIONS (was 4) is removed from e1ap_messages_types.h

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
67e646aa7c RRC: remove warning when UP params are missing
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
9327b4be6b RRC: simplify PDU session status tracking, remove intermediate states
- Remove PDU_SESSION_STATUS_DONE and PDU_SESSION_STATUS_REESTABLISHED
  from enum and from get_pdusession_status_text().
- Add rrc_gNB_action_from_pdusession_status(): sets xid for all PDU
  sessions and derives RRC transaction action from session status
  (NEW, TOMODIFY, TORELEASE) or reestablishment. Add macro
  ASSERT_PDU_ACTION_SINGLE to enforce at most one active status
  (or reestablishment) per transaction.
- rrc_gNB_generate_dedicatedRRCReconfiguration: replace inline loop
  and xid/action logic with a single call to the new helper; stop
  transitioning NEW to DONE here.
- rrc_gNB_modify_dedicatedRRCReconfiguration: set xid at loop start;
  bypass sessions with status != TOMODIFY (instead of >= DONE); remove
  FAILED handling and DONE/xid assignments from loop; add xid to log.
- NGAP: INITIAL_CONTEXT_SETUP_RESP and PDUSESSION_SETUP_RESP check
  NEW (not DONE) and set ESTABLISHED when reporting success;
  PDUSESSION_MODIFY_REQ sets TOMODIFY (not NEW); PDUSESSION_MODIFY_RESP
  checks TOMODIFY (not DONE), drops NEW/ESTABLISHED branch, improves
  warning text; HANDOVER_REQUIRED considers only ESTABLISHED (drop DONE).

PDU sessions now move directly from NEW or TOMODIFY to ESTABLISHED in
the NGAP response handlers. One RRC reconfiguration corresponds to one
NGAP procedure (single active PDU session status per transaction).
rrc_gNB_modify_dedicatedRRCReconfiguration remains the separate
entry point for PDU Session Modify.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
01add4ab43 RRC: rrc_gNB_radio_bearers.c - add QoS flow and DRB removal utilities
PDU Session Modify procedures enable the teardown of a subset of DRBs
and, together with multi-QoS handling, of a subset of QoS flows.
Thus, it is necessary to introduce (1) `rm_qos` to remove a specific QFI
from the RRC list of QoS flows and (2) `nr_rrc_remove_drb_by_id`
to remove a specific DRB by ID, upon successful retrieval of the pointer
to its RRC list item.

- Add rm_qos() to remove QoS flows by QFI from PDU session QoS list
- Add nr_rrc_remove_drb_by_id() to remove DRBs by ID from UE DRB list
- Export find_drb_by_pdusession_id() as public functions for reuse
  in PDU session modify procedures

These utilities enable QoS flow release and DRB cleanup operations
required for PDU Session Resource Modify Request handling.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
7f13e04f75 RRC: consolidate F1 UE Context Modification Request handling
UE Context Modification Request can be triggered by either DRB setup
(from either PDU Session Setup or Modify) or modify (setup/release in PDU Session Modify).
The goal of this commit is to refactor the handling of UE Context Modification Request
messages by improving clarity and reducing code duplication.

Changes:

- Remove overlapping DRB release function `rrc_gNB_send_f1_drb_release_request` and replace with
  unified `rrc_send_f1_ue_context_modification_request` that handles both DRB setup and release.
- Remove inefficient `rrc_gNB_generate_UeContextModificationRequest` and inline
  its logic into callers using the new unified helper.
- Fix type safety in DRB release handling: change from `int *drb_to_release` to
  `f1ap_drb_to_release_t *rel_drbs` to use proper struct type instead of raw int array.
- `rrc_send_f1_ue_context_modification_request` copies DRB arrays internally before freeing,
   allowing safe use of stack-allocated arrays by callers.
- Update `rrc_gNB_process_e1_bearer_context_setup_resp` to use unified helper for DRB setup
  when F1 context is already active.
- Update `rrc_gNB_process_e1_bearer_context_modif_resp` to DRB release in a single F1 UE
  Context Modification Request call (will be later used for DRB setup, improving efficiency)
- Replace magic number `32` with `E1AP_MAX_NUM_DRBS` constant for better maintainability.
- Update E1AP procedures documentation to reflect unified function name.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
226266743c RRC: refactor trigger_bearer_setup to split RRC bearers lists setup from E1 trigger
The current trigger_bearer_setup is mixing 2 functionalities: (1) setting up
RRC lists in the UE context (e.g. PDU Sessions, DRBs) (2) filling the E1AP
message to trigger Bearer Context Setup.

This commit is separating the two functionalities.
This is necessary to improve the readability of the code flow supporting
the setup of new bearers before the upcoming QoS-related changes.

* Introduce nr_rrc_add_bearers(rrc, UE, n, sessions) to populate UE context
  lists (PDU Sessions, one DRB per session, one QoS per DRB).
* Early CU-UP rejection: apply early is_cuup_associated(rrc) checks at call
  sites to fail fast before mutating UE context (this check is the reason
  why the original function was a bool).
* trigger_bearer_setup goal is to fill Bearer Context setup message upon reception
  of PDU sessions to setup, therefore it was changed to fill the bearer context setup
  for all PDU session with status PDU_SESSION_STATUS_NEW.
  Signature was changed to return void and read the lists from UE context.
  The function is also deriving UP keys and building PDU Session and DRB items
  to setup via helpers (e.g. fill_e1_pdusession_to_setup to fill PDU Session to
  setup items).
* Enforce single DRB per PDU Session, will be updated in a later commit.

Impact
* Each function has now limited and self-conteined scope:
  nr_rrc_add_bearers is responsible for update of RRC lists in the UE context.
  trigger_bearer_setup is responsible for preparing the E1 Bearer Context message.
* E1 Bearer Context Setup construction is centralized and clearer.
* The flow is now following these steps:
  1) receive NG request to setup PDU Sessions
  2) check CUUP association first, early failure if check fails
  3) add PDU Session and DRBs to UE context lists
  4) trigger Bearer Context Setup Request

The same flow applies to PDU Sessions from the Initial Context Setup (initial_PDUs)
with the only difference that those are stored in a separate list (legacy behavior)
and to NG Handover Request processing.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
ef505b55d7 fix (RRC): include NR ASN constants in DU SIB builder
Include NR_asn_constant.h in rrc_gNB_du.c so NR_maxCellIntra and NR_maxCellInter
are defined during compilation.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
89c9e89a9d PDCP build: exclude CU-CP/CU-UP from UE, guard E1 init for gNB only
- Common source in NR_PDCP_SRC and derive NR_PDCP_SRC_GNB (gNB) and
  NR_PDCP_SRC_UE from it; UE no longer compiles cucp_cuup_handler,
  cuup_cucp_if, cuup_cucp_direct, cuup_cucp_e1ap.
- NR_L2_SRC_UE uses NR_PDCP_SRC_UE so UE links only common PDCP sources.
- Add L2_NR compile definition PDCP_CUCP_CUUP; wrap nr_pdcp_e1_if_init
  call in nr_pdcp_oai_api.c with #ifdef PDCP_CUCP_CUUP so UE does not
  reference it.

UE build no longer depends on E1/CU-CP/CU-UP code or symbols; gNB
keeps full PDCP and E1 interface init.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Rakesh Mundlamuri
fa4bb92d03 Fixing broken nr-cu-nrppa-test simulator and nr-ue-nas-simualtor
Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-03 19:26:13 +05:30
Rakesh Mundlamuri
116c893d45 Introduce PUSCH DMRS length as a configurable parameter
Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-03 19:04:04 +05:30
Sakthivel Velumani
f9b0dd6af3 fix: perform FFT only on PBCH symbols
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-03 01:55:44 +00:00
Sakthivel Velumani
4b85b71523 log: fix debug logging
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-03 01:55:43 +00:00
Sakthivel Velumani
e4b2125f1e Refactor PBCH & PSBCH UE procedures
1. Refactor channel estimation and freq domain data extraction functions
   to take rxdataF of only one symbol.
2. Split the PBCH and PSBCH decoding into two parts. Fisrt part is
   called for every symbol and generates LLRs of each symbol. Second
   part is called in the last PBCH/PSBCH symbol to decode and send the
   payload to MAC.
3. In channel estimation, the loop around rx antennas is taken out to
   make the code more modular.

Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-03 01:55:32 +00:00
francescomani
d5c0e580ab removed few more unused parameters
Signed-off-by: francescomani <email@francescomani.it>
2026-05-01 14:29:58 +02:00
francescomani
c307e20ab9 remove unnecessary rrc_enb_process_msg hack in nr-uesoftmodem
Signed-off-by: francescomani <email@francescomani.it>
2026-05-01 14:27:26 +02:00
francescomani
6c39ea2b0b remove unnecessary pdcp_run hack in nr-softmodem
Signed-off-by: francescomani <email@francescomani.it>
2026-05-01 13:54:33 +02:00
francescomani
7e9d3cc328 remove unused dump_uci_stats
Signed-off-by: francescomani <email@francescomani.it>
2026-05-01 13:23:06 +02:00
Robert Schmidt
4ab525aca1 unit test: build everything
The previous commit is only necessary because not everything is built in
unit tests...

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-30 19:56:18 +02:00
Robert Schmidt
d8962fa270 spsc_q: fix call to spsc_q_alloc() in benchmark
Fixes: 4d67a6e513 ("spsc_q: make compile on older compilers")

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-30 19:55:09 +02:00
Robert Schmidt
d420f8c123 Merge branch 'integration_2026_w18' into 'develop'
Integration `2026.w18`

* !4070 fix(nrLDPC_coding): Remove ldpc_xdma
* !4068 fix(radio): Make write_reorder context thread-safe
* !4031 Add AoA selection to vrtsim
* !4071 Add 200MHz DDDSU Liteon configuration file
* !4080 spsc_q: make compile on older compilers
* !4081 fix (F1 Handover): do not trigger when no DRB is configured
* !4072 UE PRACH slot fix
* !4082 fixing typo in AWGN calculation
* !4049 Validate signed MR commits and update contribution guidelines
* !4087 Remove unnecessary log

Closes #1072

See merge request oai/openairinterface5g!4075
2026-04-30 15:24:22 +00:00
Robert Schmidt
e92dfe2f93 Merge remote-tracking branch 'origin/log_fix' into integration_2026_w18 (!4087)
Remove unnecessary log

We already check for number of received samples above after receiving.
When aligned to the slot boundary for synchronization, this length of
the samples is no longer samples_per_slot.  # Please enter a commit
message to explain why this merge is necessary,
2026-04-30 11:50:37 +02:00
Florian Kaltenberger
d1b777e0a5 fixing wrong logic for SIMO and MISO AWGN channels
Signed-off-by: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
2026-04-30 10:59:17 +02:00
Rakesh Mundlamuri
35965a1418 Remove unnecessary log
We already check for number of received samples above after receiving.
When aligned to the slot boundary for synchronization, this length
of the samples is no longer samples_per_slot.

Signed-off-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-04-30 13:29:44 +05:30
Robert Schmidt
103c1d48e3 Merge remote-tracking branch 'origin/ci-signed-commit' into integration_2026_w18 (!4049)
Validate signed MR commits and update contribution guidelines

This MR adds validation for signed merge request commits and updates the
contributing guidelines including the requirement for signing commits.

- The CI will warn in the Verify Guidelines stage if any commit in the
  merge request is unsigned.
  - Checks all commits in the MR source branch that are not present in
    the target branch
  - It then verifies if all these commits are signed
- Update contributing guidelines to include commit rules and signing
  commits using git commit -s.
- The CI will also check if there are any merge commits and fail the
  pipeline in that case.
2026-04-29 18:51:04 +02:00
Robert Schmidt
0755086cc2 Merge remote-tracking branch 'origin/hotfix_AWGN' into integration_2026_w18 (!4082)
fixing typo in AWGN calculation
2026-04-29 18:50:31 +02:00
Maxime
683d1b594f nr_rate_matching: replace byte-by-byte repetition loop with memcpy chunks 2026-04-29 12:33:55 -04:00
Robert Schmidt
c8ff0819f8 Merge remote-tracking branch 'origin/issue1272' into integration_2026_w18 (!4072)
UE PRACH slot fix

This fixes a bug in prach slot computation if more than 1 slot in
subframe at UE

Closes #1072
2026-04-29 18:01:28 +02:00
Robert Schmidt
ee4018b5d0 Merge remote-tracking branch 'origin/f1-ho-trigger-no-drb' into integration_2026_w18 (!4081)
fix (F1 Handover): do not trigger when no DRB is configured

Prevent triggering F1 handover for UEs without any DRB, to align with
3GPP TS 38.473 clause 8.3.1.2 and avoid initiating an invalid UE Context
Setup Request in the F1 handover flow.

Changes:

- Add a preliminary check in nr_rrc_trigger_f1_ho() to verify at least
  one DRB exists in ue->drbs
- Abort F1 HO trigger early when no DRB is present, with warning
2026-04-29 18:01:04 +02:00
Robert Schmidt
49e6575910 Merge remote-tracking branch 'origin/fix-spsc-q-older-compilers' into integration_2026_w18 (!4080)
spsc_q: make compile on older compilers

While compiling the spsc_q unit tests on older compilers, some complain
with

     /openairinterface5g/common/utils/ds/tests/test_spsc_q.cpp:11:44: error: use of deleted function ‘spsc_q::spsc_q(spsc_q&&)’
     spsc_q_t rb = spsc_q_alloc(2, sizeof(int));
     /openairinterface5g/common/utils/ds/spsc_q.h:19:16: error: use of deleted function ‘std::atomic<long unsigned int>::atomic(const std::atomic<long unsigned int>&)’

These compiles cannot copy the atomic. Change the API to avoid this
copy.

"Older" compiler here means g++-11/12.
2026-04-29 18:00:36 +02:00
Florian Kaltenberger
79ebf23a80 fixing typo in AWGN calculation
Signed-off-by: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
2026-04-29 16:54:14 +02:00
Shubhika Garg
3cbf0927be ci: validate for signed MR commits in the CI
- Add a new script to validate for signed commits
- Post a GitLab MR Warning comment listing the unsigned commit details

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-04-29 12:22:52 +02:00
Guido Casati
6c534c3b76 F1 Handover: do not trigger when no DRB is configured
Prevent triggering F1 handover for UEs without any DRB, to align
with 3GPP TS 38.473 clause 8.3.1.2 and avoid initiating an invalid
UE Context Setup Request in the F1 handover flow.

Changes:

- Add a preliminary check in `nr_rrc_trigger_f1_ho()` to verify at
  least one DRB exists in ue->drbs
- Abort F1 HO trigger early when no DRB is present, with warning
2026-04-29 10:30:26 +02:00
Jaroslava Fiedlerova
b5e0cf6a2b Merge remote-tracking branch 'origin/liteon_200MHz' into integration_2026_w18 (!4071)
Add 200MHz DDDSU Liteon configuration file

Adding 200MHz DDDSU 2x2 Liteon configuration file. I think we should keep
only 200 MHz configuration for both FR2 RUs: Liteon and Microamp.
Achieved throughputs are DL: 980 Mbps UL 90 Mbps
2026-04-28 23:06:01 +02:00
Robert Schmidt
4d67a6e513 spsc_q: make compile on older compilers
While compiling the spsc_q unit tests on some compilers, some
complain with

     /openairinterface5g/common/utils/ds/tests/test_spsc_q.cpp:11:44: error: use of deleted function ‘spsc_q::spsc_q(spsc_q&&)’
     spsc_q_t rb = spsc_q_alloc(2, sizeof(int));
     /openairinterface5g/common/utils/ds/spsc_q.h:19:16: error: use of deleted function ‘std::atomic<long unsigned int>::atomic(const std::atomic<long unsigned int>&)’

These compiles cannot copy the atomic. Change the API to avoid this
copy.

"Older" compiler here means g++-11/12.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-28 18:40:24 +02:00
Bartosz Podrygajlo
ced388a0f4 fix(ue): Add a log entry for PRACH occasion selection 2026-04-27 22:27:15 +02:00
francescomani
134d750a88 fix(mac): correct PRACH slot computation in configure_prach_occasions
Move the subframe scaling logic outside the PRACH slot loop to prevent the
subframe index from being incorrectly multiplied multiple times when there
are multiple PRACH slots per subframe.
2026-04-27 22:26:56 +02:00
Shubhika Garg
13963ba70d docs: update contributing guidelines to include commit signing rules
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-04-27 13:59:00 +02:00
Karim Boutiba
28c1634fdd Add 200MHz DDDSU Liteon configuration file 2026-04-27 13:49:06 +02:00
Jaroslava Fiedlerova
ec171483e9 Merge remote-tracking branch 'origin/vrtsim-aoa-selection' into integration_2026_w18 (!4031)
Add AoA selection to vrtsim

Adds AoA as a selection parameter in vrtsim. Different UEs can be
configured at different arrival angles, emulating distinct spatial
locations, which can serve as an enabler for beamforming evaluation.
2026-04-27 10:00:10 +02:00
Jaroslava Fiedlerova
d75b8963ab Merge remote-tracking branch 'origin/fix-reorder-context' into integration_2026_w18 (!4068)
fix(radio): Make write_reorder context thread-safe
2026-04-27 09:58:01 +02:00
Jaroslava Fiedlerova
3329877914 Merge remote-tracking branch 'origin/remove_ldpc_xdma' into integration_2026_w18 (!4070)
fix(nrLDPC_coding): Remove ldpc_xdma

Arguments for removing:
- There are no resources to maintain it. Including no machine with the
  board.
- There is no clue that someone is actually using it.
- The library is not standard/cannot be generalized. It was designed for
  a specific solution and cannot be used for another.
- The standard AAL (BBDev or other) should be privileged for LDPC offload
  to a hardware accelerator.
2026-04-27 09:56:35 +02:00
Jaroslava Fiedlerova
bfb177c38e Merge branch 'integration_2026_w17' into 'develop'
Integration `2026.w17`

* !4054 Minor fixes to gNB/UE behavior in RFsim
* !4062 Minor fixes/cleanup in NGAP lib
* !4036 Fix CSI-RS estimation
* !4055 fix (RRC): do not trigger N2 HO when no active PDU sessions are present
* !3988 asn1c inside local tree
* !3762 L1 gNB type0 PDSCH
* !4069 ctest: fix tests when compiling with sanitizers, ignore build directories, fix spsc_q build
* !4067 Small compilation fixes
* !3444 7.2 FHI with XRAN K release
* !4061 T-Tracer & Data Recording v1.1: UL PHY trace modularization and recording enhancements
* !3975 ZMQ radio
* Increase PRACH queue capacity from 8 to 16
* !4059 CI: Various CI adjustments

Closes #1074 and #1073

See merge request oai/openairinterface5g!4063
2026-04-24 20:23:02 +00:00
Jaroslava Fiedlerova
434cd8ca3d Merge remote-tracking branch 'origin/ci-adjustments' into integration_2026_w17 (!4059)
CI: Various CI adjustments

- RAN-SA-FHI72-CN5G: activate/inactive carriers on VVDN RU - to check if
  it improves reliability and stability of the pipeline
- RAN-SA-FHI72-CN5G: update CN with new IP range - avoid IP address
  overlap with CN used in RAN-SA-AERIAL-XXX pipelines
- RAN-SA-B200-Module-SABOX-Container: test with deltaMCS in SC-FDMA test
  case
- RAN-NSA-B200-Module-LTEBOX-Container: adjust PRACH DTX threshold to
  reduce number of false RA attempts on eNB
- remove retx check in RAN-SA-Multi-Antenna-CN5G and RAN-SA-AERIAL-CN5G -
  to avoid false CI failure caused by unsuccessful retx check of
  interfering UE
- adjust RAN-SA-Multi-Antenna-CN5G and RAN-SA-AERIAL-CN5G configs to
  improve UL throughput
2026-04-24 20:46:46 +02:00
Jaroslava Fiedlerova
38167e50f8 CI: Adjust config file in UL heavy test of SA-AERIAL-CN5G
Manual testing showed that increasing pusch_TargetSNRx10 by 3 dB improves
uplink throughput in UL-heavy test cases of SA-AERIAL-CN5G
2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
d1129d1f90 CI: Reduce RX gain in 100 MHz test of SA-Multi-Antenna-CN5G
Manual testing showed that lowering the RX gain reduces UL
retransmissions and improves overall UL throughput in the 100 MHz 2x2
test case of the SA-Multi-Antenna CN5G pipeline.
2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
6a6f200790 CI: Change OC CN for RAN-SA-FHI72-CN5G 2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
1c26f372aa CI: Disable machine performance tuning in RAN-SA-FHI72-CN5G
Performance tuning is done automatically after the reboot
2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
0da440017e CI: Test deltaMCS power control mode in SA-B200-Module-SABOX-Container 2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
e0a2b4837c CI: Configuration file adjustment for NSA-B200-Module-LTEBOX-Container
Try to reduce number of false RA attempts on eNB
2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
11dc86f59c CI: Add scripts to (in)activate carriers on VVDN
Add vvdn-activate-carriers.sh to verify RU PTP synchronization and
configuration. Activates carriers on VVDN RU by editing sysrepo running
datastore (INACTIVE->ACTIVE).

Add vvdn-inactive-carriers.sh to reverse the operation, setting all
carriers back to INACTIVE via sysrepocfg.
2026-04-24 17:18:28 +02:00
Jaroslava Fiedlerova
2d34e6cb9a Increase PRACH queue capacity from 8 to 16
After the changes introduced in !3991, multiple PRACH PDUs can be
pushed from L2 to L1 before being processed. This leads to the PRACH
queues filling up and triggering "PRACH occ queue is full" issues on
the gNB.

This commit increases the queue size from 8 to 16, providing additional
buffering and preventing queue overflows as reported in #1072.
2026-04-24 14:26:42 +02:00
Jaroslava Fiedlerova
0054b496d4 Merge remote-tracking branch 'origin/zmq-radio-3' into integration_2026_w17 (!3975)
ZMQ radio

This is a zmq radio implementation that attempts to integrate NR UE with
the ocudu project.

OAI integration status:
This can currently be used to connect OAI gnb and OAI UE.

Compilation:
cmake --build . --target nr-softmodem nr-uesoftmodem ldpc params_libconfig zmq_radio

Running
- gNB command:
sudo ./nr-softmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --device.name zmq_radio --zmq.[0].tx_channels tcp://127.0.0.1:4556 --zmq.[0].rx_channels tcp://127.0.0.1:4557

- UE command:
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516 --device.name zmq_radio --zmq.[0].tx_channels tcp://127.0.0.1:4557 --zmq.[0].rx_channels tcp://127.0.0.1:4556

A new CI testcase for 2x2 configuration was added.

OCUDU integration status:
The OAI NR UE enters RRC Connected state.

For more details, please refer to the description of MR !3975.
2026-04-24 14:17:12 +02:00
Jaroslava Fiedlerova
6b06bda933 Merge remote-tracking branch 'origin/data_recording_app_optimization_part1' into integration_2026_w17 (!4061)
T-Tracer & Data Recording v1.1: UL PHY trace modularization and recording
enhancements

Based on the plan with @schmidtr  and @roux-cedric, we agreed to enhance
the data recording in two phases:

- Phase 1: Update Data Recording framework to get All internal Massive
  Updates and enhancements through the whole framework public
- Phase2: Restructure T-Tracer Apps and remove all Mems in gNB and UE
  Softmodems to Get data on T-tarcer Apps for all activated Messages
  symbol-by-symbol, and related Meta-data, then do the aggregation on
  the T-tracer App. So, there is No Memory Creation at all on the 5G NR
  Stack.

This Merge Request is for Phase 1. We address the comments given in: !3632

Summary: Refactor T-Tracer instrumentation for UL PHY data capture and
improve the data recording application (v1.0 → v1.1). This MR extracts
inline T() macro calls into modular wrapper functions, adds Unix timestamp
fields to trace messages, implements a 4-state shared memory protocol for
gNB/UE tracers, and delivers an improved synchronized recording architecture
in Python.

Changes:
- T-Tracer: Modular UL PHY trace wrappers
  - Add T_messages_creator.c/.h with 7 wrapper functions (log_ul_fd_dmrs,
    log_ul_fd_chan_est_dmrs_pos, log_ul_fd_pusch_iq,
    log_ul_fd_chan_est_dmrs_interpl, log_ul_payload_rx_bits,
    log_ul_payload_tx_bits, log_ul_scrambled_tx_bits) and a static
    log_ul_common() helper
  - Register T_messages_creator.c in the T library CMake build
  - Update T_messages.txt definitions: Remove string timestamps and get
    time stamp directly from sending_time of T-macro.
  - PHY: Replace inline T() calls with wrappers
  - gNB (nr_ulsch_demodulation.c, nr_ul_channel_estimation.c,
    phy_procedures_nr_gNB.c): replace inline T() calls with
    T_messages_creator wrappers
  - UE (nr_ulsch_coding.c, nr_ulsch_ue.c): replace inline T() calls with
    log_ul_payload_tx_bits and log_ul_scrambled_tx_bits wrappers
  - Remove deprecated log_tools.c/.h and its CMake reference

- T-Tracer gNB & UE apps: Enhancements
  - Implement 4-state shared memory protocol (WAIT → CONFIG → RECORD → STOP)
    for coordination with the data recording app
  - Add event_trace_msg_ul_data struct with 27 UL metadata fields
  - Refactor event loop to poll()-based with proper signal handling
  - Separate project IDs (gNB=2335, UE=2336) and ftok paths for independent
    shared memory segments
  - Update shared memory sizing: Limit number of records to
    NUM_MESSAGES_PER_SLOT=5, 100 slots

- Data Recording App v1.1
  - Improved architecture with thread pool and barrier synchronization
  - Frame/slot-based message grouping with per-slot validation
  - atexit/signal-based cleanup for graceful shared memory detach
  - Delete legacy data_recording_app_v1.0.py

- Library improvements
  - config_interface.py: remove legacy YAML config reader, streamline to
    JSON-only
  - shared_memory_interface.py: new module for shared memory
    attach/read/protocol
  - wireless_parameters_mapper.py: new module for NR parameter mapping
  - data_recording_messages_def.py: updated message definitions for
    27-field struct
  - sigmf_interface.py, sync_service.py, common_utils.py: remove unused
    imports and dead code

- Documentation
  - Update data_recording.md for v1.1 architecture and usage
2026-04-24 14:09:41 +02:00
Romain Beurdouche
0538ea4937 fix(nrLDPC_coding): Remove ldpc_xdma
Arguments for removing:
1. There are no resources to maintain it.
   Including no machine with the board.
2. There is no clue that someone is actually using it.
3. AAL is privileged for LDPC offload to a hardware accelerator.
2026-04-24 12:09:34 +00:00
Bartosz Podrygajlo
ff4284050d CI testcases with OCUDU
Added two testcases with OCUDU split8 gnb
2026-04-24 13:42:14 +02:00
Jaroslava Fiedlerova
7487638d72 Merge remote-tracking branch 'origin/oran_fhi_k' into integration_2026_w17 (!3444)
7.2 FHI with XRAN K release

Purpose:
Implement the O-RAN 7.2 Fronthaul interface using O-RAN Software Community's
XRAN release K. The new features of the release K can be leveraged and it is
compatible with DPDK version 24.11.4.

For more details please refer to the MR !3444 description.
2026-04-24 11:38:43 +02:00
Jaroslava Fiedlerova
6b111384e5 Merge remote-tracking branch 'origin/compilation_fixes' into integration_2026_w17 (!4067)
Small compilation fixes

Signed-off-by: francescomani email@francescomani.it
2026-04-24 11:38:09 +02:00
abgaber
bb11b8eafe Add hint about the maximum number of records and where to oincrease the shared memory 2026-04-24 10:31:38 +02:00
abgaber
c834a694ae doc: update data recording documentation for v1.1 architecture 2026-04-24 10:31:38 +02:00
abgaber
2f23dd2444 data-recording v1.1: Major rewrite of the synchronized real-time data recording system.
Application (v1.1):
- Generic N-node architecture replacing hardcoded gNB/UE structure
- Node-based JSON config with per-node shared memory paths
- Thread pool with barrier sync for multi-node recording
- Frame/slot-based message grouping in read_and_store_tracer_messages()
- Robust cleanup via atexit and signal handlers
- Remove v1.0 legacy application

Shared Memory Interface (new):
- System V shared memory attach/detach/remove with ftok-based keys
- Structured binary read/write for tracer control messages
- Frame/slot-aware data reading with configurable timeout

Config Interface:
- JSON-based config with node definitions (id, type, shared_mem_config)
- Per-node tracer message parsing and index resolution

SigMF Interface:
- Timestamp refactor: Unix epoch sec/nsec with nanosecond precision
- Wireless parameter mapping via YAML-driven parameter map
- System components metadata (TX/channel/RX) in SigMF annotations

Sync Service:
- Generic multi-node sync replacing 2-node sync
- Frame-wrap-aware comparison (1024-frame wrap)

Wireless Parameters Mapper (new):
- YAML-driven OAI-to-SigMF parameter mapping
- 5G NR metadata derivation (DMRS, modulation, link direction)
2026-04-24 10:31:38 +02:00
abgaber
46a4097f6a T-Tracer: update shared memory sizing for 5 messages/slot
Set NUM_MESSAGES_PER_SLOT=5, 100 slots buffer depth (~234 MiB).
Add separate project IDs and ftok paths for gNB and UE.
2026-04-24 10:31:38 +02:00
abgaber
b242eb3093 T-Tracer gNB and UE: massive enhancements
- refactor timestamp handling
- Replace string-based SENDING_TIME with integer SEC/NSEC fields.
- Designed the shared memory protocol with a 4-state machine (STATE_WAIT=0, STATE_CONFIG=1, STATE_RECORD=2, STATE_STOP=3) for command/control between the recording app and the T-Tracer service
- Implemented two shared memory segments: one for reading commands (addr_rd) and one for writing captured data (addr_wr)
- Created event_trace_msg_ul_data struct mapping all 27 UL metadata fields (frame, slot, datetime, MCS, DMRS parameters, etc.) by name from the T-Tracer database
- Implemented setup_trace_msg_ul_data() using the G() macro to map field names to indices at startup
- Wrote the main event loop using poll() to avoid busy-waiting, with get_event() to receive T-Tracer events from the softmodem socket
2026-04-24 10:31:38 +02:00
abgaber
d40f56ddd2 PHY/UE: replace inline T() calls with log_ul_scrambled_tx_bits wrapper
Remove redundant T_ACTIVE() guard and old timestamp formatting.
2026-04-24 10:31:38 +02:00
abgaber
6cd797c64e PHY/UE: replace inline T() calls with log_ul_payload_tx_bits wrapper
Remove redundant T_ACTIVE() guard and old timestamp formatting.
2026-04-24 10:31:38 +02:00
abgaber
5558f98154 PHY/gNB: replace inline T() calls with T_messages_creator wrappers
Use log_ul_fd_dmrs, log_ul_fd_pusch_iq, log_ul_fd_chan_est_dmrs_pos,
log_ul_fd_chan_est_dmrs_interpl, log_ul_payload_rx_bits.
Remove redundant T_ACTIVE() guards and old timestamp formatting.
2026-04-24 10:31:38 +02:00
abgaber
3f5520d792 PHY: remove deprecated log_tools.c/.h
Timestamp formatting moved into T_messages_creator wrappers.
2026-04-24 10:31:38 +02:00
abgaber
c70ed20ca7 T-Tracer: update trace message definitions with Unix timestamp fields
Sending time field of T() is used as a time stamp
2026-04-24 10:31:38 +02:00
abgaber
80ad56af63 T-Tracer: add T_messages_creator.c to T library build 2026-04-24 10:31:38 +02:00
abgaber
b75ddf0e85 T-Tracer: add T_messages_creator wrapper functions for UL PHY trace logging
Introduce T_messages_creator.h/.c with 7 modular wrapper functions
(log_ul_fd_dmrs, log_ul_fd_pusch_iq, log_ul_fd_chan_est_dmrs_pos,
log_ul_fd_chan_est_dmrs_interpl, log_ul_payload_rx_bits,
log_ul_payload_tx_bits, log_ul_scrambled_tx_bits) that encapsulate
T() macro calls with structured PHY metadata fields.
Replaces scattered inline T() calls across PHY source files.
2026-04-24 10:31:38 +02:00
Bartosz Podrygajlo
b5aa2d87fb fix(radio): Make write_reorder context thread-safe 2026-04-24 06:49:20 +02:00
Jaroslava Fiedlerova
430e336e15 Merge remote-tracking branch 'origin/ctest-physim-sanitizers' into integration_2026_w17 (!4069)
ctest: fix tests when compiling with sanitizers, ignore build directories,
fix spsc_q build

- Fix the directory to the current build directory to enable running with
  sanitizers with ctest
- add build* to .gitignore to close #1074
- fix spsc_q compilation on non-C++23 compilers to close #1073
2026-04-24 00:23:42 +02:00
Aswanth KC
ef0b4460b6 Config: Creating New Array members via command line arguments
Before this change, if you wanted to use --rfsimulator.[0].serveraddr server
on the command line but if you had no rfsimulator block in your config file,
it would just ignore it and print:
[CONFIG] unknown option: --rfsimulator.[0].serveraddr
[CONFIG] unknown option: server

This is because the config module only processes array members that already
exist in the config file. If the array is empty, the command args are never checked.

What I changed is, in config_getlist() in config_userapi.c, after it finishes
processing existing array parameters, it checks whether a new parameter is given
in CLI.

The array number in the parameter(num) should match with the valid index of
that specific array

--cfg.[0].value 1 creates one array with one element
valid_index = num = 1

--cfg.[0].value 1 --cfg.[0].value 2 creates an array with two elements
if the previous CLI number repeats increments the "num"
valid_index = num = 2

--cfg.[1].value 1 --cfg.[0].value 2 error
valid_index < num, expects 0.
2026-04-23 17:45:34 +00:00
Teodora Vladić
3afda6aea1 Add a warning for F release support
Similarly to: https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3936/diffs#57257e70cd9cf83d562fe56bd6d173cb45785f74_466_422
2026-04-23 18:42:25 +02:00
Teodora Vladić
7af713a1d1 Remove polling support for fronthaul interface
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
9a2a313515 Make debug logging for PRACH nRxPkt = 0
This commit was tested with MicroAmp FR2 with 2x2 MIMO,
where PRACH Rx antennas used is 1.

OAI L1 sets the number of PRACH antennas to be the same as for PUSCH.
Ideally, this should be properly fixed. In the meantime, I modified the
logging to debug to reduce noise.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Jaroslava Fiedlerova
9fb78e1b34 Install libatomic in FHI72 gNB images
libatomic is required by DPDK 24.11.4

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
82f57789a5 Revert "feat(FHI72): Fix lcore count on Arm targets"
This reverts commit 8d78c97513.

Not relevant for DPDK >= 24.
2026-04-23 18:42:25 +02:00
Romain Beurdouche
c5e1c4f34f feat(CI): Build FHI with K release
Update the dockerfiles for building DPDK 24.11.4 and xran K release.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
b92936f7d7 Move the Tx/Rx counters logging in one function
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
84a1eb8b07 Reverse the Rx processing order
First process PUSCH and then PRACH because the PUSCH callback
is called before PRACH callback.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
d06bd3d49f Separate PRACH and PUSCH packet processing
* rename read_prach_data() to xran_rx_prach_read_slot()
* in F release, there is no PRACH queue so `frame` and `slot` are
  passed as input; in K release, `frame` and `slot` are taken from the PRACH
queue

Note: since the PUSCH callback is the called before PRACH callback, this
commit is correct but the timing for PRACH processing is just a little
bit late. In previous state, PRACH processing was done inside the
function of PUSCH processing.
=> next commit will just reverse the order.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
1bc8e64641 Process PRACH packets
* Move PRACH callback in the oaioran.h/c since now used in K release.
* Reset the number of PRACH packets.
* Handle PRACH queue in the same manner as for PUSCH (95c8fa46).

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Romain Beurdouche
6b665a851e Process PUSCH packets
xran K release introduces a new parameter nRxPkt describing the
fragmentation of Rx symbols.

Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Romain Beurdouche
ba4239653e feat(oran_fhlib_5g): RX error counters
K releases added RX error counters
This commits adds a printing of these counters with LOG_I

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00
Teodora Vladić
7b7afae05b feat(oran_fhlib_5g): Changes to run K release
* Initialize leak detector
* Fill IO config field holding the number of mbufs to be allocated
* Allocate and fill `activeMUs` in the FH config
* Start timing source, worker thread and activate CCs upon starting the FH
* Fill `mu_number[0]` in FH config
* Invert trx_oran end and stop
* Set `neAxcUl`
* Delete duplicated oran_eth_state_t struct definition
* gxran_handle is an array which length is equal to the number of RUs
* Fill BBDev VF token in fh_init

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:13 +02:00
Robert Schmidt
74bc9bf0cc spsc_q: fix use of stdatomic.h
stdatomic.h is a C++23 feature [1]. Thus, "older" compilers such as
gcc-11 (default in Ubuntu 22) do not know this, and can therefore not
correctly compile spsc_q. Fix this by alternatively including atomic for
C++.

Fixes errors such as

    stdatomic.h:40:9: error: ‘_Atomic’ does not name a type

[1] https://en.cppreference.com/cpp/header/stdatomic.h

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-23 14:31:51 +02:00
Robert Schmidt
b0f63bf83c .gitignore: ignore build directories
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-23 13:57:48 +02:00
Robert Schmidt
d4f039a326 ctest: fix tests when compiling with sanitizers
When compiling with sanitizers that require LD_LIBRARY_PATH (see
documentation), ctest could not drive tests as the executables did not
find shared objects. Fix the directory to the current build directory to
enable running with sanitizers.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-23 13:56:16 +02:00
Jaroslava Fiedlerova
0ecfd11d92 Merge remote-tracking branch 'origin/type0dlsch' into integration_2026_w17 (!3762)
L1 gNB type0 PDSCH

PDSCH type0 allows frequency allocation via PRB bitmap (type1 is via
start and number of PRBs) allowing for non contiguous allocation in
frequency domain
2026-04-23 10:19:40 +02:00
Teodora Vladić
77bb143b04 feat(oran_fhlib_5g): Adapt oran_fhlib_5g for K release
Adapt the oran_fhlib_5g code to compile with xran K release.
Like previously E and F, uses preprocessor directives to separate codes for different xran releases.

Notes:
1. Release K of the FHI library supports many numerologies on one instance.
   As of now the integration supports only one numerology.
2. Several arrays in the xran interface are indexed by the numerology.
   It was ambiguous whether they were indexed by the actual numerology number or by the index of the relevant numerology within the numerology array.
   They are actually indexed by the numerology number so that when one is using only numerlogy 1 for example, he should only use perMu[1], fftSize[1], ...

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 10:06:26 +02:00
Teodora Vladić
e7c4d80a5d Create a cmake API for O_RAN SC xran forked repo
* create the xran forked repo as a cmake external project - easier to maintain and track the changes
  we applied to the original repo
* add xran_DOWNLOAD option - clones and builds latest supported K release
* update the FHI README for K release

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 10:06:14 +02:00
Jaroslava Fiedlerova
6b437c5187 Merge remote-tracking branch 'origin/add-asn1c-local-possibility' into integration_2026_w17 (!3988)
asn1c inside local tree

when /opt/asn1c/bin/asn1c does not exist, we download and use the right
asn1c version locally in the build tree. This simplifies dependancies
management
2026-04-23 09:55:14 +02:00
Jaroslava Fiedlerova
66a3328b81 Merge remote-tracking branch 'origin/fix-ho-required-no-up' into integration_2026_w17 (!4055)
fix (RRC): do not trigger N2 HO when no active PDU sessions are present

Prevent triggering N2 handover when the UE has no active PDU session by
adding an early check in nr_rrc_trigger_n2_ho(), so we avoid building an
invalid HO Required. This aligns with 3GPP TS 38.413 (§9.2.3.1), where
HANDOVER REQUIRED carries a PDU Session Resource List with at least one
PDU Session Resource Item (range 1..maxnoofPDUSessions).

Relates to #1062 (closed)
2026-04-23 09:54:17 +02:00
Jaroslava Fiedlerova
02f7ecf861 Merge remote-tracking branch 'origin/fix-csirs-estimation' into integration_2026_w17 (!4036)
Fix CSI-RS estimation

Changed channel estimates buffer to store RB 0 from start of buffer instead
of FFT shift offset. This simplifies channel estimation implementation. There
is also no need to add padding because each symbol/antenna start from offset
0 and/or OFDM symbol size always 32 byte aligned.

This also fixes buffer overflow detected when running UE with OCUDU gNB.
2026-04-23 09:44:45 +02:00
francescomani
fb60743b26 remove unused defines in nfapi_nr_interface_scf
Signed-off-by: francescomani <email@francescomani.it>
2026-04-23 09:09:54 +02:00
francescomani
6539889821 remove unnecessary nfapi_nr_interface_scf dependence in nr_mac_common_tdd
Signed-off-by: francescomani <email@francescomani.it>
2026-04-23 09:04:35 +02:00
Sakthivel Velumani
2c34d84d6f phy: fix CSI-RS estimation
Changed channel estimates buffer to store RB 0 from start of buffer instead of
FFT shift offset. This simplifies channel estimation implementation. There is
also no need to add padding because each symbol/antenna start from offset 0
and/or OFDM symbol size always 32 byte aligned.

This also fixes buffer overflow detected when running UE with OCUDU gNB.
2026-04-23 03:04:39 +00:00
Bartosz Podrygajlo
aa37846454 ZMQ radio 2x2 testcase 2026-04-22 22:34:02 +02:00
Bartosz Podrygajlo
ef632db840 Add ZMQ radio to OAI build scripts 2026-04-22 22:34:02 +02:00
Bartosz Podrygajlo
384886ce48 Ensure trx_stop is called before trx_end
Make sure the radio libs are stopped before `end()` call. This allows
for a cleaner exit under most circumstances. Some libraries like zmq_radio
don't exit cleanly without it.
2026-04-22 22:34:02 +02:00
Bartosz Podrygajlo
9ef4efe10a Fix memory leak in unit tests 2026-04-22 22:34:02 +02:00
Bartosz Podrygajlo
46c120651f ZMQ radio
This commit introduces ZMQ-based radio library. Each pair of RX/TX antennas is
represented by a ZMQ REQ/REP socket pair which streams continuous IQ samples
from radio start until stop.

Usage:
Simplest configuration is to connect OAI NR UE to OAI GNB with the same number
of antennas - by inverting the RX and TX channels in ZMQ radio configuration the
gNBs TX is mapped to UEs RX antennas and vice versa.
2026-04-22 22:34:02 +02:00
Jaroslava Fiedlerova
9b0b9dc066 Merge remote-tracking branch 'origin/minor-fixes-ngap-lib' into integration_2026_w17 (!4062)
Minor fixes/cleanup in NGAP lib

This MR is about a small NGAP-focused cleanup, mainly to reduce clang
warnings and remove dead code.
- Handle unused input parameters in ngap_gNB.c and ngap_gNB_handlers.c.
- Fix clang warning in common/utils/time_meas.h (extra semicolon).
- Removes unused NGAP trace/overload code and related references
  (ngap_gNB_trace, ngap_gNB_overload).
2026-04-22 13:22:59 +02:00
Jaroslava Fiedlerova
be74bfb437 Merge remote-tracking branch 'origin/fixes-rfsim-testing' into integration_2026_w17 (!4054)
Minor fixes to gNB/UE behavior in RFsim

While testing with RFsim thw following issues where found:
- gNB config: wrong PCI was printed during F1 Setup Request preparation
- UE PHY: missing rxdata allocation was causing a crash during intra-freq
  measurements
2026-04-21 18:16:42 +02:00
Guido Casati
5902635d2d Remove unused ret variable in ngap_gNB_generate_ng_setup_request 2026-04-21 18:05:08 +02:00
Guido Casati
4a36f46a38 NGAP: remove unnecessary void * cast in ngap_gNB_task 2026-04-21 17:59:43 +02:00
Guido Casati
7f6e5ff38e Fix clang warning: unused parameters in ngap_gNB.c
- Fixed [-Wunused-parameter] warnings by adopting UNUSED macro
2026-04-21 17:49:21 +02:00
Guido Casati
711c632001 Cleanup dead NGAP code
The goal of this commit is to keep the NGAP library tidy and
remove all handlers that are not currently implemented and other
dead code.
2026-04-21 17:47:13 +02:00
Guido Casati
f4c4e02d78 Fix clang warning: sign comparison in ngap_gNB_handlers.c
- Fixed [-Wsign-compare] warning by casting sizeof result to long
- Resolves comparison between signed NGAP_ProcedureCode_t and unsigned size_t
2026-04-21 17:47:13 +02:00
Guido Casati
ca31590282 Fix clang warning: unused parameters in ngap_gNB_handlers.c
- Fixed [-Wunused-parameter] warnings by adopting UNUSED macro
2026-04-21 17:46:53 +02:00
Guido Casati
210b9089b9 Fix clang warning: remove extra semicolon in time_meas.h line 36
- Fixed [-Wextra-semi] warning by removing duplicate semicolon
2026-04-21 17:39:57 +02:00
abgaber
a12050203b Memory optimization for Data Recording and Move tracers log messages to separate function 2026-04-21 16:47:10 +02:00
abgaber
c3b2b4d30e Trace DMRS and Channel Coff of layer one 2026-04-21 16:43:15 +02:00
abgaber
a2230079d8 Remove non-used package by Data recording App after update 2026-04-21 16:40:18 +02:00
Romain Beurdouche
5b1f09faf1 feat(oran_fhlib_5g): update Findxran
Update the Cmake find script for xran to detect K release (11.1.1).

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-21 12:11:42 +02:00
Robert Schmidt
57c4633fd6 Take the long PRACH into account in queues
Fixes the commit ID: 03096dd495

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-21 12:11:35 +02:00
francescomani
644ba5cdcf set last bit of frequency_domain_assignment.val only if there is more than 1 2026-04-20 19:15:27 +02:00
francescomani
1b7be0c35a fixes at UE to make number of RBs independent from PDSCH type 2026-04-20 19:15:27 +02:00
francescomani
6bb7e3cb68 fix setting number of RBs in TBS computation for PDSCH scheduled by DCI11 at UE 2026-04-20 19:15:27 +02:00
francescomani
29457abe71 reworking the handling of freq_alloc_bitmap_t to make it more efficient
Co-Authored-By: @schmidtr
Assisted-by: Gemini:3 Flash
2026-04-20 19:15:27 +02:00
francescomani
0dd1243e6e L1 gNB type0 PDSCH 2026-04-18 09:48:40 +02:00
francescomani
27158b9244 rename reverse_bits to bits and move functions to count bits in there 2026-04-18 09:48:39 +02:00
Guido Casati
389d7a0246 fix (RRC): do not trigger N2 HO when no active PDU sessions are present
Prevent triggering N2 handover when the UE has no active PDU session
by adding an early check in nr_rrc_trigger_n2_ho(), so we avoid building
an invalid HO Required. This aligns with 3GPP TS 38.413 (§9.2.3.1), where
HANDOVER REQUIRED carries a PDU Session Resource List with at least one
PDU Session Resource Item (range 1..maxnoofPDUSessions).
2026-04-17 16:46:26 +02:00
Jaroslava Fiedlerova
547f683ebe CI: Remove retx check from OTA setups with Quectel
Retx check frequently fails in OTA pipelines, particularly for interfering
UEs attempting to connect to the cell. This leads to job failures in OTA
pipelines.

Remove the retx check from  Multi-Antenna and Aerial pipelines to improve
CI stability and avoid false failures. In these pipelines, iperf test
already validates correct funtionality, making the retx check redundant.
2026-04-17 14:09:22 +02:00
Jaroslava Fiedlerova
38dc378224 Merge branch 'integration_2026_w16' into 'develop'
Integration `2026.w16`

* !4040 fix: issue 911 - replace timer oneshot to periodic.
* !4041 Compilation without T: move to physims
* !4046 fix(record_db doc): correct the path for T_messages.txt and mention use of ninja/make
* !3994 Update CN5G images to release v2.2.0 and update traffic generator image
* !4024 Fix fill_srs_channel_matrix
* !3983 Add SIB 3,4 support, configurable SIB2 and refactor CU/DU SIB management
* !4030 Miscellaneous code improvements
* !4039 Verify consistency of CSI report in L2 instead of RRC
* !3991 L1 RX: use queues instead of arrays and linear search for PUCCH, PUSCH, SRS, PRACH
* !4011 CI: remove cppcheck, cleanup in build and license checks
* !4051 Fix EMA cold-start for noise and SNR/RSSI measurements

Closes #1063

See merge request oai/openairinterface5g!4048
2026-04-17 09:40:42 +00:00
Jaroslava Fiedlerova
93df326273 Merge remote-tracking branch 'origin/fix-ema-init' into integration_2026_w16 (!4051)
Fix EMA cold-start for noise and SNR/RSSI measurements

Initialize n0_subband_power and power control avg_snr/avg_rssi directly
from the first measurement instead of starting from zero.

Starting from zero causes the EMA to converge slowly, leading to
underestimated noise power at gNB startup. This results in inflated SNR
estimates, which triggers UE uplink power ramp-up, antenna saturation,
and a positive feedback loop of increasing noise.
2026-04-16 23:09:51 +02:00
Jaroslava Fiedlerova
e5c54b5971 Merge remote-tracking branch 'origin/ci-cppcheck-build-cleanup' into integration_2026_w16 (!4011)
CI: remove cppcheck, cleanup in build and license checks

Remove cppcheck. For those who want to use it, it's now in tools/cppcheck/,
and likely easier to use locally.
Clean up some code for CI build and license check. Remove global variable.
2026-04-16 23:09:04 +02:00
Robert Schmidt
ff97f0dea6 LicenceAndFormattingCheck: remove global variable, pass directly
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 15:15:56 +02:00
Robert Schmidt
1c512f3dc5 Remove cppcheck from CI, add to tools/
We don't enforce cppcheck through the CI, although it's there since
years. It runs on Ubuntu 18/20, so it's old. For folks, it's likely not
discoverable on how to run it locally. Let's make a fresh start.

This removes cppcheck from all CI-related code. Instead, it adds it
under tools/cppcheck/, including documentation on how to run it locally,
bare-matel or in docker.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 15:15:56 +02:00
Guido Casati
32cb3401b4 fix (gNB config): cell ID and PCI from outgoing F1 Setup Request 2026-04-16 15:07:47 +02:00
Robert Schmidt
6f2d90fee9 Add nr_mac_pc_reset_snr() to harmonize SNR reset on first reception 2026-04-16 15:03:38 +02:00
Guido Casati
f6b6ce2da3 fix (NR UE): allocate/free rxdata pointer for neighbor measurements
Fix a UE crash in the neighbor-measurement task setup by allocating the per-antenna
rxdata pointer array before indexing it in pbch_processing(), and freeing it in
nr_ue_meas_neighboring_cell() after measurements complete.

The crash is triggered by intra-frequency neighbor measurements.
2026-04-16 15:01:13 +02:00
rmagueta
aa5bd641fd Fix EMA cold-start for noise and SNR/RSSI measurements
Initialize n0_subband_power and power control avg_snr/avg_rssi directly from the first measurement instead of starting from zero
2026-04-16 14:50:13 +02:00
Robert Schmidt
463a3ad1cf Merge remote-tracking branch 'origin/l1-rx-use-queues' into integration_2026_w16 (!3991)
L1 RX: use queues instead of arrays and linear search for PUCCH, PUSCH, SRS, PRACH

This MR is an attempt to reduce the time L1 RX searches in array for the
next job to process, and instead use a queue. This queue is a FIFO,
because the various jobs (FAPI messages) to process come in order, and
need to be processed in order. The MR (hopefully, to be measured)
reduces the amount of time spent searching for the next UE (because the
next job is always at the beginning of the queue), and should scale
better for many UEs.

It does the following:

- introduce two helper libraries for (1) Frame.Slot calculation (sfn_t),
  already introduced in !3521 (merged) commit 3102068e, and (2) a ring
  buffer with fixed size
- use sfn_t and ring buffer (gNB->pucch_queue) to remove the linear
  array for PUCCH (gNB->pucch)
- use sfn_t and ring buffer (gNB->pusch_queue) for some PUSCH lookups.
  Because we need to still store PUSCH contexts, gNB->pusch is still
  there
- use sfn_t and ring buffer (gNB->srs_queue) to remove the linear array
  for SRS (gNB->srs)
- use sfn_t and ring buffers (gNB->prach_ru_queue and
  gNB->prach_l1rx_queue) to remove the linear array for PRACH
  (gNB->prach_list)
- some minor cleanups, e.g., additional loops over the PUSCH array,
  using const, using pointers instead of indices, etc
2026-04-16 13:50:53 +02:00
Robert Schmidt
288e0e1412 Merge remote-tracking branch 'origin/issue_1063' into integration_2026_w16 (!4039)
Verify consistency of CSI report in L2 instead of RRC

Closes #1063
2026-04-16 12:45:10 +02:00
Robert Schmidt
c1d0e836b4 Merge remote-tracking branch 'origin/some_fixes' into integration_2026_w16 (!4030)
Miscellaneous code improvements

- A fix in a yaml config file as reported by @Abdo-Gaber
- proper positioning of static functions in a couple of gNB scheduler
  files
- some effort to split NR from LTE code in compilation
- harmonization of macros for unused variables
2026-04-16 12:43:06 +02:00
Robert Schmidt
dc550ebaf6 Merge remote-tracking branch 'origin/rrc-sibs' into integration_2026_w16 (!3983)
Add SIB 3,4 support, configurable SIB2 and refactor CU/DU SIB management

This MR makes neighbour and inter-frequency configuration drive how
SIB2/SIB3/SIB4 are built and sent from CU to DUs. It standardizes SIB
payloads as byte_array_t with typed SIB IDs across RRC, F1AP and MAC,
reducing ad‑hoc buffer handling. Neighbour parsing, validation and
lookup are tightened.

Changes

- Minor refactor to gNB neighbour parsing and storage (shared PLMN
  extraction, safer allocation, etc).
- Represent SIB containers uniformly as byte_array_t plus nr_sib_type_t,
  and adapt F1AP, MAC and RRC users to the new container API.
- Make SIB2 cell-reselection information fully config-driven with
  explicit bounds checking and SIB2 ASN.1 building from that config.
- Generate SIB3 intra-frequency neighbours from the per-cell neighbour
  list and propagate them from CU to DU over F1, with MAC
  decoding/attaching them to SystemInformation.
- Generate SIB4 inter-frequency neighbours from a new frequency_list
  plus neighbour SIB3/SIB4 offsets, and propagate them from CU to DU
  over F1, with MAC decoding/attaching them.
- Add basic ASN.1 round-trip tests for SIB2/SIB3/SIB4 and SIB4 range
  checks, and update RRC docs to describe the neighbour/inter-frequency
  configuration model.

Testing:

1. in gNB conf file:

    cu_sibs = (2, 3, 4);

2. Update neighbour config file with SIB3/SIB4 conf:

    (see documentation)

3. run gNB and UE as usual

---

Logs & configs: see MR on Gitlab
2026-04-16 12:42:42 +02:00
Robert Schmidt
03096dd495 Use spsc_q to process PRACH jobs
Use two queues for PRACH processing:

- prach_ru_queue: pass jobs from TX thread (scheduler) to RU thread. For
  split 8, the RU thread itself handles PRACH processing; for split 7.2,
  it is the library that is responsible for handling PRACH messages (see
  oran_fh_if4p5_south_in())
- prach_l1rx_queue: after jobs have been handled in RU thread, use this
  queue to pass jobs to the RX thread. There, preamble detection is
  performed, and RACH.indication FAPI messages are filled if a preamble
  has been detected.

Together, these queues replace a linear search in a global array that
has been modified by three threads at the same time. The design ensures
that access now is thread-safe, and with less overhead.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 12:16:47 +02:00
Guido Casati
22783bb3a7 doc (RRC): document neighbour configuration, SIB3/4 and MeasGaps design
Expand RRC usage and handover documentation to describe the two-level
neighbour configuration layout, lookup-key semantics,
and config-time SIB4 grouping behaviour. Expand the example config
to include a `frequency_list` block and per-neighbour SIB3/SIB4
offset fields. Add SIB2 config example.

Update handover-tutorial.md to describe the same nested model and
note that F1 and N2 handover share the same serving-cell keyed
mapping.

Add documentation about SIB3/SIB4 and MeasGaps implementation
in OAI with stress on the shared neighbour configuration data model.

Update FEATURE_SET.
2026-04-16 12:13:35 +02:00
Robert Schmidt
879e374d32 Use bytes instead of bit packing for rb_mask_ul
Clarify the code, the bitpacking might even potentially be slower.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
39d3477d84 TODO: reimplement NR_gNB_PHY_STATS_t lookup
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
f5989abd0d Use spsc_q for SRS processing
Use the spsc queue to pass jobs from TX thread (scheduler) to RX thread
(handling those jobs), reducing the amount spent searching for SRS jobs,
clarifying the design, and making it thread-safe.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
a5696562da Refactor SRS processing into its own function
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
2bb1f36a2c Remove SNR parameter
The structure in which was snr will be a "SRS job" in a follow-up
commit, so the snr parameter cannot be stored in there (and it is also
not necessary to do so, as it can be local to the function handling
nr_srs_rx_procedures()).

Correctly read SRS SNR through FAPI message in nr_ulsim. Switch to SRS
BEAMMANAGEMENT as only this message returns the actual SNR (unlike
CODEBOOK). Add asserts to check what is returned is valid data in the
sense of the test.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
81b2fe634f Simplify SRS handling
Remove useless logging defines. Move srs_estimated_channel_time to where
it is used. Prepare for the next commit by moving UL_INFO to earlier
inside phy_procedures_gNB_uespec_RX().

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
cb4c307221 Speed up generate_srs_nr()
- calculation in float: should be enough precision (it'll go into 16bit
  ints later...)
- avoid round: the lower 15bits will be shifted away, the rounding will
  have no effect
- group some multiplications to avoid re-computation of the same
  results.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
4a47fbbef7 Remove global gNB SRS memory
This means that as of this commit, the signal has to be permanently
regenerated. In fact, with the SRS queue to be introduced in a follow-up
commit, we don't have an easy way to cache the sequence generation, as
there is no "index" to which we could refer to (hence, caching would be
tricky).

Instead, the next commits further refactor this to reduce the time for
SRS sequence generation as well as the memory footprint.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
2213235fc1 Simplify UE SRS: no global memory required
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
138e0f9547 Use spsc_q for PUSCH queue
Use the spsc queue to pass jobs from TX thread (scheduler) to RX thread
(handling those jobs), reducing the amount spent searching for PUSCH
jobs, clarifying the design, and making it thread-safe.

Since the PUSCH contexts have to be stored somewhere, there is still a
single iteration over all contexts. Removing that is left for future
work. Thus, this commit (together with previous commits) reduces the
number of iterations over all PUSCH entries, only iterating over the
actually requested PUSCH jobs. On the other hand, because only the RX
thread iterates over PUSCH contexts, it should be thread-safe.

Remove flag "handled", which is always 0.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
25f77993ca Refactor PUSCH processing into its own function
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
cbe69c7dfa Refactor nr_fill_indication()
Pass pointers directly instead of ULSCH_id. Put const where possible and
applicable.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
337abd5716 Remove superfluous tbs parameter
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
c0a2dc9006 Remove second useless loop iteration in nr_ulsch_procedures()
Set the FAPI message in nr_ulschsim correctly in line with what
nr_ulsch_procedures() expected. Add an AssertFatal() to verify that the
assumed length of DMRS in the simulator and what is actually set in the
FAPI message matches. Finally, the internal nr_get_G() code (looping
over all PUSCH) does not double the DMRS because Nl == 3 || Nl == 4, so
harmonize in the simulator.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
a2f8f2ead3 Remove first useless iteration
It is pointless to iterate ulsch_to_decode to find the number of jobs if
we can simply pass it to the function.

Use an additional {} block to limit the amount of indentation.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
c99e5642b5 Pass pointer directly
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
0161568d69 Apply const correctness and avoid pointers
Amidst all these unnecessary pointers, the pointer on
pusch_vars->ptrs_symbols is necessary to reset the PTRS number of
symbols. For clarity, remove this pointer and use
pusch_vars->ptrs_symbols directly.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
1aed7b5802 Cleanly pass pusch_vars to nr_pusch_channel_estimation()
Pass pointer to data. This necessitates to move delay from
NR_gNB_ULSCH_t (ULSCH data, including transport channels etc) to
NR_gNB_PUSCH (lower-PHY PUSCH data):

1. This allows to pass a single pointer to nr_pusch_channel_estimation()
2. To me, delay estimation seems to be a lower-PHY calculation, so it
   fits better anyway.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
e8e3f60e73 Use spsc_q for PUCCH processing
Use the spsc queue to pass jobs from TX thread (scheduler) to RX thread
(handling those jobs), reducing the amount spent searching for PUCCH
jobs in an array, clarifying the design, and making it thread-safe.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
85b4057bde Refactor PUCCH processing into its own function
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Robert Schmidt
b15d394212 Improve spsc_q through atomics
Because it is SPSC, atomic variables are enough to synchronize the two
threads. Concretely put() is modified to ensure that read_idx is
"acquired" so that the read index has been written, including memory, by
the other thread. "Release" ensures that the write operation (including
the memory to the buffer) is written before it is visible to the other
thread in get() (which in turn "acquires" it). For more information, see
also [1].

The rest of the library has been simplified to work only with put() and
get(), reducing total code and the surface for possible bugs.

This (and the previous) version has been tested with the
threadSanitizer:

    TSAN_OPTIONS=halt_on_error=1 ./common/utils/ds/tests/test_spsc_q_perf

On my machine, using Google Benchmark, I measure a considerable 5x speed
improvement:

    $ /tmp/benchmark/tools/compare.py benchmarks pthread.json atomic.json
    Comparing pthread.json to atomic.json
    Benchmark                         Time             CPU      Time Old      Time New       CPU Old       CPU New
    --------------------------------------------------------------------------------------------------------------
    BM_spsc_q/10                   -0.8201         -0.0740     266779912      47989020         52387         48512
    BM_spsc_q/16                   -0.8301         -0.0520     249656592      42428540         51462         48784
    BM_spsc_q/32                   -0.8003         -0.0841     230248798      45972155         53841         49311
    BM_spsc_q/64                   -0.7995         -0.0506     210429791      42199674         50690         48124
    BM_spsc_q/128                  -0.7930         -0.1101     205212273      42483155         52745         46936
    BM_spsc_q/160                  -0.7880         -0.1663     216644738      45938247         53400         44518
    OVERALL_GEOMEAN                -0.8057         -0.0904             0             0             0             0

[1] https://en.cppreference.com/w/c/atomic/memory_order.html

Assisted-By: Claude:claude-sonnet-4-6
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 11:53:19 +02:00
Jaroslava Fiedlerova
0b752116ee Merge remote-tracking branch 'origin/fix-fill_srs_channel_matrix' into integration_2026_w16 (!4024)
Fix fill_srs_channel_matrix

Fix incorrect SRS subcarrier mapping in fill_srs_channel_matrix

The previous implementation of fill_srs_channel_matrix assumed an incorrect
SRS subcarrier mapping, leading to wrong indexing of the estimated channel
in frequency domain.
2026-04-16 09:48:33 +02:00
Laurent THOMAS
3a935bc9f7 When asn1c is not found, allow to download and use asn1c in build tree
This simplifies dependancies management

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 09:34:35 +02:00
Robert Schmidt
17a87cd858 Simplify BuildImage
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-16 00:34:58 +02:00
Merkebu Girmay
58f00921c8 Add AoA selection to vrtsim in-process CIRDB path 2026-04-15 11:19:55 -07:00
Jaroslava Fiedlerova
7fc1d1835a Merge remote-tracking branch 'origin/update-docker-compose' into integration_2026_w16 (!3994)
Update CN5G images to release v2.2.1 and update traffic generator image

- Updated all CN5G image tags to v2.2.1
- Updated image oaisoftwarealliance/trf-gen-cn5g to latest tag supporting
  multi-architecture platforms See here
- Enabled iperf3 server in daemon mode in oai-ext-dn
- Handover: Since MR oai/cn5g/oai-cn5g-amf!372 has been merged, the AMF
  image tag is updated to the latest release v2.2.1
- upgrade MySQL image to 9.6
2026-04-15 14:57:20 +02:00
francescomani
3ff08f25ca remove UNUSED_VARIABLE and replace with UNUSED 2026-04-15 12:29:58 +02:00
francescomani
a1b68b9f98 fix oran_isolate compilation 2026-04-15 12:29:58 +02:00
francescomani
e0ef042fe6 remove gnb dependence in common nr_modulation file 2026-04-15 12:29:57 +02:00
Robert Schmidt
34aad5d276 Add spsc_q data structure library
This data structure is designed to support the use cases of the L1,
i.e., provide a queue which can be quickly used to order L1 jobs in FIFO
order with simple iteration of jobs to treat. It is a Single-Consumer
Single-Producer queue library.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 11:26:21 +02:00
Robert Schmidt
51e17fd7c8 Add test_tpool_vs_actors to unit tests
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 10:27:19 +02:00
Robert Schmidt
449910dbc7 Add fsn lib to simplify frame/slot handling
Refactor existing code, and harmonize interface. Add a couple of tests.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 10:26:53 +02:00
Robert Schmidt
b81442de91 Link NFAPI_LIB into SCHED_NR_LIB
phy_procedures_nr_gNB.c calls pack_srs() functions to pack individual
SRS "subPDUs". Correspondingly, the library depends on NFAPI_LIB. In
nr_ulsim, in a later commit, we will need to unpack the SRS.indication,
so remove dummy functions and implement correctly.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 10:25:56 +02:00
Robert Schmidt
7e3406c3bd Delete dummy functions
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 10:25:46 +02:00
Robert Schmidt
1be48251f0 NFAPI_LIB needs z(lib) for crc32()
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-15 10:25:43 +02:00
Shubhika Garg
05c2165535 chore: upgrade MySQL image to 9.6
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-04-14 15:17:16 +02:00
Shubhika Garg
8ecc693799 docker-compose: Add iperf3 daemon to oai-ext-dn container in cn5g
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-04-14 15:10:03 +02:00
Shubhika Garg
74fcab8779 Update trf-gen-cn5g Docker images to latest tag
- This tag is multi-architecture compatible

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-04-14 15:10:03 +02:00
Shubhika Garg
45ae5f19e4 chore: Update core network images to v2.2.1 release tag
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-04-14 15:09:24 +02:00
Jaroslava Fiedlerova
d694aa68eb Merge remote-tracking branch 'origin/record_db_doc_fix' into integration_2026_w16 (!4046)
fix(record_db doc): correct the path for T_messages.txt and mention use of ninja/make

The commit !4038 (51d84419) provided the wrong path for T_messages.txt. The path
it provided holds if the T tracer is built manually using make.

A note to explicitly mention the path for T_messages.txt when T tracer is built
using make.

Signed-off-by: Sagar Arora sagar.arora@openairinterface.org
2026-04-14 12:12:46 +02:00
Jaroslava Fiedlerova
99c0e6a149 Merge remote-tracking branch 'origin/physim-no-t' into integration_2026_w16 (!4041)
Compilation without T: move to physims
2026-04-14 12:12:18 +02:00
Jaroslava Fiedlerova
a91741818b Merge remote-tracking branch 'origin/issue-911-fix-2' into integration_2026_w16 (!4040)
fix: issue 911 - replace timer oneshot to periodic.

Updated SCTP reconnect timer from TIMER_ONE_SHOT to TIMER_PERIODIC so gNB
continuously retries AMF lookup every 30 seconds after disconnect.
Timer is now removed only when ngap_amf_associated_nb > 0, AMF association
is actually back.
2026-04-14 12:09:42 +02:00
Sagar Arora
9fe14b784f fix(record_db doc): correct the path for T_messages.txt and mention use of ninja/make
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-04-14 09:42:15 +02:00
Aswanth KC
d33466d632 fix: issue 911 - replace timer oneshot to periodic.
Updated SCTP reconnect timer from TIMER_ONE_SHOT to
TIMER_PERIODIC so gNB continuously retries AMF lookup every
30 seconds after disconnect.

Timer is now removed only when ngap_amf_associated_nb > 0,
AMF association is actually back.
2026-04-13 20:43:50 +00:00
Robert Schmidt
90ec531554 Hashtable: remove unused code
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-13 17:21:29 +02:00
francescomani
82f9501424 include NR_L2_UE in dlsim and ulsim and get rid of indication functions from nr_unitary_common 2026-04-12 09:31:47 +02:00
francescomani
d45a1e209b verify consistency of CSI report in L2 instead of RRC
at RRC we don't store CSI-MeasConfig information so in some scenarios (see #1063) we may not have the full pictures to understand if what RRC received is a valid configuration
we verify at L2 instead after updating CSI-MeasConfig and if it fails we send a message to RRC
2026-04-11 17:47:28 +02:00
francescomani
850f03d328 remove lte_rrc from nr-softmodem 2026-04-10 11:07:04 +02:00
francescomani
08085af943 move nr_ru_procedures to SCHED_NR_SRC to prevent including unnecessary SCHED_RU_LIB 2026-04-10 11:07:04 +02:00
francescomani
4cda6ab959 remove unnecessary PHY_COMMON library from NR targets 2026-04-10 11:07:04 +02:00
francescomani
a1ab732111 adding separated NR_PHY_RU library split from LTE one 2026-04-10 11:07:03 +02:00
francescomani
00c1976078 some cleanup in scheduler RA file 2026-04-10 11:02:57 +02:00
francescomani
f414ae474c some cleanup in scheduler primitives file 2026-04-10 10:52:20 +02:00
francescomani
10516db5dd fix yaml file
Co-Authored-By: @Abdo-Gaber
2026-04-10 10:52:20 +02:00
Guido Casati
c866078b21 Tests: enable SIB2/SIB3/SIB4 example config in F1 rfsim CI
Update the shared neighbour config used by the F1 rfsim pipeline to
enable CU-provided SIB2 and neighbour-derived SIB3/SIB4 inputs.

In `ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf`
- Add `cu_sibs = (2, 3, 4)

In `ci-scripts/conf_files/neighbour-config.conf`:
- Add a complete `sib2_config` block
- Add `frequency_list` / `frequency_config` for inter-frequency SIB4 fields
- Extend both neighbour entries with per-cell offsets
2026-04-10 10:22:50 +02:00
Guido Casati
3e515d9c9c Tests: add SIB2/SIB3/SIB4 ASN.1 round-trip coverage
Add encode/decode helpers and basic round-trip tests for NR SIB2, SIB3
and SIB4 in test_asn1_msg.cpp to ensure we produce decodable messages
with expected fields. Extend SIB4 coverage with an
inter_freq_carrier_freq_info_ranges test that exercises boundary and
out-of-range values for carrier reselection parameters and checks
encoder failures for invalid configurations.

Changes:
- Introduce encode_and_decode_sib2, encode_and_decode_sib3 and
  encode_and_decode_sib4 helpers that call do_SIB2_NR, do_SIB3_NR,
  do_SIB4_NR and uper_decode and assert non-empty, non-null byte
  arrays and successful decoding.
- Add sib2_basic_encode_decode, sib3_basic_encode_decode and
  sib4_basic_encode_decode tests that populate minimal but
  representative NR_SIB2_t, NR_SIB3_t and NR_SIB4_t instances and
  verify selected decoded fields match the originals.
- Add inter_freq_carrier_freq_info_ranges test that builds an NR_SIB4_t
  with NR_InterFreqCarrierFreqInfo_t and varies different offsets and
  thresholds to confirm valid combinations encode and invalid ones
  are rejected.
2026-04-10 10:22:50 +02:00
Guido Casati
da7054092a Reorganize and document nr_neighbour_cell_t structure
- Add comprehensive documentation header explaining the structure's role
  as single source of truth for neighbor cell information across multiple
  protocols (NGAP/XnAP handover, measurement config, DU validation, SIB3/SIB4)

- Add detailed field comments documenting protocol-specific mappings:
  * Core identification fields (gNB_ID, nrcell_id, physicalCellId)
  * Frequency/RF parameters (absoluteFrequencySSB, subcarrierSpacing, band)
  * Handover target identification (plmn, tac)

- Document NGAP/XnAP IE mappings for plmn and tac fields
2026-04-10 10:22:50 +02:00
Guido Casati
4569ef199d Refactor (RRC): drop isIntraFrequencyNeighbour flag and labelling
Remove the isIntraFrequencyNeighbour field and all code that sets or
uses it, simplifying neighbour cell handling and avoiding redundant
state in the RRC gNB code. The flag duplicated information that can be
derived from the neighbour absoluteFrequencySSB and the serving cell
SSB ARFCN, and intra-frequency neighbours are logged in the SIB3
preparation flow.

Changes:
- Remove isIntraFrequencyNeighbour from nr_neighbour_cell_t in
  openair2/RRC/NR/nr_rrc_defs.h
- Delete is_intra_frequency_neighbour() and
  label_intra_frequency_neighbours() helpers from
  openair2/RRC/NR/rrc_gNB_du.c
- Remove calls to label_intra_frequency_neighbours() from
  rrc_gNB_process_f1_setup_req() and
  rrc_gNB_process_f1_du_configuration_update() in rrc_gNB_du.c
- Stop setting .isIntraFrequencyNeighbour in the local
  nr_neighbour_cell_t neighbourConfig initializer in
  openair2/RRC/NR/rrc_gNB_mobility.c
2026-04-10 10:22:50 +02:00
Guido Casati
6f9a716eb9 RRC/MAC: add SIB4 inter-frequency neighbour support
Add SIB4 encode/decode helpers and populate SIB4 from configured
inter-frequency carriers and neighbour cells, wiring it into DU F1
Setup handling and MAC SystemInformation.

Changes:
- Add do_SIB4_NR() and NR_SIB4.h inclusion in asn1_msg.c/asn1_msg.h to
  UPER-encode NR_SIB4_t into a byte_array_t.
- Extend nr_mac_configure_other_sib() in NR_MAC_gNB/config.c with an
  NR_SIB_4 case that validates the SIB container, decodes NR_SIB4_t via
  uper_decode, logs failures, and appends SIB4 to SystemInformation.
- Introduce build_inter_freq_carrier_from_cfg() and
  get_sib4_inter_freq_neighbors() in rrc_gNB_du.c to build
  NR_InterFreqCarrierFreqInfo_t and NR_SIB4_t from inter-frequency and
  neighbour cell configuration, skipping invalid or empty carriers.
- Handle NR_SIB_4 in rrc_gNB_process_f1_setup_req() by deriving SIB4
  from neighbour/inter-frequency configuration, encoding it with
  do_SIB4_NR(), validating the resulting byte_array_t and adding the SI
  message for the DU cell when encoding succeeds.
2026-04-10 10:22:50 +02:00
Guido Casati
817d1a6cb5 RRC/MAC: add SIB3 intra-freqeuncy neighbour support
Introduce NR SIB3 encoding in RRC and wire SIB3 neighbour information
into CU–DU F1 Setup and DU SystemInformation. Extend MAC to decode NR
SIB3 from CU-provided SIB containers and attach the decoded SIB3 to the
DU SystemInformation structure.

Changes:
- Add NR_SIB3 ASN.1 include and a do_SIB3_NR() encoder in asn1_msg
  so SIB3 can be serialized into a byte_array_t buffer.
- Introduce get_q_offset_asn1() and get_sib3_intra_freq_neighbors() in
  rrc_gNB_du.c to build an intra-frequency neighbour cell list for SIB3,
  mapping q_OffsetCell dB values to NR_Q_OffsetRange and optionally
  filling q_RxLevMinOffsetCell and q_QualMinOffsetCell.
- Limit the number of intra-frequency neighbours in SIB3 to
  NR_maxCellIntra, logging a warning and skipping additional cells when
  the limit is reached.
- Hook SIB3 construction and encoding into rrc_gNB_process_f1_setup_req()
  so SIB type 3 entries are added to the F1 Setup Response when
  neighbour configuration and matching neighbours are available.
- Handle NR_SIB_3 in nr_mac_configure_other_sib() by validating the CU
  SIB3 container buffer, decoding it with uper_decode into an NR_SIB3_t,
  and attaching the resulting SIB3 to the MAC SystemInformation via
  add_sib_to_systeminformation().
2026-04-10 10:22:50 +02:00
Guido Casati
c53b28f51d RRC: add SIB3/SIB4 neighbour offsets and inter-frequency SIB4 config
Introduce typed SIB3/SIB4 neighbour and inter-frequency carrier
configuration structures, wire them into the RRC neighbour and gNB
instances, and centralise parsing and bounds checking of per-frequency
SIB4 parameters from the gNB frequency list.

Changes:
- Define SIB3/SIB4 reselection and offset bound macros in gnb_config.c
  and apply them when parsing SIB4 frequency_config and
  per-carrier q_RxLevMin/t_ReselectionNR.
- Add add_inter_freq and parse_inter_freq_list helpers in gnb_config.c
  to populate a shared inter_freqs seq_arr_t from gNB_CONFIG_STRING_GNB_LIST
  frequency_list entries, enforcing unique (ARFCN,SCS) combinations and
  logging duplicates.
- Extend neighbour cell parameters in gnb_paramdef.h with SIB3 per-
  neighbour offset fields and define frequency_list/frequency_config
  option names, descriptor tables, and index constants for SIB4 inter-
  frequency configuration.
- Introduce nr_neighbour_cell_neighbor_offset_t, nr_neighbour_cell_sib3_t,
  nr_neighbour_cell_sib4_freq_t, nr_neighbour_cell_sib4_t, and
  nr_inter_freq_cfg_t in nr_rrc_defs.h, and extend nr_neighbour_cell_t
  and gNB_RRC_INST with sib3/sib4 and inter_freqs members respectively.
- udpated fill_neighbour_cell_configuration to use GET_PARAMS_LIST
  with params bound check
2026-04-10 10:22:50 +02:00
Guido Casati
9afa94040d RRC/SIB2: load cell reselection config from gNB
Introduce a typed SIB2 cell reselection configuration, load it from the
gNB configuration into the RRC gNB instance, and use it to build and
encode SIB2 instead of relying on a fixed SIB2 definition.
Validate SIB2 parameters against explicit bounds and make the SIB2
encoder consume a pre-built ASN.1 structure with safer error handling.

Changes:
- Add SIB2 mobility timer and q-HystSF enums plus SIB2 config structs
  (`sib2_speed_state_reselection_pars_t`, `sib2_config_t`) and a
  `sib2_config` field on `gNB_RRC_INST` in `nr_rrc_defs.h`.
- Define SIB2 configuration option names, defaults
  (`GNB_CONFIG_STRING_SIB2_*`, `GNBSIB2PARAMS_DESC`)
  in `gnb_paramdef.h` for q_Hyst, thresholds, mobility timers, scaling
  factors and deriveSSB_IndexFromCell.
- Add `sib2_config` parameter keys, defaults, and range/value checks in
  `gnb_paramdef.h` (`GNBSIB2PARAMS_DESC`).
- Add SIB2 `fill_sib2_configuration()` in `gnb_config.c` to read SIB2
  parameters from the config file log the resulting configuration and
  store it in `rrc->sib2_config` via `RCconfig_NRRRC()`.
- Add `get_q_hyst_asn1()` and `get_sib2_from_cfg()` in `rrc_gNB_du.c`, and
  update `rrc_gNB_process_f1_setup_req()` to encode/add SIB2 from config with
  explicit encode-failure handling and logging.
- Change `do_SIB2_NR` signature in `asn1_msg.h/.c` to
  `byte_array_t do_SIB2_NR(const NR_SIB2_t *sib2)`, remove internal default
  SIB2 construction, and add ASN.1 constraint/encode error logging.
2026-04-10 10:22:50 +02:00
Guido Casati
52d5705f47 Neighbour config: log neighbour presence and counts during parsing
Add info logs for neighbour cell configuration parsing
without changing functional behaviour.
2026-04-10 10:22:50 +02:00
Guido Casati
e27f8c24cf Refactor (F1AP/RRC): convert SIB containers to byte_array_t
Unify SIB container handling by introducing a typed SIB enum and storing
SIB payloads as byte_array_t across common NR types, F1AP helpers, MAC,
and RRC DU setup code.

Changes:
- Include byte_array support in nr_common.h, add nr_sib_type_t (NR_SIB_1–NR_SIB_21),
  and change nr_SIBs_t to hold only nr_sib_type_t SIB_type.
- Switch f1ap_sib_msg_t in f1ap_messages_types.h to use a byte_array_t SI_container
  instead of raw pointer and length fields.
- Update F1AP encode/decode, equality, copy, and free helpers in
  f1ap_interface_management.c to work on SI_container.buf / SI_container.len and
  use eq_byte_array, copy_byte_array, and free_byte_array.
- Adapt F1AP tests in f1ap_lib_test.c to build and inspect SIB containers via
  SI_container.buf and SI_container.len.
- Replace magic SIB numbers with nr_sib_type_t values in gnb_config.c
  (get_sys_info and fill_du_sibs) to validate and configure DU SIBs.
- Rework nr_mac_configure_other_sib in NR_MAC_gNB/config.c to decode SIB2
  from a byte_array_t container, fix freeing by releasing the decoded sib2 on
  failure, and use NR_SIB_2 / NR_SIB_19 for CU/DU SIB selection.
- Add an add_si_msg helper in rrc_gNB_du.c and refactor the SIB2 branch of
  rrc_gNB_process_f1_setup_req to populate cell->SI_msg from encoded local
  byte array while iterating SIBs with FOR_EACH_SEQ_ARR.
2026-04-10 10:22:50 +02:00
Guido Casati
7606a93f57 Refactor (RRC): validate neighbour-cell params and use gpd lookups
Tighten neighbour-cell config parsing by enforcing parameter constraints in
the descriptor and switching parsing code to name-based lookups with gpd.

Changes:
- Update `GNBNEIGHBOURCELLPARAMS_DESC` in `openair2/GNB_APP/gnb_paramdef.h`
  to add checks for `physical id`, `absoluteFrequencySSB`, `scs`, `band`
  `tracking_area_code`.
- Remove neighbour-cell parameter index macros.
- Refactor `parse_neighbour_cells_list` in `openair2/GNB_APP/gnb_config.c`
  to use `gpd()` lookups for neighbour fields instead of fixed indexes.
- Extend `parse_neighbour_cells_list` with an `n_cell_params` argument and
  update `fill_neighbour_cell_configuration` to pass
  `sizeofArray(ncell_params)`.
2026-04-10 10:22:50 +02:00
Guido Casati
185690cb94 Refactor (RRC): inline neighbour cell arrays and constify access
Inline neighbour cell arrays into the RRC neighbour configuration and
update RRC/DU helpers to use const-aware access and shared iteration
helpers when walking neighbour lists and building measurement configs.

Changes:
- Change neighbour_cells in neighbour_cell_configuration_t from a
  seq_arr_t * to an embedded seq_arr_t field.
- Initialize and populate the embedded neighbour_cells directly in
  parse_neighbour_cells_list in gnb_config.c, dropping dynamic
  allocation of the neighbour list container.
- Refactor get_neighbour_cell_by_pci and nr_rrc_get_measconfig in
  rrc_gNB.c to access the embedded neighbour_cells via const pointers,
  introduce a local meas_cfg and a3_event_list, and iterate neighbour
  cells with FOR_EACH_SEQ_ARR.
- Treat neighbour cell configuration entries as const in rrc_gNB_du.c
  (get_cell_neighbour_list, label_intra_frequency_neighbours,
  valid_du_in_neighbour_configs) and iterate neighbour lists with
  FOR_EACH_SEQ_ARR instead of index-based loops.
2026-04-10 10:22:50 +02:00
Guido Casati
442b3045d6 Refactor (gNB Config): look up neighbour-list nr_cellid by name with gpd
Outer gNB neighbour_list entries now only declare the serving cell
nr_cellid. The code resolves that field with gpd instead of a fixed column
index.

Changes:
- gnb_paramdef.h: remove unused NEIGHBOUR_CELL_PHYSICAL_ID from
  GNB_NEIGHBOUR_LIST_PARAM_LIST (keep NRCELLID only).
- gnb_config.c: in fill_neighbour_cell_configuration, set nr_cell_id
  from gpd
2026-04-10 10:22:50 +02:00
Guido Casati
196855364c Add documentation to refactored functions in gnb_config.c 2026-04-10 10:22:50 +02:00
Guido Casati
afb3005a7c Refactor (gNB Config): reuse PLMN helper and neighbour config parsing
Refactor gNB configuration code to share PLMN extraction logic and to
split neighbour-cell configuration into smaller helpers with safer
allocation and clearer list handling.

Changes:
- Add `extract_plmn_from_params()` in `gnb_config_common.c` and declare
  it in `gnb_config_common.h` to centralize PLMN extraction from
  `paramdef_t`.
- Update `set_plmn_config()` to use `extract_plmn_from_params()` when
  filling the PLMN array instead of duplicating field assignments.
- Refactor `fill_neighbour_cell_configuration()` in `gnb_config.c` to
  delegate per-cell neighbour parsing to
  `parse_neighbour_cells_list()` and sorting to
  `sort_neighbour_configuration()`, simplifying the main loop.
- Use `extract_plmn_from_params()` when parsing neighbour PLMNs in
  `parse_neighbour_cells_list()` and log each neighbour with its PLMN,
  PCI, and other radio parameters before adding it to the sequence.
- Switch allocation of `rrc->neighbour_cell_configuration` in
  `fill_neighbour_cell_configuration()` from `malloc` to
  `malloc_or_fail()` to enforce consistent handling of allocation
  failures.
2026-04-10 10:22:50 +02:00
Guido Casati
425ea41ba5 fix (Config API): make config integer checks type-correct and add unsigned range validator
Change 1: config_check_intval() now uses the correct integer pointer for TYPE_INT

Problem: config_check_intval() previously dereferenced param->uptr regardless
of param->type. For parameters declared as signed (TYPE_INT / TYPE_INT32), the
active union member is param->iptr, and param->uptr may be NULL -> using uptr
makes validation unsafe and type-inconsistent.

What changed: Updated config_check_intval() behavior (signature unchanged).
Handle both param->type, param->iptr and param->uptr.

Change 1: new config_check_uintrange() for unsigned range constraints

Problem: there was a signed range checker (config_check_intrange()) that reads
param->iptr, but there was no dedicated unsigned range validator using param->uptr.

What changed: added config_check_uintrange() in config_userapi.h/.c
The new function reads param->uptr as uint32_t and validates against
param->chkPptr->s2.okintrange[] endpoints.

Change 3: constify input params for f2 function pointers

Problem: checkedparam_t.s2.f2 was typed with non-const input params, even though
range checks only read. A safer const-safe signature is required.

What changed: s2.f2 now takes const configmodule_interface_t *
and const paramdef_t *. config_check_intrange() and config_check_uintrange() use
the same const-qualified parameters.
2026-04-10 10:22:48 +02:00
Guido Casati
dc260bd4d9 Fix (config API): print correct integer pointer in range check
Use the integer pointer when reporting invalid integer values:
in `config_check_intrange()` error print from `param->uptr` to
`param->iptr`.
2026-04-10 10:21:56 +02:00
Robert Schmidt
ec327d26fc Compilation without T: move to physims 2026-04-09 12:26:35 +02:00
rmagueta
14cceed229 Fix incorrect SRS subcarrier mapping in fill_srs_channel_matrix
The previous implementation of fill_srs_channel_matrix assumed an incorrect SRS subcarrier mapping, leading to wrong indexing of the estimated channel in frequency domain
2026-04-06 10:19:34 +01:00
916 changed files with 58383 additions and 24127 deletions

View File

@@ -5,3 +5,4 @@ common/utils/T/T_IDs.h
common/utils/T/T_messages.txt.h
common/utils/T/genids
common/utils/T/genids.o
build/

190
.github/workflows/jenkins-dispatch.yml vendored Normal file
View File

@@ -0,0 +1,190 @@
name: Duranta Jenkins Dispatch
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
branches: [develop]
push:
branches:
- develop
concurrency:
group: ${{ github.event_name }}-${{ github.event.action }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
verify-signed-commits:
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request_target'
steps:
- name: Check all commits are signed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
UNSIGNED=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits \
--paginate --jq '[.[] | select(.commit.verification.verified == false) | .sha[:7]] | join(", ")')
if [ -n "$UNSIGNED" ]; then
echo -e "$UNSIGNED commits are missing signature"
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "$(cat <<EOF
**Validation:**
The following commit(s) are missing signature:
$UNSIGNED
Please use 'git commit -S' to sign your commits.
For detailed instructions, refer to the [CONTRIBUTING.md](https://github.com/duranta-project/openairinterface5g/blob/develop/CONTRIBUTING.md) file at the root of this repository or [GitHub Docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
EOF
)"
exit 1
fi
check-labels:
needs: verify-signed-commits
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request_target'
steps:
- name: Check for mandatory CI label
run: |
PR_LABELS=$(echo '${{ toJson(github.event.pull_request.labels) }}' | jq -r '.[].name')
for label in \
"${{ vars.BUILD_ONLY_LABEL }}" \
"${{ vars.DOC_LABEL }}" \
"${{ vars.NR_LABEL }}" \
"${{ vars.NRUE_LABEL }}" \
"${{ vars.LTE_LABEL }}" \
"${{ vars.CI_LABEL }}" \
"${{ vars.RETRIGGER_CI_LABEL }}"; do
if echo "$PR_LABELS" | grep -qxF "$label"; then
exit 0
fi
done
exit 1
detect-changes:
needs: check-labels
runs-on: ubuntu-24.04
if: |
always() && (
github.event_name == 'push' ||
needs.check-labels.result == 'success'
) && (
github.event.action != 'labeled' ||
github.event.label.name == vars.RETRIGGER_CI_LABEL
)
outputs:
protected_files_changed: ${{ steps.filter.outputs.protected }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
protected:
- 'ci-scripts/**'
- '.github/workflows/**'
- '.github/actions/**'
- 'docker/**'
- 'charts/**'
- 'openshift/**'
- 'cmake_targets/build_oai'
- 'cmake_targets/tools/build_helper'
require-maintainer-approval:
needs: detect-changes
if: |
always() &&
needs.detect-changes.outputs.protected_files_changed == 'true'
runs-on: ubuntu-24.04
environment:
name: ci-approval
steps:
- run: echo "Maintainer has approved the changes"
trigger-jenkins:
needs:
- check-labels
- detect-changes
- require-maintainer-approval
if: |
always() &&
(
needs.detect-changes.outputs.protected_files_changed == 'false' ||
needs.require-maintainer-approval.result == 'success'
)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Trigger Jenkins
run: |
# Write payload to a temp file to avoid shell escaping issues
cat << 'EOF' > /tmp/payload.json
${{ toJson(github.event) }}
EOF
# Filter and send
jq -c 'del(.pull_request.body)' /tmp/payload.json > /tmp/filtered_payload.json
# Remap pull_request_target -> pull_request for Jenkins compatibility
EVENT_NAME="${{ github.event_name }}"
if [ "$EVENT_NAME" = "pull_request_target" ]; then
EVENT_NAME="pull_request"
fi
curl -X POST "https://${{ secrets.J_USER }}:${{ secrets.J_PASS }}@${{ secrets.J_URL }}" \
-H "Accept: */*" \
-H "Content-Type: application/json" \
-H "User-Agent: GitHub-Hookshot/${{ secrets.H_AGENT }}" \
-H "X-Github-Delivery: ${{ secrets.GITHUB_TOKEN }}" \
-H "X-Github-Event: $EVENT_NAME" \
-H "X-Github-Hook-Id: ${{ secrets.H_ID }}" \
-H "X-Github-Hook-Installation-Target-Id: ${{ secrets.H_TARGET }}" \
-H "X-Github-Hook-Installation-Target-Type: repository" \
--data @/tmp/filtered_payload.json
cleanup:
needs:
- verify-signed-commits
- check-labels
- detect-changes
- require-maintainer-approval
- trigger-jenkins
if: always() && github.event_name == 'pull_request_target'
runs-on: ubuntu-24.04
steps:
- name: Remove retrigger-ci label
run: |
PR_LABELS=$(echo '${{ toJson(github.event.pull_request.labels) }}' | jq -r '.[].name')
if echo "$PR_LABELS" | grep -qxF "${{ vars.RETRIGGER_CI_LABEL }}"; then
gh pr edit ${{ github.event.pull_request.number }} --remove-label "${{ vars.RETRIGGER_CI_LABEL }}" --repo ${{ github.repository }}
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ cmake_targets/*/build/
cmake_targets/ran_build/
log/
lte_build_oai/
build*
# IDE files
.vscode

View File

@@ -2,7 +2,7 @@
# RELEASE NOTES: #
## [v2.4.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.4.0) -> December 2025. ##
## [v2.4.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v2.4.0) -> December 2025. ##
General new features and improvements (both RAN and UE):
- Rework LDPC BBdev/AAL interface and support both AMD T2/Intel vRAN Boost
@@ -68,7 +68,7 @@ Configuration file changes:
should be removed
- `MACRLCs.[0].stats_max_ue` has been added
## [v2.3.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.3.0) -> July 2025. ##
## [v2.3.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v2.3.0) -> July 2025. ##
General new features and improvements (both RAN and UE):
- Preliminary support for RedCap UEs
@@ -114,7 +114,7 @@ nrUE changes:
Regression:
- Multiple BWPs do not work reliably on gNB; use tag 2025.w17
## [v2.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.2.0) -> November 2024. ##
## [v2.2.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v2.2.0) -> November 2024. ##
General 5G improvements (both gNB and UE):
- Make standalone mode (SA) the default (see [`RUNMODEM.md`](doc/RUNMODEM.md))
@@ -170,7 +170,7 @@ General 5G improvements (both gNB and UE):
This release also includes many fixes and documentation updates. See
`doc/README.md` in the repository for an overview of documentation.
## [v2.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.1.0) -> February 2024. ##
## [v2.1.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v2.1.0) -> February 2024. ##
This release improves existing 5G support and adds various new features.
@@ -197,7 +197,7 @@ interoperability is under testing.
This release also includes many fixes and documentation updates.
## [v2.0.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.0.0) -> August 2023. ##
## [v2.0.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v2.0.0) -> August 2023. ##
This release adds support for 5G and maintains previous features:
* 5G SA in gNB
@@ -226,11 +226,11 @@ This release adds support for 5G and maintains previous features:
For more information on supported features, please refer to the [feature set](doc/FEATURE_SET.md).
## [v1.2.1](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.2.1) -> February 2020. ##
## [v1.2.1](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.2.1) -> February 2020. ##
* Bug fix for mutex lock for wake-up signal
## [v1.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.2.0) -> January 2020. ##
## [v1.2.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.2.0) -> January 2020. ##
This version adds the following implemented features:
@@ -246,11 +246,11 @@ This version also has an improved code quality:
* Better Test Coverage in Continuous Integration:
- Initial framework to do long-run testing at R2LAB
## [v1.1.1](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.1.1) -> November 2019. ##
## [v1.1.1](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.1.1) -> November 2019. ##
- Bug fix in the TDD Fair Round-Robin scheduler
## [v1.1.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.1.0) -> July 2019. ##
## [v1.1.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.1.0) -> July 2019. ##
This version adds the following implemented features:
@@ -282,19 +282,19 @@ This version has an improved code quality:
- Multi-RRU TDD mode
- X2 Handover in FDD mode
## [v1.0.3](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.0.3) -> June 2019. ##
## [v1.0.3](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.0.3) -> June 2019. ##
- Bug fix for LimeSuite v19.04.0 API
## [v1.0.2](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.0.2) -> February 2019. ##
## [v1.0.2](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.0.2) -> February 2019. ##
- Full OAI support for 3.13.1 UHD
## [v1.0.1](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.0.1) -> February 2019. ##
## [v1.0.1](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.0.1) -> February 2019. ##
- Bug fix for the UE L1 simulator.
## [v1.0.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v1.0.0) -> January 2019. ##
## [v1.0.0](https://github.com/duranta-project/openairinterface5g/releases/tag/v1.0.0) -> January 2019. ##
This version first implements the architectural split described in the following picture.

View File

@@ -3,10 +3,11 @@
cmake_minimum_required (VERSION 3.19)
project (OpenAirInterface LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(OAI_VERSION 2.4.0)
option(CUDA_ENABLE "Enable CUDA accelerated channel simulation" OFF)
if(CUDA_ENABLE)
option(ENABLE_CHANNEL_SIM_CUDA "Enable CUDA accelerated channel simulation" OFF)
if(ENABLE_CHANNEL_SIM_CUDA)
find_package(CUDA REQUIRED)
find_package(CUDAToolkit REQUIRED)
message(STATUS "CUDA explicitly enabled, building with GPU acceleration support.")
@@ -34,7 +35,7 @@ if(CUDA_ENABLE)
message(STATUS "CUDA Explicit Copy path enabled (default ATS was overridden).")
endif()
add_compile_definitions(ENABLE_CUDA)
add_compile_definitions(CHANNEL_SIM_CUDA)
endif()
#########################################################
@@ -83,25 +84,40 @@ option(PACKAGING_COMMON "Will produce a package containing common target, config
option(PACKAGING_USRP "Will produce a package containing usrp target, configuration files and docs" OFF)
option(PACKAGING_PHYSIM "Will produce a package containing physim target, configuration files and docs" OFF)
# Check if asn1c is installed, and check if it supports all options we need
# a user can provide ASN1C_EXEC to override an asn1c to use (e.g., parallel
# installation)
find_program(ASN1C_EXEC_PATH asn1c HINTS /opt/asn1c/bin)
set(ASN1C_EXEC ${ASN1C_EXEC_PATH} CACHE FILEPATH "path to asn1c executable")
if(NOT ASN1C_EXEC)
message(FATAL_ERROR "No asn1c found!
You might want to re-run ./build_oai -I
Or provide a path to asn1c using
./build_oai ... --cmake-opt -DASN1C_EXEC=/path/to/asn1c
")
option(AUTO_DOWNLOAD_ASN1C "Automatically download asn1c if not found" OFF)
if (ASN1C_EXEC)
check_option(${ASN1C_EXEC} -gen-APER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-UPER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-JER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-BER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-OER ASN1C_EXEC)
add_custom_target(asn1c DEPENDS ${ASN1C_EXEC})
else ()
if (NOT AUTO_DOWNLOAD_ASN1C)
message(FATAL_ERROR "asn1c not found. Install it globally or activate AUTO_DOWNLOAD_ASN1C")
endif()
message(STATUS "Downloading and compile asn1c local in this build tree")
include(ExternalProject)
ExternalProject_Add(
asn1c_gen
GIT_REPOSITORY https://github.com/mouse07410/asn1c
GIT_TAG 940dd5fa9f3917913fd487b13dfddfacd0ded06e
GIT_REMOTE_UPDATE_STRATEGY CHECKOUT
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/bin/asn1c
BUILD_IN_SOURCE True
CONFIGURE_COMMAND autoreconf -i
BUILD_COMMAND ./configure --prefix ${CMAKE_BINARY_DIR}
COMMAND make -j8 CFLAGS=-fno-strict-aliasing -Wmisleading-indentation
STEP_TARGETS build
)
set(ASN1C_EXEC ${CMAKE_BINARY_DIR}/bin/asn1c)
add_custom_target(asn1c DEPENDS asn1c_gen)
endif()
check_option(${ASN1C_EXEC} -gen-APER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-UPER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-JER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-BER ASN1C_EXEC)
check_option(${ASN1C_EXEC} -no-gen-OER ASN1C_EXEC)
#########################################################
# Base directories, compatible with legacy OAI building #
#########################################################
@@ -140,14 +156,17 @@ add_boolean_option(AVX512 ${AUTODETECT_AVX512} "Whether AVX512 intrinsics is ava
eval_boolean(AUTODETECT_AVX2 DEFINED CPUFLAGS AND CPUFLAGS MATCHES "avx2")
add_boolean_option(AVX2 ${AUTODETECT_AVX2} "Whether AVX2 intrinsics is available on the host processor" ON)
eval_boolean(AUTODETECT_GFNI DEFINED CPUFLAGS AND CPUFLAGS MATCHES "gfni")
add_boolean_option(GFNI ${AUTODETECT_GFNI} "Whether GFNI intrinsics is available on the host processor" ON)
message(STATUS "CPU architecture is ${CMAKE_SYSTEM_PROCESSOR}")
if (CROSS_COMPILE)
message(STATUS "setting as aarch64")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -lgcc -lrt")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
# The following intrinsics are assumed to be available on any x86 system
# (avx, f16c, fma, gnfi, mmx, pclmul, sse, sse2, sse3, xop)
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_AVX_NATIVE -DSIMDE_X86_AVX_NATIVE -DSIMDE_X86_F16C_NATIVE -DSIMDE_X86_FMA_NATIVE -DSIMDE_X86_GFNI_NATIVE -DSIMDE_X86_MMX_NATIVE -DSIMDE_X86_PCLMUL_NATIVE -DSIMDE_X86_SSE2_NATIVE -DSIMDE_X86_SSE3_NATIVE -DSIMDE_X86_SSE_NATIVE -DSIMDE_X86_XOP_HAVE_COM_ -DSIMDE_X86_XOP_NATIVE")
# (avx, f16c, fma, mmx, pclmul, sse, sse2, sse3, xop)
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_AVX_NATIVE -DSIMDE_X86_AVX_NATIVE -DSIMDE_X86_F16C_NATIVE -DSIMDE_X86_FMA_NATIVE -DSIMDE_X86_MMX_NATIVE -DSIMDE_X86_PCLMUL_NATIVE -DSIMDE_X86_SSE2_NATIVE -DSIMDE_X86_SSE3_NATIVE -DSIMDE_X86_SSE_NATIVE -DSIMDE_X86_XOP_HAVE_COM_ -DSIMDE_X86_XOP_NATIVE")
message(STATUS "AVX512 intrinsics are ${AVX512}")
if(${AVX512})
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_AVX512BW_NATIVE -DSIMDE_X86_AVX512F_NATIVE -DSIMDE_X86_AVX512VL_NATIVE -mavx512bw -march=skylake-avx512 -mtune=skylake-avx512")
@@ -158,13 +177,17 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
if(${AVX2})
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_AVX2_NATIVE -DSIMDE_X86_VPCLMULQDQ_NATIVE")
endif()
if (CPUINFO MATCHES "sse4_1")
message(STATUS "GFNI intrinsics are ${GFNI}")
if(${GFNI})
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_GFNI_NATIVE -mgfni")
endif()
if (CPUFLAGS MATCHES "sse4_1")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_SSE4_1_NATIVE")
endif()
if(CPUINFO MATCHES "sse4_2")
if(CPUFLAGS MATCHES "sse4_2")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_SSE4_2_NATIVE")
endif()
if(CPUINFO MATCHES "ssse3")
if(CPUFLAGS MATCHES "ssse3")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -DSIMDE_X86_SSSE3_NATIVE")
endif()
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
@@ -206,16 +229,14 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(commonOpts "${commonOpts} -Wno-packed-bitfield-compat")
endif()
# clang: suppress complaints about unused command line argument (-rdynamic only
# used during linking)
# used during linking) and "const member leaves the object uninitialized"
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(commonOpts "${commonOpts} -Wno-unused-command-line-argument")
set(commonOpts "${commonOpts} -Wno-unused-command-line-argument -Wno-default-const-init-field-unsafe")
endif()
set(CMAKE_C_FLAGS
"${C_FLAGS_PROCESSOR} ${commonOpts} -std=gnu11 -funroll-loops ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS
"${C_FLAGS_PROCESSOR} ${commonOpts} -std=c++11 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${C_FLAGS_PROCESSOR} ${commonOpts} ${CMAKE_CXX_FLAGS}")
add_boolean_option(SANITIZE_ADDRESS OFF "enable the address sanitizer (ASan)" ON)
if (SANITIZE_ADDRESS)
@@ -362,6 +383,12 @@ endif()
add_boolean_option(ENABLE_IMSCOPE OFF "Enable phy scope based on imgui" OFF)
add_boolean_option(ENABLE_IMSCOPE_RECORD OFF "Enable recording IQ data for imscope" OFF)
#########################
##### E3 AGENT
#########################
set(E3_AGENT "OFF" CACHE STRING "O-RAN nGRG E3 Agent for dApps")
set_property(CACHE E3_AGENT PROPERTY STRINGS "ON" "OFF")
##################################################
# ASN.1 grammar C code generation & dependencies #
##################################################
@@ -420,7 +447,6 @@ add_library(ngap
${NGAP_DIR}/ngap_gNB_pdu_session_management.c
${NGAP_DIR}/ngap_gNB_nnsf.c
${NGAP_DIR}/ngap_gNB_overload.c
${NGAP_DIR}/ngap_gNB_trace.c
${NGAP_DIR}/ngap_gNB_ue_context.c
${NGAP_DIR}/ngap_gNB_NRPPa_transport_procedures.c
)
@@ -603,12 +629,6 @@ include_directories("${OPENAIR2_DIR}/COMMON")
include_directories("${OPENAIR2_DIR}/UTIL")
include_directories("${OPENAIR3_DIR}/COMMON")
include_directories("${OPENAIR3_DIR}/UTILS")
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
include_directories("${OPENAIR1_DIR}")
include_directories("${OPENAIR2_DIR}")
include_directories("${OPENAIR3_DIR}/NAS/TOOLS")
@@ -705,22 +725,24 @@ set(SCHED_SRC
)
add_library(SCHED_LIB ${SCHED_SRC})
target_link_libraries(SCHED_LIB PRIVATE asn1_lte_rrc_hdrs)
target_link_libraries(SCHED_LIB PRIVATE nfapi_pnf_lib)
set(SCHED_NR_SRC
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_gNB.c
${OPENAIR1_DIR}/SCHED_NR/nr_prach_procedures.c
${OPENAIR1_DIR}/SCHED_NR/nr_ru_procedures.c
${OPENAIR1_DIR}/SCHED_NR/phy_frame_config_nr.c
)
add_library(SCHED_NR_LIB ${SCHED_NR_SRC})
target_link_libraries(SCHED_NR_LIB PRIVATE asn1_nr_rrc_hdrs UTIL)
target_link_libraries(SCHED_NR_LIB PRIVATE nfapi_nr_lib nfapi_user_lib) # some FAPI messages pack "subPDUs"
set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/ru_procedures.c
${OPENAIR1_DIR}/SCHED_NR/nr_ru_procedures.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
)
add_library(SCHED_RU_LIB ${SCHED_SRC_RU})
target_link_libraries(SCHED_RU_LIB PRIVATE asn1_lte_rrc_hdrs)
target_link_libraries(SCHED_RU_LIB PRIVATE asn1_lte_rrc_hdrs nfapi_user_lib)
set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c
@@ -742,79 +764,6 @@ set(SCHED_SRC_NR_UE
add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE})
target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
# nFAPI
#################################
set(NFAPI_SRC
${NFAPI_DIR}/nfapi/src/nfapi_p4.c
${NFAPI_DIR}/nfapi/src/nfapi_p5.c
${NFAPI_DIR}/nfapi/src/nfapi_p7.c
)
add_library(NFAPI_LIB ${NFAPI_SRC})
target_link_libraries(NFAPI_LIB PUBLIC nfapi_common)
target_link_libraries(NFAPI_LIB PUBLIC nr_fapi_p5 nr_fapi_p7)
if(OAI_WLS)
target_compile_definitions(NFAPI_LIB PRIVATE ENABLE_WLS)
else()
target_compile_definitions(NFAPI_LIB PRIVATE ENABLE_SOCKET)
endif()
include_directories(${NFAPI_DIR}/nfapi/public_inc)
include_directories(${NFAPI_DIR}/nfapi/inc)
set(NFAPI_PNF_SRC
${NFAPI_DIR}/pnf/src/pnf.c
${NFAPI_DIR}/pnf/src/pnf_interface.c
${NFAPI_DIR}/pnf/src/pnf_p7.c
${NFAPI_DIR}/pnf/src/pnf_p7_interface.c
)
add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(NFAPI_PNF_LIB PUBLIC nr_fapi_p7)
if(OAI_WLS)
target_compile_definitions(NFAPI_PNF_LIB PRIVATE ENABLE_WLS)
endif()
include_directories(${NFAPI_DIR}/pnf/public_inc)
include_directories(${NFAPI_DIR}/pnf/inc)
set(NFAPI_VNF_SRC
${NFAPI_DIR}/vnf/src/vnf.c
${NFAPI_DIR}/vnf/src/vnf_interface.c
${NFAPI_DIR}/vnf/src/vnf_p7.c
${NFAPI_DIR}/vnf/src/vnf_p7_interface.c
)
add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC})
target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(NFAPI_VNF_LIB PRIVATE nr_fapi_p5 nr_fapi_p7)
if(OAI_AERIAL)
target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_AERIAL)
endif()
include_directories(${NFAPI_DIR}/vnf/public_inc)
include_directories(${NFAPI_DIR}/vnf/inc)
if(OAI_WLS)
target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_WLS)
endif()
# nFAPI user defined code
#############################
set(NFAPI_USER_SRC
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/nfapi_pnf.c
${NFAPI_USER_DIR}/nfapi_vnf.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
)
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
if(OAI_WLS)
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_WLS)
elseif (OAI_AERIAL)
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_AERIAL)
else()
target_compile_definitions(NFAPI_USER_LIB PRIVATE ENABLE_SOCKET)
endif()
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
target_link_libraries(NFAPI_USER_LIB PRIVATE nr_fapi_p7)
include_directories(${NFAPI_USER_DIR})
# Layer 1
#############################
set(PHY_TURBOIF
@@ -826,6 +775,7 @@ set(PHY_NRLDPC_CODINGIF
)
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts_neon.c)
target_compile_options(dfts PRIVATE -fno-semantic-interposition)
set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
@@ -866,7 +816,6 @@ set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
${OPENAIR1_DIR}/PHY/TOOLS/get_sin_cos.c
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
${OPENAIR1_DIR}/PHY/log_tools.c
)
set(PHY_SRC
@@ -877,6 +826,10 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pilots_mbsfn.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dlsch_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pbch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci.c
@@ -893,22 +846,21 @@ set(PHY_SRC
)
set(PHY_SRC_RU
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/drs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_nr.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/gen_75KHz.cpp
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/INIT/nr_init_ru.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
)
set(NR_PHY_SRC_RU
${OPENAIR1_DIR}/PHY/MODULATION/nr_beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_nr.c
${OPENAIR1_DIR}/PHY/INIT/nr_init_ru.c
)
set(PHY_SRC_UE
@@ -977,7 +929,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_sch_dmrs.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_prach.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/ul_ref_seq_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
@@ -1068,7 +1019,7 @@ add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
target_link_libraries(PHY_NR_COMMON PUBLIC UTIL)
add_library(PHY_NR ${PHY_NR_SRC})
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5 polar smallblock)
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5 polar smallblock ds)
add_library(PHY_NR_NO_AVX_256 ${PHY_NR_SRC})
target_link_libraries(PHY_NR_NO_AVX_256 nr_phy_common nr_common)
@@ -1080,6 +1031,8 @@ target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common
add_library(PHY_RU ${PHY_SRC_RU})
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs UTIL)
add_library(NR_PHY_RU ${NR_PHY_SRC_RU})
#Layer 2 library
#####################
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
@@ -1115,12 +1068,20 @@ set(NR_PDCP_SRC
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia2.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_integrity_nia1.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
)
# gNB: PDCP + CU-CP/CU-UP interface
set(NR_PDCP_SRC_GNB
${NR_PDCP_SRC}
openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c
openair2/LAYER2/nr_pdcp/cuup_cucp_if.c
openair2/LAYER2/nr_pdcp/cuup_cucp_direct.c
openair2/LAYER2/nr_pdcp/cuup_cucp_e1ap.c
)
# UE build: PDCP only; CU-CP/CU-UP interface is gNB-only.
set(NR_PDCP_SRC_UE ${NR_PDCP_SRC})
set(NR_SDAP_SRC
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap.c
${OPENAIR2_DIR}/SDAP/nr_sdap/nr_sdap_entity.c
@@ -1164,7 +1125,7 @@ set(L2_LTE_SRC
)
set(L2_NR_SRC
${NR_PDCP_SRC}
${NR_PDCP_SRC_GNB}
${NR_SDAP_SRC}
${NR_RRC_DIR}/rrc_gNB.c
${NR_RRC_DIR}/mac_rrc_dl_direct.c
@@ -1200,7 +1161,7 @@ set(L2_RRC_SRC_UE
)
set(NR_L2_SRC_UE
${NR_PDCP_SRC}
${NR_PDCP_SRC_UE}
${NR_SDAP_SRC}
${NR_UE_RRC_DIR}/L2_interface_ue.c
${NR_UE_RRC_DIR}/main_ue.c
@@ -1242,12 +1203,15 @@ set (MAC_NR_SRC
${NR_GNB_MAC_DIR}/gNB_scheduler.c
${NR_GNB_MAC_DIR}/gNB_scheduler_bch.c
${NR_GNB_MAC_DIR}/gNB_scheduler_dlsch.c
${NR_GNB_MAC_DIR}/gNB_scheduler_dlsch_default_policies.c
${NR_GNB_MAC_DIR}/gNB_scheduler_ulsch.c
${NR_GNB_MAC_DIR}/gNB_scheduler_ulsch_default_policies.c
${NR_GNB_MAC_DIR}/gNB_scheduler_primitives.c
${NR_GNB_MAC_DIR}/gNB_scheduler_phytest.c
${NR_GNB_MAC_DIR}/gNB_scheduler_uci.c
${NR_GNB_MAC_DIR}/gNB_scheduler_srs.c
${NR_GNB_MAC_DIR}/gNB_scheduler_RA.c
${NR_GNB_MAC_DIR}/gNB_scheduler_pcch.c
${NR_GNB_MAC_DIR}/mac_rrc_dl_handler.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_direct.c
${NR_GNB_MAC_DIR}/mac_rrc_ul_f1ap.c
@@ -1305,6 +1269,7 @@ set (MISC_NFAPI_LTE
)
add_library(MISC_NFAPI_LTE_LIB ${MISC_NFAPI_LTE})
target_link_libraries(MISC_NFAPI_LTE_LIB PRIVATE nfapi_vnf_lib nfapi_pnf_lib)
add_library(L2
${L2_SRC}
@@ -1314,6 +1279,7 @@ add_library(L2
)
target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_link_libraries(L2 PRIVATE nfapi_vnf_lib nfapi_pnf_lib)
if(E2_AGENT)
target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
@@ -1331,6 +1297,7 @@ add_library(L2_NR
)
target_link_libraries(L2_NR PRIVATE ds alg)
target_link_libraries(L2_NR PRIVATE f1ap_lib)
target_link_libraries(L2_NR PRIVATE nfapi_vnf_lib)
target_include_directories(L2_NR PRIVATE ${F1AP_DIR}/lib)
if(E2_AGENT)
target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
@@ -1344,6 +1311,7 @@ add_library(e1_if
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap SECURITY ${OPENSSL_LIBRARIES} e1ap GTPV1U)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_common)
target_compile_definitions(L2_NR PRIVATE PDCP_CUCP_CUUP)
if(OAI_AERIAL)
target_compile_definitions(L2_NR PRIVATE ENABLE_AERIAL)
endif()
@@ -1351,10 +1319,10 @@ endif()
add_library(L2_LTE_NR
# temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file)
${MAC_DIR}/dummy_functions.c
${ENB_APP_SRC}
)
target_link_libraries(L2_LTE_NR PRIVATE f1ap s1ap nr_rrc)
target_link_libraries(L2_LTE_NR PRIVATE nfapi_vnf_lib)
add_library(L2_UE
${L2_SRC_UE}
@@ -1362,6 +1330,7 @@ add_library(L2_UE
)
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_UE PRIVATE GTPV1U)
target_link_libraries(L2_UE PRIVATE nfapi_pnf_lib)
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
@@ -1395,6 +1364,7 @@ set (MME_APP_SRC
add_library(MME_APP ${MME_APP_SRC})
target_link_libraries(MME_APP PRIVATE m2ap m3ap)
target_link_libraries(MME_APP PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(MME_APP PRIVATE nfapi_vnf_lib nfapi_user_lib)
find_package(sctp REQUIRED)
set(SCTP_SRC
@@ -1698,7 +1668,6 @@ endif()
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
include_directories("${NFAPI_DIR}/pnf/public_inc")
include_directories("${NFAPI_DIR}/nfapi/inc")
include_directories("${NFAPI_DIR}/sim_common/inc")
include_directories("${NFAPI_DIR}/pnf_sim/inc")
@@ -1740,9 +1709,9 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE nfapi_vnf_lib nfapi_pnf_lib nfapi_user_lib MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI SIMU radio_common softmodem_common
-Wl,--end-group z dl)
-Wl,--end-group dl)
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
@@ -1757,13 +1726,17 @@ add_executable(oairu
${OPENAIR_DIR}/executables/lte-ru.c
${OPENAIR_DIR}/executables/ru_control.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
${OPENAIR_DIR}/executables/main_ru.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
)
target_link_libraries(oairu PRIVATE
-Wl,--start-group
SCHED_RU_LIB PHY_COMMON PHY_RU UTIL radio_common softmodem_common
-Wl,--end-group z dl)
-Wl,--end-group dl)
target_link_libraries(oairu PRIVATE pthread m CONFIG_LIB rt ${T_LIB})
target_link_libraries(oairu PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -1790,9 +1763,9 @@ target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECURITY UTIL SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
PHY_UE PHY_RU L2_UE L2_LTE SIMU nfapi_pnf_lib nfapi_user_lib MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI radio_common softmodem_common
-Wl,--end-group z dl)
-Wl,--end-group dl)
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
@@ -1802,22 +1775,24 @@ target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs
target_link_libraries(lte-uesoftmodem PRIVATE
asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap)
# nr RRU
add_executable(nr-oru
${OPENAIR_DIR}/executables/nr-ru.c
${OPENAIR_DIR}/openair1/PHY/INIT/nr_parms.c
${OPENAIR_DIR}/openair1/SCHED_NR/phy_frame_config_nr.c
${OPENAIR_DIR}/openair1/SCHED_NR/nr_prach_procedures.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR_DIR}/executables/main_nr_ru.c
)
target_link_libraries(nr-oru PRIVATE
UTIL SCHED_RU_LIB PHY_COMMON PHY_RU PHY_NR shlib_loader z dl
radio_common softmodem_common)
target_link_libraries(nr-oru PRIVATE pthread m CONFIG_LIB rt ${T_LIB} utils
barrier actor)
target_link_libraries(nr-oru PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_phy_common time_management)
if (OAI_RU_FRONTHAUL)
add_executable(nr-oru
${OPENAIR_DIR}/executables/nr-ru.c
${OPENAIR_DIR}/openair1/PHY/INIT/nr_parms.c
${OPENAIR_DIR}/openair1/SCHED_NR/phy_frame_config_nr.c
${OPENAIR_DIR}/openair1/SCHED_NR/nr_prach_procedures.c
${OPENAIR_DIR}/openair1/SCHED_NR/nr_ru_procedures.c
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
${OPENAIR_DIR}/executables/main_nr_ru.c
${OPENAIR_DIR}/executables/nr-oru.c
)
target_link_libraries(nr-oru PRIVATE
UTIL NR_PHY_RU PHY_NR shlib_loader dl oru_fh MAC_NR_COMMON
radio_common softmodem_common nfapi_pnf_lib)
target_link_libraries(nr-oru PRIVATE pthread m CONFIG_LIB rt ${T_LIB} utils
barrier actor nfapi_user_lib)
target_link_libraries(nr-oru PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_phy_common time_management)
endif()
# nr-softmodem
###################################################
@@ -1836,33 +1811,37 @@ add_executable(nr-softmodem
target_link_libraries(nr-softmodem PRIVATE
-Wl,--start-group
UTIL SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
UTIL SCTP_CLIENT SCHED_LIB SCHED_NR_LIB PHY_NR PHY PHY_NR_COMMON NR_PHY_RU GTPV1U SECURITY
ITTI ${NAS_UE_LIB} nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON nfapi_vnf_lib nfapi_pnf_lib nfapi_user_lib SIMU
x2ap f1ap m2ap m3ap e1ap radio_common
time_management softmodem_common
-Wl,--end-group z dl)
-Wl,--end-group dl)
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_boolean_option(OAI_WLS OFF "Activate OAI's WLS driver" OFF)
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
if (OAI_WLS)
target_link_libraries(nr-softmodem PUBLIC wls_integration_lib)
elseif (OAI_AERIAL)
target_compile_definitions(nr-softmodem PUBLIC ENABLE_AERIAL)
target_link_libraries(nr-softmodem PUBLIC aerial_lib)
else()
target_link_libraries(nr-softmodem PUBLIC nfapi_socket_lib)
endif()
add_boolean_option(OAI_AERIAL OFF "Activate OAI's AERIAL driver" OFF)
if (OAI_AERIAL)
target_compile_definitions(nr-softmodem PUBLIC ENABLE_AERIAL)
target_link_libraries(nr-softmodem PUBLIC aerial_lib)
endif()
if(E2_AGENT)
target_link_libraries(nr-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif()
if (E3_AGENT)
target_link_libraries(nr-softmodem PRIVATE e3ap)
target_compile_definitions(nr-softmodem PRIVATE E3_AGENT)
endif()
# force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(nr-softmodem PRIVATE
@@ -1872,7 +1851,7 @@ add_executable(nr-cuup
executables/nr-cuup.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${OPENAIR2_DIR}/E1AP/e1ap_setup.c
${NR_PDCP_SRC}
${NR_PDCP_SRC_GNB}
${NR_SDAP_SRC}
)
@@ -1881,8 +1860,9 @@ target_link_libraries(nr-cuup PRIVATE
GTPV1U e1ap f1ap
time_management softmodem_common
alg
z dl pthread ${T_LIB})
dl pthread ${T_LIB})
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_compile_definitions(nr-cuup PRIVATE PDCP_CUCP_CUUP)
if(E2_AGENT)
target_link_libraries(nr-cuup PRIVATE e2_agent e2_agent_arg e2_ran_func_cuup)
target_compile_definitions(nr-cuup PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
@@ -1905,11 +1885,11 @@ add_executable(nr-uesoftmodem
target_link_libraries(nr-uesoftmodem PRIVATE
-Wl,--start-group
nr_rrc SECURITY UTIL SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
nr_rrc SECURITY UTIL SCHED_NR_UE_LIB
PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON nfapi_nr_lib
ITTI SIMU radio_common
time_management softmodem_common
-Wl,--end-group z dl)
-Wl,--end-group dl)
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
@@ -1983,14 +1963,14 @@ target_link_libraries(physim_common PRIVATE UTIL)
add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c)
target_link_libraries(nr_dlschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common
)
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c)
target_link_libraries(nr_pbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common
)
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2000,14 +1980,14 @@ add_executable(nr_psbchsim
${NFAPI_USER_DIR}/nfapi.c
)
target_link_libraries(nr_psbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common softmodem_common
)
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c)
target_link_libraries(nr_pucchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common
)
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2019,15 +1999,15 @@ add_executable(nr_dlsim
${PHY_INTERFACE_DIR}/queue_t.c
)
target_link_libraries(nr_dlsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common NR_L2_UE
softmodem_common
)
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_prachsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c)
target_link_libraries(nr_prachsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR NR_PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common)
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2035,7 +2015,7 @@ add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
)
target_link_libraries(nr_ulschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${T_LIB} ITTI dl physim_common
)
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2048,8 +2028,8 @@ add_executable(nr_ulsim
)
target_link_libraries(nr_ulsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common NR_L2_UE
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
@@ -2059,17 +2039,17 @@ add_executable(nr_srssim
)
target_link_libraries(nr_srssim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON -Wl,--end-group
m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common
)
if(CUDA_ENABLE)
if(ENABLE_CHANNEL_SIM_CUDA)
if (TARGET oai_cuda_lib)
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
target_link_libraries(nr_ulsim PRIVATE oai_cuda_lib)
target_compile_definitions(nr_dlsim PRIVATE ENABLE_CUDA)
target_compile_definitions(nr_ulsim PRIVATE ENABLE_CUDA)
target_compile_definitions(nr_dlsim PRIVATE CHANNEL_SIM_CUDA)
target_compile_definitions(nr_ulsim PRIVATE CHANNEL_SIM_CUDA)
endif()
endif()
@@ -2126,9 +2106,9 @@ if (${T_TRACER})
params_libconfig
oai_eth_transpro UTIL
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
nfapi_lte_lib nfapi_nr_lib nfapi_pnf_lib nfapi_vnf_lib nfapi_user_lib
MISC_NFAPI_LTE_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU NR_PHY_RU
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap
GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE SIMU
dfts config_internals nr_common crc_byte)
@@ -2171,7 +2151,7 @@ if(ENABLE_TESTS)
NAME benchmark
GITHUB_REPOSITORY google/benchmark
VERSION 1.9.0
OPTIONS "BENCHMARK_ENABLE_TESTING OFF"
OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF"
)
endif()
endif()
@@ -2186,6 +2166,11 @@ add_subdirectory(openair3)
add_subdirectory(radio)
add_subdirectory(tests)
add_boolean_option(OAI_RU_FRONTHAUL OFF "Whether to configure OAI fronthaul library" OFF)
if(OAI_RU_FRONTHAUL)
add_subdirectory(fronthaul)
endif()
if(TARGET oai_cuda_lib)
message(STATUS "CUDA library 'oai_cuda_lib' found, linking to targets...")
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)

View File

@@ -1,33 +1,47 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Contributing to OpenAirInterface #
# Contributing to Duranta
We want to make contributing to this project as easy and transparent as possible.
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112).
1. Sign and return a Contributor License Agreement to OAI team.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up)
if you do not have any.
- We recommend that you register with a professional or student email address.
- If your email domain (`@domain.com`) is not whitelisted, please contact us
(mailto:contact@openairinterface.org).
- Eurecom GitLab does NOT accept public email domains.
3. Provide the OAI team with the **username** of this account to
(mailto:contact@openairinterface.org) ; we will give you the developer
rights on this repository.
4. The contributing policies are described in the [corresponding documentation
1. Create an account on [GitHub](https://github.com/). Only contributions
against [`duranta-project/openairinterface5g/`](https://github.com/duranta-project/openairinterface5g/)
are accepted.
2. Fork the repository, and open pull requests for your contributions from your
fork.
3. The contributing policies are described in the [corresponding documentation
page](doc/code-style-contrib.md).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account.
It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge
request from a forked repository.
* This decision was made for the license reasons.
* The Continuous Integration will reject your merge request.
4. [Sign the CLA](https://github.com/duranta-project/governance/blob/main/docs/easy_cla_process.md)
either before doing making your first pull request or after submitting the
pull request.
5. Mandatory signing of all the commits using the email address used for CLA.
# License #
## Commit Guidelines
By contributing to OpenAirInterface, you agree that your contributions will be
Every pull request must pass two CI checks before it can be merged:
1. **[Developer Certificate of Origin (DCO)](https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin)**:
Each commit must include a `Signed-off-by:` trailer in the commit message.
Use `git commit -s` (or `--signoff`).
2. **[Verified commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)**:
Each commit must be cryptographically signed using SSH or GPG keys to confirm
its origin.
### Signing Commits
GitHub supports commit signing using either SSH keys or GPG keys. For the
step-by-step setup (key generation, Git configuration, registering the key on
GitHub, and verifying signatures locally), see the
[commit signing section of the Git guide](doc/git-guide.md#setting-up-commit-signing).
> **NOTE:** If your commits are not signed, the CI framework will not accept the PR.
For more information regarding contribution guidelines
please check [this document](doc/code-style-contrib.md)
## License
By contributing to Duranta, you agree that your contributions will be
licensed under
1. [CSSL v1.0 license](LICENSES/preferred/CSSL-v1.0.txt): for RAN and UE

8
NOTICE
View File

@@ -84,3 +84,11 @@ Nuand: https://github.com/Nuand/bladeRF/tree/master?tab=License-1-ov-file
Credits for https://github.com/pothosware/SoapySDR
Pothosware: BSL 1.0 License
Credits for https://github.com/zeromq/libzmq
ZeroMQ authors: Mozilla Public License Version 2.0
Credits for source code:
- radio/zmq/zmq_imported.cpp
- radio/zmq/zmq_imported.h
Software Radio Systems Limited: BSD-3-Clause-Open-MPI

View File

@@ -1,24 +1,21 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<h1 align="center">
<a href="https://openairinterface.org/"><img src="https://openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png" alt="OAI" width="550"></a>
<a href="https://lfnetworking.org/projects/duranta/"><img src="https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png" alt="Duranta OAI" width="550"></a>
</h1>
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-CSSL--v1.0-blue" alt="License"></a>
<a href="https://github.com/duranta-project/openairinterface5g/blob/develop/LICENSE"><img src="https://img.shields.io/badge/license-CSSL--v1.0-blue" alt="License"></a>
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
<a href="https://releases.ubuntu.com/26.04/"><img src="https://img.shields.io/badge/OS-Ubuntu26-Green" alt="Supported OS Ubuntu 26"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RHEL9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore41-Green" alt="Supported OS Fedora 43"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedora44-Green" alt="Supported OS Fedora 44"></a>
</p>
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/releases"><img alt="GitLab Release (custom instance)" src="https://img.shields.io/gitlab/v/release/oai/openairinterface5g?gitlab_url=https%3A%2F%2Fgitlab.eurecom.fr&include_prereleases&sort=semver"></a>
</p>
<p align="center">
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu18-Image-Builder%2F&label=build-Ubuntu-x86%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-RHEL8-Cluster-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-RHEL8-Cluster-Image-Builder%2F&label=build-UBI-x86%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu-Image-Builder%2F&label=build-Ubuntu-x86%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-RHEL-Cluster-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-RHEL-Cluster-Image-Builder%2F&label=build-RHEL-Cluster%20Images"></a>
<a href="https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu-ARM-Image-Builder/"><img src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins-oai.eurecom.fr%2Fjob%2FRAN-Ubuntu-ARM-Image-Builder%2F&label=build-Ubuntu-ARM%20Images"></a>
</p>
@@ -30,14 +27,23 @@
<a href="https://hub.docker.com/r/oaisoftwarealliance/oai-nr-cuup"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/oaisoftwarealliance/oai-nr-cuup?label=NR-CUUP%20docker%20pulls"></a>
</p>
# OpenAirInterface License #
# Duranta - OpenAirInterface
Duranta OpenAirInterface RAN delivers and maintains an open-source cellular
wireless software stack for 4G, 5G and future networking technologies. It
supports simulation, prototyping, and end-to-end deployments on
Commercial-Off-The-Shelf (COTS) hardware. Built for research and
experimentation, it provides standard-compliant interfaces and is released
under the Collaborative Standards Software License (CSSL).
## License
* [OAI License Model](http://www.openairinterface.org/?page_id=101)
* [CSSL v1.0](http://www.openairinterface.org/?page_id=698)
The source code is distributed under [**CSSL v1.0**](LICENSE).
Some files, such as for orchestration, are distributed under
[MIT license](preferred)(MIT.txt). Documentation is distributed under
[MIT license](./LICENSES/preferred/MIT.txt). Documentation is distributed under
[Creative Commons Attribution 4.0 International license](LICENSES/preferred/CC-BY-4.0.txt).
All the files without an explicit copyright header have an implicit "Copyright
@@ -53,7 +59,7 @@ history:
3. OAI Public License v1.0: starting tag v.04 till v1.0
4. GPL 3: starting tag v.0 till v.04 (only initial implementation of 4G)
# Where to Start #
## Where to Start
* [General overview of documentation](./doc/README.md)
* [The implemented features](./doc/FEATURE_SET.md)
@@ -69,7 +75,7 @@ To find all READMEs, this command might be handy:
find . -iname "readme*"
```
# RAN repository structure #
## RAN repository structure
The OpenAirInterface (OAI) software is composed of the following parts:
@@ -94,9 +100,9 @@ openairinterface5g
└── tools : Tools for use by the developers/ci machines: code analysis and formatting
```
# How to get support from the OAI Community #
## How to get support from the Community
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).
You can ask your question on the [mailing lists](https://github.com/duranta-project/openairinterface5g/wiki/MailingList).
Your email should contain below information:
@@ -107,6 +113,6 @@ Your email should contain below information:
- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only.
- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only.
- In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment.
- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking.
- Known/open issues are present on [Github](https://github.com/duranta-project/openairinterface5g/issues), so keep checking.
Always remember a structured email will help us understand your issues quickly.

61
ROADMAP.md Normal file
View File

@@ -0,0 +1,61 @@
# Duranta-OpenAirInterface Roadmap
## RAN Roadmap
### Q2 2026
- GPU LDPC Accelerator
- NR-DC Support
- CN Paging procedures
- Support for 64 UEs with E2E throughput validation
- Basic Cat-A OAI O-RU (simulated radio)
### Q3 2026
- QoS-enforcing scheduler
- Xn Handover Support
- UL MU-MIMO
- Aperiodic UL channels (SRS/CSI reporting)
- NR user plane protocol
- Multi-cell support in L2
- Support for 128 UEs with E2E throughput validation
### Q4 2026
- Cat-B Support for FHI 7.2 at RU/DU
- RAN Paging
- Support of 5G RAN Slicing
- Multi-cell performance evaluation (with at-least 3 cells)
### Q1 2027
- Digital Beamforming Support
- DL MU-MIMO at L1
---
## UE Roadmap
### Q2 2026
- Support for Handover Procedures
- Basic Sidelink Procedures (PSSCH, PSCCH)
- PUCCH formats 1&3
### Q3 2026
- Support for 2 UL layers
- Support for 2 DL layers
- RU sharing
### Q4 2026
- Reduce feedback time
- AT command interface
- DL KPI Improvements
- UL KPI Improvements
### Q1 2027
- Scan carrier
- Power control procedures for outdoor operation

View File

@@ -14,7 +14,7 @@ description: A Helm chart for physical simulators network function
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
icon: https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
@@ -31,8 +31,8 @@ keywords:
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
- https://github.com/duranta-project/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org
email: oaicicdteam@openairinterface.org

View File

@@ -14,7 +14,7 @@ description: A Helm subchart for 4G physims network function
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
icon: https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
@@ -30,8 +30,8 @@ keywords:
- 4G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
- https://github.com/duranta-project/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org
email: oaicicdteam@openairinterface.org

View File

@@ -14,7 +14,7 @@ description: A Helm chart for physical simulators network function
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
icon: https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
@@ -31,8 +31,8 @@ keywords:
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
- https://github.com/duranta-project/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org
email: oaicicdteam@openairinterface.org

View File

@@ -14,7 +14,7 @@ description: A Helm subchart for 5G physims network function
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
icon: https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
@@ -30,8 +30,8 @@ keywords:
- 5G
sources:
- https://gitlab.eurecom.fr/oai/openairinterface5g
- https://github.com/duranta-project/openairinterface5g
maintainers:
- name: OPENAIRINTERFACE
email: contact@openairinterface.org
email: oaicicdteam@openairinterface.org

View File

@@ -20,12 +20,11 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def sourceRepository = params.eNB_Repository ?: env.GIT_URL
def sourceBranch = params.eNB_Branch ?: env.GIT_BRANCH
def targetRepository = params.Target_Repository ?: sourceRepository
def targetBranch = params.eNB_TargetBranch ?: 'develop'
def commitID = params.eNB_CommitID ?: env.GIT_COMMIT
def is_MR = params.eNB_mergeRequest ?: false
def targetBranch = params.targetBranch ?: 'develop'
def testRepository = params.repository ?: 'git@asterix:/home/git/openairinterface5g.git'
def testBranch = params.branch ?: 'develop'
def mergeWithTarget = params.mergeWithTarget ?: false
def sourceBranch = params.sourceBranch ?: testBranch
def flexricOption = ""
def runWithOC = false
@@ -40,17 +39,23 @@ pipeline {
timestamps()
ansiColor('xterm')
lock(extra: lockResources)
skipDefaultCheckout()
}
stages {
stage("Build Init") {
steps {
checkout(
scmGit(branches: [[name: "${branch}"]],
userRemoteConfigs: [[url: "${repository}"]],
extensions: [cleanBeforeCheckout()])
)
script {
echo '\u2705 \u001B[94mBuild Init\u001B[0m'
JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
}
// update the build name and description
buildName "${params.eNB_MR}"
buildName "${params.requestNumber}"
buildDescription "Branch : ${sourceBranch}"
}
}
@@ -64,12 +69,12 @@ pipeline {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
echo "no eNB_SourceCodePath given"
if (params.workspace == null) {
echo "no workspace given"
allParametersPresent = false
}
if (params.OC_Credentials != null) {
echo "This pipeline is configured to run with Opensift Cluster."
echo "This pipeline is configured to run with Openshift Cluster."
runWithOC = true
if (params.OC_ProjectName == null) {
echo "no OC_ProjectName given"
@@ -84,21 +89,11 @@ pipeline {
}
echo "CI executor node : ${pythonExecutor}"
echo "Source Repository : ${sourceRepository}"
echo "Source Branch : ${sourceBranch}"
echo "Target Repository : ${targetRepository}"
echo "Target Branch : ${targetBranch}"
echo "Commit ID : ${commitID}"
echo "Testing Repository : ${testRepository}"
echo "Testing Branch : ${testBranch}"
if (allParametersPresent) {
echo '\u2705 \u001B[94m All parameters are present\u001B[0m'
if (is_MR) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${sourceBranch} --src-commit ${commitID} --target-branch ${targetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${commitID}"
}
} else {
echo "\u274C Some parameters are missing"
sh "./ci-scripts/fail.sh"
@@ -121,28 +116,20 @@ pipeline {
}
}
sh """
python3 main.py --mode=InitiateHtml --ranRepository=${targetRepository} \
--ranBranch=${sourceBranch} --ranCommitID=${commitID} \
--ranAllowMerge=${is_MR} --ranTargetBranch=${targetBranch} \
${flexricOption} ${mainPythonAllXmlFiles}
python3 main.py --mode=InitiateHtml --repository=${testRepository} \
--branch=${testBranch} ${mainPythonAllXmlFiles}
"""
if (runWithOC) {
withCredentials([usernamePassword(credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password')]) {
sh """
python3 main.py --mode=InitiateHtml --ranRepository=${targetRepository} \
--ranBranch=${sourceBranch} --ranCommitID=${commitID} \
--ranAllowMerge=${is_MR} --ranTargetBranch=${targetBranch} \
${flexricOption} ${mainPythonAllXmlFiles}
"""
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh """
python3 main.py --mode=TesteNB --ranRepository=${targetRepository} \
--ranBranch=${sourceBranch} --ranCommitID=${commitID} \
--ranAllowMerge=${is_MR} --ranTargetBranch=${targetBranch} \
--eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} \
python3 main.py --mode=TesteNB --repository=${testRepository} \
--branch=${testBranch} \
--ranAllowMerge=${mergeWithTarget} --targetBranch=${targetBranch} \
--workspace=${params.workspace} --XMLTestFile=${xmlFile} \
--OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} \
${flexricOption}
"""
@@ -160,10 +147,10 @@ pipeline {
try {
timeout (time: 60, unit: 'MINUTES') {
sh """
python3 main.py --mode=TesteNB --ranRepository=${targetRepository} \
--ranBranch=${sourceBranch} --ranCommitID=${commitID} \
--ranAllowMerge=${is_MR} --ranTargetBranch=${targetBranch} \
--eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} \
python3 main.py --mode=TesteNB --repository=${testRepository} \
--branch=${testBranch} \
--ranAllowMerge=${mergeWithTarget} --targetBranch=${targetBranch} \
--workspace=${params.workspace} --XMLTestFile=${xmlFile} \
${flexricOption}
"""
}

View File

@@ -3,6 +3,12 @@
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
import groovy.transform.Field
@Field def branch = ''
@Field def gitLocalBranch = ''
@Field def downstreamResults = [:]
// Location of the executor node
def nodeExecutor = params.nodeExecutor
@@ -12,13 +18,43 @@ def do4Gtest = false
def do5Gtest = false
def do5GUeTest = false
//
def gitCommitAuthorEmailAddr
// list of failing stages
def failingStages = ""
def mrValidationWarning = ""
OAI_Registry = "gracehopper3-oai.sboai.cs.eurecom.fr"
// Globally scoped status result variables for downstream jobs.
def ubuntuBuildStatus = ''
def ubuntuArmBuildStatus = ''
def ubuntuJetsonBuildStatus = ''
def rhelBuildStatus = ''
def armBuildStatus = ''
def physim5GStatus = ''
def physimGH5GStatus = ''
def channelSimStatus = ''
def vrtSim5GStatus = ''
def rfSim5GStatus = ''
def flexricRAN5GStatus = ''
def physim4GStatus = ''
def rfSim4GStatus = ''
def l2Sim4GStatus = ''
def lteTDDB200Status = ''
def lteFDDB200OAIUEStatus = ''
def lteFDDB200Status = ''
def lteTDD2x2N3xxStatus = ''
def nsaTDDB200Status = ''
def saTDDB200Status = ''
def phytestLDPCoffloadStatus = ''
def saAW2SStatus = ''
def saAERIALStatus = ''
def saMultiAntennaStatus = ''
def saFHI72Status = ''
def saFHI72MplaneStatus = ''
def saHandoverStatus = ''
def saAERIALOAIUEStatus = ''
def saOAIUEStatus = ''
pipeline {
agent {
@@ -26,103 +62,122 @@ pipeline {
}
options {
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
}
stages {
stage ("Verify Parameters") {
stage ("Get Parameters") {
steps {
script {
echo '\u2705 \u001B[32mGet Parameters\u001B[0m'
// GIT_BRANCH is prefixed with "origin/" by Jenkins - stripped version for use in tags and params in case of PUSH event
gitLocalBranch = env.GIT_BRANCH.replace('origin/', '')
if (env.GITHUB_PR_NUMBER) {
echo "PR number : ${env.GITHUB_PR_NUMBER}"
echo "Source Repository : ${env.GITHUB_PR_URL}"
echo "Source Branch : ${env.GITHUB_PR_SOURCE_BRANCH}"
echo "Commit ID : ${env.GITHUB_PR_HEAD_SHA}"
echo "Target Repo : ${env.GIT_URL}"
echo "Target Branch : ${env.GITHUB_PR_TARGET_BRANCH}"
echo "Label : ${env.GITHUB_PR_LABELS}"
branch = "${env.GITHUB_PR_SOURCE_BRANCH.replace('/', '-').replace('+', '-')}-${env.GITHUB_PR_HEAD_SHA}"
} else {
echo "Branch : ${gitLocalBranch}"
echo "Commit ID : ${env.GIT_COMMIT}"
branch = "${gitLocalBranch}-${env.GIT_COMMIT}"
}
env.JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
echo '\u2705 \u001B[32mVerify Labels\u001B[0m'
if ("MERGE".equals(env.gitlabActionType)) {
LABEL_CHECK = sh returnStdout: true, script: 'ci-scripts/checkGitLabMergeRequestLabels.sh --mr-id ' + env.gitlabMergeRequestIid
LABEL_CHECK = LABEL_CHECK.trim()
if (LABEL_CHECK == 'NONE') {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Your merge request should have one of the mandatory labels:\n\n"
message += " - ~documentation (don't perform any stages)\n"
message += " - ~BUILD-ONLY (execute only build stages)\n"
message += " - ~4G-LTE (perform 4G tests)\n"
message += " - ~5G-NR (perform 5G tests)\n"
message += " - ~CI (perform both 4G and 5G tests)\n"
message += " - ~nrUE (perform only 5G-UE related tests including physims excluding LDPC tests)\n\n"
message += "Not performing CI due to lack of labels"
addGitLabMRComment comment: message
error('Not performing CI due to lack of labels')
} else if (LABEL_CHECK == 'FULL') {
}
}
}
stage ("Verify Labels") {
steps {
echo '\u2705 \u001B[32mVerify Labels\u001B[0m'
script {
if (env.GITHUB_PR_NUMBER) {
if (!(env.GITHUB_PR_LABELS)) {
def gitBaseUrl = env.GIT_URL.trim().replace('.git', '')
def message = "**CI Build:** [#${env.BUILD_NUMBER}](${BUILD_URL}) | Not performing CI due to the absence of one of the following mandatory labels:\n"
message += "- ${gitBaseUrl}/labels/documentation (don't perform any stages)\n"
message += "- ${gitBaseUrl}/labels/BUILD-ONLY (execute only build stages)\n"
message += "- ${gitBaseUrl}/labels/4G-LTE (perform 4G tests)\n"
message += "- ${gitBaseUrl}/labels/5G-NR (perform 5G tests)\n"
message += "- ${gitBaseUrl}/labels/nrUE (perform only 5G-UE related tests including physims excluding LDPC tests)\n"
message += "- ${gitBaseUrl}/labels/CI (perform both 4G and 5G tests)\n"
githubPRComment comment: githubPRMessage(message)
error('Not performing CI due to lack of mandatory labels')
}
if (env.GITHUB_PR_LABELS.contains('CI')) {
do4Gtest = true
do5Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == "SHORTEN-4G") {
}
if (env.GITHUB_PR_LABELS.contains('4G-LTE')) {
do4Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G') {
}
if (env.GITHUB_PR_LABELS.contains('5G-NR')) {
do5Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G-UE') {
}
if (env.GITHUB_PR_LABELS.contains('nrUE')) {
do5GUeTest = true
} else if (LABEL_CHECK == 'SHORTEN-4G-5G-UE') {
do4Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == 'documentation') {
}
if (env.GITHUB_PR_LABELS.contains('documentation')) {
doBuild = false
} else {
// is "BUILD-ONLY", will only build
}
} else {
// PUSH event
do4Gtest = true
do5Gtest = true
}
echo """
CI decision summary:
doBuild = ${doBuild}
do4Gtest = ${do4Gtest}
do5Gtest = ${do5Gtest}
do5GUeTest = ${do5GUeTest}
"""
}
}
}
stage ("Verify Guidelines") {
steps {
echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}"
echo "Git URL is ${GIT_URL}"
echo "Job Name is ${JOB_NAME}"
echo "Build Id is ${BUILD_ID}"
script {
if ("MERGE".equals(env.gitlabActionType)) {
// since a bit, in push events, gitlabUserEmail is not populated
gitCommitAuthorEmailAddr = env.gitlabUserEmail
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
// Doing it manually --> it may have merge conflicts
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
if (env.GITHUB_PR_NUMBER) {
// Validate MR commits: checks for missing Signed-off-by and merge commits
def mrValidationLog = "signedCommit_${env.BUILD_NUMBER}.log"
def mrValidationExitCode = sh(
script: "bash ./ci-scripts/pre-ci-check.sh -s ${env.GITHUB_PR_HEAD_SHA} -t origin/${env.GITHUB_PR_TARGET_BRANCH} > ${mrValidationLog} 2>&1",
returnStatus: true
)
def mrValidationMessage = readFile(mrValidationLog).trim()
sh "rm -f ${mrValidationLog}"
if (mrValidationExitCode >= 1) {
mrValidationWarning = mrValidationMessage
}
if (mrValidationExitCode >= 2) {
error("${mrValidationMessage}")
}
} else {
echo "Git Branch is ${GIT_BRANCH}"
echo "Git Commit is ${GIT_COMMIT}"
// since a bit, in push events, gitlabUserEmail is not populated
gitCommitAuthorEmailAddr = sh returnStdout: true, script: 'git log -n1 --pretty=format:%ae ${GIT_COMMIT}'
gitCommitAuthorEmailAddr = gitCommitAuthorEmailAddr.trim()
echo "GitLab Usermail is ${gitCommitAuthorEmailAddr}"
}
}
}
post {
failure {
script {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Merge Conflicts -- Cannot perform CI"
addGitLabMRComment comment: message
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Local-Repo-Push") {
stage ("Internal-Repo-Push") {
steps {
script {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
triggerSlaveJob ('RAN-Local-Repo-Push', 'Local-Repo-Push')
}
triggerDownstreamJob ('RAN-Internal-Repo-Push')
}
}
post {
failure {
script {
echo "Push to local repository KO"
failingStages += '\n * RAN-Local-Repo-Push'
currentBuild.result = 'FAILURE'
failingStages += '\n * Internal-Repo-Push - merge validation failed (merge conflict, git operation failure, or internal CI error)'
}
}
}
@@ -134,7 +189,7 @@ pipeline {
stage ("Ubuntu-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu-Image-Builder')
triggerDownstreamJob ('RAN-Ubuntu-Image-Builder')
}
}
post {
@@ -142,7 +197,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
ubuntuBuildStatus = finalizeSlaveJob('RAN-Ubuntu18-Image-Builder')
ubuntuBuildStatus = finalizeDownstreamJob('RAN-Ubuntu-Image-Builder')
}
}
failure {
@@ -156,7 +211,7 @@ pipeline {
stage ("Ubuntu-ARM-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder')
triggerDownstreamJob ('RAN-Ubuntu-ARM-Image-Builder')
}
}
post {
@@ -164,7 +219,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
ubuntuArmBuildStatus = finalizeSlaveJob('RAN-Ubuntu-ARM-Image-Builder')
ubuntuArmBuildStatus = finalizeDownstreamJob('RAN-Ubuntu-ARM-Image-Builder')
}
}
failure {
@@ -178,7 +233,7 @@ pipeline {
stage ("Ubuntu-Jetson-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu-Jetson-Image-Builder', 'Ubuntu-Jetson-Image-Builder')
triggerDownstreamJob ('RAN-Ubuntu-Jetson-Image-Builder')
}
}
post {
@@ -186,7 +241,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
ubuntuJetsonBuildStatus = finalizeSlaveJob('RAN-Ubuntu-Jetson-Image-Builder')
ubuntuJetsonBuildStatus = finalizeDownstreamJob('RAN-Ubuntu-Jetson-Image-Builder')
}
}
failure {
@@ -200,7 +255,7 @@ pipeline {
stage ("RHEL-Cluster-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-RHEL8-Cluster-Image-Builder', 'RHEL-Cluster-Image-Builder')
triggerDownstreamJob ('RAN-RHEL-Cluster-Image-Builder')
}
}
post {
@@ -208,7 +263,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
rhelBuildStatus = finalizeSlaveJob('RAN-RHEL8-Cluster-Image-Builder')
rhelBuildStatus = finalizeDownstreamJob('RAN-RHEL-Cluster-Image-Builder')
}
}
failure {
@@ -219,32 +274,10 @@ pipeline {
}
}
}
stage ("cppcheck") {
steps {
script {
triggerSlaveJob ('RAN-cppcheck', 'cppcheck')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
cppcheckStatus = finalizeSlaveJob('RAN-cppcheck')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += cppcheckStatus
}
}
}
}
stage ("ARM-Cross-Compile") {
steps {
script {
triggerSlaveJob ('RAN-ARM-Cross-Compile-Builder', 'ARM-Cross-Compilation')
triggerDownstreamJob ('RAN-ARM-Cross-Compile-Builder')
}
}
post {
@@ -252,7 +285,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
armBuildStatus = finalizeSlaveJob('RAN-ARM-Cross-Compile-Builder')
armBuildStatus = finalizeDownstreamJob('RAN-ARM-Cross-Compile-Builder')
}
}
failure {
@@ -266,11 +299,11 @@ pipeline {
}
}
stage ("DockerHub-Push") {
when { expression {doBuild && "PUSH".equals(env.gitlabActionType)} }
when { expression {doBuild && !(env.GITHUB_PR_NUMBER)} }
steps {
script {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
triggerSlaveJob ('RAN-DockerHub-Push', 'DockerHub-Push')
triggerDownstreamJob ('RAN-DockerHub-Push')
}
}
}
@@ -290,7 +323,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-Cluster-5G', 'PhySim-Cluster-5G')
triggerDownstreamJob ('RAN-PhySim-Cluster-5G')
}
}
post {
@@ -298,7 +331,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
physim5GStatus = finalizeSlaveJob('RAN-PhySim-Cluster-5G')
physim5GStatus = finalizeDownstreamJob('RAN-PhySim-Cluster-5G')
}
}
failure {
@@ -313,7 +346,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-GraceHopper-5G', 'PhySim-GraceHopper-5G')
triggerDownstreamJob ('RAN-PhySim-GraceHopper-5G')
}
}
post {
@@ -321,7 +354,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
physimGH5GStatus = finalizeSlaveJob('RAN-PhySim-GraceHopper-5G')
physimGH5GStatus = finalizeDownstreamJob('RAN-PhySim-GraceHopper-5G')
}
}
failure {
@@ -336,7 +369,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-Channel-Simulation', 'Channel-Simulation')
triggerDownstreamJob ('RAN-Channel-Simulation')
}
}
post {
@@ -344,7 +377,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
channelSimStatus = finalizeSlaveJob('RAN-Channel-Simulation')
channelSimStatus = finalizeDownstreamJob('RAN-Channel-Simulation')
}
}
failure {
@@ -359,7 +392,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-Cluster-4G', 'PhySim-Cluster-4G')
triggerDownstreamJob ('RAN-PhySim-Cluster-4G')
}
}
post {
@@ -367,7 +400,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
physim4GStatus = finalizeSlaveJob('RAN-PhySim-Cluster-4G')
physim4GStatus = finalizeDownstreamJob('RAN-PhySim-Cluster-4G')
}
}
failure {
@@ -382,7 +415,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test-4G', 'RF-Sim-Test-4G')
triggerDownstreamJob ('RAN-RF-Sim-Test-4G')
}
}
post {
@@ -390,7 +423,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
rfSim4GStatus = finalizeSlaveJob('RAN-RF-Sim-Test-4G')
rfSim4GStatus = finalizeDownstreamJob('RAN-RF-Sim-Test-4G')
}
}
failure {
@@ -405,7 +438,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-VRT-Sim-Test-5G', 'VRT-Sim-Test-5G')
triggerDownstreamJob ('RAN-VRT-Sim-Test-5G')
}
}
post {
@@ -413,7 +446,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
vrtSim5GStatus = finalizeSlaveJob('RAN-VRT-Sim-Test-5G')
vrtSim5GStatus = finalizeDownstreamJob('RAN-VRT-Sim-Test-5G')
}
}
failure {
@@ -428,7 +461,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
triggerDownstreamJob ('RAN-RF-Sim-Test-5G')
}
}
post {
@@ -436,7 +469,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
rfSim5GStatus = finalizeSlaveJob('RAN-RF-Sim-Test-5G')
rfSim5GStatus = finalizeDownstreamJob('RAN-RF-Sim-Test-5G')
}
}
failure {
@@ -451,7 +484,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
triggerDownstreamJob ('OAI-FLEXRIC-RAN-Integration-Test')
}
}
post {
@@ -459,7 +492,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
flexricRAN5GStatus = finalizeDownstreamJob('OAI-FLEXRIC-RAN-Integration-Test')
}
}
failure {
@@ -474,7 +507,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-L2-Sim-Test-4G', 'L2-Sim-Test-4G')
triggerDownstreamJob ('RAN-L2-Sim-Test-4G')
}
}
post {
@@ -482,7 +515,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
l2Sim4GStatus = finalizeSlaveJob('RAN-L2-Sim-Test-4G')
l2Sim4GStatus = finalizeDownstreamJob('RAN-L2-Sim-Test-4G')
}
}
failure {
@@ -497,7 +530,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'LTE-FDD-LTEBOX-Container')
triggerDownstreamJob ('RAN-LTE-FDD-LTEBOX-Container')
}
}
post {
@@ -505,13 +538,13 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
lteTDDB200Status = finalizeSlaveJob('RAN-LTE-FDD-LTEBOX-Container')
lteFDDB200Status = finalizeDownstreamJob('RAN-LTE-FDD-LTEBOX-Container')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteTDDB200Status
failingStages += lteFDDB200Status
}
}
}
@@ -521,7 +554,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-FDD-OAIUE-OAICN4G-Container', 'LTE-FDD-OAIUE-OAICN4G-Container')
triggerDownstreamJob ('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
}
}
post {
@@ -529,7 +562,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
lteFDDB200OAIUEStatus = finalizeSlaveJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
lteFDDB200OAIUEStatus = finalizeDownstreamJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
}
}
failure {
@@ -544,7 +577,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'LTE-TDD-LTEBOX-Container')
triggerDownstreamJob ('RAN-LTE-TDD-LTEBOX-Container')
}
}
post {
@@ -552,13 +585,13 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
lteFDDB200Status = finalizeSlaveJob('RAN-LTE-TDD-LTEBOX-Container')
lteTDDB200Status = finalizeDownstreamJob('RAN-LTE-TDD-LTEBOX-Container')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteFDDB200Status
failingStages += lteTDDB200Status
}
}
}
@@ -567,7 +600,7 @@ pipeline {
when { expression {do4Gtest || do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-NSA-B200-Module-LTEBOX-Container', 'NSA-B200-Module-LTEBOX-Container')
triggerDownstreamJob ('RAN-NSA-B200-Module-LTEBOX-Container')
}
}
post {
@@ -575,7 +608,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
nsaTDDB200Status = finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container')
nsaTDDB200Status = finalizeDownstreamJob('RAN-NSA-B200-Module-LTEBOX-Container')
}
}
failure {
@@ -590,7 +623,7 @@ pipeline {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'SA-B200-Module-SABOX-Container')
triggerDownstreamJob ('RAN-SA-B200-Module-SABOX-Container')
}
}
post {
@@ -598,7 +631,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saTDDB200Status = finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
saTDDB200Status = finalizeDownstreamJob('RAN-SA-B200-Module-SABOX-Container')
}
}
failure {
@@ -613,7 +646,7 @@ pipeline {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-gNB-N300-Timing-Phytest-LDPC', 'gNB-N300-Timing-Phytest-LDPC')
triggerDownstreamJob ('RAN-gNB-N300-Timing-Phytest-LDPC')
}
}
post {
@@ -621,7 +654,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
phytestLDPCoffloadStatus = finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC')
phytestLDPCoffloadStatus = finalizeDownstreamJob('RAN-gNB-N300-Timing-Phytest-LDPC')
}
}
failure {
@@ -636,7 +669,7 @@ pipeline {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-TDD-2x2-Container', 'LTE-TDD-2x2-Container')
triggerDownstreamJob ('RAN-LTE-TDD-2x2-Container')
}
}
post {
@@ -644,7 +677,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
lteTDD2x2N3xxStatus = finalizeSlaveJob('RAN-LTE-TDD-2x2-Container')
lteTDD2x2N3xxStatus = finalizeDownstreamJob('RAN-LTE-TDD-2x2-Container')
}
}
failure {
@@ -659,7 +692,7 @@ pipeline {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-AW2S-CN5G', 'SA-AW2S-CN5G')
triggerDownstreamJob ('RAN-SA-AW2S-CN5G')
}
}
post {
@@ -667,7 +700,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saAW2SStatus = finalizeSlaveJob('RAN-SA-AW2S-CN5G')
saAW2SStatus = finalizeDownstreamJob('RAN-SA-AW2S-CN5G')
}
}
failure {
@@ -678,34 +711,11 @@ pipeline {
}
}
}
stage ("Sanity-Check OAI-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerCN5GSlaveJob ('OAI-CN5G-COTS-UE-Test', 'OAI-CN5G-COTS-UE-Test')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
cn5gCOTSUESanityCheck = finalizeSlaveJob('OAI-CN5G-COTS-UE-Test')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += cn5gCOTSUESanityCheck
}
}
}
}
stage ("SA-AERIAL-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-AERIAL-CN5G', 'SA-AERIAL-CN5G')
triggerDownstreamJob ('RAN-SA-AERIAL-CN5G')
}
}
post {
@@ -713,7 +723,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saAERIALStatus = finalizeSlaveJob('RAN-SA-AERIAL-CN5G')
saAERIALStatus = finalizeDownstreamJob('RAN-SA-AERIAL-CN5G')
}
}
failure {
@@ -728,7 +738,7 @@ pipeline {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-Multi-Antenna-CN5G', 'SA-Multi-Antenna-CN5G')
triggerDownstreamJob ('RAN-SA-Multi-Antenna-CN5G')
}
}
post {
@@ -736,7 +746,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saMultiAntennaStatus = finalizeSlaveJob('RAN-SA-Multi-Antenna-CN5G')
saMultiAntennaStatus = finalizeDownstreamJob('RAN-SA-Multi-Antenna-CN5G')
}
}
failure {
@@ -751,7 +761,7 @@ pipeline {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-FHI72-CN5G', 'SA-FHI72-CN5G')
triggerDownstreamJob ('RAN-SA-FHI72-CN5G')
}
}
post {
@@ -759,7 +769,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saFHI72Status = finalizeSlaveJob('RAN-SA-FHI72-CN5G')
saFHI72Status = finalizeDownstreamJob('RAN-SA-FHI72-CN5G')
}
}
failure {
@@ -770,11 +780,11 @@ pipeline {
}
}
}
stage ("SA-Handover-CN5G") {
stage ("SA-FHI72-MPLANE-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-Handover-CN5G', 'SA-Handover-CN5G')
triggerDownstreamJob ('RAN-SA-FHI72-MPLANE-CN5G')
}
}
post {
@@ -782,7 +792,30 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saHandoverStatus = finalizeSlaveJob('RAN-SA-Handover-CN5G')
saFHI72MplaneStatus = finalizeDownstreamJob('RAN-SA-FHI72-MPLANE-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saFHI72MplaneStatus
}
}
}
}
stage ("SA-Handover-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerDownstreamJob ('RAN-SA-Handover-CN5G')
}
}
post {
always {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saHandoverStatus = finalizeDownstreamJob('RAN-SA-Handover-CN5G')
}
}
failure {
@@ -797,7 +830,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-SA-AERIAL-OAIUE-CN5G', 'SA-AERIAL-OAIUE-CN5G')
triggerDownstreamJob ('RAN-SA-AERIAL-OAIUE-CN5G')
}
}
post {
@@ -805,7 +838,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saAERIALOAIUEStatus = finalizeSlaveJob('RAN-SA-AERIAL-OAIUE-CN5G')
saAERIALOAIUEStatus = finalizeDownstreamJob('RAN-SA-AERIAL-OAIUE-CN5G')
}
}
failure {
@@ -820,7 +853,7 @@ pipeline {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-CN5G')
triggerDownstreamJob ('RAN-SA-OAIUE-CN5G')
}
}
post {
@@ -828,7 +861,7 @@ pipeline {
script {
// Using a unique variable name for each test stage to avoid overwriting on a global variable
// due to parallel-time concurrency
saOAIUEStatus = finalizeSlaveJob('RAN-SA-OAIUE-CN5G')
saOAIUEStatus = finalizeDownstreamJob('RAN-SA-OAIUE-CN5G')
}
}
failure {
@@ -845,21 +878,47 @@ pipeline {
post {
success {
script {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) {
addGitLabMRComment comment: message
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
if (env.GITHUB_PR_NUMBER) {
if (mrValidationWarning) {
def message = "**CI Build:** [#${env.BUILD_NUMBER}](${BUILD_URL}) | **Passed**"
message += "\n\n**Validation:** " + mrValidationWarning
githubPRComment comment: githubPRMessage(message)
}
githubNotify account: params.gitAccount,
repo: params.gitRepo,
credentialsId: 'github-jenkins-duranta',
sha: env.GITHUB_PR_HEAD_SHA,
status: 'SUCCESS',
description: 'Build success',
targetUrl: BUILD_URL,
context: 'Jenkins Duranta CI'
}
echo "Pipeline is SUCCESSFUL"
}
}
failure {
script {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ")"
if ("MERGE".equals(env.gitlabActionType)) {
def fullMessage = message + '\n\nList of failing test stages:' + failingStages
addGitLabMRComment comment: fullMessage
def message2 = message + " -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
if (env.GITHUB_PR_NUMBER) {
def message = "**CI Build:** [#${env.BUILD_NUMBER}](${BUILD_URL}) | **Failed** on the following stages:"
if (failingStages) {
message += failingStages
} else {
message += "\nThe pipeline may have failed due to CI, validation, or scripting error. See the build for more details."
}
if (mrValidationWarning) {
message += '\n\n**Validation:** ' + mrValidationWarning
}
if (env.GITHUB_PR_LABELS) {
githubPRComment comment: githubPRMessage(message)
}
githubNotify account: params.gitAccount,
repo: params.gitRepo,
credentialsId: 'github-jenkins-duranta',
sha: env.GITHUB_PR_HEAD_SHA,
status: 'FAILURE',
description: 'Build failed',
targetUrl: BUILD_URL,
context: 'Jenkins Duranta CI'
}
echo "Pipeline FAILED"
}
@@ -869,46 +928,37 @@ pipeline {
// ---- Slave Job functions
def triggerSlaveJob (jobName, gitlabStatusName) {
def MR_NUMBER = "MERGE".equals(env.gitlabActionType) ? env.gitlabMergeRequestIid : 'develop'
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
def triggerDownstreamJob (jobName) {
// Workaround for the "cancelled" pipeline notification
// The downstream job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
def localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'SourceRepo', value: String.valueOf(env.gitlabSourceRepoHttpUrl)),
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
string(name: 'eNB_MR', value: String.valueOf(MR_NUMBER)),
booleanParam(name: 'eNB_mergeRequest', value: "MERGE".equals(env.gitlabActionType)),
string(name: 'eNB_TargetBranch', value: String.valueOf(env.gitlabTargetBranch))
string(name: 'targetRepo', value: String.valueOf(env.GIT_URL)),
string(name: 'sourceRepo', value: String.valueOf(env.GITHUB_PR_URL ?: env.GIT_URL)),
string(name: 'sourceBranch', value: String.valueOf(env.GITHUB_PR_SOURCE_BRANCH ?: gitLocalBranch)),
string(name: 'sourceCommit', value: String.valueOf(env.GITHUB_PR_HEAD_SHA ?: env.GIT_COMMIT)),
string(name: 'requestNumber', value: String.valueOf(env.GITHUB_PR_NUMBER ?: gitLocalBranch)),
booleanParam(name: 'mergeWithTarget', value: env.GITHUB_PR_NUMBER != null),
string(name: 'targetBranch', value: (env.GITHUB_PR_TARGET_BRANCH ?: gitLocalBranch)),
string(name: 'repository', value: String.valueOf(params.ciRepositoryURL)),
string(name: 'branch', value: String.valueOf(branch))
], propagate: false
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
downstreamResults[jobName] = localStatus.resultIsBetterOrEqualTo('SUCCESS') ? 'SUCCESS' : 'FAILURE'
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
if ("MERGE".equals(env.gitlabActionType)) {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.gitlabMergeRequestLastCommit
shortenShaOne = shortenShaOne.trim()
branchName = env.gitlabSourceBranch.replaceAll("/", "-").trim()
fullRanTag = OAI_Registry + '/oai-gnb:' + env.gitlabSourceBranch + '-' + shortenShaOne
} else {
shortenShaOne = sh returnStdout: true, script: 'git log -1 --pretty=format:"%h" --abbrev=8 ' + env.GIT_COMMIT
shortenShaOne = shortenShaOne.trim()
fullRanTag = OAI_Registry + '/oai-gnb:develop-' + shortenShaOne
}
def triggerCN5GDownstreamJob (jobName) {
def fullRanTag = params.internalRegistry + '/oai-gnb:' + "${branch}"
// Workaround for the "cancelled" GitLab pipeline notification
// The slave job is triggered with the propagate false so the following commands are executed
// The downstream job is triggered with the propagate false so the following commands are executed
// Its status is now PASS/SUCCESS from a stage pipeline point of view
// localStatus variable MUST be analyzed to properly assess the status
def localStatus = build job: jobName,
@@ -917,29 +967,30 @@ def triggerCN5GSlaveJob (jobName, gitlabStatusName) {
], propagate: false
def localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
gitlabCommitStatus(name: gitlabStatusName) {
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
downstreamResults[jobName] = localStatus.resultIsBetterOrEqualTo('SUCCESS') ? 'SUCCESS' : 'FAILURE'
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
def finalizeSlaveJob(jobName) {
def finalizeDownstreamJob(jobName) {
lock ('Parent-Lock') {
// In case of any non-success, we are retrieving the HTML report of the last completed
// slave job. The only drop-back is that we may retrieve the HTML report of a previous build
// downstream job. The only drop-back is that we may retrieve the HTML report of a previous build
def fileName
if (jobName == 'OAI-CN5G-COTS-UE-Test') {
fileName = "test_results_oai_cn5g_cots_ue.html"
} else {
fileName = "test_results-${jobName}.html"
}
artifactUrl = BUILD_URL
def artifactUrl = BUILD_URL
if (!fileExists(fileName)) {
copyArtifacts(projectName: jobName,
filter: 'test_results*.html',
selector: lastCompleted())
selector: lastCompleted(),
optional: true)
if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${env.JOB_TIMESTAMP}#' ${fileName}"
} else {
@@ -950,6 +1001,15 @@ def finalizeSlaveJob(jobName) {
// no need to add a prefixed '/'
artifactUrl += 'artifact/' + fileName
}
if (env.GITHUB_PR_NUMBER) {
githubNotify account: params.gitAccount,
repo: params.gitRepo,
credentialsId: "github-jenkins-duranta",
sha: env.GITHUB_PR_HEAD_SHA,
status: downstreamResults.getOrDefault(jobName, 'FAILURE'),
targetUrl: "${artifactUrl}",
context: jobName
}
artifactUrl = "\n * [${jobName}](${artifactUrl})"
return artifactUrl
}

View File

@@ -23,79 +23,98 @@ pipeline {
lock(extra: lockResources)
}
stages {
stage("Job init") {
steps {
buildName "${params.requestNumber ?: params.targetBranch}"
buildDescription "Branch: ${params.sourceBranch}"
}
}
stage('Checkout') {
steps {
script {
if (params.mergeWithTarget) {
echo "PR triggered - checking out merge ref for PR #${params.requestNumber}"
try {
checkout([
$class: 'GitSCM',
branches: [[name: "refs/remotes/origin/pr/${params.requestNumber}/merge"]],
userRemoteConfigs: [[
url: params.targetRepo,
refspec: "+refs/pull/${params.requestNumber}/merge:refs/remotes/origin/pr/${params.requestNumber}/merge",
credentialsId: 'github-jenkins-duranta'
]]
])
} catch (e) {
error("Checkout failed for PR #${params.requestNumber} - " +
"merge ref not found. The PR likely has a conflict with ${params.targetBranch} " +
"that must be resolved before CI can run. (${e.message})")
}
} else {
echo "Push triggered - checking out branch ${params.targetBranch}"
try {
checkout([
$class: 'GitSCM',
branches: [[name: params.targetBranch]],
userRemoteConfigs: [[
url: params.targetRepo,
credentialsId: 'github-jenkins-duranta'
]]
])
} catch (e) {
error("Checkout failed for branch ${params.targetBranch} from ${params.targetRepo}. (${e.message})")
}
}
}
}
}
stage('Verify parameters') {
steps {
script {
def missingParams = []
if (!params.SourceRepo?.trim()) { missingParams << 'SourceRepo' }
if (!params.eNB_Branch?.trim()) { missingParams << 'eNB_Branch' }
if (!params.eNB_CommitID?.trim()) { missingParams << 'eNB_CommitID' }
if (!params.eNB_TargetBranch?.trim()) { missingParams << 'eNB_TargetBranch' }
if (!params.eNB_Repository?.trim()) { missingParams << 'eNB_Repository' }
if (!params.sourceBranch?.trim()) { missingParams << 'sourceBranch' }
if (!params.sourceCommit?.trim()) { missingParams << 'sourceCommit' }
if (params.mergeWithTarget) {
if (!params.targetRepo?.trim()) { missingParams << 'targetRepo' }
if (!params.targetBranch?.trim()) { missingParams << 'targetBranch' }
}
if (missingParams) {
error "Missing required parameters: ${missingParams.join(', ')}"
}
echo "Source Repo : ${params.SourceRepo}"
echo "Source Branch : ${params.eNB_Branch}"
echo "Source Commit : ${params.eNB_CommitID}"
echo "Target Branch : ${params.eNB_TargetBranch}"
echo "Target Repo : ${params.eNB_Repository}"
echo "Source Branch : ${params.sourceBranch}"
echo "Source Commit : ${params.sourceCommit}"
echo "Merge : ${params.mergeWithTarget}"
if (params.mergeWithTarget) {
echo "Target Branch : ${params.targetBranch}"
echo "Target Repo : ${params.targetRepo}"
}
}
}
}
stage('Prepare workspace') {
steps {
sh """
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git remote remove source || true
git config user.email "oaicicdteam@openairinterface.org"
git config user.name "Duranta Jenkins"
git remote remove internal-repo || true
"""
}
}
stage('Add source repo & fetch branches') {
stage('Create testing branch for CI') {
steps {
sh """
git remote add source ${params.SourceRepo} || true
git fetch source ${params.eNB_Branch}
git fetch origin ${params.eNB_TargetBranch}
"""
}
}
stage('Create temporary branch for CI') {
steps {
script {
def shortCommit = params.eNB_CommitID.take(8)
env.NEW_BRANCH = "${params.eNB_Branch}-${shortCommit}"
echo "New branch: ${env.NEW_BRANCH}"
}
sh """
# Checkout source commit
git checkout -B ${env.NEW_BRANCH} ${params.eNB_CommitID}
"""
}
}
stage('Merge target into source') {
steps {
sh """
echo "Merging target branch ${params.eNB_TargetBranch} into source branch ${env.NEW_BRANCH}"
if ! git merge --ff origin/${params.eNB_TargetBranch} \
-m "Merge ${params.eNB_TargetBranch} into ${params.eNB_Branch} for CI"; then
echo "Merge conflicts detected. Aborting."
git merge --abort || true
exit 1
fi
git checkout -B ${params.branch}
"""
}
}
stage('Push merged branch to internal repository') {
steps {
sh """
git remote add internal-repo ${internalRepoURL} || true
echo "Pushing ${env.NEW_BRANCH} to internal repo"
git push --force internal-repo ${env.NEW_BRANCH}
git remote add internal-repo ${params.repository} || true
echo "Pushing ${params.branch} to internal repo"
git push --force internal-repo ${params.branch}
"""
}
}

View File

@@ -46,9 +46,9 @@ pipeline {
stage ("Push to DockerHub") {
steps {
script {
WEEK_REF = sh returnStdout: true, script: 'date +"%Y.w%V"'
def WEEK_REF = sh returnStdout: true, script: 'date +"%Y.w%V"'
WEEK_REF = WEEK_REF.trim()
WEEK_TAG = sh returnStdout: true, script: 'python3 ./ci-scripts/provideUniqueImageTag.py --start_tag ' + WEEK_REF
def WEEK_TAG = sh returnStdout: true, script: 'python3 ./ci-scripts/provideUniqueImageTag.py --start_tag ' + WEEK_REF
WEEK_TAG = WEEK_TAG.trim()
if ((params.forceTag != null) && (params.tagToUse != null)) {
if (params.forceTag) {
@@ -56,7 +56,7 @@ pipeline {
echo "Forced Tag is ${WEEK_TAG}"
}
}
WEEK_SHA = sh returnStdout: true, script: 'git log -n1 --pretty=format:"%h" origin/develop | cut -c 1-8'
def WEEK_SHA = sh returnStdout: true, script: 'git log -n1 --pretty=format:"%H" origin/develop'
WEEK_SHA = WEEK_SHA.trim()
withCredentials([
@@ -82,12 +82,6 @@ pipeline {
}
sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop ${OAI_Registry}/${item}:develop-${WEEK_SHA} || true"
}
// Proxy is not following the same pattern.
sh "docker image tag proxy:develop ${DH_Account}/proxy:develop"
sh "docker image tag proxy:develop ${DH_Account}/proxy:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/proxy:develop"
sh "docker push --quiet ${DH_Account}/proxy:${WEEK_TAG}"
sh "docker rmi ${DH_Account}/proxy:develop ${DH_Account}/proxy:${WEEK_TAG}"
// Logging out on both registries
sh "docker logout ${OAI_Registry} > /dev/null 2>&1"
sh "docker logout > /dev/null 2>&1"

View File

@@ -0,0 +1,210 @@
#!/bin/groovy
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
def pythonExecutor = params.pythonExecutor
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
def JOB_TIMESTAMP
// Choose test stage name or fallback default
def testStageName = params.pipelineTestStageName != null ? params.pipelineTestStageName : 'Template Test Stage'
// Name of the resource
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def targetBranch = params.targetBranch ?: 'develop'
def testRepository = params.repository ?: 'git@asterix:/home/git/openairinterface5g.git'
def testBranch = params.branch ?: "latest"
def mergeWithTarget = params.mergeWithTarget ?: false
def sourceBranch = params.sourceBranch ?: testBranch
def flexricOption = ""
def runWithOC = false
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
agent {
label pythonExecutor
}
options {
timestamps()
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
script {
echo '\u2705 \u001B[94mBuild Init\u001B[0m'
JOB_TIMESTAMP = sh(returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"').trim()
}
// update the build name and description
buildName "${params.requestNumber}"
buildDescription "Branch : ${sourceBranch}"
}
}
stage ('Verify Parameters') {
steps {
script {
echo '\u2705 \u001B[94mVerify Parameters\u001B[0m'
def allParametersPresent = true
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.workspace == null) {
echo "no workspace given"
allParametersPresent = false
}
if (params.OC_Credentials != null) {
echo "This pipeline is configured to run with Openshift Cluster."
runWithOC = true
if (params.OC_ProjectName == null) {
echo "no OC_ProjectName given"
allParametersPresent = false
}
}
if (params.Flexric_Tag != null) {
echo "This pipeline is configured to run with a FlexRIC deployment."
echo "Appending FlexRicTag option to the list of options"
flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
echo "Using new Flexric option: ${flexricOption}"
}
if (testBranch == 'latest') {
echo "Detecting latest commit and branch from repo"
def latest_integration = sh(script: "git for-each-ref --format='%(refname:short) %(committerdate:unix)' refs/remotes/origin/integration_* | sort -k2 -nr | head -n1 | cut -d' ' -f1", returnStdout: true).trim()
def latest_develop = sh(script: "git for-each-ref --format='%(refname:short) %(committerdate:unix)' refs/remotes/origin/develop* | sort -k2 -nr | head -n1 | cut -d' ' -f1", returnStdout: true).trim()
def dev_date = sh(script: "git log ${latest_develop} -1 --format=%ct", returnStdout: true).trim().toInteger()
def int_date = sh(script: "git log ${latest_integration} -1 --format=%ct", returnStdout: true).trim().toInteger()
def selected_ref = (dev_date > int_date) ? "origin/develop" : latest_integration
sourceBranch = selected_ref.replaceFirst("^origin/", "")
commitID = sh(script: "git rev-parse ${selected_ref}", returnStdout: true).trim()
echo "Found branch ${sourceBranch}, commit ${commitID}"
testBranch = "${sourceBranch}-${commitID}"
}
echo "CI executor node : ${pythonExecutor}"
echo "Testing Repository : ${testRepository}"
echo "Testing Branch : ${testBranch}"
if (allParametersPresent) {
echo '\u2705 \u001B[94m All parameters are present\u001B[0m'
} else {
echo "\u274C Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Deploy and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[94m Deploy and Test: ${testStageName}\u001B[0m"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
} else {
echo "Test XML file ${xmlFile}: no such file"
}
}
sh """
python3 main.py --mode=InitiateHtml --repository=${testRepository} \
--branch=${testBranch} ${mainPythonAllXmlFiles}
"""
if (runWithOC) {
withCredentials([usernamePassword(credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password')]) {
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 150, unit: 'MINUTES') {
sh """
python3 main.py --mode=TesteNB --repository=${testRepository} \
--branch=${testBranch} \
--ranAllowMerge=${mergeWithTarget} --targetBranch=${targetBranch} \
--workspace=${params.workspace} --XMLTestFile=${xmlFile} \
--OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} \
${flexricOption}
"""
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
}
} else {
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 150, unit: 'MINUTES') {
sh """
python3 main.py --mode=TesteNB --repository=${testRepository} \
--branch=${testBranch} \
--ranAllowMerge=${mergeWithTarget} --targetBranch=${targetBranch} \
--workspace=${params.workspace} --XMLTestFile=${xmlFile} \
${flexricOption}
"""
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
}
}
}
}
stage ("Log Collection") {
steps {
script {
echo '\u2705 \u001B[94mLog Collection\u001B[0m'
dir ('ci-scripts') {
// Zipping all archived log files
sh "mkdir test_logs"
sh "mv *.log* test_logs || true"
// Zip all log files matching cmake_targets/{*.log*,log/*} into test_logs_XXXX.zip
if (fileExists('../cmake_targets/log')) {
sh "mv ../cmake_targets/log/* test_logs || true"
}
sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *test_log*/"
sh "rm -rf *test_log*/"
if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
}
if (fileExists("test_results.html")) {
def reportName = "test_results-${env.JOB_NAME}.html"
sh "mv test_results.html ${reportName}"
sh """
sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' \
-e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' \
-e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' \
-e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' \
-e 's#TEMPLATE_STAGE_NAME#${testStageName}#' ${reportName}
"""
archiveArtifacts artifacts: "${reportName}"
}
}
}
}
}
}
}

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
# Python for CI testing
#
# Required Python Version
# Python 3.x
@@ -22,7 +22,7 @@ import constants as CONST
#-----------------------------------------------------------
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,CLUSTER):
force_local = False
date_fmt = None
@@ -44,80 +44,40 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
mode = matchReg.group(1)
elif re.match(r'^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match(r'^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.ranRepository = matchReg.group(1)
RAN.ranRepository=matchReg.group(1)
HTML.ranRepository=matchReg.group(1)
CONTAINERS.ranRepository=matchReg.group(1)
SCA.ranRepository=matchReg.group(1)
CLUSTER.ranRepository=matchReg.group(1)
elif re.match(r'^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
elif re.match(r'^\-\-repository=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-repository=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.repository = matchReg.group(1)
RAN.repository=matchReg.group(1)
HTML.repository=matchReg.group(1)
CONTAINERS.repository=matchReg.group(1)
CLUSTER.repository=matchReg.group(1)
elif re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
doMerge = matchReg.group(1)
if ((doMerge == 'true') or (doMerge == 'True')):
CiTestObj.ranAllowMerge = True
RAN.ranAllowMerge=True
HTML.ranAllowMerge=True
CONTAINERS.ranAllowMerge=True
SCA.ranAllowMerge=True
CLUSTER.ranAllowMerge=True
elif re.match(r'^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
RAN.merge=True
CONTAINERS.merge=True
CLUSTER.merge=True
elif re.match(r'^\-\-branch=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-branch=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.branch = matchReg.group(1)
RAN.branch=matchReg.group(1)
HTML.branch=matchReg.group(1)
CONTAINERS.branch=matchReg.group(1)
CLUSTER.branch=matchReg.group(1)
elif re.match(r'^\-\-targetBranch=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-targetBranch=(.*)$', myArgv, re.IGNORECASE)
RAN.targetBranch=matchReg.group(1)
CONTAINERS.targetBranch=matchReg.group(1)
CLUSTER.targetBranch=matchReg.group(1)
elif re.match(r'^\-\-workspace=(.+)$|^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-workspace=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-workspace=(.+)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match(r'^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.ranBranch = matchReg.group(1)
RAN.ranBranch=matchReg.group(1)
HTML.ranBranch=matchReg.group(1)
CONTAINERS.ranBranch=matchReg.group(1)
SCA.ranBranch=matchReg.group(1)
CLUSTER.ranBranch=matchReg.group(1)
elif re.match(r'^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match(r'^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
CiTestObj.ranCommitID = matchReg.group(1)
RAN.ranCommitID=matchReg.group(1)
HTML.ranCommitID=matchReg.group(1)
CONTAINERS.ranCommitID=matchReg.group(1)
SCA.ranCommitID=matchReg.group(1)
CLUSTER.ranCommitID=matchReg.group(1)
elif re.match(r'^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match(r'^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
CiTestObj.ranTargetBranch = matchReg.group(1)
RAN.ranTargetBranch=matchReg.group(1)
HTML.ranTargetBranch=matchReg.group(1)
CONTAINERS.ranTargetBranch=matchReg.group(1)
SCA.ranTargetBranch=matchReg.group(1)
CLUSTER.ranTargetBranch=matchReg.group(1)
elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
print("parameters --eNB*IPAddress ignored")
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
print("parameters --eNB*UserName ignored")
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
print("parameter --eNB*Password ignored")
elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBSourceCodePath=matchReg.group(1)
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
SCA.eNBSourceCodePath=matchReg.group(1)
CLUSTER.eNBSourceCodePath=matchReg.group(1)
elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
print("parameter --eNB1SourceCodePath ignored")
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
print("parameter --eNB2SourceCodePath ignored")
RAN.workspace=matchReg.group(1)
CONTAINERS.workspace=matchReg.group(1)
CLUSTER.workspace=matchReg.group(1)
elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
CiTestObj.testXMLfiles.append(matchReg.group(1))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -55,8 +55,9 @@ then
IS_OAI_LICENCE_PRESENT=`grep -E -c "SPDX-License-Identifier: LicenseRef-CSSL-1.0" $FILE || true`
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FILE || true`
IS_MIT_LICENCE_PRESENT=`grep -E -c "SPDX-License-Identifier: MIT" $FILE || true`
IS_APACHE_LICENSE_PRESENT=`grep -E -c "SPDX-License-Identifier: Apache-2.0" $FILE || true`
IS_EXCEPTION=`echo $FILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ] && [ $IS_APACHE_LICENSE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then
@@ -166,8 +167,9 @@ do
IS_OAI_LICENCE_PRESENT=`grep -E -c "SPDX-License-Identifier: LicenseRef-CSSL-1.0" $FULLFILE || true`
IS_BSD_LICENCE_PRESENT=`grep -E -c "the terms of the BSD Licence|License-Identifier: BSD-2-Clause|License-Identifier: BSD-3-Clause" $FULLFILE || true`
IS_MIT_LICENCE_PRESENT=`grep -E -c "SPDX-License-Identifier: MIT" $FULLFILE || true`
IS_APACHE_LICENSE_PRESENT=`grep -E -c "SPDX-License-Identifier: Apache-2.0" $FULLFILE || true`
IS_EXCEPTION=`echo $FULLFILE | grep -E -c "common/utils/collection/tree.h|common/utils/collection/queue.h|openair2/UTIL/OPT/packet-rohc.h|openair3/NAS/COMMON/milenage.h|openair1/PHY/CODING/crc.h|openair1/PHY/CODING/crcext.h|openair1/PHY/CODING/types.h" || true`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ]
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] && [ $IS_MIT_LICENCE_PRESENT -eq 0 ] && [ $IS_APACHE_LICENSE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then

View File

@@ -1,115 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
function usage {
echo "OAI GitLab merge request applying script"
echo ""
echo "Usage:"
echo "------"
echo ""
echo " checkGitLabMergeRequestLabels.sh [OPTIONS]"
echo ""
echo "Options:"
echo "------------------"
echo ""
echo " --mr-id ####"
echo " Specify the ID of the merge request."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -ne 2 ] && [ $# -ne 1 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
--mr-id)
MERGE_REQUEST_ID="$2"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
LABELS=`curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests/$MERGE_REQUEST_ID" | jq '.labels' || true`
IS_MR_DOCUMENTATION=`echo $LABELS | grep -ic documentation`
IS_MR_BUILD_ONLY=`echo $LABELS | grep -c BUILD-ONLY`
IS_MR_CI=`echo $LABELS | grep -c CI`
IS_MR_4G=`echo $LABELS | grep -c 4G-LTE`
IS_MR_5G=`echo $LABELS | grep -c 5G-NR`
IS_MR_5G_UE=`echo $LABELS | grep -c nrUE`
# none is present! No CI
if [ $IS_MR_BUILD_ONLY -eq 0 ] && [ $IS_MR_CI -eq 0 ] && [ $IS_MR_4G -eq 0 ] && [ $IS_MR_5G -eq 0 ] && [ $IS_MR_DOCUMENTATION -eq 0 ] && [ $IS_MR_5G_UE -eq 0 ]
then
echo "NONE"
exit 0
fi
# 4G and 5G or CI labels: run everything (4G, 5G)
if [ $IS_MR_4G -eq 1 ] && [ $IS_MR_5G -eq 1 ] || [ $IS_MR_CI -eq 1 ]
then
echo "FULL"
exit 0
fi
if [ $IS_MR_5G_UE -eq 1 ] && [ $IS_MR_4G -eq 1 ]
then
echo "SHORTEN-4G-5G-UE"
exit 0
fi
# 4G is present: run only 4G
if [ $IS_MR_4G -eq 1 ]
then
echo "SHORTEN-4G"
exit 0
fi
# 5G is present: run only 5G
if [ $IS_MR_5G -eq 1 ]
then
echo "SHORTEN-5G"
exit 0
fi
if [ $IS_MR_5G_UE -eq 1 ]
then
echo "SHORTEN-5G-UE"
exit 0
fi
# BUILD-ONLY is present: only build stages
if [ $IS_MR_BUILD_ONLY -eq 1 ]
then
echo "BUILD-ONLY"
exit 0
fi
# Documentation is present: don't do anything
if [ $IS_MR_DOCUMENTATION -eq 1 ]
then
echo "documentation"
exit 0
fi

View File

@@ -44,6 +44,14 @@ up2-aerial:
IF: wwan0
MTU: 1500
up3:
Host: up3
AttachScript: /opt/mbim/start_quectel_mbim.sh
DetachScript: /opt/mbim/stop_quectel_mbim.sh
NetworkScript: ip a show dev wwan0
IF: wwan0
MTU: 1500
adb_ue_1:
Host: nano
InitScript: /home/oaicicd/ci_ctl_adb.sh initialize R3CM40LZPHT
@@ -79,11 +87,19 @@ oc-cn5g:
oc-cn5g-20897:
Host: cacofonix
NetworkScript: echo "inet 172.21.6.105"
NetworkScript: echo "inet 172.21.6.115"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72 %%log_dir%%"
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2026-apr oaicicd-core-for-fhi72"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2026-apr oaicicd-core-for-fhi72"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2026-apr oaicicd-core-for-fhi72 %%log_dir%%"
oc-cn5g-00105:
Host: cacofonix
NetworkScript: echo "inet 172.21.6.118"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2026-apr-00105 oaicicd-core-for-fhi72"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2026-apr-00105 oaicicd-core-for-fhi72"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2026-apr-00105 oaicicd-core-for-fhi72 %%log_dir%%"
oc-cn5g-00103-ho:
Host: groot
@@ -109,6 +125,19 @@ oc-cn5g-00104:
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial %%log_dir%%"
oc-cn5g-20897-stonechat:
Host: stonechat
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-fhi72 %%log_dir%%"
oc-cn5g-20899-always-on:
Host: stonechat
NetworkScript: echo "inet 172.21.6.12"
RunIperf3Server: False
matix-cn5g:
Host: matix
NetworkScript: docker exec prod-trf-gen ip a show dev eth0
@@ -183,6 +212,24 @@ amarisoft_ue_2x2:
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz_2x2/aw2s-multi-00102-2x2-v2.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
NetworkScript: ip netns exec ue1 ip a show dev pdn0
amarisoft_00105_40MHz:
Host: amariue
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_fhi72_mplane_40MHz/multi-00105-40.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
NetworkScript: ip netns exec ue1 ip a show dev pdn0
Tracing:
Start: '' # nothing to be done
Stop: '' # nothing to be done
Collect: 'cp /tmp/ue.log %%log_dir%%'
amarisoft_00105_100MHz:
Host: amariue
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_fhi72_mplane_100MHz/multi-00105-100.cfg &
TermScript: /root/lteue-linux-2025-03-15/ws.js -t 10 127.0.0.1:9002 '{"message":"quit"}' || killall -KILL lteue-avx2
NetworkScript: ip netns exec ue1 ip a show dev pdn0
Tracing:
Start: '' # nothing to be done
Stop: '' # nothing to be done
Collect: 'cp /tmp/ue.log %%log_dir%%'
amarisoft_ue_1:
Host: amariue
AttachScript: /root/lteue-linux-2025-03-15/ws.js 127.0.0.1:9002 '{"message":"power_on","ue_id":1}'

View File

@@ -95,13 +95,13 @@ class Analysis():
test_summary['Nbfail'] = nb_failed
return nb_failed == 0, test_summary, test_result
def analyze_rt_stats(thresholds, L1_stats, MAC_stats):
def analyze_rt_stats(thresholds, stat_files):
with open(thresholds, 'r') as f:
datalog_rt_stats = yaml.load(f, Loader=yaml.FullLoader)
rt_keys = datalog_rt_stats['Ref']
real_time_stats = {}
for sf in [L1_stats, MAC_stats]:
for sf in stat_files:
with open(sf, 'r') as f:
for line in f.readlines():
for k in rt_keys:

View File

@@ -50,17 +50,16 @@ def OC_logout(cmd):
class Cluster:
def __init__(self):
self.eNBSourceCodePath = ""
self.workspace = ""
self.OCUserName = ""
self.OCPassword = ""
self.OCProjectName = ""
self.OCUrl = OCUrl
self.OCRegistry = OCRegistry
self.ranRepository = ""
self.ranBranch = ""
self.ranCommitID = ""
self.ranAllowMerge = False
self.ranTargetBranch = ""
self.repository = ""
self.branch = ""
self.merge = False
self.targetBranch = ""
self.cmd = None
def _recreate_entitlements(self):
@@ -101,7 +100,7 @@ class Cluster:
def _start_build(self, name):
# will return "immediately" but build runs in background
# if multiple builds are started at the same time, this can take some time, however
ret = self.cmd.run(f'oc start-build {name} --from-dir={self.eNBSourceCodePath} --exclude=""')
ret = self.cmd.run(f'oc start-build {name} --from-dir={self.workspace} --exclude=""')
regres = re.search(r'build.build.openshift.io/(?P<jobname>[a-zA-Z0-9\-]+) started', ret.stdout)
if ret.returncode != 0 or ret.stdout.count('Uploading finished') != 1 or regres is None:
logging.error(f"error during oc start-build: {ret.stdout}")
@@ -157,7 +156,7 @@ class Cluster:
OC_logout(cmd)
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
return False
tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
tag = self.branch
registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, None, None)
OC_logout(cmd)
@@ -174,12 +173,12 @@ class Cluster:
return (image, archiveArtifact(self.cmd, ctx, fn))
def BuildClusterImage(self, ctx, node, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
if self.repository == '' or self.branch == '':
HELP.GenericHelp(CONST.Version)
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
lSourcePath = self.eNBSourceCodePath
raise ValueError(f'Insufficient Parameter: repository {self.repository} branch {self.branch}')
lSourcePath = self.workspace
if node == '' or lSourcePath == '':
raise ValueError('Insufficient Parameter: eNBSourceCodePath missing')
raise ValueError('Insufficient Parameter: workspace missing')
ocUserName = self.OCUserName
ocPassword = self.OCPassword
ocProjectName = self.OCProjectName
@@ -200,22 +199,22 @@ class Cluster:
baseTag = 'develop'
forceBaseImageBuild = False
if self.ranAllowMerge: # merging MR branch into develop -> temporary image
branchName = self.ranBranch.replace('/','-')
imageTag = f'{branchName}-{self.ranCommitID[0:8]}'
if self.ranTargetBranch == 'develop':
if self.merge: # merging MR branch into develop -> temporary image
branchName = self.branch.replace('/','-')
imageTag = f'{branchName}'
if self.targetBranch == 'develop':
ret = self.cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.rhel9 | grep --colour=never -i INDEX')
result = re.search('index', ret.stdout)
if result is not None:
forceBaseImageBuild = True
baseTag = 'ci-temp'
# if the branch name contains integration_20xx_wyy, let rebuild ran-base
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.ranBranch)
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.branch)
if not forceBaseImageBuild and result is not None:
forceBaseImageBuild = True
baseTag = 'ci-temp'
else:
imageTag = f'develop-{self.ranCommitID[0:8]}'
imageTag = self.branch
forceBaseImageBuild = True
# logging to OC Cluster and then switch to corresponding project

View File

@@ -29,38 +29,18 @@ from cls_ci_helper import archiveArtifact
# Helper functions used here and in other classes
# (e.g., cls_cluster.py)
#-----------------------------------------------------------
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-enb-asan', 'oai-gnb-asan', 'oai-lte-ue-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial', 'oai-gnb-fhi72']
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-enb-asan', 'oai-gnb-asan', 'oai-lte-ue-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial', 'oai-gnb-fhi72', 'oai-gnb-fhi72-t2']
DEFAULT_REGISTRY = "gracehopper3-oai.sboai.cs.eurecom.fr"
def CreateWorkspace(host, sourcePath, ranRepository, ranCommitID, ranTargetBranch, ranAllowMerge):
if ranCommitID == '':
logging.error('need ranCommitID in CreateWorkspace()')
raise ValueError('Insufficient Parameter in CreateWorkspace(): need ranCommitID')
def CreateWorkspace(host, sourcePath, repository, branch):
script = "scripts/create_workspace.sh"
options = f"{sourcePath} {ranRepository} {ranCommitID}"
if ranAllowMerge:
if ranTargetBranch == '':
ranTargetBranch = 'develop'
options += f" {ranTargetBranch}"
options = f"{sourcePath} {repository} {branch}"
logging.info(f'execute "{script}" with options "{options}" on node {host}')
with cls_cmd.getConnection(host) as c:
ret = c.exec_script(script, 90, options)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
return ret.returncode == 0
def CreateTag(ranCommitID, ranBranch, ranAllowMerge):
if ranCommitID == 'develop':
return 'develop'
shortCommit = ranCommitID[0:8]
if ranAllowMerge:
# Allowing contributor to have a name/branchName format
branchName = ranBranch.replace('/','-')
tagToUse = f'{branchName}-{shortCommit}'
else:
tagToUse = f'develop-{shortCommit}'
return tagToUse
def AnalyzeBuildLogs(image, lf):
committed = False
tagged = False
@@ -172,23 +152,16 @@ class Containerize():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBSourceCodePath = ''
self.repository = ''
self.branch = ''
self.merge = False
self.targetBranch = ''
self.workspace = ''
self.imageKind = ''
self.proxyCommit = None
self.yamlPath = ''
self.services = ''
self.deploymentTag = ''
self.cli = ''
self.cliBuildOptions = ''
self.dockerfileprefix = ''
self.host = ''
self.num_attempts = 1
self.flexricTag = ''
@@ -198,23 +171,12 @@ class Containerize():
#-----------------------------------------------------------
def BuildImage(self, ctx, node, HTML):
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
logging.debug('Building on server: ' + node)
cmd = cls_cmd.getConnection(node)
log_files = []
# Checking the hostname to get adapted on cli and dockerfileprefixes
cmd.run('hostnamectl')
result = re.search('Ubuntu|Red Hat', cmd.getBefore())
self.host = result.group(0)
if self.host == 'Ubuntu':
self.cli = 'docker'
self.dockerfileprefix = '.ubuntu'
self.cliBuildOptions = ''
elif self.host == 'Red Hat':
self.cli = 'sudo podman'
self.dockerfileprefix = '.rhel9'
self.cliBuildOptions = '--disable-compression'
dockerfileprefix = '.ubuntu'
# we always build the ran-build image with all targets
# Creating a tupple with the imageName, the DockerFile prefix pattern, targetName and sanitized option
@@ -232,23 +194,20 @@ class Containerize():
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
imageNames.append(('oai-lte-ue', 'lteUE', 'oai-lte-ue', ''))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
if self.host == 'Red Hat':
imageNames.append(('oai-physim', 'phySim', 'oai-physim', ''))
if self.host == 'Ubuntu':
imageNames.append(('oai-lte-ru', 'lteRU', 'oai-lte-ru', ''))
# Building again the 5G images with Address Sanitizer
imageNames.append(('ran-build', 'build', 'ran-build-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-enb', 'eNB', 'oai-enb-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-lte-ue', 'lteUE', 'oai-lte-ue-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('ran-build-fhi72', 'build.fhi72', 'ran-build-fhi72', ''))
imageNames.append(('oai-gnb', 'gNB.fhi72', 'oai-gnb-fhi72', ''))
imageNames.append(('oai-nr-oru', 'nrORU.fhi72', 'oai-nr-oru', ''))
imageNames.append(('oai-lte-ru', 'lteRU', 'oai-lte-ru', ''))
# Building again the 5G images with Address Sanitizer
imageNames.append(('ran-build', 'build', 'ran-build-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-enb', 'eNB', 'oai-enb-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-lte-ue', 'lteUE', 'oai-lte-ue-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
imageNames.append(('ran-build-fhi72', 'build.fhi72', 'ran-build-fhi72', ''))
imageNames.append(('oai-gnb', 'gNB.fhi72', 'oai-gnb-fhi72', ''))
imageNames.append(('oai-nr-oru', 'nrORU.fhi72', 'oai-nr-oru', ''))
result = re.search('build_cross_arm64', self.imageKind)
if result is not None:
self.dockerfileprefix = '.ubuntu.cross-arm64'
dockerfileprefix = '.ubuntu.cross-arm64'
result = re.search('native_armv9', self.imageKind)
if result is not None:
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
@@ -261,27 +220,27 @@ class Containerize():
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
result = re.search('fhi72-t2', self.imageKind)
if result is not None:
imageNames.append(('ran-build-fhi72-t2', 'build.fhi72.t2', 'ran-build-fhi72-t2', ''))
imageNames.append(('oai-gnb', 'gNB.fhi72.t2', 'oai-gnb-fhi72-t2', ''))
cmd.cd(lSourcePath)
# if asterix, copy the entitlement and subscription manager configurations
if self.host == 'Red Hat':
cmd.run('mkdir -p ./etc-pki-entitlement')
cmd.run('cp /etc/pki/entitlement/*.pem ./etc-pki-entitlement/')
baseImage = 'ran-base'
baseTag = 'develop'
forceBaseImageBuild = False
imageTag = 'develop'
if (self.ranAllowMerge):
if (self.merge):
imageTag = 'ci-temp'
if self.ranTargetBranch == 'develop':
cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base{self.dockerfileprefix} | grep --colour=never -i INDEX')
if self.targetBranch == 'develop':
cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base{dockerfileprefix} | grep --colour=never -i INDEX')
result = re.search('index', cmd.getBefore())
if result is not None:
forceBaseImageBuild = True
baseTag = 'ci-temp'
# if the branch name contains integration_20xx_wyy, let rebuild ran-base
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.ranBranch)
result = re.search('integration_20([0-9]{2})_w([0-9]{2})', self.branch)
if not forceBaseImageBuild and result is not None:
forceBaseImageBuild = True
baseTag = 'ci-temp'
@@ -289,31 +248,30 @@ class Containerize():
forceBaseImageBuild = True
# Let's remove any previous run artifacts if still there
cmd.run(f"{self.cli} image prune --force")
cmd.run(f"docker image prune --force")
for image,pattern,name,option in imageNames:
cmd.run(f"{self.cli} image rm {name}:{imageTag}", reportNonZero=False)
cmd.run(f"docker image rm {name}:{imageTag}", reportNonZero=False)
cmd.run(f'docker login -u oaicicd -p oaicicd {DEFAULT_REGISTRY}')
ubuntuImage = "ubuntu:noble"
# Build the base image only on Push Events (not on Merge Requests)
# On when the base image docker file is being modified.
if forceBaseImageBuild:
cmd.run(f"{self.cli} image rm {baseImage}:{baseTag}")
cmd.run(f"docker image rm {baseImage}:{baseTag}")
logfile = f'{lSourcePath}/cmake_targets/log/ran-base.docker.log'
if self.host == 'Ubuntu':
option = f" --build-arg UBUNTU_IMAGE={DEFAULT_REGISTRY}/{ubuntuImage}"
cmd.run(f"{self.cli} build {self.cliBuildOptions} --target {baseImage} --tag {baseImage}:{baseTag} --file docker/Dockerfile.base{self.dockerfileprefix} {option} . &> {logfile}", timeout=1600)
option = f" --build-arg UBUNTU_IMAGE={DEFAULT_REGISTRY}/{ubuntuImage}"
cmd.run(f"docker build --target {baseImage} --tag {baseImage}:{baseTag} --file docker/Dockerfile.base{dockerfileprefix} {option} . &> {logfile}", timeout=1600)
t = ("ran-base", archiveArtifact(cmd, ctx, logfile))
log_files.append(t)
# First verify if the base image was properly created.
ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {baseImage}:{baseTag}")
ret = cmd.run(f"docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' {baseImage}:{baseTag}")
allImagesSize = {}
if ret.returncode != 0:
logging.error('\u001B[1m Could not build properly ran-base\u001B[0m')
# Recover the name of the failed container?
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty {self.cli} rm -f")
cmd.run(f"{self.cli} image prune --force")
cmd.run(f"docker ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty docker rm -f")
cmd.run(f"docker image prune --force")
cmd.close()
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
HTML.CreateHtmlTestRow(self.imageKind, 'KO', CONST.ALL_PROCESSES_OK)
@@ -333,32 +291,37 @@ class Containerize():
for image,pattern,name,option in imageNames:
# the archived Dockerfiles have "ran-base:latest" as base image
# we need to update them with proper tag
cmd.run(f'git checkout -- docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'sed -i -e "s#{baseImage}:latest#{baseImage}:{baseTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'git checkout -- docker/Dockerfile.{pattern}{dockerfileprefix}')
cmd.run(f'sed -i -e "s#{baseImage}:latest#{baseImage}:{baseTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
# target images should use the proper ran-build image
if image != 'ran-build' and "-asan" in name:
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build-asan:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build-asan:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
elif "fhi72" in name or name == "oai-nr-oru":
cmd.run(f'sed -i -e "s#ran-build-fhi72:latest#ran-build-fhi72:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'sed -i -e "s#ran-build-fhi72:latest#ran-build-fhi72:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
elif image != 'ran-build':
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
if image == 'oai-gnb-aerial':
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2026.01.07.tar.gz .')
if image == 'ran-build-fhi72-t2':
cmd.run('cp -f /opt/t2-patch/AMD-T2-SDFEC_25-03-1.patch .')
if name == 'oai-gnb-fhi72-t2':
cmd.run(f'sed -i -e "s#ran-build-fhi72-t2:latest#ran-build-fhi72-t2:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
logfile = f'{lSourcePath}/cmake_targets/log/{name}.docker.log'
if self.host == 'Ubuntu':
option = option + f" --build-arg UBUNTU_IMAGE={DEFAULT_REGISTRY}/{ubuntuImage}"
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} {option} . > {logfile} 2>&1', timeout=1200)
option = option + f" --build-arg UBUNTU_IMAGE={DEFAULT_REGISTRY}/{ubuntuImage}"
ret = cmd.run(f'docker build --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{dockerfileprefix} {option} . > {logfile} 2>&1', timeout=1200)
t = (name, archiveArtifact(cmd, ctx, logfile))
log_files.append(t)
if image == 'oai-gnb-aerial':
cmd.run('rm -f nvipc_src.2026.01.07.tar.gz')
if image == 'ran-build-fhi72-t2':
cmd.run('rm -f AMD-T2-SDFEC_25-03-1.patch')
# check the status of the build
ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}")
ret = cmd.run(f"docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}")
if ret.returncode != 0:
logging.error('\u001B[1m Could not build properly ' + name + '\u001B[0m')
status = False
# Here we should check if the last container corresponds to a failed command and destroy it
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty {self.cli} rm -f")
cmd.run(f"docker ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty docker rm -f")
allImagesSize[name] = 'N/A -- Build Failed'
break
else:
@@ -372,16 +335,16 @@ class Containerize():
logging.debug(f'{name} size is unknown')
allImagesSize[name] = 'unknown'
# Now pruning dangling images in between target builds
cmd.run(f"{self.cli} image prune --force")
cmd.run(f"docker image prune --force")
cmd.run(f'docker logout {DEFAULT_REGISTRY}')
# Remove all intermediate build images and clean up
cmd.run(f"{self.cli} image rm ran-build:{imageTag} ran-build-asan:{imageTag} ran-build-fhi72:{imageTag} || true")
cmd.run(f"{self.cli} volume prune --force")
cmd.run(f"docker image rm ran-build:{imageTag} ran-build-asan:{imageTag} ran-build-fhi72:{imageTag} || true")
cmd.run(f"docker volume prune --force")
# Remove some cached artifacts to prevent out of diskspace problem
logging.debug(cmd.run("df -h").stdout)
logging.debug(cmd.run("docker system df").stdout)
cmd.run(f"{self.cli} buildx prune --filter until=1h --force")
cmd.run(f"docker buildx prune --filter until=1h --force")
logging.debug(cmd.run("df -h").stdout)
logging.debug(cmd.run("docker system df").stdout)
@@ -401,108 +364,18 @@ class Containerize():
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
return status
def BuildProxy(self, ctx, node, HTML):
lSourcePath = self.eNBSourceCodePath
logging.debug('Building on server: ' + node)
ssh = cls_cmd.getConnection(node)
oldRanCommidID = self.ranCommitID
oldRanRepository = self.ranRepository
oldRanAllowMerge = self.ranAllowMerge
oldRanTargetBranch = self.ranTargetBranch
self.ranCommitID = self.proxyCommit
self.ranRepository = 'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git'
self.ranAllowMerge = False
self.ranTargetBranch = 'master'
# Let's remove any previous run artifacts if still there
ssh.run('docker image prune --force')
# Remove any previous proxy image
ssh.run('docker image rm oai-lte-multi-ue-proxy:latest')
tag = self.proxyCommit
logging.debug('building L2sim proxy image for tag ' + tag)
# check if the corresponding proxy image with tag exists. If not, build it
ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}')
buildProxy = ret.returncode != 0 # if no image, build new proxy
if buildProxy:
ssh.run(f'rm -Rf {lSourcePath}')
success = CreateWorkspace(node, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
if not success:
raise Exception("could not clone proxy repository")
fullpath = f'{lSourcePath}/proxy_build.log'
ssh.run(f'docker build --target oai-lte-multi-ue-proxy --tag proxy:{tag} --file {lSourcePath}/docker/Dockerfile.ubuntu18.04 {lSourcePath} > {fullpath} 2>&1')
archiveArtifact(ssh, ctx, fullpath)
ssh.run('docker image prune --force')
ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}')
if ret.returncode != 0:
logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m')
ssh.close()
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
return False
else:
logging.debug('L2sim proxy image for tag ' + tag + ' already exists, skipping build')
# retag the build images to that we pick it up later
ssh.run(f'docker image tag proxy:{tag} oai-lte-multi-ue-proxy:latest')
# we assume that the host on which this is built will also run the proxy. The proxy
# currently requires the following command, and the docker-compose up mechanism of
# the CI does not allow to run arbitrary commands. Note that the following actually
# belongs to the deployment, not the build of the proxy...
logging.warning('the following command belongs to deployment, but no mechanism exists to exec it there!')
ssh.run('sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up')
# to prevent accidentally overwriting data that might be used later
self.ranCommitID = oldRanCommidID
self.ranRepository = oldRanRepository
self.ranAllowMerge = oldRanAllowMerge
self.ranTargetBranch = oldRanTargetBranch
ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}')
result = re.search(r'Size *= *(?P<size>[0-9\-]+) *bytes', ret.stdout)
# Cleaning any created tmp volume
ssh.run('docker volume prune --force')
ssh.close()
allImagesSize = {}
if result is not None:
imageSize = float(result.group('size')) / 1000000
logging.debug('\u001B[1m proxy size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
allImagesSize['proxy'] = str(round(imageSize,1)) + ' Mbytes'
logging.info('\u001B[1m Building L2sim Proxy Image Pass\u001B[0m')
HTML.CreateHtmlTestRow('commit ' + tag, 'OK', CONST.ALL_PROCESSES_OK)
return True
else:
logging.error('proxy size is unknown')
allImagesSize['proxy'] = 'unknown'
logging.error('\u001B[1m Build of L2sim proxy failed\u001B[0m')
HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK)
return False
def BuildRunTests(self, ctx, node, dockerfile, runtime_opt, ctest_opt, HTML):
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
logging.debug('Building on server: ' + node)
cmd = cls_cmd.getConnection(node)
cmd.cd(lSourcePath)
ret = cmd.run('hostnamectl')
result = re.search('Ubuntu', ret.stdout)
host = result.group(0)
if host != 'Ubuntu':
cmd.close()
raise Exception("Can build unit tests only on Ubuntu server")
logging.debug('running on Ubuntu as expected')
# check that ran-base image exists as we expect it
baseImage = 'ran-base'
baseTag = 'develop'
if self.ranAllowMerge:
if self.ranTargetBranch == 'develop':
cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base{self.dockerfileprefix} | grep --colour=never -i INDEX')
if self.merge:
if self.targetBranch == 'develop':
cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.ubuntu | grep --colour=never -i INDEX')
result = re.search('index', cmd.getBefore())
if result is not None:
baseTag = 'ci-temp'
@@ -528,7 +401,7 @@ class Containerize():
# I would like to run it with --rm and mount the ctest result directory to avoid 'docker cp'
# below, but then permissions are messed up and we can't remove the directory without sudo
# making the next pipeline fail
ret = cmd.run(f'docker run -a STDOUT {runtime_opt} --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc) {ctest_opt}')
ret = cmd.run(f'docker run -a STDOUT {runtime_opt} --shm-size=2g --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ran-unittests ran-unittests:{baseTag} ctest --no-label-summary -j$(nproc) {ctest_opt}')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTest.log .')
archiveArtifact(cmd, ctx, f'{lSourcePath}/LastTest.log')
cmd.run('docker cp ran-unittests:/oai-ran/build/Testing/Temporary/LastTestsFailed.log .')
@@ -544,7 +417,7 @@ class Containerize():
return False
def Push_Image_to_Local_Registry(self, node, HTML, tag_prefix=""):
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
logging.debug('Pushing images to server: ' + node)
ssh = cls_cmd.getConnection(node)
imagePrefix = DEFAULT_REGISTRY
@@ -557,10 +430,10 @@ class Containerize():
return False
orgTag = 'develop'
if self.ranAllowMerge:
if self.merge:
orgTag = 'ci-temp'
for image in IMAGES:
tagToUse = tag_prefix + CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
tagToUse = tag_prefix + self.branch
imageTag = f"{image}:{tagToUse}"
ret = ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{imageTag}')
if ret.returncode != 0:
@@ -573,7 +446,7 @@ class Containerize():
HTML.CreateHtmlTestRow(msg, 'KO', CONST.ALL_PROCESSES_OK)
return False
# Creating a develop tag on the local private registry
if not self.ranAllowMerge:
if not self.merge:
devTag = f"{tag_prefix}develop"
ssh.run(f'docker image tag {image}:{orgTag} {imagePrefix}/{image}:{devTag}')
ssh.run(f'docker push {imagePrefix}/{image}:{devTag}')
@@ -621,7 +494,7 @@ class Containerize():
def Pull_Image_from_Registry(self, HTML, node, images, tag=None, tag_prefix="", registry=DEFAULT_REGISTRY, username="oaicicd", password="oaicicd"):
logging.debug(f'\u001B[1m Pulling image(s) on server: {node}\u001B[0m')
if not tag:
tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
tag = self.branch
with cls_cmd.getConnection(node) as cmd:
success, msg = Containerize.Pull_Image(cmd, images, tag, tag_prefix, registry, username, password)
param = f"on node {node}"
@@ -634,7 +507,7 @@ class Containerize():
def Clean_Test_Server_Images(self, HTML, node, images, tag=None):
logging.debug(f'\u001B[1m Cleaning image(s) from server: {node}\u001B[0m')
if not tag:
tag = CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
tag = self.branch
status = True
with cls_cmd.getConnection(node) as myCmd:
@@ -653,17 +526,17 @@ class Containerize():
return status
def Create_Workspace(self, node, HTML):
lSourcePath = self.eNBSourceCodePath
success = CreateWorkspace(node, lSourcePath, self.ranRepository, self.ranCommitID, self.ranTargetBranch, self.ranAllowMerge)
sourcePath = self.workspace
success = CreateWorkspace(node, sourcePath, self.repository, self.branch)
if success:
HTML.CreateHtmlTestRowQueue('N/A', 'OK', [f"created workspace {lSourcePath}"])
HTML.CreateHtmlTestRowQueue('N/A', 'OK', [f"created workspace {sourcePath} on node {node}"])
else:
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ["cannot create workspace"])
return success
def DeployObject(self, ctx, node, HTML):
num_attempts = self.num_attempts
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
yaml = self.yamlPath.strip('/')
wd = f'{lSourcePath}/{yaml}'
wd_yaml = f'{wd}/docker-compose.y*ml'
@@ -681,7 +554,7 @@ class Containerize():
raise ValueError(f'Invalid value for num_attempts: {num_attempts}, must be greater than 0')
for attempt in range(num_attempts):
logging.info(f'will start services {services}')
status = ssh.run(f'docker compose -f {wd_yaml} up -d --wait --wait-timeout 60 -- {services}')
status = ssh.run(f'docker compose -f {wd_yaml} up -d --wait --wait-timeout 120 -- {services}')
info = ssh.run(f"docker compose -f {wd_yaml} ps --all --format=\'table {{{{.Service}}}} [{{{{.Image}}}}] {{{{.Status}}}}\' -- {services} | column -t")
deployed = status.returncode == 0
if not deployed:
@@ -707,7 +580,7 @@ class Containerize():
return deployed
def StopObject(self, ctx, node, HTML):
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
if not self.services:
raise ValueError(f'no services provided')
logging.info(f'\u001B[1m Stopping objects "{self.services}" from server: {node}\u001B[0m')
@@ -736,7 +609,7 @@ class Containerize():
return success
def UndeployObject(self, ctx, node, HTML, to_analyze):
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
logging.info(f'\u001B[1m Undeploying all objects from server {node}\u001B[0m')
yaml = self.yamlPath.strip('/')
wd = f'{lSourcePath}/{yaml}'
@@ -771,10 +644,10 @@ class Containerize():
logging.error('\u001B[1m Undeploying objects Failed\u001B[0m')
return success
def AnalyzeRTStatsObject(self, HTML, node, ctx, thresholds, service=None):
def AnalyzeRTStatsObject(self, HTML, node, ctx, thresholds, service=None, stats_files=None):
logging.info(f'Analyzing realtime stats from server: {node}')
yaml = self.yamlPath.strip('/')
wd = f'{self.eNBSourceCodePath}/{yaml}'
wd = f'{self.workspace}/{yaml}'
wd_yaml = f'{wd}/docker-compose.y*ml'
with cls_cmd.getConnection(node) as cmd:
@@ -787,12 +660,20 @@ class Containerize():
raise RuntimeError(f"Requested service {s} not found among services: {deployed_services}")
logging.info(f"Analyzing deployed service '{s}'")
# similar to BuildRunTests(), use docker cp to avoid problems with permissions
cmd.run(f'docker compose -f {wd_yaml} cp {s}:/opt/oai-gnb/nrL1_stats.log {wd}/')
l1_file = archiveArtifact(cmd, ctx, f"{wd}/nrL1_stats.log")
cmd.run(f'docker compose -f {wd_yaml} cp {s}:/opt/oai-gnb/nrMAC_stats.log {wd}/')
mac_file = archiveArtifact(cmd, ctx, f"{wd}/nrMAC_stats.log")
local_files = []
for sf in stats_files:
basename = os.path.basename(sf)
ret = cmd.run(f'docker compose -f {wd_yaml} cp {s}:{sf} {wd}/')
if ret.returncode != 0:
logging.error(f"Cannot retrieve {s}:{sf}")
return False
file = archiveArtifact(cmd, ctx, f"{wd}/{basename}")
if not file:
logging.error(f"Cannot retrieve file {basename}")
return False
local_files.append(file)
logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, l1_file, mac_file)
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, local_files)
HTML.CreateHtmlDataLogTable(datalog_rt_stats)
return success

View File

@@ -33,11 +33,8 @@ class HTMLManagement():
self.htmlHeaderCreated = False
self.htmlFooterCreated = False
self.ranRepository = ''
self.ranBranch = ''
self.ranCommitID = ''
self.ranAllowMerge = False
self.ranTargetBranch = ''
self.repository = ''
self.branch = ''
self.nbTestXMLfiles = 0
self.htmlTabRefs = []
@@ -78,12 +75,12 @@ class HTMLManagement():
self.htmlFile.write(' <tr style="border-collapse: collapse; border: none;">\n')
self.htmlFile.write(' <td style="border-collapse: collapse; border: none;">\n')
self.htmlFile.write(' <a href="http://www.openairinterface.org/">\n')
self.htmlFile.write(' <img src="http://www.openairinterface.org/wp-content/uploads/2016/03/cropped-oai_final_logo2.png" alt="" border="none" height=50 width=150>\n')
self.htmlFile.write(' <img src="https://raw.githubusercontent.com/duranta-project/governance/main/logos/Duranta-Logo-Color.png" alt="" border="none" style="margin-right: 2rem;" width=150>\n')
self.htmlFile.write(' </img>\n')
self.htmlFile.write(' </a>\n')
self.htmlFile.write(' </td>\n')
self.htmlFile.write(' <td style="border-collapse: collapse; border: none; vertical-align: center;">\n')
self.htmlFile.write(' <b><font size = "6">Job Summary -- Job: TEMPLATE_JOB_NAME -- Build-ID: TEMPLATE_BUILD_ID</font></b>\n')
self.htmlFile.write(' <b><font size = "6">TEMPLATE_JOB_NAME -- Build-ID: TEMPLATE_BUILD_ID</font></b>\n')
self.htmlFile.write(' </td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n')
@@ -96,47 +93,24 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository </td>\n')
self.htmlFile.write(' <td><a href="' + self.ranRepository + '">' + self.ranRepository + '</a></td>\n')
self.htmlFile.write(' <td><a href="' + self.repository + '">' + self.repository + '</a></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Job Trigger </td>\n')
if (self.ranAllowMerge):
self.htmlFile.write(' <td>Merge-Request</td>\n')
else:
self.htmlFile.write(' <td>Push to Branch</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Test Branch </td>\n')
self.htmlFile.write(' <td>' + self.branch + '</td>\n')
self.htmlFile.write(' </tr>\n')
commit_id = subprocess.check_output("git log -n1 --pretty=format:\"%H\" ", shell=True, universal_newlines=True)
commit_id = commit_id.strip()
self.htmlFile.write(' <tr>\n')
if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch </td>\n')
else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>\n')
self.htmlFile.write(' <td>' + self.ranBranch + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
self.htmlFile.write(' <td>' + commit_id + '</td>\n')
self.htmlFile.write(' </tr>\n')
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" ", shell=True, universal_newlines=True)
commit_message = commit_message.strip()
self.htmlFile.write(' <tr>\n')
if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID </td>\n')
else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message </td>\n')
self.htmlFile.write(' <td>' + commit_message + '</td>\n')
self.htmlFile.write(' </tr>\n')
if self.ranAllowMerge != '' and self.ranCommitID != 'develop':
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
commit_message = commit_message.strip()
self.htmlFile.write(' <tr>\n')
if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message </td>\n')
else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message </td>\n')
self.htmlFile.write(' <td>' + commit_message + '</td>\n')
self.htmlFile.write(' </tr>\n')
if (self.ranAllowMerge):
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch </td>\n')
if (self.ranTargetBranch == ''):
self.htmlFile.write(' <td>develop</td>\n')
else:
self.htmlFile.write(' <td>' + self.ranTargetBranch + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n')
self.htmlFile.write(' <br>\n')
@@ -379,90 +353,6 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
def CreateHtmlTestRowCppCheckResults(self, CCR):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return
self.htmlFile = open('test_results.html', 'a')
vId = 0
for version in CCR.versions:
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"><b> Results for cppcheck v ' + version + ' </b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> NB ERRORS</b></td>\n')
if CCR.nbErrors[vId] == 0:
myColor = 'lightgreen'
elif CCR.nbErrors[vId] < 20:
myColor = 'orange'
else:
myColor = 'lightcoral'
self.htmlFile.write(' <td colspan="3" bgcolor = "' + myColor + '"><b>' + str(CCR.nbErrors[vId]) + '</b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> NB WARNINGS</b></td>\n')
if CCR.nbWarnings[vId] == 0:
myColor = 'lightgreen'
elif CCR.nbWarnings[vId] < 20:
myColor = 'orange'
else:
myColor = 'lightcoral'
self.htmlFile.write(' <td colspan="3" bgcolor = "' + myColor + '"><b>' + str(CCR.nbWarnings[vId]) + '</b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"> ----------------- </td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Memory leak</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbMemLeaks[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Possible null pointer deference</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbNullPtrs[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Uninitialized variable</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbUninitVars[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Undefined behaviour shifting</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbTooManyBitsShift[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Signed integer overflow</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbIntegerOverflow[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"> </td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Printf formatting issues</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbInvalidPrintf[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Modulo result is predetermined</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbModuloAlways[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Opposite Condition -> dead code</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbOppoInnerCondition[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td></td>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" ><b> Wrong Scanf Nb Args</b></td>\n')
self.htmlFile.write(' <td colspan="3">' + str(CCR.nbWrongScanfArg[vId]) + '</td>\n')
self.htmlFile.write(' </tr>\n')
vId += 1
def CreateHtmlTestRowPhySimTestResult(self, testSummary, testResult):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return

View File

@@ -65,6 +65,23 @@ def Iperf_ComputeTime(args):
raise Exception('Iperf time not found!')
return int(result.group('iperf_time'))
def Iperf_UpdateBindPort(opts, ueIP, idx):
# search if bind address present. Extract if yes, add if no.
bind_m = re.search(r'(-B|--bind)\s+(?P<ip>\d+\.\d+\.\d+\.\d+)', opts)
if bind_m:
bindIP = bind_m.group('ip')
else:
bindIP = ueIP
opts += f" -B {ueIP}"
# search if port present. Extract if yes, add if no.
port_m = re.search(r'(-p|--port)\s+(?P<port>\d+)', opts)
if port_m:
port = port_m.group('port')
else:
port = 5002 + idx
opts += f" -p {port}"
return bindIP, port, opts
def convert_to_mbps(value, magnitude):
value = float(value)
if magnitude == 'K' or magnitude == 'k':
@@ -259,18 +276,46 @@ def Deploy_Physim(ctx, HTML, node, workdir, script, options):
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
return test_status
def DeployWithScript(HTML, node, script, options, tag):
logging.debug(f'Deploy with script {script} on node: {node}')
opt = options.replace('%%image_tag%%', tag)
with cls_cmd.getConnection(node) as c:
ret = c.exec_script(script, 600, opt)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
HTML.CreateHtmlTestRowQueue(f'on node {node}', 'OK' if ret.returncode == 0 else 'KO', [f'{ret.stdout}'])
return ret.returncode == 0
def UndeployWithScript(HTML, ctx, node, script, options):
logging.debug(f'Undeploy with script {script} on node: {node}')
remote_dir = '/tmp/undeploy'
opt = options.replace('%%log_dir%%', remote_dir)
with cls_cmd.getConnection(node) as c:
# create a directory for log collection
c.run(f'rm -rf {remote_dir}')
ret = c.run(f'mkdir {remote_dir}')
if ret.returncode != 0:
logging.error("cannot create directory for log collection")
return False
ret = c.exec_script(script, 600, opt)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
ret_ls = c.run(f'ls -1 {remote_dir}')
files = ret_ls.stdout.strip().splitlines()
log_files = []
for lf in files:
name = archiveArtifact(c, ctx, f'{remote_dir}/{lf}')
log_files.append(name)
msg = "Log files:\n" + "\n".join([os.path.basename(lf) for lf in log_files])
HTML.CreateHtmlTestRowQueue(f'on node {node}', 'OK' if ret.returncode == 0 else 'KO', [f'{ret.stdout}\n\n{msg}'])
return ret.returncode == 0
#-----------------------------------------------------------
# OaiCiTest Class Definition
#-----------------------------------------------------------
class OaiCiTest():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranCommitID = ''
self.ranAllowMerge = False
self.ranTargetBranch = ''
self.repository = ''
self.branch = ''
self.testXMLfiles = []
self.ping_args = ''
self.ping_packetloss_threshold = ''
@@ -457,7 +502,6 @@ class OaiCiTest():
svrIP = cn.getIP()
if not svrIP:
return (False, f"Iperf server {cn.getName()} has no IP address")
iperf_opt = self.iperf_args
jsonReport = "--json"
serverReport = ""
@@ -471,11 +515,11 @@ class OaiCiTest():
# note: enable server report collection on the UE side, no need to store and collect server report separately on the server side
serverReport = "--get-server-output"
iperf_time = Iperf_ComputeTime(self.iperf_args)
bindIP, port, iperf_opt = Iperf_UpdateBindPort(iperf_opt, ueIP, idx)
# hack: the ADB UEs don't have iperf in $PATH, so we need to hardcode for the moment
iperf_ue = '/data/local/tmp/iperf3' if re.search('adb', ue.getName()) else 'iperf3'
ue_header = f'UE {ue.getName()} ({ueIP})'
ue_header = f'UE {ue.getName()} ({bindIP})'
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
port = 5002 + idx
# note: some core setups start an iperf3 server automatically, indicated in ci_infra by runIperf3Server: False`
t = iperf_time * 2.5
cmd_ue.run(f'rm {client_filename}', reportNonZero=False, silent=True)
@@ -486,7 +530,7 @@ class OaiCiTest():
if ret.returncode == 0:
logging.warning(f'Iperf3 server on port {port} detected and terminated')
cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf3 -s -B {svrIP} -p {port} -1 {jsonReport} >> /dev/null &', timeout=t)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -B {ueIP} -c {svrIP} -p {port} {iperf_opt} {jsonReport} {serverReport} -O 5 >> {client_filename}', timeout=t)
client_ret = cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} {iperf_ue} -c {svrIP} {iperf_opt} {jsonReport} {serverReport} -O 5 >> {client_filename}', timeout=t, reportNonZero=False)
dest_filename = archiveArtifact(cmd_ue, ctx, client_filename)
if udpIperf:
status, msg = Iperf_analyzeV3UDP(dest_filename, self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
@@ -495,6 +539,10 @@ class OaiCiTest():
else:
status, msg = Iperf_analyzeV3TCPJson(dest_filename, self.iperf_tcp_rate_target)
# add some diagnostic messages if the actual iperf command returned non-zero
if client_ret.returncode != 0:
msg = f'{msg}\nIperf client command failed on {bindIP} -> {svrIP}:{port} (return code: {client_ret.returncode})'
return (status, f'{ue_header}\n{msg}')
def Iperf(self, ctx, node, HTML, infra_file="ci_infra.yaml"):

View File

@@ -27,160 +27,30 @@ import constants as CONST
import cls_cmd
from cls_ci_helper import archiveArtifact
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
class CppCheckResults():
def __init__(self):
self.variants = ['bionic', 'focal']
self.versions = ['','']
self.nbErrors = [0,0]
self.nbWarnings = [0,0]
self.nbNullPtrs = [0,0]
self.nbMemLeaks = [0,0]
self.nbUninitVars = [0,0]
self.nbInvalidPrintf = [0,0]
self.nbModuloAlways = [0,0]
self.nbTooManyBitsShift = [0,0]
self.nbIntegerOverflow = [0,0]
self.nbWrongScanfArg = [0,0]
self.nbPtrAddNotNull = [0,0]
self.nbOppoInnerCondition = [0,0]
class StaticCodeAnalysis():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBSourceCodePath = ''
def CppCheckAnalysis(self, ctx, node, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
lSourcePath = self.eNBSourceCodePath
if not lSourcePath or not node:
raise ValueError(f"{lSourcePath=} {node=}")
logging.debug('Building on server: ' + node)
cmd = cls_cmd.getConnection(node)
# on RedHat/CentOS .git extension is mandatory
result = re.search(r'([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
if result is not None:
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
else:
full_ran_repo_name = self.ranRepository + '.git'
cmd.cd(lSourcePath)
logDir = f'{lSourcePath}/cmake_targets/log'
cmd.run(f'mkdir -p {logDir}')
cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal')
cmd.run(f'sed -e "s@xenial@bionic@" {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.xenial > {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.bionic')
cmd.run(f'docker build --tag oai-cppcheck:bionic --file {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.bionic . > {logDir}/cppcheck-bionic.txt 2>&1')
cmd.run(f'sed -e "s@xenial@focal@" {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.xenial > {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.focal')
cmd.run(f'docker build --tag oai-cppcheck:focal --file {lSourcePath}/ci-scripts/docker/Dockerfile.cppcheck.focal . > {logDir}/cppcheck-focal.txt 2>&1')
cmd.run('docker image rm oai-cppcheck:bionic oai-cppcheck:focal')
bionic = archiveArtifact(cmd, ctx, f'{logDir}/cppcheck-bionic.txt')
focal = archiveArtifact(cmd, ctx, f'{logDir}/cppcheck-focal.txt')
cmd.close()
CCR = CppCheckResults()
CCR_ref = CppCheckResults()
vId = 0
for variant in CCR.variants:
filename = ctx.baseFilename() + '-cppcheck-'+ variant + '.txt'
logging.info(f"will check file '{filename}'")
if not os.path.isfile(filename):
raise FileNotFoundError(f"{filename} is not a file")
else:
xmlStart = False
with open(filename, 'r') as logfile:
for line in logfile:
ret = re.search(r'cppcheck version="(?P<version>[0-9\.]+)"', str(line))
if ret is not None:
CCR.versions[vId] = ret.group('version')
if re.search('RUN cat cmake_targets/log/cppcheck.xml', str(line)) is not None:
xmlStart = True
if xmlStart:
if re.search('severity="error"', str(line)) is not None:
CCR.nbErrors[vId] += 1
if re.search('severity="warning"', str(line)) is not None:
CCR.nbWarnings[vId] += 1
if re.search('id="memleak"', str(line)) is not None:
CCR.nbMemLeaks[vId] += 1
if re.search('id="nullPointer"', str(line)) is not None:
CCR.nbNullPtrs[vId] += 1
if re.search('id="uninitvar"', str(line)) is not None:
CCR.nbUninitVars[vId] += 1
if re.search('id="invalidPrintfArgType_sint"|id="invalidPrintfArgType_uint"', str(line)) is not None:
CCR.nbInvalidPrintf[vId] += 1
if re.search('id="moduloAlwaysTrueFalse"', str(line)) is not None:
CCR.nbModuloAlways[vId] += 1
if re.search('id="shiftTooManyBitsSigned"', str(line)) is not None:
CCR.nbTooManyBitsShift[vId] += 1
if re.search('id="integerOverflow"', str(line)) is not None:
CCR.nbIntegerOverflow[vId] += 1
if re.search('id="wrongPrintfScanfArgNum"|id="invalidScanfArgType_int"', str(line)) is not None:
CCR.nbWrongScanfArg[vId] += 1
if re.search('id="pointerAdditionResultNotNull"', str(line)) is not None:
CCR.nbPtrAddNotNull[vId] += 1
if re.search('id="oppositeInnerCondition"', str(line)) is not None:
CCR.nbOppoInnerCondition[vId] += 1
vMsg = ''
vMsg += '======== Variant ' + variant + ' - ' + CCR.versions[vId] + ' ========\n'
vMsg += ' ' + str(CCR.nbErrors[vId]) + ' errors\n'
vMsg += ' ' + str(CCR.nbWarnings[vId]) + ' warnings\n'
vMsg += ' -- Details --\n'
vMsg += ' Memory leak: ' + str(CCR.nbMemLeaks[vId]) + '\n'
vMsg += ' Possible null pointer deference: ' + str(CCR.nbNullPtrs[vId]) + '\n'
vMsg += ' Uninitialized variable: ' + str(CCR.nbUninitVars[vId]) + '\n'
vMsg += ' Undefined behaviour shifting: ' + str(CCR.nbTooManyBitsShift[vId]) + '\n'
vMsg += ' Signed integer overflow: ' + str(CCR.nbIntegerOverflow[vId]) + '\n'
vMsg += '\n'
vMsg += ' Printf formatting issue: ' + str(CCR.nbInvalidPrintf[vId]) + '\n'
vMsg += ' Modulo result is predetermined: ' + str(CCR.nbModuloAlways[vId]) + '\n'
vMsg += ' Opposite Condition -> dead code: ' + str(CCR.nbOppoInnerCondition[vId]) + '\n'
vMsg += ' Wrong Scanf Nb Args: ' + str(CCR.nbWrongScanfArg[vId]) + '\n'
for vLine in vMsg.split('\n'):
logging.debug(vLine)
vId += 1
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowCppCheckResults(CCR)
logging.info('\u001B[1m Static Code Analysis Pass\u001B[0m')
return True
def LicenceAndFormattingCheck(self, ctx, node, HTML):
def LicenceAndFormattingCheck(ctx, node, HTML, d, branch, allowMerge, targetBranch):
# Workspace is no longer recreated from scratch.
# It implies that this method shall be called last within a build pipeline
# where workspace is already created
lSourcePath = self.eNBSourceCodePath
if not node or not lSourcePath:
raise ValueError(f"{lSourcePath=} {node=}")
if not node or not d:
raise ValueError(f"{d=} {node=}")
logging.debug('Building on server: ' + node)
cmd = cls_cmd.getConnection(node)
check_options = ''
if self.ranAllowMerge:
check_options = f'--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH={self.ranBranch}'
if self.ranTargetBranch == '':
if self.ranBranch != 'develop' and self.ranBranch != 'origin/develop':
if allowMerge:
check_options = f'--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH={branch}'
if targetBranch == '':
if branch != 'develop' and branch != 'origin/develop':
check_options += ' --build-arg TARGET_BRANCH=develop'
else:
check_options += f' --build-arg TARGET_BRANCH={self.ranTargetBranch}'
check_options += f' --build-arg TARGET_BRANCH={targetBranch}'
logDir = f'{lSourcePath}/cmake_targets/log/'
logDir = f'{d}/cmake_targets/log/'
cmd.run(f'mkdir -p {logDir}')
cmd.run('docker image rm oai-formatting-check:latest')
cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {lSourcePath}/ci-scripts/docker/Dockerfile.formatting.ubuntu {lSourcePath} > {logDir}/oai-formatting-check.txt 2>&1')
cmd.run(f'docker build --target oai-formatting-check --tag oai-formatting-check:latest {check_options} --file {d}/ci-scripts/docker/Dockerfile.formatting.ubuntu {d} > {logDir}/oai-formatting-check.txt 2>&1')
cmd.run('docker image rm oai-formatting-check:latest')
cmd.run('docker image prune --force')

View File

@@ -184,7 +184,8 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
prach_dtx_threshold = 200;
}
);
RUs = (

View File

@@ -184,7 +184,8 @@ L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
prach_dtx_threshold = 200;
}
);
RUs = (

View File

@@ -216,6 +216,7 @@ L1s =
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
}
);

View File

@@ -216,6 +216,7 @@ L1s =
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
}
);

View File

@@ -216,6 +216,7 @@ L1s =
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
}
);

View File

@@ -216,6 +216,7 @@ L1s =
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 200;
}
);

View File

@@ -215,6 +215,7 @@ L1s =
(
{
num_cc = 1;
prach_dtx_threshold = 200;
tr_n_preference = "local_mac";
}
);

View File

@@ -17,6 +17,7 @@ gNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) });
cu_sibs = ( 2, 3, 4 );
@include "neighbour-config.conf"
nr_cellid = 12345678L;

View File

@@ -0,0 +1,240 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
do_SRS = "periodic";
force_UL256qam_off = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 4049.76 MHz
# selected SSB frequency = 4049.76 MHz
absoluteFrequencySSB = 669984;
dl_frequencyBand = 77;
# frequency point A = 4000.62 MHz
dl_absoluteFrequencyPointA = 666708;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 159;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 7;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 2;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -100;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 8;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.10.20";
remote_n_address = "172.21.6.112";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 230;
pucch_TargetSNRx10 = 250;
pusch_FailureThres = 100;
dl_min_mcs = 20;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = -100;
tx_amp_backoff_dB = 3;
L1_rx_thread_core = 11;
L1_tx_thread_core = 12;
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 8;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1");
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("98:ae:71:04:83:e3", "98:ae:71:04:83:e3");
mtu = 9600;
fh_config = ({
T1a_cp_dl = (285, 470);
T1a_cp_ul = (285, 429);
T1a_up = (125, 350);
Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -25,7 +25,7 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 2;
do_SRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{

View File

@@ -0,0 +1,247 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 1;
# n_TimingAdvanceOffset = 0;
# downlinkConfigCommon
#frequencyInfoDL
absoluteFrequencySSB = 663360;
dl_frequencyBand = 77;
dl_absoluteFrequencyPointA = 660084;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 10;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 159;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 8;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 3;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 3;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -96;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.10.20";
remote_n_address = "172.21.6.112";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 250;
pucch_TargetSNRx10 = 220;
pusch_FailureThres = 100;
dl_min_mcs = 20;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 15;
tx_amp_backoff_dB = 12; # needs to match O-RU configuration
L1_rx_thread_core = 10;
L1_tx_thread_core = 11; # relevant after merge of l1_tx_thread
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 12;
sl_ahead = 5;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="info";
f1ap_log_level ="info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1");
system_core = 7;
io_core = 8;
worker_cores = (9);
dpdk_iova_mode = "VA";
ru_addr = ("8c:1f:64:d1:11:c0","8c:1f:64:d1:11:c0");
mtu = 9216; # check if xran uses this properly
file_prefix = "fhi_72";
fh_config = ({
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -0,0 +1,228 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4; #2;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# n_TimingAdvanceOffset = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 3350.01 MHz
# selected SSB frequency = 3349.92 MHz
absoluteFrequencySSB = 623328;
dl_frequencyBand = 78;
# frequency point A = 3300.87 MHz
dl_absoluteFrequencyPointA = 620058;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 159;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 22;
zeroCorrelationZoneConfig = 15;
preambleReceivedTargetPower = -104;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 7;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 2;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -96;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 8;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.10.20";
remote_n_address = "172.21.6.112";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 250;
pusch_FailureThres = 100;
dl_min_mcs = 20;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 120
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 15;
tx_amp_backoff_dB = 20; # needs to match O-RU configuration
L1_rx_thread_core = 11;
L1_tx_thread_core = 12;
phase_compensation = 1; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 8;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1"); # one VF can be used as well
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("e8:c7:4f:25:81:b3", "e8:c7:4f:25:81:b3");
mtu = 9600;
fh_config = ({
T1a_cp_dl = (285, 429);
T1a_cp_ul = (285, 429);
T1a_up = (96, 196);
Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
prach_config = {
kbar = 0;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -0,0 +1,231 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 4;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
do_CSIRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3300.24 + 134*12*30e3 = 3348.48 MHz (5G NR GSCN: 7741)
absoluteFrequencySSB = 649920;
dl_frequencyBand = 78;
# this is 3300.24 MHz
dl_absoluteFrequencyPointA = 646724;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=162 (275*(275-L+1))+(274-RBstart))
initialDLBWPlocationAndBandwidth = 1099;
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 148;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 12;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 5;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant = -90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 8;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.10.20";
remote_n_address = "172.21.6.112";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 220;
pucch_TargetSNRx10 = 220;
pusch_FailureThres = 100;
dl_min_mcs = 20;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 130;
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 10;
tx_amp_backoff_dB = 10; #9; needs to match O-RU configuration # JF important to check
L1_rx_thread_core = 11;
L1_tx_thread_core = 12; # relevant after merge of l1_tx_thread
phase_compensation = 0; # needs to match O-RU configuration # JF to be tested
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 8;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level ="info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1");
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("00:E0:0C:00:AE:06", "00:E0:0C:00:AE:06");
mtu = 9000;
fh_config = ({
T1a_cp_dl = (285, 470);
T1a_cp_ul = (285, 429);
T1a_up = (125, 350);
Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -0,0 +1,266 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 4;
pusch_AntennaPorts = 8;
do_CSIRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# n_TimingAdvanceOffset = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 3950.4 MHz
# selected SSB frequency = 3950.4 MHz
absoluteFrequencySSB = 663360;
dl_frequencyBand = 77;
# frequency point A = 3901.26 MHz
dl_absoluteFrequencyPointA = 660084;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 152;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 8;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 3;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -96;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = 0;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_address = "172.21.10.20";
remote_n_address = "172.21.6.92";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 220;
pucch_TargetSNRx10 = 200;
dl_bler_target_upper = .35;
dl_bler_target_lower = .15;
ul_bler_target_upper = .35;
ul_bler_target_lower = .15;
pusch_FailureThres = 100;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 10;
tx_amp_backoff_dB = 12; # needs to match O-RU configuration
L1_rx_thread_core = 11;
L1_tx_thread_core = 12; # relevant after merge of l1_tx_thread
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 8;
nb_rx = 8;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 10;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
mac_log_level = "info";
rlc_log_level = "info";
pdcp_log_level = "info";
rrc_log_level = "info";
ngap_log_level = "info";
f1ap_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1", "0000:41:11.2", "0000:41:11.3"); # two VFs can be used as well
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("8c:1f:64:d1:10:46","8c:1f:64:d1:10:46","8c:1f:64:d1:10:43","8c:1f:64:d1:10:43"); # if two VFs, set two RU MAC addresses (one per RU)
mtu = 9216;
fh_config = (
# RAN650 #1
{
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
},
# RAN650 #2
{
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -0,0 +1,70 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
L1s = (
{
tr_n_preference = "nfapi";
remote_n_address = "127.0.0.1"; // vnf addr
local_n_address = "127.0.0.1"; // pnf addr
local_n_portc = 50000; // pnf p5 port [!]
remote_n_portc = 50001; // vnf p5 port
local_n_portd = 50010; // pnf p7 port
remote_n_portd = 50011; // vnf p7 port
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = -100;
tx_amp_backoff_dB = 3;
L1_rx_thread_core = 11;
L1_tx_thread_core = 12;
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 6;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
log_config :
{
global_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1");
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("98:ae:71:04:83:e3", "98:ae:71:04:83:e3");
mtu = 9600;
fh_config = ({
T1a_cp_dl = (285, 470);
T1a_cp_ul = (285, 429);
T1a_up = (125, 350);
Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -24,7 +24,7 @@ gNBs =
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{

View File

@@ -0,0 +1,190 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI-DU");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_DU_ID = 0xe00;
gNB_name = "gNB-OAI-DU";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
do_SRS = "periodic";
force_UL256qam_off = 0;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 4049.76 MHz
# selected SSB frequency = 4049.76 MHz
absoluteFrequencySSB = 669984;
dl_frequencyBand = 77;
# frequency point A = 4000.62 MHz
dl_absoluteFrequencyPointA = 666708;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 159;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 7;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 2;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -100;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 10;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
}
);
MACRLCs = (
{
tr_s_preference = "nfapi";
remote_s_address = "127.0.0.1"; // pnf addr [!]
local_s_address = "127.0.0.1"; // vnf addr
local_s_portc = 50001; // vnf p5 port
remote_s_portc = 50000; // pnf p5 port [!]
local_s_portd = 50011; // vnf p7 port [!]
remote_s_portd = 50010; // pnf p7 port [!]
tr_n_preference = "f1";
local_n_address = "172.21.8.200";
remote_n_address = "172.21.6.112";
local_n_portd = 2153;
remote_n_portd = 2153;
pusch_TargetSNRx10 = 220;
pucch_TargetSNRx10 = 250;
ul_bler_target_upper = .35;
ul_bler_target_lower = .15;
pusch_FailureThres = 100;
dl_min_mcs = 20;
}
);
log_config :
{
global_log_level = "info";
};

View File

@@ -25,7 +25,7 @@ gNBs =
pdsch_AntennaPorts_N1 = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
min_rxtxtime = 2;
uess_agg_levels = [0, 4, 2, 1, 0];

View File

@@ -26,7 +26,7 @@ gNBs =
pdsch_AntennaPorts_N1 = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
min_rxtxtime = 2;
force_UL256qam_off = 1;
servingCellConfigCommon = (
@@ -186,10 +186,10 @@ MACRLCs = (
local_s_portd = 50011; // vnf p7 port [!]
tr_s_preference = "aerial";
tr_n_preference = "local_RRC";
pucch_RSSI_Threshold = -270;
pusch_RSSI_Threshold = -260;
pusch_TargetSNRx10 = 260; # 150;
pucch_TargetSNRx10 = 200; #200;
pucch_RSSI_Threshold = -270;
pusch_RSSI_Threshold = -260;
pusch_TargetSNRx10 = 290;
pucch_TargetSNRx10 = 200;
dl_max_mcs = 28;
ul_max_mcs = 28;
ul_min_mcs = 9;

View File

@@ -24,8 +24,6 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 0;
do_SRS = 0;
min_rxtxtime = 6;
servingCellConfigCommon = (

View File

@@ -23,8 +23,6 @@ gNBs =
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
pusch_AntennaPorts = 4;
do_CSIRS = 0;
do_SRS = 0;
servingCellConfigCommon = (
{

View File

@@ -0,0 +1,222 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({mcc = 208; mnc = 99; mnc_length = 2;});
tr_s_preference = "local_mac"
////////// Physical parameters:
min_rxtxtime = 6;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 4412.64 MHz
absoluteFrequencySSB = 694176;
dl_frequencyBand = 79;
# this is 4400.94 MHz
dl_absoluteFrequencyPointA = 693396;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=41,L=24 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6368;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 79;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6368;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -118;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ({ ipv4 = "192.168.12.26"; port = 36412; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
});
L1s = (
{
tr_n_preference = "local_mac";
});
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 50;
eNB_instances = [0];
});
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
};

View File

@@ -44,7 +44,7 @@ gNBs =
#initialDownlinkBWP
#genericParameters
# this is RBstart=0,L=32 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6349;
initialDLBWPlocationAndBandwidth = 17875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 3;
@@ -64,7 +64,7 @@ gNBs =
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6349;
initialULBWPlocationAndBandwidth = 17875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 3;
@@ -145,11 +145,6 @@ gNBs =
);
first_active_bwp = 1;
bwp_list = (
{ scs = 3; bwpStart = 0; bwpSize = 66;}
);
# ------- SCTP definitions
SCTP :
{

View File

@@ -25,7 +25,7 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
uess_agg_levels = [4,2,0,0,0];
servingCellConfigCommon = (

View File

@@ -0,0 +1,268 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 208; mnc = 97; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
do_SRS = "periodic";
force_UL256qam_off = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 4049.76 MHz
# selected SSB frequency = 4049.76 MHz
absoluteFrequencySSB = 669984;
dl_frequencyBand = 77;
# frequency point A = 4000.62 MHz
dl_absoluteFrequencyPointA = 666708;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 77;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 159;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 7;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 2;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -100;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 8;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 2;
ssPBCH_BlockPower = -10;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "172.21.6.103"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.10.20";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.10.20";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 250;
pusch_FailureThres = 100;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 130
pucch0_dtx_threshold = 80;
pusch_dtx_threshold = -100;
tx_amp_backoff_dB = 3;
L1_rx_thread_core = 11;
L1_tx_thread_core = 12;
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 0;
att_rx = 0;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 10;
sl_ahead = 8;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
mac_log_level = "info";
rlc_log_level = "info";
pdcp_log_level = "info";
rrc_log_level = "info";
ngap_log_level = "info";
f1ap_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:41:11.0", "0000:41:11.1");
dpdk_iova_mode = "VA";
system_core = 7;
io_core = 8;
worker_cores = (9);
ru_addr = ("98:ae:71:04:83:e3", "98:ae:71:04:83:e3");
mtu = 9600;
fh_config = ({
T1a_cp_dl = (285, 470);
T1a_cp_ul = (285, 429);
T1a_up = (125, 350);
Ta4 = (110, 180);
ru_config = {
iq_width = 9;
iq_width_prach = 9;
};
});
};
nrLDPC_coding_aal : {
dpdk_dev : "0000:01:00.0";
dpdk_core_list : "18-19";
is_t2 : 1;
};

View File

@@ -24,7 +24,6 @@ gNBs =
maxMIMO_layers = 2;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
do_SRS = 0;
force_UL256qam_off = 1;
servingCellConfigCommon = (
@@ -161,7 +160,7 @@ gNBs =
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "172.21.6.103"; });
amf_ip_address = ({ ipv4 = "172.21.6.113"; });
NETWORK_INTERFACES :
{

View File

@@ -23,7 +23,7 @@ gNBs = (
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{
@@ -197,7 +197,7 @@ RUs = (
nb_tx = 2;
nb_rx = 2;
att_tx = 0;
att_rx = 0;
att_rx = 6;
bands = [77];
max_pdschReferenceSignalPower = -27;
max_rxgain = 71;

View File

@@ -0,0 +1,262 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 05; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pdsch_AntennaPorts_N1 = 2;
maxMIMO_layers = 4;
pusch_AntennaPorts = 4;
do_CSIRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 3350.01 MHz
# selected SSB frequency = 3349.92 MHz
absoluteFrequencySSB = 623328;
dl_frequencyBand = 78;
# frequency point A = 3330.93 MHz
dl_absoluteFrequencyPointA = 622062;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 28875; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 152;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 8;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 3;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -96;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -10;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "172.21.6.116"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.150";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.150";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 250;
pucch_TargetSNRx10 = 200;
pusch_FailureThres = 1000;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 15;
tx_amp_backoff_dB = 12; # needs to match O-RU configuration
L1_rx_thread_core = 3;
L1_tx_thread_core = 4;
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 4;
nb_rx = 4;
att_tx = 24;
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 5;
sl_ahead = 10;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
mac_log_level = "info";
rlc_log_level = "info";
pdcp_log_level = "info";
rrc_log_level = "info";
ngap_log_level = "info";
f1ap_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:c3:11.0"); # one VF can be used as well
system_core = 0;
io_core = 1;
worker_cores = (2);
du_key_pair = ("/opt/oai-gnb/etc/id_rsa.pub", "/opt/oai-gnb/etc/id_rsa");
du_addr = ("00:11:22:33:44:66");
vlan_tag = (3); # only one needed if one VF configured
ru_username = ("oranbenetel");
ru_ip_addr = ("192.168.81.4");
fh_config = ({
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
});
};

View File

@@ -22,7 +22,6 @@ gNBs =
////////// Physical parameters:
min_rxtxtime = 5;
do_SRS = 0;
force_256qam_off = 1;
pdsch_AntennaPorts_N1 = 1;
pdsch_AntennaPorts_XP = 1;

View File

@@ -18,7 +18,7 @@ gNBs =
nr_cellid = 12345678L;
////////// Physical parameters:
use_deltaMCS = 1;
servingCellConfigCommon = (
{
@@ -180,7 +180,7 @@ MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pusch_TargetSNRx10 = 100;
pucch_TargetSNRx10 = 200;
ul_prbblack_SNR_threshold = 10;
}

View File

@@ -207,3 +207,40 @@ channelmod:
forgetfact: 0
offset: 0
ds_tdl: 0
vrtsim:
role: server
# Channel mode: exactly one of the three modes below should be active.
#
# No channel - plain passthrough, no impairments:
# cirdb: 0
# chanmod: 0
#
# Built-in channel model defined in the channelmod: section above:
# chanmod: 1
# cirdb: 0
#
# External taps emitter publishing over a nanomsg socket.
# Requires a running emit_from_db.py and build with -DOAI_VRTSIM_TAPS_CLIENT=ON:
# cirdb: 0
# chanmod: 0
# taps-socket: "tcp://127.0.0.1:5555"
#
# In-process CIR database: reads precomputed 3GPP TDL taps directly from
# cir_db.bin. No external emitter required. Generate the database offline
# with cir_generator.py. Use cirdb-path to point to the directory containing
# cir_db.bin and cir_db.yaml.
cirdb_file: /cirdb/cir_db.bin
cirdb_yaml: /cirdb/cir_db.yaml
#
# Per-UE channel configuration for multi-UE operation
ue_config:
- antennas: "2x2" # NxM where N=UE-TX, M=gNB-TX; M must equal RU nb_tx
model_id: 0 # 0=TDL-A 1=TDL-B 2=TDL-C 3=TDL-D 4=TDL-E
ds_ns: 1.0 # RMS delay spread in ns
speed_mps: 1.5 # UE speed in m/s
# aoa_deg: 0.0 # angle of arrival in degrees; TDL-D/E only
- antennas: "1x2"
model_id: 0
ds_ns: 1.0
speed_mps: 1.5
# aoa_deg: 0.0

View File

@@ -0,0 +1,260 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 05; mnc_length = 2; snssaiList = ( { sst = 1; }); });
nr_cellid = 1;
////////// Physical parameters:
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# center frequency = 3350.01 MHz
# selected SSB frequency = 3349.92 MHz
absoluteFrequencySSB = 623328;
dl_frequencyBand = 78;
# frequency point A = 3300.87 MHz
dl_absoluteFrequencyPointA = 620058;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 273;
#initialDownlinkBWP
#genericParameters
initialDLBWPlocationAndBandwidth = 1099; #38.101-1 Table 5.3.2-1
#
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 11;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 273;
pMax = 23;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 1099;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 152;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 0;
preambleReceivedTargetPower = -100;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 8;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 3;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#one (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 15;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
# this is the offset between the last PRACH preamble power and the Msg3 PUSCH, 2 times the field value in dB
msg3_DeltaPreamble = 2;
p0_NominalWithGrant = -96;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 0;
p0_nominal = -96;
ssb_PositionsInBurst_Bitmap = 0x1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 5;
nrofDownlinkSlots = 3;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 1;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -11;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ({ ipv4 = "172.21.6.116"; });
NETWORK_INTERFACES :
{
GNB_IPV4_ADDRESS_FOR_NG_AMF = "172.21.16.150";
GNB_IPV4_ADDRESS_FOR_NGU = "172.21.16.150";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 200;
pucch_TargetSNRx10 = 200;
pusch_FailureThres = 1000;
}
);
L1s = (
{
tr_n_preference = "local_mac";
prach_dtx_threshold = 100;
pucch0_dtx_threshold = 10;
pusch_dtx_threshold = 10;
max_ldpc_iterations = 15;
tx_amp_backoff_dB = 12; # needs to match O-RU configuration
L1_rx_thread_core = 3;
L1_tx_thread_core = 4;
phase_compensation = 0; # needs to match O-RU configuration
}
);
RUs = (
{
local_rf = "no";
nb_tx = 2;
nb_rx = 2;
att_tx = 24;
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 75;
sf_extension = 0;
eNB_instances = [0];
ru_thread_core = 5;
sl_ahead = 10;
tr_preference = "raw_if4p5"; # important: activate FHI7.2
do_precoding = 0; # needs to match O-RU configuration
}
);
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level = "info";
hw_log_level = "info";
phy_log_level = "info";
mac_log_level = "info";
rlc_log_level = "info";
pdcp_log_level = "info";
rrc_log_level = "info";
ngap_log_level = "info";
f1ap_log_level = "info";
};
fhi_72 = {
dpdk_devices = ("0000:c3:11.0"); # one VF can be used as well
system_core = 0;
io_core = 1;
worker_cores = (2);
du_key_pair = ("/opt/oai-gnb/etc/id_rsa.pub", "/opt/oai-gnb/etc/id_rsa");
du_addr = ("00:11:22:33:44:66");
vlan_tag = (3); # only one needed if one VF configured
ru_username = ("oranbenetel");
ru_ip_addr = ("192.168.81.4");
fh_config = ({
T1a_cp_dl = (419, 470);
T1a_cp_ul = (285, 336);
T1a_up = (294, 345);
Ta4 = (0, 200);
});
};

View File

@@ -22,7 +22,7 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
min_rxtxtime = 5;
servingCellConfigCommon = (

View File

@@ -26,7 +26,7 @@ gNBs =
pdsch_AntennaPorts_XP = 2;
pusch_AntennaPorts = 2;
do_CSIRS = 1;
do_SRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{

View File

@@ -5,6 +5,57 @@
# for the 2-cell rfsim setup (gNB_ID 0xe00 & 0xb00) #
############################################################
############################################################
# SIB2 #
############################################################
sib2_config : {
q_Hyst = 0;
cellReselectionPriority = 0;
threshServingLowP = 0;
threshServingLowQ = 0;
s_NonIntraSearchP = -1;
s_NonIntraSearchQ = -1;
q_RxLevMin = -56;
q_QualMin = -1;
s_IntraSearchP = 22;
s_IntraSearchQ = -1;
t_ReselectionNR = 1;
deriveSSB_IndexFromCell = 1;
speed_t_Evaluation = 0;
speed_t_HystNormal = 0;
speed_n_CellChangeMedium = 1;
speed_n_CellChangeHigh = 2;
speed_sf_Medium = 1;
speed_sf_High = 0;
};
############################################################
# Per-frequency SIB4 inter-frequency configuration #
############################################################
frequency_list = (
{
absoluteFrequencySSB = 621312;
subcarrierSpacing = 1; # 30 kHz
band = 78;
frequency_config = (
{
cellReselectionPriority = 5;
threshX_HighP = 10;
threshX_LowP = 6;
threshX_HighQ = -1;
threshX_LowQ = -1;
q_OffsetFreq = 0;
q_RxLevMin = -56;
t_ReselectionNR = 1;
}
);
}
);
neighbour_list = (
##########################################################
# Entry USED BY gNB_ID = 0xe00 (nr_cellid = 1) #
@@ -21,6 +72,9 @@ neighbour_list = (
band = 78;
plmn = { mcc = 208; mnc = 99; mnc_length = 2 };
tracking_area_code = 1;
q_OffsetCell = 2;
q_RxLevMinOffsetCell= 2;
q_QualMinOffsetCell = 1;
}
);
},
@@ -40,6 +94,9 @@ neighbour_list = (
band = 78;
plmn = { mcc = 208; mnc = 99; mnc_length = 2 };
tracking_area_code = 1;
q_OffsetCell = 2;
q_RxLevMinOffsetCell= 2;
q_QualMinOffsetCell = 1;
}
);
}

View File

@@ -5,8 +5,8 @@ uicc0 = {
key = "fec86ba6eb707ed08905757b1bb44b8f";
opc= "C42449363BBAD02B66D16BC975D77CC1";
pdu_sessions = (
{ id = 1; dnn = "oai"; nssai_sst = 1; },
{ id = 2; dnn = "oai"; nssai_sst = 1; }
{ id = 1; dnn = "oai"; nssai_sst = 1; nssai_sd = 0xFFFFFF; },
{ id = 2; dnn = "openairinterface"; nssai_sst = 1; nssai_sd = 0x123456; }
)
}

View File

@@ -30,7 +30,7 @@ channelmod:
- model_name: rfsimu_channel_ue0
type: AWGN
ploss_dB: 20
nose_power_dB: -2
noise_power_dB: -2
forgetfact: 0
offset: 0
ds_tdl: 0

View File

@@ -29,7 +29,7 @@ gNBs =
#pucch_TargetSNRx10 = 200;
ul_prbblacklist = "51,52,53,54"
min_rxtxtime = 6;
do_SRS = 1;
do_SRS = "periodic";
servingCellConfigCommon = (
{

View File

@@ -20,7 +20,7 @@ Ref :
DL & UL scheduling timing : 8.0
UL Indication : 3.0
Slot Indication : 9.0
feprx : 85.0
feprx : 50.0
feptx_ofdm (per port, half_slot) : 31
feptx_total : 92
DeviationThreshold :

View File

@@ -0,0 +1,32 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : gNB Processing Time (us) from datalog_rt_stats.default.yaml
ColNames :
- Metric
- Average; Max; Count
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
Ref :
L1 Tx processing : 190.0
DLSCH encoding : 120.0
L1 Rx processing : 235.0
UL segments decoding : 120.0
PUSCH inner-receiver : 150.0
UL Indication : 2.0
Slot Indication : 10.0
feprx : 40.0
feptx_ofdm (per port, half_slot) : 30
feptx_total : 52
DeviationThreshold :
L1 Tx processing : 0.25
DLSCH encoding : 0.25
L1 Rx processing : 0.25
UL segments decoding : 0.25
PUSCH inner-receiver : 0.25
UL Indication : 1.00
Slot Indication : 0.50
feprx : 0.25
feptx_ofdm (per port, half_slot) : 0.25
feptx_total : 0.25

View File

@@ -0,0 +1,40 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : UE Processing Time (us) from datalog_rt_stats.ue.40.vrtsim.yaml
ColNames :
- Metric
- Average; Max; Count
- Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)
Ref :
RX_PDSCH_STATS : 62.0
DLSCH_RX_PDCCH_STATS : 30.5
RX_DFT_STATS : 5.5
DLSCH_CHANNEL_ESTIMATION_STATS : 39.0
DLSCH_DECODING_STATS : 178.0
DLSCH_LDPC_DECODING_STATS : 78.0
DLSCH_LLR_STATS : 25.0
DLSCH_LAYER_DEMAPPING : 8.5
DLSCH_PROCEDURES_STATS : 188.0
PHY_PROC_TX : 158.0
PUSCH_PROC_STATS : 167.0
ULSCH_LDPC_ENCODING_STATS : 43.0
ULSCH_ENCODING_STATS : 121.0
OFDM_MOD_STATS : 44.5
DeviationThreshold :
RX_PDSCH_STATS : 0.25
DLSCH_RX_PDCCH_STATS : 0.25
RX_DFT_STATS : 0.25
DLSCH_CHANNEL_ESTIMATION_STATS : 0.25
DLSCH_DECODING_STATS : 0.25
DLSCH_LDPC_DECODING_STATS : 0.25
DLSCH_LLR_STATS : 0.25
DLSCH_LAYER_DEMAPPING : 0.5
DLSCH_PROCEDURES_STATS : 0.25
PHY_PROC_TX : 0.25
PUSCH_PROC_STATS : 0.25
ULSCH_LDPC_ENCODING_STATS : 0.25
ULSCH_ENCODING_STATS : 0.25
OFDM_MOD_STATS : 0.25

View File

@@ -1,126 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
function usage {
echo "OAI GitLab merge request applying script"
echo ""
echo "Usage:"
echo "------"
echo ""
echo " doGitLabMerge.sh [OPTIONS] [MANDATORY_OPTIONS]"
echo ""
echo "Mandatory Options:"
echo "------------------"
echo ""
echo " --src-branch #### OR -sb ####"
echo " Specify the source branch of the merge request."
echo ""
echo " --src-commit #### OR -sc ####"
echo " Specify the source commit ID (SHA-1) of the merge request."
echo ""
echo " --target-branch #### OR -tb ####"
echo " Specify the target branch of the merge request (usually develop)."
echo ""
echo " --target-commit #### OR -tc ####"
echo " Specify the target commit ID (SHA-1) of the merge request."
echo ""
echo "Options:"
echo "--------"
echo " --help OR -h"
echo " Print this help message."
echo ""
}
if [ $# -ne 8 ] && [ $# -ne 1 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
checker=0
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-sb|--src-branch)
SOURCE_BRANCH="$2"
let "checker|=0x1"
shift
shift
;;
-sc|--src-commit)
SOURCE_COMMIT_ID="$2"
let "checker|=0x2"
shift
shift
;;
-tb|--target-branch)
TARGET_BRANCH="$2"
let "checker|=0x4"
shift
shift
;;
-tc|--target-commit)
TARGET_COMMIT_ID="$2"
let "checker|=0x8"
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [[ $TARGET_COMMIT_ID == "latest" ]]
then
TARGET_COMMIT_ID=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH`
fi
echo "Source Branch is : $SOURCE_BRANCH"
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
echo "Target Branch is : $TARGET_BRANCH"
echo "Target Commit ID is : $TARGET_COMMIT_ID"
if [ $checker -ne 15 ]
then
echo ""
echo "Syntax Error: missing option"
echo ""
usage
exit 1
fi
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git checkout -f $SOURCE_COMMIT_ID > checkout.txt 2>&1
STATUS=`grep -E -c "fatal: reference is not a tree" checkout.txt`
rm -f checkout.txt
if [ $STATUS -ne 0 ]
then
echo "fatal: reference is not a tree --> $SOURCE_COMMIT_ID"
STATUS=-1
exit $STATUS
fi
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
STATUS=`git status | grep -E -c "You have unmerged paths.|fix conflicts"`
if [ $STATUS -ne 0 ]
then
echo "There are merge conflicts.. Cannot perform further build tasks"
STATUS=-1
fi
exit $STATUS

View File

@@ -0,0 +1,37 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
FROM ran-base:latest AS optional-base
RUN DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt upgrade --yes && \
apt install --yes \
libglfw3-dev
WORKDIR /oai-src
COPY . .
FROM optional-base AS build-imscope
RUN \
# Mount CCache cache directory
--mount=type=cache,target=/root/.cache/ccache/,id=ccache_imscope \
# Mount CPM package cache
--mount=type=cache,target=/root/.cache/cpm/,id=cpmcache_imscope \
mkdir -p /build-imscope && \
cd /build-imscope && \
cmake /oai-src/ -DENABLE_IMSCOPE=ON -GNinja && \
ninja imscope nr-softmodem nr-uesoftmodem
FROM optional-base AS build-tracy
RUN \
# Mount CCache cache directory
--mount=type=cache,target=/root/.cache/ccache/,id=ccache_tracy \
# Mount CPM package cache
--mount=type=cache,target=/root/.cache/cpm/,id=cpmcache_tracy \
mkdir -p /build-tracy && \
cd /build-tracy && \
cmake /oai-src/ -DTRACY_ENABLE=ON -GNinja && \
ninja nr-softmodem nr-uesoftmodem

View File

@@ -26,7 +26,7 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
-DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
-DPHYSIM_CHECK_FILES="ThresholdsCuda.cmake" \
-DCUDA_ENABLE=ON \
-DENABLE_CHANNEL_SIM_CUDA=ON \
-DUSE_UNIFIED_MEMORY=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \

View File

@@ -1,41 +0,0 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
FROM ubuntu:xenial AS oai-cppcheck
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
build-essential \
vim \
cppcheck
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/common/utils/T
RUN make
WORKDIR /oai-ran
RUN mkdir -p cmake_targets/log && \
cppcheck --enable=warning --force --xml --xml-version=2 \
--inline-suppr \
-i openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c \
--suppressions-list=ci-scripts/cppcheck_suppressions.list \
-I common/utils \
-I openair3/NAS/COMMON/UTIL \
-j`nproc` . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt
RUN grep -E -c 'severity="error' cmake_targets/log/cppcheck.xml
RUN grep -E -c 'severity="warning' cmake_targets/log/cppcheck.xml
RUN cat cmake_targets/log/cppcheck.xml

View File

@@ -26,7 +26,7 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
-DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
-DPHYSIM_CHECK_FILES="ThresholdsCuda.cmake" \
-DCUDA_ENABLE=ON \
-DENABLE_CHANNEL_SIM_CUDA=ON \
-DUSE_UNIFIED_MEMORY=ON \
-DUSE_ATS_MEMORY=OFF \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \

View File

@@ -22,4 +22,4 @@ WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCUDA_ENABLE=ON .. && ninja tests
RUN cmake -GNinja -DENABLE_TESTS=ON -DENABLE_CHANNEL_SIM_CUDA=ON .. && ninja tests

View File

@@ -10,14 +10,25 @@
FROM ran-base:develop AS ran-tests
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
libgtest-dev \
libyaml-cpp-dev
libyaml-cpp-dev \
libzmq3-dev \
flatbuffers-compiler \
libnanomsg-dev \
dpdk-dev \
dpdk \
curl
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
WORKDIR /oai-ran/build
RUN cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DSANITIZE_ADDRESS=True .. && ninja tests
RUN --mount=type=cache,target=/root/.cache/ccache/ \
--mount=type=cache,target=/root/.cache/cpm/ \
cmake .. -GNinja \
-DENABLE_TESTS=ON -DOAI_ZMQ=ON -DCMAKE_BUILD_TYPE=Debug \
-DSANITIZE_ADDRESS=True -DOAI_VRTSIM_TAPS_CLIENT=ON -DOAI_RU_FRONTHAUL=ON \
&& \
ninja

View File

@@ -27,17 +27,15 @@ def GenericHelp(vers):
print(' --local Force local execution: rewrites the test xml script before running to always execute on localhost. Assumes')
print(' images are available locally, will not remove any images and will run inside the current repo directory')
def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch):
print(' --ranRepository=[OAI RAN Repository URL] -- ' + repository)
print(' --ranBranch=[OAI RAN Repository Branch] -- ' + branch)
print(' --ranCommitID=[OAI RAN Repository Commit SHA-1] -- ' + commit)
def GitSrvHelp(repository,branch,mergeallow,targetbranch):
print(' --repository=[OAI RAN Repository URL] -- ' + repository)
print(' --branch=[OAI RAN Repository Branch] -- ' + branch)
print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow)
print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
print(' --targetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
def eNBSrvHelp(sourcepath):
print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath)
def SrvHelp(sourcepath):
print(' --workspace=[directory for workspaces on remote hosts] -- ' + sourcepath)
def XmlHelp(filename):
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)
print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)')

View File

@@ -22,7 +22,7 @@ import constants as CONST
import cls_oaicitest #main class for OAI CI test framework
import cls_containerize #class Containerize for all container-based operations on RAN/UE objects
import cls_static_code_analysis #class for static code analysis
import cls_static_code_analysis as SCA
import cls_cluster # class for building/deploying on cluster
import cls_native # class for all native/source-based operations
from cls_ci_helper import TestCaseCtx
@@ -64,23 +64,17 @@ def ExecuteActionWithParam(action, ctx, node):
global RAN
global HTML
global CONTAINERS
global SCA
global CLUSTER
if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy' or action == "Build_Cluster_Image" or action == "Build_Run_Tests":
if action == 'Build_eNB' or action == 'Build_Image' or action == "Build_Cluster_Image" or action == "Build_Run_Tests":
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
proxy_commit = test.findtext('proxy_commit')
dockerfile = test.findtext('dockerfile') or ''
runtime_opt = test.findtext('runtime-opt') or ''
ctest_opt = test.findtext('ctest-opt') or ''
if proxy_commit is not None:
CONTAINERS.proxyCommit = proxy_commit
if action == 'Build_eNB':
success = cls_native.Native.Build(ctx, node, HTML, RAN.eNBSourceCodePath, RAN.Build_eNB_args)
success = cls_native.Native.Build(ctx, node, HTML, RAN.workspace, RAN.Build_eNB_args)
elif action == 'Build_Image':
success = CONTAINERS.BuildImage(ctx, node, HTML)
elif action == 'Build_Proxy':
success = CONTAINERS.BuildProxy(ctx, node, HTML)
elif action == 'Build_Cluster_Image':
success = CLUSTER.BuildClusterImage(ctx, node, HTML)
elif action == 'Build_Run_Tests':
@@ -154,16 +148,16 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'Deploy_Run_OC_PhySim':
oc_release = test.findtext('oc_release')
script = "scripts/oc-deploy-physims.sh"
image_tag = cls_containerize.CreateTag(CLUSTER.ranCommitID, CLUSTER.ranBranch, CLUSTER.ranAllowMerge)
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {CLUSTER.eNBSourceCodePath}"
workdir = CLUSTER.eNBSourceCodePath
image_tag = CLUSTER.branch
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {CLUSTER.workspace}"
workdir = CLUSTER.workspace
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)
elif action == 'Build_Deploy_PhySim':
ctest_opt = test.findtext('ctest-opt') or ''
script = test.findtext('script')
options = f"{CONTAINERS.eNBSourceCodePath} {ctest_opt}"
workdir = CONTAINERS.eNBSourceCodePath
options = f"{CONTAINERS.workspace} {ctest_opt}"
workdir = CONTAINERS.workspace
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)
elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork':
@@ -171,11 +165,20 @@ def ExecuteActionWithParam(action, ctx, node):
core_op = getattr(cls_oaicitest.OaiCiTest, action)
success = core_op(cn_id, ctx, HTML)
elif action == 'DeployWithScript' or action == 'UndeployWithScript':
script = test.findtext('script')
options = test.findtext('options')
if action == 'DeployWithScript':
deploymentTag = RAN.branch
success = cls_oaicitest.DeployWithScript(HTML, node, script, options, deploymentTag)
elif action == 'UndeployWithScript':
success = cls_oaicitest.UndeployWithScript(HTML, ctx, node, script, options)
elif action == 'Deploy_Object' or action == 'Undeploy_Object' or action == "Create_Workspace" or action == "Stop_Object":
CONTAINERS.yamlPath = test.findtext('yaml_path')
CONTAINERS.services = test.findtext('services')
CONTAINERS.num_attempts = int(test.findtext('num_attempts') or 1)
CONTAINERS.deploymentTag = cls_containerize.CreateTag(CONTAINERS.ranCommitID, CONTAINERS.ranBranch, CONTAINERS.ranAllowMerge)
CONTAINERS.deploymentTag = CONTAINERS.branch
if action == 'Deploy_Object':
success = CONTAINERS.DeployObject(ctx, node, HTML)
elif action == 'Stop_Object':
@@ -196,10 +199,7 @@ def ExecuteActionWithParam(action, ctx, node):
success = CONTAINERS.Create_Workspace(node, HTML)
elif action == 'LicenceAndFormattingCheck':
success = SCA.LicenceAndFormattingCheck(ctx, node, HTML)
elif action == 'Cppcheck_Analysis':
success = SCA.CppCheckAnalysis(ctx, node, HTML)
success = SCA.StaticCodeAnalysis.LicenceAndFormattingCheck(ctx, node, HTML, RAN.workspace, RAN.branch, RAN.merge, RAN.targetBranch)
elif action == 'Push_Local_Registry':
tag_prefix = test.findtext('tag_prefix') or ""
@@ -223,14 +223,14 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'Custom_Command':
command = test.findtext('command')
# Allow referencing repository workspace path in XML via %%workspace%%
command = command.replace("%%workspace%%", CONTAINERS.eNBSourceCodePath)
command = command.replace("%%workspace%%", CONTAINERS.workspace)
success = cls_oaicitest.Custom_Command(HTML, node, command)
elif action == 'Custom_Script':
script = test.findtext('script')
args = test.findtext('args')
# Allow referencing repository workspace path in XML via %%workspace%%
script = script.replace("%%workspace%%", CONTAINERS.eNBSourceCodePath)
script = script.replace("%%workspace%%", CONTAINERS.workspace)
success = cls_oaicitest.Custom_Script(HTML, node, script, args)
elif action == 'Pull_Cluster_Image':
@@ -245,7 +245,8 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'AnalyzeRTStats_Object':
yaml = test.findtext('stats_cfg')
service = test.findtext('service')
success = CONTAINERS.AnalyzeRTStatsObject(HTML, node, ctx, yaml, service)
stats_files = (test.findtext('stats_file') or '').split()
success = CONTAINERS.AnalyzeRTStatsObject(HTML, node, ctx, yaml, service, stats_files)
else:
logging.warning(f"unknown action {action}, skip step")
@@ -297,7 +298,6 @@ CiTestObj = cls_oaicitest.OaiCiTest()
RAN = ran.RANManagement()
HTML = cls_oai_html.HTMLManagement()
CONTAINERS = cls_containerize.Containerize()
SCA = cls_static_code_analysis.StaticCodeAnalysis()
CLUSTER = cls_cluster.Cluster()
#-----------------------------------------------------------
@@ -307,7 +307,7 @@ CLUSTER = cls_cluster.Cluster()
import args_parse
# Force local execution, move all execution targets to localhost
force_local = False
mode, force_local, date_fmt = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER)
mode, force_local, date_fmt = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,CLUSTER)
fmt = "%(levelname)8s: %(message)s"
if date_fmt:
fmt = "[%(asctime)s] %(levelname)s %(message)s"
@@ -375,15 +375,15 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
logging.info('\u001B[1m----------------------------------------\u001B[0m')
if re.match('^TesteNB$', mode, re.IGNORECASE):
if RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBSourceCodePath == '':
if RAN.repository == '' or RAN.branch == '' or RAN.workspace == '':
HELP.GenericHelp(CONST.Version)
if RAN.ranRepository == '':
HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch)
if RAN.eNBSourceCodePath == '':
HELP.eNBSrvHelp(RAN.eNBSourceCodePath)
if RAN.repository == '':
HELP.GitSrvHelp(RAN.repository, RAN.branch, RAN.merge, RAN.targetBranch)
if RAN.workspace == '':
HELP.SrvHelp(RAN.workspace)
sys.exit('Insufficient Parameter')
else:
if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '':
if CiTestObj.repository == '' or CiTestObj.branch == '':
HELP.GenericHelp(CONST.Version)
sys.exit('UE: Insufficient Parameter')

103
ci-scripts/pre-ci-check.sh Executable file
View File

@@ -0,0 +1,103 @@
#!/bin/bash
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
function usage {
echo "OAI GitLab MR validation script (Signed-off-by and merge commits)"
echo ""
echo "Usage:"
echo "------"
echo " $0 -s <source-branch> -t <target-branch>"
echo ""
echo "Options:"
echo "--------"
echo " -s"
echo " The source branch of the merge request. Default value is current Git Branch (HEAD)"
echo ""
echo " -t"
echo " The target branch of the merge request. Default value is develop"
echo ""
echo " -h"
echo " Print this help message."
echo ""
}
# Parse arguments properly
SOURCE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
TARGET_BRANCH="origin/develop"
while getopts ":s:t:h" opt; do
case "$opt" in
s)
SOURCE_BRANCH="$OPTARG"
;;
t)
TARGET_BRANCH="$OPTARG"
;;
h)
usage
exit 0
;;
:)
echo "Error: Option -$OPTARG requires a value."
echo ""
usage
exit 2
;;
\?)
echo "Error: Invalid option -$OPTARG"
echo ""
usage
exit 2
;;
esac
done
# ----------------------------
# Merged commits
# ----------------------------
if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then
# note: if no branch could be found, it will result in "" and git rev-list
# will use the commit ID. Exclude "HEAD detached at", then use first branch
# name.
BRANCH_NAME=$(git branch -a --points-at $SOURCE_BRANCH --format='%(refname:short)' | grep -v detached | head -n1)
echo "SHA recognized in $SOURCE_BRANCH, using \"$BRANCH_NAME\" as branch name"
else
BRANCH_NAME="$SOURCE_BRANCH"
fi
if [[ ! "$BRANCH_NAME" =~ ^(origin/)?integration_[0-9]{4}_w[0-9]{2}$ ]]; then
mergeCommits=$(git rev-list --merges --abbrev-commit "$TARGET_BRANCH".."$SOURCE_BRANCH")
if [[ -n "$mergeCommits" ]]; then
message="Error: Following merge commits are found in the source branch history. Please rebase your branch.\n\n"
message+="$(echo "$mergeCommits" | paste -sd ',' | sed 's/,/, /g')\n"
echo -e "$message"
exit 3
fi
fi
# ----------------------------
# Check unsigned commits
# ----------------------------
unsignedCommits=$(
for c in $(git rev-list "$TARGET_BRANCH".."$SOURCE_BRANCH" --no-merges); do
if ! git log -1 --format=%B "$c" | grep -q "Signed-off-by:"; then
git log -1 --format='%h' "$c"
fi
done | paste -sd ',' | sed 's/,/, /g'
)
# ----------------------------
# Report unsigned commits
# ----------------------------
message=""
if [ -n "$unsignedCommits" ]; then
message="The following commit(s) are missing a Signed-off-by:\n\n$unsignedCommits\n\n"
message+="Please use 'git commit -s' to sign your commits.\n"
message+="For detailed instructions, refer to the CONTRIBUTING file at the root of this repository."
echo -e "$message"
exit 1
else
message="All commits are signed off using 'git commit -s'."
echo -e "$message"
exit 0
fi

View File

@@ -32,12 +32,11 @@ class RANManagement():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBSourceCodePath = ''
self.repository = ''
self.branch = ''
self.merge = False
self.targetBranch = ''
self.workspace = ''
self.Initialize_eNB_args = ''
self.imageKind = ''
self.eNBOptions = ['', '', '']
@@ -57,7 +56,7 @@ class RANManagement():
raise ValueError(f"{node=}")
logging.debug('Starting eNB/gNB on server: ' + node)
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
cmd = cls_cmd.getConnection(node)
# Initialize_eNB_args usually start with -O and followed by the location in repository
@@ -103,7 +102,7 @@ class RANManagement():
def TerminateeNB(self, ctx, node, HTML, to_analyze):
logging.debug('Stopping eNB/gNB on server: ' + node)
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
cmd = cls_cmd.getConnection(node)
ret = cmd.run('ps -aux | grep --color=never -e softmodem | grep -v grep')
result = re.search('-softmodem', ret.stdout)
@@ -138,7 +137,7 @@ class RANManagement():
def AnalyzeRTStats(self, HTML, node, ctx, thresholds):
logging.info(f'Analyzing realtime stats from server: {node}')
lSourcePath = self.eNBSourceCodePath
lSourcePath = self.workspace
logdir = f'{lSourcePath}/cmake_targets'
with cls_cmd.getConnection(node) as cmd:
@@ -146,6 +145,6 @@ class RANManagement():
mac_file = archiveArtifact(cmd, ctx, f"{logdir}/nrMAC_stats.log")
logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, l1_file, mac_file)
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, [l1_file, mac_file])
HTML.CreateHtmlDataLogTable(datalog_rt_stats)
return success

View File

@@ -30,15 +30,13 @@ docker tag oai-nr-ue oai-ci/oai-nr-ue:develop-${SHORT_COMMIT_SHA}
docker tag oai-gnb oai-ci/oai-gnb:develop-${SHORT_COMMIT_SHA}
docker tag oai-nr-cuup oai-ci/oai-nr-cuup:develop-${SHORT_COMMIT_SHA}
python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
--ranTargetBranch=NONE \
python3 main.py --mode=InitiateHtml --repository=NONE --branch=${CURRENT_BRANCH} \
--XMLTestFile=xml_files/${TESTCASE} --local --datefmt="%H:%M:%S"
python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
--ranTargetBranch=NONE \
--eNBSourceCodePath=${REPO_PATH} \
python3 main.py --mode=TesteNB --repository=NONE --branch=${CURRENT_BRANCH} \
--ranAllowMerge=false \
--targetBranch=NONE \
--workspace=${REPO_PATH} \
--XMLTestFile=${TESTCASE} --local --datefmt="%H:%M:%S"
RET=$?

View File

@@ -6,22 +6,16 @@ function die() {
exit 1
}
[ $# -ge 3 -a $# -le 4 ] || die "usage: $0 <directory> <repository> <ref> [<merge-ref>]"
[ $# -eq 3 ] || die "usage: $0 <directory> <repository> <branch>"
set -ex
dir=$1
repo=$2
ref=$3
merge=$4
branch=$3
rm -rf ${dir}
git clone --filter=blob:none -n ${repo} ${dir}
git clone --depth=1 --branch "${branch}" "${repo}" "${dir}"
cd ${dir}
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git config advice.detachedHead false
mkdir -p cmake_targets/log
git checkout -f ${ref}
[ -n "${merge}" ] && git fetch origin ${merge} && git merge --ff FETCH_HEAD -m "Temporary merge for CI"
exit 0

View File

@@ -0,0 +1,22 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
export PS4='[\D{%Y-%m-%d %H:%M:%S}] '
function die() { echo $@; exit 1; }
[ $# -eq 3 ] || die "usage: $0 <path-to-dir> <namespace> <image-tag>"
OC_NS=${2}
IMAGE_TAG=${3}
OC_DIR=${1}
OC_RELEASE=$(basename "${1}")
cat /opt/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
oc project ${OC_NS} > /dev/null
set -x
helm install --wait --timeout 120s ${OC_RELEASE} --set nfimage.version=${IMAGE_TAG} --hide-notes ${OC_DIR}/.
status=$?
set +x
oc logout > /dev/null
[ $status -eq 0 ] || die "OC chart deployment failed"

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
function die() { echo $@; exit 1; }
[ $# -eq 3 ] || die "usage: $0 <path-to-dir> <namespace> <log-dir>"
export PS4='[\D{%Y-%m-%d %H:%M:%S}] '
OC_DIR=${1}
OC_NS=${2}
LOG_DIR=${3}
OC_RELEASE=$(basename "${OC_DIR}")
cat ${OC_DIR}/oc-password | oc login -u oaicicd --server https://api.oai.cs.eurecom.fr:6443 > /dev/null
oc project ${OC_NS} > /dev/null
oc describe pod > ${LOG_DIR}/describe-pods-post-test.log
oc get pods.metrics.k8s &> ${LOG_DIR}/nf-resource-consumption.log
oc logs -l app.kubernetes.io/name=${OC_RELEASE} --tail=-1 > ${LOG_DIR}/${OC_RELEASE}.log
set -x
helm uninstall ${OC_RELEASE} --wait
status=$?
set +x
oc logout > /dev/null
[ $status -eq 0 ] || die "OC chart undeployment failed"

View File

@@ -0,0 +1,48 @@
#!/bin/sh
# SPDX-License-Identifier: MIT
set -e
RU_IP="10.10.0.111"
RU_HOST="root@10.10.0.111"
ssh_exec() {
ssh $RU_HOST $@ </dev/null
}
echo "→ Checking for PTP fluctuations in the last 60 minutes..."
logs=$(journalctl -u ptp4l.service --since "60 minutes ago")
check_ptp=$(echo "$logs" | awk '
/rms/ {
rms=$8
if (rms > 100) {
print "✗ PTP FLUCTUATION DETECTED → " $0
exit 0
}
}
')
if [ -n "$check_ptp" ]; then
echo "$check_ptp"
else
echo "✓ No PTP fluctuations detected."
fi
echo "→ Checking if VVDN LPRU is PTP synchronized (timeout 1 min)..."
if ssh_exec 'timeout 1m sh -c "tail -F /var/log/synctimingptp2.log | grep -m 1 -F ,\ synchronized"'; then
echo "✓ VVDN LPRU synchronized"
else
echo "✗ VVDN LPRU not synchronized"
fi
echo "→ Checking TX/RX carrier configuration..."
if ssh_exec 'sysrepocfg -X -d running -f xml | grep -q "<active>INACTIVE</active>"'; then
echo "→ Some carriers are not active, activating via sysrepocfg..."
ssh_exec 'sysrepocfg -X -d running -f xml | sed "s/<active>INACTIVE<\/active>/<active>ACTIVE<\/active>/g" | sysrepocfg -I -d running -f xml'
echo "✓ All TX/RX carriers activated."
else
echo "✓ All TX/RX carriers already activated."
fi
exit 0

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# SPDX-License-Identifier: MIT
set -e
RU_HOST="root@10.10.0.111"
ssh_exec() {
ssh $RU_HOST $@ </dev/null
}
echo "→ Inactivating TX/RX carriers on VVDN LPRU..."
ssh_exec 'sysrepocfg -X -d running -f xml | sed "s/ACTIVE/INACTIVE/g" | sysrepocfg -I -d running -f xml'
echo "✓ TX/RX carriers inactivated."

View File

@@ -21,6 +21,7 @@ To run individual unit tests, start them like so:
python tests/log-analysis.py -v
python tests/ping-iperf.py -v
python tests/pull-clean-int-registry.py -v
python tests/script-deployment.py -v
The logs will indicate if all tests passed. `tests/deployment.py` requires
these images to be present:

View File

@@ -26,7 +26,7 @@ class TestAnalysis(unittest.TestCase):
rtsf = "datalog_rt_stats.100.2x2.yaml"
l1f = "tests/analysis/gnb_phytest.success.nrL1.log"
macf = "tests/analysis/gnb_phytest.success.nrMAC.log"
status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, l1f, macf)
status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, [l1f, macf])
self.assertTrue(status)
self.assertEqual(s['Title'], "Processing Time (us) from datalog_rt_stats.100.2x2.yaml")
self.assertEqual(s['ColNames'], ["Metric", "Average; Max; Count", "Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)"])

View File

@@ -24,7 +24,7 @@ class TestBuild(unittest.TestCase):
self._d = tempfile.mkdtemp()
logging.warning(f"temporary directory: {self._d}")
self.node = 'localhost'
self.cont.eNBSourceCodePath = self._d
self.cont.workspace = self._d
self.ctx = TestCaseCtx.Default(tempfile.mkdtemp())
def tearDown(self):
@@ -33,10 +33,5 @@ class TestBuild(unittest.TestCase):
cmd.run(f"rm -rf {self._d}")
cmd.run(f'rm -rf {self.ctx.logPath}')
def test_build_proxy(self):
self.cont.proxyCommit = "b64d9bce986b38ca59e8582864ade3fcdd05c0dc"
success = self.cont.BuildProxy(self.ctx, self.node, self.html)
self.assertTrue(success)
if __name__ == '__main__':
unittest.main()

View File

@@ -41,10 +41,9 @@ class TestDeploymentMethods(unittest.TestCase):
self.ci = cls_oaicitest.OaiCiTest()
self.cont = cls_containerize.Containerize()
self.cont.yamlPath = ''
self.cont.ranAllowMerge = True
self.cont.ranBranch = ''
self.cont.ranCommitID = ''
self.cont.eNBSourceCodePath = os.getcwd()
self.cont.merge = True
self.cont.branch = ''
self.cont.workspace = os.getcwd()
self.cont.num_attempts = 3
self.node = 'localhost'
self.ctx = TestCaseCtx.Default(tempfile.mkdtemp())
@@ -136,13 +135,12 @@ class TestDeploymentMethods(unittest.TestCase):
self.assertTrue(undeploy)
def test_create_workspace(self):
self.cont.eNBSourceCodePath = tempfile.mkdtemp()
self.cont.ranRepository = "https://gitlab.eurecom.fr/oai/openairinterface5g.git"
self.cont.ranCommitID = "05f9c975eeecbca1bdff5940affad44465f1301f"
self.cont.ranBranch = "develop"
self.cont.workspace = tempfile.mkdtemp()
self.cont.repository = "https://github.com/duranta-project/openairinterface5g.git"
self.cont.branch = "develop"
ws = self.cont.Create_Workspace(self.node, self.html)
with cls_cmd.LocalCmd() as cmd:
cmd.run(f"rm -rf {self.cont.eNBSourceCodePath}")
cmd.run(f"rm -rf {self.cont.workspace}")
self.assertTrue(ws)
def test_undeploy_loganalysis(self):

View File

@@ -82,5 +82,17 @@ class TestPingIperf(unittest.TestCase):
success = self.ci.Iperf(self.ctx, self.node, self.html, infra_file=infra_file)
self.assertTrue(success)
def test_iperf_new_bindport(self):
self.ci.iperf_args = "-u -t 5 -b 22M -O 0 -p 10000 -B 127.0.0.3"
self.ci.svr_id = "test"
self.ci.svr_node = "localhost"
self.ci.iperf_packetloss_threshold = "0"
self.ci.iperf_bitrate_threshold = "0"
self.ci.iperf_profile = "balanced"
infra_file = "tests/config/infra_ping_iperf.yaml"
# TODO Should need nothing but options and UE(s) to use
success = self.ci.Iperf(self.ctx, self.node, self.html, infra_file=infra_file)
self.assertTrue(success)
if __name__ == '__main__':
unittest.main()

View File

@@ -22,7 +22,7 @@ class TestDeploymentMethods(unittest.TestCase):
self.html = cls_oai_html.HTMLManagement()
self.html.testCaseId = "000000"
self.cont = cls_containerize.Containerize()
self.cont.eNBSourceCodePath = os.getcwd()
self.cont.workspace = os.getcwd()
def test_pull_clean_local_reg(self):
# the pull function has the authentication at the internal cluster hardcoded

View File

@@ -0,0 +1,65 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
import sys
import logging
logging.basicConfig(
level=logging.DEBUG,
stream=sys.stdout,
format="[%(asctime)s] %(levelname)8s: %(message)s"
)
import os
import tempfile
import unittest
sys.path.append('./') # to find OAI imports below
import cls_oaicitest
import cls_oai_html
import cls_cmd
from cls_ci_helper import TestCaseCtx
class TestScriptDeployment(unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp()
self.html = cls_oai_html.HTMLManagement()
self.node = 'localhost'
self.tag = 'develop-12345678'
self.ctx = TestCaseCtx.Default(self.tmpdir)
def tearDown(self):
with cls_cmd.LocalCmd() as c:
c.run(f'rm -rf {self.ctx.logPath}')
def test_simple_deployment(self):
script = 'tests/scripts/deploy-with-script.sh'
options = 'WILL PASS'
success = cls_oaicitest.DeployWithScript(self.html, self.node, script, options, self.tag)
self.assertTrue(success)
def test_simple_deployment_fail(self):
script = 'tests/scripts/deploy-with-script.sh'
options = 'WILLFAIL'
success = cls_oaicitest.DeployWithScript(self.html, self.node, script, options, self.tag)
self.assertFalse(success)
def test_simple_undeployment(self):
script = 'tests/scripts/undeploy-with-script.sh'
options = '%%log_dir%% WILL PASS'
success = cls_oaicitest.UndeployWithScript(self.html, self.ctx, self.node, script, options)
self.assertTrue(success)
# verify logs were created
files = os.listdir(self.tmpdir)
self.assertIn('112233-log1.txt', files)
self.assertIn('112233-log2.txt', files)
def test_simple_undeployment_fail(self):
script = 'tests/scripts/undeploy-with-script.sh'
options = '%%log_dir%% WILLFAILL'
success = cls_oaicitest.UndeployWithScript(self.html, self.ctx, self.node, script, options)
self.assertFalse(success)
# verify logs were created
files = os.listdir(self.tmpdir)
self.assertIn('112233-log1.txt', files)
self.assertIn('112233-log2.txt', files)
if __name__ == '__main__':
unittest.main()

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
function die() { echo $@; exit 1; }
echo "Deploy script executed with options: $@"
[ $# -lt 2 ] && die "failing"
exit 0

View File

@@ -0,0 +1,15 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
function die() { echo $@; exit 1; }
echo "Undeploy script executed with options: $@"
LOG_DIR="$1"
mkdir -p "$LOG_DIR"
echo "Undeployment started" > "$LOG_DIR/log1.txt"
echo "Undeployment finished successfully" > "$LOG_DIR/log2.txt"
[ $# -lt 3 ] && die "failing"
exit 0

View File

@@ -1,29 +1,24 @@
#/bin/bash
#!/bin/bash
# SPDX-License-Identifier: MIT
branch=$(git rev-parse --abbrev-ref HEAD)
commit=$(git rev-parse HEAD)
file=../../test_results.html
rm -f ${file}
cd ../../
python3 main.py \
--mode=InitiateHtml \
--ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g.git \
--ranBranch=${branch} \
--ranCommitID=${commit} \
--ranAllowMerge=true \
--ranTargetBranch=develop \
--repository=https://github.com/duranta-project/openairinterface5g.git \
--branch=${branch} \
--XMLTestFile=tests/test-runner/test.xml
python3 main.py \
--mode=TesteNB \
--ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g.git \
--ranBranch=${branch} \
--ranCommitID=${commit} \
--repository=https://github.com/duranta-project/openairinterface5g.git \
--branch=${branch} \
--ranAllowMerge=true \
--ranTargetBranch=develop \
--eNBSourceCodePath=NONE \
--targetBranch=develop \
--workspace=NONE \
--XMLTestFile=tests/test-runner/test.xml
python3 main.py \

View File

@@ -1,5 +1,4 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
- Build_Proxy
- Build_Cluster_Image
- Pull_Cluster_Image
- Build_eNB
@@ -23,7 +22,6 @@
- Deploy_Object
- Stop_Object
- Undeploy_Object
- Cppcheck_Analysis
- Deploy_Run_OC_PhySim
- Build_Deploy_PhySim
- LicenceAndFormattingCheck
@@ -35,3 +33,5 @@
- Create_Workspace
- AnalyzeRTStats
- AnalyzeRTStats_Object
- DeployWithScript
- UndeployWithScript

View File

@@ -70,7 +70,7 @@
<class>Attach_UE</class>
<desc>Attach OAI UE 1 and 2</desc>
<id>rfsim5g_ue rfsim5g_ue2</id>
<node>carabe</node>
<node>localhost</node>
</testCase>
<testCase>
@@ -98,21 +98,32 @@
</testCase>
<testCase>
<class>Ping</class>
<desc>Ping ext-dn from both UEs</desc>
<class>Iperf</class>
<desc>Iperf (DL/TCP)(20 sec)</desc>
<iperf_args>-t 20 -R</iperf_args>
<id>rfsim5g_ue rfsim5g_ue2</id>
<node>carabe</node>
<node>localhost</node>
<svr_id>oai_ext_dn</svr_id>
<svr_node>carabe</svr_node>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
<svr_node>localhost</svr_node>
<iperf_tcp_rate_target>10</iperf_tcp_rate_target>
</testCase>
<testCase>
<class>Iperf</class>
<desc>Iperf (UL/TCP)(20 sec)</desc>
<iperf_args>-t 20</iperf_args>
<id>rfsim5g_ue rfsim5g_ue2</id>
<node>localhost</node>
<svr_id>oai_ext_dn</svr_id>
<svr_node>localhost</svr_node>
<iperf_tcp_rate_target>5</iperf_tcp_rate_target>
</testCase>
<testCase>
<class>Detach_UE</class>
<desc>Detach OAI UE 1 and 2</desc>
<id>rfsim5g_ue rfsim5g_ue2</id>
<node>carabe</node>
<node>localhost</node>
</testCase>
<testCase>
@@ -178,7 +189,7 @@
<yaml_path>ci-scripts/yaml_files/5g_rfsimulator_flexric</yaml_path>
<always_exec>true</always_exec>
<analysis>
<service>nearRT-RIC=LastLineContains=Removing E2 Node</service>
<service>nearRT-RIC=LastLineContains=The nearRT-RIC run SUCCESSFULLY</service>
<service>xapp-rc-moni=LastLineContains=Test xApp run SUCCESSFULLY</service>
<service>xapp-kpm-moni=LastLineContains=Test xApp run SUCCESSFULLY</service>
<service>xapp-kpm-rc=LastLineContains=Test xApp run SUCCESSFULLY</service>

Some files were not shown because too many files have changed in this diff Show More