Compare commits

...

3021 Commits

Author SHA1 Message Date
Maxime Elkael
4bd0e3234d Merge branch 'hol-delay' into 'develop'
Add per-LCID head-of-line delay to DL scheduling candidates

See merge request oai/openairinterface5g!4152
2026-07-02 06:59:24 +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
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
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
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
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
Maxime
a8de5c4c7a Add per-LCID head-of-line delay to DL scheduling candidates
Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-28 15:10:32 -04: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
Jaroslava Fiedlerova
5fcd456a46 Merge branch 'integration_2026_w15' into 'develop'
Integration `2026.w15`

* !4014 Microamp FR2 configuration file and documentation
* !4029 nr rlc: tolerate bogus data
* !4032 build_oai fixes: harmonize duplicate options, remove wrong --build-lib handling
* !3977 Further unused arguments cleanup
* !4009 Fix for NULL pucch-ResourceCommon at MSG4
* !4037 Increase reliability of ltebox start
* !4034 Prevent infinite loop on Single Entry PHR handling
* !4038 doc(record_db): explain how to use record_db
* fix compilation of T tracers with 'make'
* !3489 Thread-pool support for TX symbol processing.

See merge request oai/openairinterface5g!4033
2026-04-10 08:17:46 +00:00
Jaroslava Fiedlerova
8583689349 Merge remote-tracking branch 'origin/tx_symbol_processing' into integration_2026_w15 (!3489)
Thread-pool support for TX symbol processing.

This MR adds thread-pool support for TX symbol processing. It allows modulation
/mapping/layer-precoding to run in parallel and offers a speedup of around 3
compared to single-thread execution. This is particularly important for large
bandwidths and 4 or more TX antenna ports where the precoding operation is quite
computationally-intensive.

Please see the description of !3489 for the performance comparison results and
the nr_dlsim timing measurements.
2026-04-09 18:11:03 +02:00
Romain Beurdouche
03350ab21b doc(tuning_and_security): extend the performance tuning section
Extend the performance tuning section of documentation
to include explanation on the `--L1s.L1_num_tx_sym_per_thread` option
and on the AMD EPYC core complex behavior
2026-04-09 14:31:40 +00:00
Jaroslava Fiedlerova
83ffa53ccc fix compilation of T tracers with 'make'
Modification required after !3977 is merged.
2026-04-09 16:30:42 +02:00
Robert Schmidt
ec327d26fc Compilation without T: move to physims 2026-04-09 12:26:35 +02:00
Robert Schmidt
90ff73798a Merge remote-tracking branch 'origin/record_db-doc' into integration_2026_w15 (!4038)
doc(record_db): explain how to use record_db

Documentation for how to use record_db
2026-04-09 09:43:47 +02:00
Robert Schmidt
1b9b65800e Merge remote-tracking branch 'origin/handle-ul-harq-loop' into integration_2026_w15 (!4034)
Prevent infinite loop on Single Entry PHR handling

Avoid an infinite loop, and always pass HARQ PID. Also make more
functions static.
2026-04-09 09:43:28 +02:00
Sagar Arora
51d8441927 doc(record_db): explain how to use record_db
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
Reviewed-by: Nick Hedberg <nhedberg@nvidia.com>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Assisted-by: gpt-5.4
2026-04-09 09:36:09 +02:00
Jaroslava Fiedlerova
6d3a902135 Merge remote-tracking branch 'origin/fix-ltebox-startup-fail' into integration_2026_w15 (!4037)
Increase reliability of ltebox start

The existing ltebox startup sequence on nepes occasionally fails. Running

sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss' \
    && sleep 1 && sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw \
    & sleep 1 && ip a show dev tun1

Reliably shows that no tun1 interface is created, because that takes around
1s itself. Increasing the second sleep to 2 reliably deploys it correctly.
Do the same for sabox and ltebox on nano for consistency.
2026-04-08 21:55:46 +02:00
Jaroslava Fiedlerova
cfa58f8dbb Merge remote-tracking branch 'origin/pucch_fixes' into integration_2026_w15 (!4009)
Fix for NULL pucch-ResourceCommon at MSG4

Field pucch-ResourceCommon, used for ACK of MSG4, in some scenarios was
overwritten by RRCSetup before being used. Storing it in advance prevents
the segfault. In addition there is a clenaup of similar procedures at gNB.
2026-04-08 21:50:56 +02:00
Romain Beurdouche
87402f4959 feat(nr_dlsch): option to provide the number of symbols per thread
* Add option `--L1s.L1_num_tx_sym_per_thread` for the softmodems and `-Y` for `nr_dlsim`
  to provide the number of symbols processed per thread.
  It defaults to 0 which makes that every symbols are processed in one thread.
* The last symbol processing task is processed in the L1 TX thread.
2026-04-08 13:18:54 +00:00
Robert Schmidt
176521e6ec call nr_process_mac_pdu() with current HARQ PID
There is no real reason not to from what I can see.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-08 14:24:00 +02:00
Robert Schmidt
d93b0e13d2 Prevent infinite loop on HARQ PID=-1 and Single Entry PHR
When receiving single-entry PHR with HARQ PID -1
(nr_mac_process_mac_pdu() is called with such parameter in at least two
places), the error handling path calls continue skipping the accounting
of the current sub-pdu (pduP and pdu_len). This results in an infinite
loop. Fix by moving functionality into a separate function.

Fixes: 2e0493632d ("RLC data ind: single call for complete TB at gNB")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-08 14:24:00 +02:00
Jaroslava Fiedlerova
ef67552e1f Merge remote-tracking branch 'origin/further_unused_arguments_cleanup' into integration_2026_w15 (!3977)
Further unused arguments cleanup

More fixes for unused function arguments (see #1057),
add_compile_options(-Wunused-parameter) added in folders:
- nfapi
- openair2
- openair3
- USRP
- rfsimulator
2026-04-08 13:55:16 +02:00
Jaroslava Fiedlerova
8d8ac73cb4 Merge remote-tracking branch 'origin/fix-build_oai' into integration_2026_w15 (!4032)
build_oai fixes: harmonize duplicate options, remove wrong --build-lib handling

Correctly handle --build-lib such that missing arguments are still handled
properly. Harmonize, and remove useless code.
2026-04-08 13:54:38 +02:00
Bartosz Podrygajlo
dfed62bd24 Better stubs for test_nr_ue_ra_procedures 2026-04-08 08:31:14 +02:00
francescomani
edd7611854 pre-store pucch_ResourceCommon to avoid segfault in scheduling PUCCH at UE
(the field in some scenarios was erased by RRCSetup before being used for ACK of MSG4, storing it in advance prevents the segfault)
2026-04-08 08:30:20 +02:00
Robert Schmidt
466c9b5eee Increase reliability of ltebox start
The existing ltebox startup sequence on nepes occasionally fails.
Running

    sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss' \
        && sleep 1 && sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw \
        & sleep 1 && ip a show dev tun1

Reliably shows that no tun1 interface is created, because that takes
around 1s itself. Increasing the second sleep to 2 reliably deploys it
correctly.

Do the same for sabox and ltebox on nano for consistency.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-08 02:13:53 +02:00
Robert Schmidt
447c0b211e gNB_scheduler_ulsch: make functions static 2026-04-07 21:05:43 +02:00
Robert Schmidt
d63dc3a321 Remove build_oai --clean-kernel option
This option is potentially dangerous as it might override custom user
options.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 15:06:42 +02:00
Robert Schmidt
900fa704ed bugfix run_asn1c: make make/ninja fail on error
Functionality existed to print all output of asn1c on error, but the
form

    asn1c || cat X

makes the command exit with a 0 exit code (success). Fix by explicitly
returning non-zero exit code in this case:

    asn1c || ( cat X && false )

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 15:06:42 +02:00
Robert Schmidt
be9fc79f77 harmonize build_oai -c/-C
Both do practically the same. Harmonize them into one while guaranteeing
backwards compatibility.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 15:06:42 +02:00
Robert Schmidt
57df1ede4b Remove log directory creation: it's not used
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 15:06:42 +02:00
Robert Schmidt
6684ead115 Correctly handle build_oai --build-lib option
This fixes two problem:

1. an omitted --build-lib library could yield strange grep errors. For
   instance, calling build_oai --build-lib --cmake-opt OPTION passed
   "--cmake-opt" to grep, that does not know this option. Handle by
   explicitly separating options and search pattern through --.
2. Even with this fixed, set -e triggered an exit because grep exits
   with non-zero error code. Remove set -e to have the error handling
   code pass.

With set -e removed, properly check that the build passes.

Update a log line to make it clearer.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 15:06:33 +02:00
Jaroslava Fiedlerova
8dfb61827b Merge remote-tracking branch 'origin/bugfix-rlc-fuzzing' into integration_2026_w15 (!4029)
nr rlc: tolerate bogus data

Some unfriendly entity may play with the RLC module and send bogus data to
trigger funky behaviors here and there.

A report sent by Dhanish indentifies one such issue.

From analyzing this report, a possible scenario is the following. Unfriendly
entity sends an RLC PDU with: is_first=0 is_last=0 so=15 lenght of data,
whatever, let's say 1.

This PDU is put in the RX list.

Then later it sends another PDU (for the same SN, obviously), with: is_first=1
is_last=1 so=0 (well, since is_first=1, necessarily so=0; it is not transmitted,
see 38.322 6.2.2.3 for UM and 38.322 6.2.2.4 for AM) length=10, let's say.

This PDU is also put in the RX list, before the previous one.

Then the function sdu_full() returns 1, so reassemble_and_deliver() is called
and the 'while (pdu)' loop is executed for both PDUs. When the second (bogus
one) is processed, so==10 (after processing the first PDU) and the line: int
len = pdu->size - (so - pdu->so) is: int len = 1 - (10 - 15) which is not good.

So we detect the case 'pdu->so > so' and reject the SDU. We could label the
other entity as bogus, since no standard RLC implementation will produce such a
case, but let's remain friendly, even with unfriendly entities. (To be changed
later if needed.)

The problem was reported for RLC AM but is also present in RLC UM. (Not in RLC
TM, where there is no segmentation.) Note: according to the report, this bug was
found using a fuzzer described as 'AI-assisted custom 5G NR protocol fuzzer'. It
had to be said.
2026-04-07 12:09:51 +02:00
Romain Beurdouche
f6693d41e3 fix(nr_dlsch): Remove DLSCH mapping debugs 2026-04-07 09:21:22 +00:00
Romain Beurdouche
1d42dfda66 fix(nr_dlsch): time meas in TX symbol processing
* Global timers were started and stopped
  in the TX symbol processing tasks
  which is not thread safe
* gNBs nrL1_stats.log now shows
  PDSCH generation time rather than
  layer mapping and precoding times
2026-04-07 09:21:22 +00:00
Romain Beurdouche
b875f855c7 fix(nr_dlsch): symbol offset calculation
There was an indexing error in the calculation of the symbol offset `re_beginning_of_symbol`.
The symbol was tested to hold PTRS or DMRS based on the index of the
first symbol processed in the task and not based on the index of the
symbol as it should be.
Then PDSCH generation was not working properly for more than one symbol
per task.
2026-04-07 09:21:22 +00:00
Raymond Knopp
bad2ae874e added thread-pool support for TX symbol processing
removed warnings in nr_dlsch.c and changed return of do_onelayer

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-07 09:19:01 +00:00
Jaroslava Fiedlerova
da44a52092 Merge remote-tracking branch 'origin/microamp_MR' into integration_2026_w15 (!4014)
Microamp FR2 configuration file and documentation

Adding Microamp FR2 RU configuration file and updating documentation
2026-04-07 10:38:40 +02:00
Karim Boutiba
f55e26a25e Adding Microamp FR2 RU configuration file and updating documentation 2026-04-07 10:23:32 +02:00
francescomani
5d8e79521e some cleanup and improvements for default PUCCH on gNB 2026-04-07 10:07:07 +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
Jaroslava Fiedlerova
2407c35633 Merge branch 'integration_2026_w14' into 'develop'
Integration `2026.w14`

* !4021 hotfix for 4 layer mapping on aarch64
* !4022 UE: Fix CSI RS Measurement
* !4010 UE: Implement SUCI Profile Scheme A
* !4012 More compilation improvements
* !4027 CI: fix Aerial conf for test with 30 MHz BW
* !3948 Update doc: split RUNMODEM.md, clarify USRP-specific workarounds
* !4026 RRC/E1 bugfixes: handle missing UE context, don't send E1 msg if no PDU session
* !3996 Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git
* !4020 Remove a lot of unused code and defines
* !3969 Acceleration of channel convolution
* !4023 Cleanup common_lib.h
* Clarifications on license
* !4017 CI: Add stage to push to local git repository

See merge request oai/openairinterface5g!4025
2026-04-03 10:09:09 +00:00
Jaroslava Fiedlerova
1a4c4c9b35 Merge remote-tracking branch 'origin/ci-push-local-repo' into integration_2026_w14 (!4017)
CI: Add stage to push to local git repository

This MR includes minor code cleanup and fixes for warnings reported by Jenkins.
It also introduces a new stage in ci-scripts/Jenkinsfile-GitLab-Container that
pushes the branch to a local repository after the merge. In a follow-up MR,
this local repository will be used as the source for cloning the branch,
replacing direct access to GitLab/GitHub.
2026-04-03 09:09:06 +02:00
Jaroslava Fiedlerova
3f3c0b5ed2 Jenkinsfile-GitLab-Container: declare pipeline variables
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named JOB_TIMESTAMP (to a value of type String) which could lead to memory leaks or other issues.
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named MR_NUMBER (to a value of type String) which could lead to memory leaks or other issues.
2026-04-03 08:48:32 +02:00
Jaroslava Fiedlerova
febbadf83a CI: Add stage to push to local git repository 2026-04-03 08:48:32 +02:00
Jaroslava Fiedlerova
e0d9edeeee Add Jenkinsfile for RAN-Local-Repo-Push 2026-04-03 08:48:32 +02:00
Robert Schmidt
0f7550831f Clarifications on license
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-04-03 04:14:46 +02:00
Cedric Roux
6556c88694 nr rlc: tolerate bogus data
Some unfriendly entity may play with the RLC module and send bogus data to
trigger funky behaviors here and there.

A report sent by Dhanish, India, indentifies one such issue.

From analyzing this report, a possible scenario is the following.

Unfriendly entity sends an RLC PDU with:
is_first=0
is_last=0
so=15
lenght of data, whatever, let's say 1.

This PDU is put in the RX list.

Then later it sends another PDU (for the same SN, obviously), with:
is_first=1
is_last=1
so=0 (well, since is_first=1, necessarily so=0; it is not transmitted,
see 38.322 6.2.2.3 for UM and 38.322 6.2.2.4 for AM)
length=10, let's say.

This PDU is also put in the RX list, before the previous one.

Then the function sdu_full() returns 1, so reassemble_and_deliver() is
called and the 'while (pdu)' loop is executed for both PDUs. When the
second (bogus one) is processed, so==10 (after processing the first
PDU) and the line: int len = pdu->size - (so - pdu->so)
is: int len = 1 - (10 - 15)
which is not good.

So we detect the case 'pdu->so > so' and reject the SDU. We could label
the other entity as bogus, since no standard RLC implementation will
produce such a case, but let's remain friendly, even with unfriendly
entities. (To be changed later if needed.)

The problem was reported for RLC AM but is also present in RLC UM.
(Not in RLC TM, where there is no segmentation.)

Note: according to the report, this bug was found using a fuzzer
described as 'AI-assisted custom 5G NR protocol fuzzer'. It had
to be said.
2026-04-02 21:41:18 +02:00
Jaroslava Fiedlerova
5e6fd58dde Merge remote-tracking branch 'origin/cleanup-split8-api' into integration_2026_w14 (!4023)
Cleanup common_lib.h

This change reduces the number of dependecies of common_lib.h and simplifies
the task of implementing an external OAI radio library.
2026-04-02 18:33:50 +02:00
Jaroslava Fiedlerova
978932e522 Merge remote-tracking branch 'origin/vrtsim-convolution-acceleration' into integration_2026_w14 (!3696)
Acceleration of channel convolution

Added two versions of channel convolution:
- accelerated via threadpool
- accelerated using CUDA
2026-04-02 17:11:31 +02:00
Robert Schmidt
0393a14049 Merge remote-tracking branch 'origin/remove-unused-code' into integration_2026_w14 (!4020)
Remove a lot of unused code, defines, and config options

Remove unused header files and defines.

Slightly clean up gnb_config.c by removing all _IDX variables. Remove
these unused parameters:

- MACRLCs.[0].num_cc
- MACRLCs.[0].local_n_portc
- MACRLCs.[0].remove_n_portc
- MACRLCs.[0].remote_s_portc
- MACRLCs.[0].remote_s_portd
- L1s.[0].num_cc
- L1s.[0].local_n_portc
2026-04-02 15:46:56 +02:00
Jaroslava Fiedlerova
eb50f78ed5 Merge remote-tracking branch 'origin/xran-repo' into integration_2026_w14 (!3996)
Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git
2026-04-02 12:49:50 +02:00
Jaroslava Fiedlerova
13fbc5a643 CI: Get source repository from Gitlab plugin in Jenkins 2026-04-02 12:34:55 +02:00
Jaroslava Fiedlerova
6cf2570a9f Jenkinsfile-GitLab-Container: declare local vars in slave job triggers
Declare `localStatus` and `localResult` as local variables in `triggerSlaveJob`
and `triggerCN5GSlaveJob` functions by adding `def`.

This prevents unintended use of global variables in pipeline and avoids
potential variable leakage or conflicts between stages.

Follows the Jenkins recommendation:
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localStatus (to a value of type RunWrapper) which could lead to memory leaks or other issues.
Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localResult (to a value of type String) which could lead to memory leaks or other issues.
2026-04-02 12:34:55 +02:00
Jaroslava Fiedlerova
df7a1704cc Jenkinsfile-GitLab-Container: remove unused function 2026-04-02 12:34:55 +02:00
Robert Schmidt
e1a7a2e8af Remove L1s.local_n_portc: not used
Also remove intermediate variable eth_params_n that is not used
anywhere.
2026-04-02 11:58:59 +02:00
Robert Schmidt
16b1a031a9 Remove MACRLCs.remote_s_portc/d: not used
Remove the gNB_MAC_INST.eth_params_s, since it's only purpose is to
store what can be on the stack.

For the Aerial log message, don't print an empty prefix but what is
actually used for Aerial.
2026-04-02 11:58:59 +02:00
Robert Schmidt
7ee619b0bc MACRLCs my/remote_portc: remove, is unused 2026-04-02 11:58:59 +02:00
Jaroslava Fiedlerova
1682507735 CI: Add CUDA-enabled unit tests for running on GH
- remove test_multipath and test_noise from ChanelSim tests of
  RAN-Channel-Simulation pipeline - will be executed together with the
  other CUDA-enabled unit tests
2026-04-01 23:00:16 +02:00
Jaroslava Fiedlerova
b05985e7ab CI: Extend BuildRunTests() to accept configurable dockerfile and test options
- enable configurable dockerfile, runtime-opt, and ctest-opt parameters in
  the XML file for the Build_Run_Tests step
- pass runtime options to `docker run` to support ctest execution with CUDA
- allow additional ctest options for selective test execution and labeling
2026-04-01 22:57:03 +02:00
Robert Schmidt
7cf92f4bae Remove all gNB num_cc parameters in MACRLCs and L1s sections
These parameters are not used.
2026-04-01 21:38:40 +02:00
Jaroslava Fiedlerova
84d9cd3c93 CI: add channel pipeline tests to CTest and label CUDA tests
- add benchmark_channel_pipeline to CTest
- add test_channel_pipeline to CTest
- add `cuda` label to CUDA-dependent tests for easier execution and
  filtering
2026-04-01 21:36:20 +02:00
Jaroslava Fiedlerova
45d106f1c6 Relax CUDA device requirement
This change removes the cudaDevAttrIntegrated check and only requires
pageable memory access. This change allows to run GPU accelerated
channel convolution on GH machines.
2026-04-01 21:36:10 +02:00
Robert Schmidt
8a48fca140 Remove L1_..._IDX
Similar like parent commit, but for L1.
2026-04-01 21:19:51 +02:00
Robert Schmidt
42d5e5a0dc Remove MACRLC_..._IDX
The indices are brittle and might be wrong. Instead, use the option name
(via gpd()) to look up config options. This will also simplify the
removal of unused parameters, as we don't have to update all indices.

Remove leading CONFIG_STRING_, as it is just repetitive and adds noise.
The constants are both short(er) and sufficiently self-explanatory
without it.
2026-04-01 21:19:14 +02:00
Jaroslava Fiedlerova
f69b88a108 Merge remote-tracking branch 'origin/fixes-rrc-e1' into integration_2026_w14 (!4026)
RRC/E1 bugfixes: handle missing UE context, don't send E1 msg if no PDU session

See individual commits
2026-04-01 20:58:35 +02:00
Jaroslava Fiedlerova
8f5148ab2a Merge remote-tracking branch 'origin/update-split-doc-runmodem' into integration_2026_w14 (!3948)
Update doc: split RUNMODEM.md, clarify USRP-specific workarounds

This reworks the documentation:
- split up RUNMODEM.md into separate documents for gNB, UE, NTN
- explains USRP workaround and patches
- makes a standalone UE doc file that explains UE-specific configuration
  & modes
- better explains physical simulators
- adds a document on tracy
- cleanup
2026-04-01 20:57:16 +02:00
Robert Schmidt
1a3bf557cf delay transaction: handle if no UE found
It can happen that a message is delayed, but then no UE is found for
such message, e.g., something is delayed but the UE context is deleted
in the meantime:

    [02:23:16.320730] [NR_RRC] I [--] (UE ID 3 RNTI d2b1) Remove UE context

    Assertion (ue_context_p) failed!
    In rrc_delay_transaction() /oai-ran/openair2/RRC/NR/rrc_gNB.c:191

In that case, don't delay the message further -- all handlers gated by
this function will check for the UE context and abort the transaction if
not present.
2026-04-01 17:09:37 +02:00
Robert Schmidt
1e9476a6de E1 message: handle if no UE found
Abort message processing if no UE can be found, which is what is done in
most other messages.
2026-04-01 17:09:37 +02:00
Robert Schmidt
95e4270ea7 bugfix: do not trigger e1 bearer setup when no PDU session
It can happen that no PDU session can be setup (e.g., PDU session
already setup). Check that there is at least one before triggering the
message.

Also initialize bearer_req.gNB_cu_cp_ue_id early to avoid uninitialized
IDs (e.g., when no PDU session to be setup).
2026-04-01 17:09:37 +02:00
Jaroslava Fiedlerova
fcd3e62a33 Merge remote-tracking branch 'origin/ci-fix-aerial-oaiue' into integration_2026_w14 (!4027)
CI: fix Aerial conf for test with 30 MHz BW
2026-04-01 16:33:08 +02:00
Jaroslava Fiedlerova
28c6b6d9d9 Merge remote-tracking branch 'origin/compil_imp' into integration_2026_w14 (!4012)
More compilation improvements

Mostly to decouple NR files from LTE headers.

At least in one instance, ulsch_input_buffer_array, using an LTE constant in
NR code was quite dangerous because the buffer in NR could easily be larger
than what the LTE constant foresee.
2026-04-01 16:32:18 +02:00
Jaroslava Fiedlerova
d1f92c03a7 Merge remote-tracking branch 'origin/fix-csi-rs-meas' into integration_2026_w14 (!4022)
UE: Fix CSI RS Measurement

1. Fix regression introduced in !3834.
2. ZMQ has no interference or artificial noise so the interference plus noise
   measured is always 0. nr_csi_rs_pmi_estimation() returns SINR as 0 if noise
   is 0 which reports CQI as 0. This fix computes SINR if noise is 0 instead of
   returning.
2026-04-01 09:58:48 +02:00
Jaroslava Fiedlerova
1dd66355a2 Merge remote-tracking branch 'origin/nr-ue-suci-scheme-a' into integration_2026_w14 (!4010)
UE: Implement SUCI Profile Scheme A

This MR modifies the nrUE to support Profile Scheme A based SUCI generation as
outlined in TS 33.501 §C.3 Elliptic Curve Integrated Encryption Scheme (ECIES),
this further extends SUCI generation, which currently only supports the NULL
Scheme.

Changes:
- Extend UICC structure for SUCI parameters.
- Add cryptographic primitives (Curve25519, X9.63 KDF).
- Add an abstracted function to transfer digit strings into their corresponding
  BCD value.
- Updates SUCI generation to support Profile Scheme A.
- Updates NAS SUCI encoding to support hexadecimal cryptographic output in
  addition to BCD encoded MSINs.

Notes:
When a configuration file specifies an unsupported Profile Scheme, the NAS layer
triggers a fatal error. This occurs either because Profile Scheme B is
unimplemented or the build uses OpenSSL < 3.0, which lacks Curve25519 and X9.63
KDF support, ensuring users are informed of the incompatibility. Support for
Profile Scheme B (TS 33.501 §C.3.4.2 Profile B) can be implemented at a later
stage using P-256-based encryption.

The implementation of SUCI Profile Scheme A was tested against Open5GS’s core
implementation. OpenAirInterface’s cn5G does not yet support Scheme A and should
be extended to include it in a future update.
2026-04-01 09:56:29 +02:00
Jaroslava Fiedlerova
f59083f620 CI: fix Aerial conf for testcase with 30 MHz BW 2026-03-31 22:30:48 +02:00
Robert Schmidt
40a1afda05 Rewrite RUNMODEM.md for general gNB overview
Assisted-by: Claude:claude-sonnet-4-6
2026-03-31 21:35:31 +02:00
Robert Schmidt
fd2fda6260 runmodem-ue.md: update multi-UE operation, minor updates 2026-03-31 21:35:31 +02:00
Robert Schmidt
faadb1aa15 doc: physim: explain timing, give more ctest examples 2026-03-31 21:35:31 +02:00
Jaroslava Fiedlerova
c07813a43e Add physical simulator test to tests target
This allows to compile physical simulators by compiling only tests with
"ninja tests". It fixes a regression.

Fixes: ec8efe1b7e ("Unify physim test definition")
2026-03-31 21:35:31 +02:00
Robert Schmidt
76b4899ecb USRP driver: describe patch, --continuous-tx, -E options 2026-03-31 21:35:31 +02:00
Sakthivel Velumani
422ebb2c7c csi: fix sinr measurement with ZMQ 2026-03-31 19:10:58 +00:00
Sakthivel Velumani
e3b74e542d csi: fix regression introduced in !3834 2026-03-31 19:10:49 +00:00
francescomani
74cc133a13 fix for ldpc_aal compilation error 2026-03-31 16:45:25 +02:00
francescomani
0b3216f889 further compilation cleanup 2026-03-31 16:45:25 +02:00
francescomani
f94dad6893 rename and take out gold generic function from lte files to specific file to avoid cross-compilation 2026-03-31 16:45:25 +02:00
francescomani
a71cd36248 compilation improvements aroung impl_defs_top file 2026-03-31 16:45:24 +02:00
Bartosz Podrygajlo
e4d2d2b827 Cleanup common_lib.h
This change reduces the number of dependecies of common_lib.h and simplifies
the task of implementing an external OAI radio library.
2026-03-31 11:50:35 +02:00
Jaroslava Fiedlerova
7b2d9d9e31 Merge remote-tracking branch 'origin/hotfix_layer_mapping_aarch64' into integration_2026_w14 (!4021)
hotfix for 4 layer mapping on aarch64

This hotfix fixes a small bug appearing on aarch64 in the 4-layer PDSCH mapping
function. It was an error in the original implemntation.
2026-03-31 11:42:21 +02:00
Aaron van Diepen
8ec7b4009b Implement SUCI Profile Scheme A for 5G UE
Extend UICC configuration parsing to provide: routing_indicator,
protection_scheme, home_network_public_key, and home_network_public_key_id.
Use the protection_scheme value to decide what SUCI Profile Scheme to
apply during SUCI generation. Add support for Profile Scheme A which
provides ECIES-based encryption using Curve25519 and X9.63 KDF as outlined
in TS 33.501 Section C.3.4.1 Profile A.

When a configuration file specifies an unsupported Profile Scheme,
the NAS layer triggers a fatal error. This occurs either because
Profile Scheme B is unimplemented or the build uses OpenSSL < 3.0,
which lacks Curve25519 and X9.63 KDF support, ensuring users are
informed of the incompatibility.
2026-03-31 00:44:32 +02:00
Robert Schmidt
732f970442 Add tracy documentation 2026-03-30 23:35:22 +02:00
Robert Schmidt
dd3490714c Reorganize BUILD.md: cmake first, describe how to build all targets 2026-03-30 21:20:43 +02:00
Robert Schmidt
50e6cd44af Move instruction on how to configure UE to separate page
Save space in the main tutorial, and group UE-specific configuration in
one page. Add a reference where to find UE-related configuration
information.
2026-03-30 21:20:33 +02:00
Robert Schmidt
4ad1775c1d Remove unused BWP document entry 2026-03-30 21:20:29 +02:00
Robert Schmidt
37a2a0590a Move developer-specific docs to developer's section 2026-03-30 21:20:24 +02:00
Robert Schmidt
4c9aaba54a Remove NSA from instructions: already covered elsewhere 2026-03-30 21:20:22 +02:00
Robert Schmidt
fbb867adb8 Split out nrUE configuration/documentation to separate document
I only modify the headings and write an introductory sentence, but the
content is otherwise unmodified.
2026-03-30 21:19:34 +02:00
Robert Schmidt
2db282c7d3 Split out NTN configuration from RUNMODEM.md
Split out to make a standalone NTN configuratio page that would be
easier to find. I only modify the headings in the new file and write an
introductory sentence of the tutorial, the rest is unchanged.
2026-03-30 21:18:01 +02:00
Bartosz Podrygajlo
2578866451 vrtsim: disable channelmod histogram print if its empty 2026-03-30 09:49:18 +02:00
Bartosz Podrygajlo
96cec32eaf Integrate channel pipeline with vrtsim
Integrate channel pipeline library with vrtsim with two acceleration
options chosen at compile time:
 - threadpool if CUDA support is disabled
 - CUDA otherwise
2026-03-30 09:48:58 +02:00
Bartosz Podrygajlo
47ba5d3ca5 Acceleration of channel convolution and noise generation
Added two versions of channel convolution and noise generation:
 - accelerated via threadpool
 - accelerated using CUDA

The main difference between this and previous versions of channel
convolution implementations is that these functions take a real-world
approach to input/output where both could be split unevenly over a set of
buffers, e.g. ring buffers used in vrtsim.

The CUDA-accelerated version only works on systems with unified memory, e.g. NVidia
DGX Spark or GH
2026-03-30 09:48:50 +02:00
Bartosz Podrygajlo
c7799886cf Move noise_device to openair1/SIMULATION/TOOLS 2026-03-30 09:47:17 +02:00
Bartosz Podrygajlo
384d1eedf6 Fix for unit tests 2026-03-30 09:26:55 +02:00
Bartosz Podrygajlo
744e8d2108 Switch xran lib repo to https://github.com/openairinterface/o-du-phy.git 2026-03-29 21:38:35 +02:00
Raymond Knopp
f68f23ea86 hotfix for 4 layer mapping on aarch64 2026-03-27 21:55:35 +01:00
Robert Schmidt
bdc9c4922f Remove unused ITTI tasks 2026-03-27 18:57:11 +01:00
Robert Schmidt
ab0757c4d9 Remove many unused files
The lteUE RRC was sending some messages, but no TASK_PHY_UE exists to
receive them. Remove also this code for clarity.
2026-03-27 18:57:09 +01:00
francescomani
2cb9dc6bcd handle unused sched_pusch in rx_sdu function 2026-03-27 18:06:34 +01:00
francescomani
10d386ef75 some more additional fix for unused arguments 2026-03-27 18:06:34 +01:00
francescomani
b10864c2e8 add flag for unused function arguments in openair3 folder CMakeLists 2026-03-27 18:06:34 +01:00
francescomani
683d855d97 add flag for unused function arguments in common folder CMakeLists
(not enforced because of fmtlog external dependency)
2026-03-27 18:06:33 +01:00
francescomani
2483b68ee4 add flag for unused function arguments in NAS CMakeLists 2026-03-27 18:03:11 +01:00
francescomani
7732c30c1d moving unused check to upper folder in openair2 2026-03-27 18:02:43 +01:00
francescomani
7cf76f69bd further L2 cleanup for unused arguments in functions 2026-03-27 18:01:25 +01:00
francescomani
f59d67e526 add flag for unused function arguments in E1AP CMakeLists 2026-03-27 18:01:24 +01:00
francescomani
99bded7b87 improve nr_unitary_common file to prevent unused parameter warnings 2026-03-27 18:01:01 +01:00
francescomani
0da39e702c add flag for unused function arguments in F1AP CMakeLists 2026-03-27 18:01:00 +01:00
francescomani
6b5a8b691d further L1 cleanup for unused arguments in functions 2026-03-27 18:00:32 +01:00
francescomani
008c6fa73c add flag for unused function arguments in USRP lib CMakeLists 2026-03-27 18:00:31 +01:00
francescomani
39fa6d81ec add flag for unused function arguments in rfsimulator CMakeLists 2026-03-27 18:00:00 +01:00
francescomani
709c06f08e add flag for unused function arguments in nfapi CMakeLists 2026-03-27 17:59:26 +01:00
francescomani
13d129768f apply unused arguments flag to LAYER2 folder (mostly for RLC and PDCP files as far as I undestand) 2026-03-27 17:58:43 +01:00
Robert Schmidt
77b898b4d3 Remove unused MACRLC defines
The removed code is a subset of what is actually defined in
MACRLC_nr_paramdef.h. The only thing missing there is
CONFIG_STRING_MACRLC_LIST.
2026-03-27 17:47:51 +01:00
Robert Schmidt
af4b0d53e9 Merge branch 'license-change-cssl' into 'develop'
Change OAI license to CSSL v1.0

See merge request oai/openairinterface5g!4019
2026-03-27 16:46:25 +00:00
Robert Schmidt
8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00
Robert Schmidt
6ae4ec37ca Remove most doxygen file-level commands, copyrights, and authors
Remove the \file directive, as it is always superfluous  because the
current file is implicit [1]:

> If the file name is omitted (i.e. the line after \file is left blank)
> then the documentation block that contains the \file command will belong
> to the file it is located in.

Author names and e-mails are not relevant for us: it can always be
inferred from git blame, and is often outdated.

Eurecom code has been contributed and was under OAI PL v1.0/v1.1.

For the cpack package contact: put generic email address that is
independent of an individual and that will remain reachable.

[1] https://www.doxygen.nl/manual/commands.html#cmdfile
2026-03-27 14:52:47 +01:00
Robert Schmidt
9c7f174124 Add missing header guards 2026-03-27 09:37:54 +01:00
Robert Schmidt
2a47d9d9fb Remove unused CI files 2026-03-27 09:37:54 +01:00
Robert Schmidt
63ffdbddb4 CI HTML copyright 2026 2026-03-27 08:37:52 +01:00
Jaroslava Fiedlerova
4941f44043 Merge branch 'integration_2026_w13' into 'develop'
Integration `2026.w13`

* !4004 Remove OSD, some scripts, oaisim references
* !3968 Fix DAS via index based beamforming
* !3982 UE: update pdcch config only after mib read
* !3851 Bugfix in UE DLSCH LLR functions
* !3933 mac: fixes to prevent prb overlapping
* !4006 Update cir-generator image tag to v0.0.1
* !4007 Remove old CUDA LDPC implementation
* !4005 FHI72: handle more than 64 cores
* !3805 \[E2 agent\] Refactor E2SM-KPM and implement support for REPORT style 1
* !3973 Introduce UE NAS Simulator
* !3966 PUCCH Format 1 decoder implementation and validation with nr_pucchsim
* !3681 Configure DigitalBeamTable in OAI and pass down to Aerial L1
* !3912 Fix Delta MCS mode, reimplement UL power control
* CI: Tune VNF configuration files in Aerial pipeline

Closes #1044

See merge request oai/openairinterface5g!4008
2026-03-26 18:58:39 +00:00
Jaroslava Fiedlerova
0576fcafa8 CI: Tune VNF configuration files in Aerial pipeline
Adjust target SNR values and introduce RSSI thresholds in the VNF configuration
files to prevent UL saturation. These changes improve uplink stability and
performance for tests with Aerial and WNC RU.
2026-03-26 18:54:35 +01:00
Jaroslava Fiedlerova
4472b9d82a Merge remote-tracking branch 'origin/fix-delta-mcs' into integration_2026_w13 (!3912)
Fix Delta MCS mode, reimplement UL power control

This change set fixes the "delta-MCS" mode, and reimplements the UL power
control loops at gNB, i.e., for PUSCH and PUCCH. It further adds new T traces
to log PUSCH/PUCCH power infrmation, and cleans up code.

The "delta-MCS" mode in OAI refers to configuring a UE with deltaMCS in the
PUSCH-PowerControl IE (see TS 38.331). In this mode, the UE adjusts the PUSCH
power for transmissions to take into account for MCS (see TS 38.213 Sec. 7.1).
In other words, the target SNR can be set to a somewhat low value, and the UE
will still use the right power for UL transmissions. Note that the spec only
foresees this adjustment of UL power when using one layer. In contrast, in the
"normal" mode, the gNB sends TPC commands to keep a UE at a fixed target SNR
(default: 20dB), regardless of the MCS or number of layers. Future work is
planned to completely remove this fixed target SNR, which is not done in this
MR yet.

Further, there is a new power control loop implementation. Prior to this MR, on
each UL transmissions, the gNB uses the SNR to decide about TPC sent to a UE in
the next transmissions. The new implementation relies on averaging the SNR, and
a "TPC in flight" average to account for the slow reaction of the average SNR.
The sum of both quantities is the current SNR that is used by the UE. See the
commit messages or documentation for more information.

Further cleanup to group data (e.g., power control configuration, refactoring of
code to save space, ...) is done. Two new T traces GNB_MAC_PUSCH_POWER_CONTROL
and GNB_MAC_PUCCH_POWER_CONTROL are added; documentation exists to explain how
to graphically plot corresponding graphs.
2026-03-26 13:57:27 +01:00
Jaroslava Fiedlerova
6a725d6e4e Merge remote-tracking branch 'origin/oran_beamforming_static_weights' into integration_2026_w13 (!3681)
Configure DigitalBeamTable in OAI and pass down to Aerial L1

With this MR it will be possible to define a Beamtable in OAI and pass it down
to a L1 (Aerial or OAI) which then will either use them locally to apply
static beamforming (Split 8 with USRP) or pass them down to the RU using 7.2
split with Section Extension 1.
2026-03-26 13:45:23 +01:00
Jaroslava Fiedlerova
a2f0cef892 Merge remote-tracking branch 'origin/pucch_format1_MR' into integration_2026_w13 (!3966)
PUCCH Format 1 decoder implementation and validation with nr_pucchsim

This is the implementation of the PUCCH Format 1 decoder, validated with
pucchsim in the current branch.
Build:
  ./build_oai --nrUE --gNB --ninja --phy_simulators
Run tests:
  ctest -L nr_pucchsim -j 8
2026-03-26 13:44:25 +01:00
Jaroslava Fiedlerova
0ceb5fd3d4 Merge remote-tracking branch 'origin/ue_nas_simulator' into integration_2026_w13 (!3973)
Introduce UE NAS Simulator

This MR introduces a simple standalone tester for 5G UE NAS signaling and NGAP
messages. It connects to the AMF to perform NGAP and NAS encoding/decoding and
validates the UE Registration and PDU Session Establishment processes without
the overhead of a full Radio Access Network (PHY/MAC/RLC).

The motivation for this tester is as follows,
- This tester is a lightweight, deterministic tool to test the UE NAS layer
directly.
- Developers can easily inject specific NAS messages depending on the use-case.
- Developers can validate custom NAS/NGAP messages without the need to implement
complete RRC/MAC etc procedures.

Start the 5G Core network to test the UE NAS simulator. The compiling and
testing procedure is described below.
To compile:
mkdir build && cd build && cmake .. -GNinja && ninja nr-ue-nas-simulator-test

To run:
  LD_LIBRARY_PATH=. ./tests/nr-ue-nas-simulator/nr-ue-nas-simulator-test -O ../tests/nr-ue-nas-simulator/test.conf
2026-03-26 13:43:11 +01:00
Rúben Soares Silva
878f6b3dca Change pack_nr_config_request to not pack VE TLVs 0xA000 and 0xA001 when compiled with Aerial, allowing them to be filled, but not sent to Aerial L1. 2026-03-25 14:18:08 +00:00
Gabriele Gemmi
610795c7d8 Read DBT from libconfig 2026-03-25 14:17:55 +00:00
Gabriele Gemmi
b4a3440128 Pack and send DBT to Aerial 2026-03-25 14:17:55 +00:00
Gabriele Gemmi
d448e99e64 read DBT from csv 2026-03-25 14:17:45 +00:00
Karim Boutiba
4649107d89 Adding unit tests for PUCCH Format 1 2026-03-25 14:29:32 +01:00
Raymond Knopp
584ace460c Add PUCCH Format 1 decoder
This commit completes the PUCCH Format 1 decoder implementation using
maximum-likelihood detection with RE averaging across symbols/RB (and
hop-wise averaging for intra-slot hopping). It also updates the PUCCH
simulation/test flow to align with the decoder changes, including
payload and logging consistency fixes needed for correct validation.
2026-03-25 14:29:32 +01:00
Robert Schmidt
2cb96ea534 Reformat pucch_rx.c 2026-03-25 14:29:31 +01:00
Robert Schmidt
1428aeac63 Add documentation for gNB power control, and explain deltaMCS 2026-03-25 09:03:49 +01:00
Robert Schmidt
22fdcd641a Print PUCCH SNR 2026-03-25 09:03:49 +01:00
Robert Schmidt
73498ccae8 Update 100MHz 2x2 test case for UL throughput
Do not limit DL power, because it is not done in the other pipelines
either. Set the UL target power high, as this increases the achievable
throughput high (PUCCH can be normal). Finally, increase BLER thresholds
to improve the MCS a bit.
2026-03-25 09:03:49 +01:00
Robert Schmidt
83e2e7760d Telnet helper to set PUSCH target SNR 2026-03-25 09:03:49 +01:00
Robert Schmidt
27a5a75685 Reuse new power control functionality for PUCCH 2026-03-25 09:03:49 +01:00
Robert Schmidt
cd0051dea1 Split compute_ph_factor() function to save space 2026-03-25 09:03:49 +01:00
Robert Schmidt
70422dc3c3 Use Msg3 PUSCH SNR measurements in new power control loop 2026-03-25 09:03:49 +01:00
Jaroslava Fiedlerova
8b9eada328 Merge remote-tracking branch 'origin/grafana-dist-channel_quality' into integration_2026_w13 (!3805)
[E2 agent] Refactor E2SM-KPM and implement support for REPORT style 1

- Refactor E2SM-KPM to:
  - better handle different supported REPORT styles needed for "E2 Setup
    Request"
  - pass "Measurement Label" for calculating the measurement values
- Implement Subscription for E2SM-KPM REPORT style 1 and fill the PDSCH MCS
  distribution measurement (CARR.PDSCHMCSDist)
- Fix the memory leakage caused by the UEs filtering based on NSSAI for REPORT
  style 4

Tested successfully with and without ASan:
- in rfsim mode: gNB-mono, CU/DU and CU-CP/CU-UP/DU
- with the USRP B210: gNB-mono

and xapp_kpm_moni, xapp_rc_moni and xapp_kpm_rc xApps.
2026-03-24 13:40:00 +01:00
Teodora
6423b6040a Fix the memory leakage in the E2SM-KPM RAN Function for REPORT style 4
1. Allocate memory for the ue_id and ue_info_list arrays on the stack.
Explanation:
   Every granularity period, the program passes through the fp_match_cond_type,
   then through match_s_nssai_test_cond_type function pointers. Based on the node type,
   the function used calloc() for these arrays.
   => the longer a connection with an E2SM-KPM xApp was, the more memory leakage occured.
2. If matched UEs > 0, only free the memory of ue_id content after each
   Indication Message was sent.
2026-03-24 10:52:06 +01:00
Teodora
9bfe26bb49 Update the submodule commit ID
Needed notably due to MR https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/74.

But also, in the meantime, the MR https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/73 was merged,
with the goal of reducing compilation warnings in the "Release" build.
2026-03-24 10:52:06 +01:00
fatich
b3028fdd18 Implement E2SM-KPM REPORT style 1 containing "CARR.PDSCHMCSDist" measurement
Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-03-24 10:52:06 +01:00
Teodora
2c96fe5cc8 Refactor E2SM-KPM: pass the "Measurement Label" for calculating the measurement values
At this stage, all supported measurements do not take the label into account (noLabel = true),
but will be of value for distribution measurements.
2026-03-24 10:52:06 +01:00
Teodora
99f7ecfff5 Refactor E2SM-KPM: handle better supported REPORT styles needed for "E2 Setup Request"
Extend the ran_def_kpm with REPORT style types.

Implement kpm_report_style function pointer for filling different REPORT styles.
2026-03-24 10:52:06 +01:00
fatich
5e379e41db Add statistics for CQI and MCS distribution 2026-03-24 10:51:59 +01:00
Jaroslava Fiedlerova
a255b0bca6 Merge remote-tracking branch 'origin/fhi72-many-cores' into integration_2026_w13 (!4005)
FHI72: handle more than 64 cores
2026-03-24 10:07:22 +01:00
Jaroslava Fiedlerova
4973c17392 Merge remote-tracking branch 'origin/remove-old-cuda-ldpc' into integration_2026_w13 (!4007)
Remove old CUDA LDPC implementation

A new implementation is under way in !3955. To simplify the MR, remove the old
LDPC CUDA implementation in a first step.
2026-03-24 10:06:36 +01:00
Jaroslava Fiedlerova
844169962f Merge remote-tracking branch 'origin/cir-generator-image-v0.0.1' into integration_2026_w13 (!4006)
Update cir-generator image tag to v0.0.1
2026-03-23 22:35:47 +01:00
Jaroslava Fiedlerova
e3c4c4da13 Merge remote-tracking branch 'origin/prb-overlap-fix' into integration_2026_w13 (!3933)
mac: fixes to prevent prb overlapping

- this patch fixes a bug in the MAC where the scheduled PRB resources can
  overlap
- at the same time, we try to enforce the same semantics for "rbStart" (which
  should be relative to the BWP) across the code as much as possible
2026-03-23 22:33:37 +01:00
Robert Schmidt
db0f6696f4 Reimplement (PUSCH) power control
Introduce new data structures to track the average SNR and RSSI, and
that allow to dynamically modify the target SNR (per UE) as well as
continuously get TPC updates based on the average SNR. The target SNR is
per power control loop (which a future commit will extend to use for
PUCCH).

Concretely, it maintains an average of measured SNR and RSSI.  It also
updates "tpc_in_flight", which tracks TPC changes that don't show up in
the average yet. For instance, imagine that the target SNR of 15 changes
to 20. Three successive TPC commands need to be sent (+3, +1, +1), but
it will take time to show up in the average SNR. To account for this,
tpc_in_flight is updated by the TPCs sent, and an average will make it
go down back to zero at the same pace as the average SNR approaches the
target SNR.  The sum of average SNR and tpc_in_flight sums up to the
actual, current SNR, which approximates the target SNR.

The SNR is kept within -1<=targetSNR<=+2dB to avoid too many TPC
changes.

The current average SNR (sum of average SNR and tpc_in_flight) is used
to continuously get TPC updates, taking into account recent TPCs sent,
the difference to target SNR, and RSSI.

If there is DTX, tpc_in_flight is modified to artificially introduce TPC
commands which increase the currently used SNR of the UE. This is
temporary, as tpc_in_flight eventually will go back to zero. If the DTX
was due to sudden SNR drop (e.g., higher path loss), this will allow to
quickly adapt the UE's SNR to new conditions.

The periodical logs are extended to not only show the current SNR, but
also the difference from the target for better analysis.

Co-authored-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-03-23 17:47:32 +01:00
Robert Schmidt
ffae59427a Logs for debugging 2026-03-23 17:47:32 +01:00
Robert Schmidt
3d5edef27e Remove unused PH factor calculation
The same calculation is done in post_process_ulsch(), so we don't need it here.
2026-03-23 17:47:32 +01:00
Robert Schmidt
6fbaaa02a0 Fix deltaMCS scheduling mode: save phr_txpower_calc
The phr_txpower_calc field actually needs to be saved in the HARQ
process for later retrieval, so set sched_pusch after phr_txpower_calc
has been calculated.
2026-03-23 17:47:32 +01:00
Jaroslava Fiedlerova
15239d2595 Merge remote-tracking branch 'origin/ue-simplify-dlsch-llr' into integration_2026_w13 (!3851)
Bugfix in UE DLSCH LLR functions

Closes #1044
Fix bug in PTRS compensation.
2026-03-23 17:13:03 +01:00
Jaroslava Fiedlerova
23c4312630 Merge remote-tracking branch 'origin/nr_fix_ssbpos2' into integration_2026_w13 (!3982)
UE: update pdcch config only after mib read

- In MR !3929, this change was done to call update_pdcch_config if mac
  configuration is changed.
- Observed that the issue related to RAR after handover if SSB position changes
  occurs also in develop 2026_w10 where MR !3929 is merged.
- update_pdcch_config should be done only after sync obtained.
- this fix is similar to the fix in initial commits of MR !3929
2026-03-23 17:11:47 +01:00
Robert Schmidt
c229d59efd Add PUCCH power control T traces 2026-03-23 16:49:51 +01:00
Robert Schmidt
28d770108f Log PUSCH power control variables via T trace GNB_MAC_PUSCH_POWER_CONTROL
Include plotting tool and README on how to log and visualize graphics.
2026-03-23 16:49:08 +01:00
Romain Beurdouche
3a92eed5b9 fix(build & doc): Remove remaining mentions of ldpc_cuda
* Option to build ldpc_cuda was remaining in the build script
* Build script option to build ldpc_cuda was still used in CI
* Mentions of ldpc_cuda were remaining in the documentation

Note: In the documentation, the example of ldpctest usage that was
loading ldpc_cuda was replaced by an example in which it is loading
ldpc_orig even though this is pointless as it makes ldpctest compare
ldpc_orig with ldpc_orig. On the other hand, it is the only library
other than the default ldpc that uses the former interface.
2026-03-23 13:56:46 +01:00
Jaroslava Fiedlerova
c065a59890 Merge remote-tracking branch 'origin/fix_analog_das' into integration_2026_w13 (!3968)
Fix DAS via index based beamforming

DAS implementation via index based analog beamforming was broken after !3715.
This MR fixes it.
2026-03-23 13:10:16 +01:00
Robert
55adbe8890 Remove old CUDA LDPC implementation 2026-03-23 12:48:45 +01:00
Jaroslava Fiedlerova
390d96e55a Merge remote-tracking branch 'origin/remove-osd' into integration_2026_w13 (!4004)
Remove OSD, some scripts, oaisim references

The README says:
  It is just generating the XML file and it is placing it in
  $(OPENAIR_TARGETS)/SIMU/EXAMPLE/OSD/WEBXML/ or http://localhost/xmlfile/
  so that the oaisim could pars and run the simulation/emulation

oaisim does not exist anymore, and corresponding simulation cannot be done.
Also, it requires XAMPP and similar technologies, that I think nobody uses
in the context of OAI.
Remove also most references to oaisim.
Remove some scripts that are likely not used by anybody, or straight useless.
2026-03-23 12:26:47 +01:00
Robert Schmidt
f282402ea2 Move power configuration into struct
Group related parameters and simplify setup of these parameters.
2026-03-23 12:18:32 +01:00
Robert Schmidt
15ac13e882 Add assert: on Msg3, we cannot have phr_txpower_calc
It is not filled in the Msg3 scheduler.
2026-03-23 12:18:32 +01:00
Robert Schmidt
2ab6b88d64 Remove write-only or unused variables 2026-03-23 12:18:32 +01:00
Robert Schmidt
7dbb6251b8 Remove unused nb_nr_mac_CC 2026-03-23 12:18:32 +01:00
Merkebu Girmay
5b05df39d3 ci: update cir-generator image tag to v0.0.1 2026-03-20 18:57:57 -07:00
Thomas Schlichter
5287ed68c6 gNB MAC: use new function get_rb_alloc() for RB allocation and prevent prb overlapping
Co-authored-by: Xin Zhe Khooi <khooixz@comp.nus.edu.sg>
Assisted-by: Gemini:3 Flash
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-03-20 20:59:02 +01:00
Jaroslava Fiedlerova
0ba31c0f89 Merge branch 'integration_2026_w12' into 'develop'
Integration `2026.w12`

* !3985 Fix XNAP to avoid recompilation and unnecessary includes
* !3724 Better c style pss sss
* !3972 Resolve "Demote AssertFatal `PUCCH list is full` message to a warning"
* !3956 [FHI72] [xran F] Revert and simplify the code for Liteon FR2 interoperability
* !3970 Fix for NTN phy-test mode
* !3987 T: minor: remove target record_db from automatic building
* !3993 UE: Derive Serving Network Name from SIB1 PLMN
* !3997 vrtsim doc: clarify container requirements
* !3935 [FHI72] Fix long PRACH format
* !3998 Set rxgain to 0 in vrtsim
* !3964 CI: Add FHI7.2 phytest pipeline
* !4001 Remove unused ci-scripts/mysql4testresults/ dir and content
* !3999 bugfix: use proper pointer
* !3986 handle start symbol on non-zeroth downlink symbol for SIB1 for multiplexing pattern 3 configuration.
* !3957 replace static allocation of max antennas in a dynamic structure for gnb rach
* !3859 Delay compensation in SRS
* !3909 Adjust ssPBCH_BlockPower in FHI7.2 configs

Closes #1058

See merge request oai/openairinterface5g!3989
2026-03-20 13:29:57 +00:00
Rakesh Mundlamuri
03ba636b04 Add README.md for the nr-ue-nas-simulator 2026-03-20 16:35:08 +05:30
Rakesh Mundlamuri
ac2749022b Fix memory leak in generateSecurityModeComplete() 2026-03-20 16:32:53 +05:30
Rakesh Mundlamuri
6cc087e3c9 Introduce UE NAS SIMULATOR 2026-03-20 16:32:50 +05:30
Jaroslava Fiedlerova
a67c537dae Merge remote-tracking branch 'origin/fix-ssPBCH_BlockPower-config' into integration_2026_w12 (!3909)
Adjust ssPBCH_BlockPower in FHI7.2 configs

ssPBCH_BlockPower is the average EPRE of the resources elements that carry
secondary synchronization signals in dBm. In OAI, the SSB is the same level
as all the rest, so we can compute ssPBCH_BlockPower from RU TX power and
bandwidth using:

ssPBCH_BlockPower = P_TX(dBm) − 10 x log10(N_RB x 12)

where:
- P_TX is the RU transmit power
  - 24 dBm for indoor RUs (configurable on the RU)
  - 35 dBm for outdoor RUs (configurable on the RU)
- N_RB is the number of resource blocks for the configured bandwidth
- 12 corresponds to the number of subcarriers per RB
2026-03-20 10:39:53 +01:00
Jaroslava Fiedlerova
b9803d6366 doc: Add description of ssPBCH_BlockPower into ORAN documentation 2026-03-20 09:21:14 +01:00
Robert Schmidt
ec7ad3b87c Apply clang-format to pucchsim.c
See diff with --ignore-all-space to see the meaningful, non-space
changes.
2026-03-19 17:57:53 +01:00
Robert Schmidt
ec3642ea05 Merge remote-tracking branch 'origin/srs-delay-comp' into integration_2026_w12 (!3859)
Delay compensation in SRS

Implementation of delay compensation in channel estimation based on SRS.

Testing, for example, with

    sudo ./nr_ulsim -n1 -s50 -S50 -R51 -E 1 -W2 -y2 -z2 -d 10

we obtain the following logs.

LOGs with develop branch:

    [NR_PHY] 	  __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm__
    [NR_PHY] (   0)    687	  -198  |     688	  -198  |      -1	    -3
    [NR_PHY] (   1)      0	     0  |     688	  -196  |      -1	    -3
    [NR_PHY] (   2)    687	  -198  |     644	  -272  |      -1	    -1
    [NR_PHY] (   3)      0	     0  |     600	  -346  |      -1	    -1
    [NR_PHY] (   4)    513	  -498  |     556	  -422  |      -1	    -1
    [NR_PHY] (   5)      0	     0  |     512	  -496  |      -1	    -1
    [NR_PHY] (   6)    513	  -498  |     440	  -542  |      -1	     0
    [NR_PHY] (   7)      0	     0  |     370	  -588  |      -1	     0
    [NR_PHY] (   8)    226	  -682  |     298	  -634  |      -1	    -3
    [NR_PHY] (   9)      0	     0  |     228	  -680  |      -1	    -3
    [NR_PHY] (  10)    226	  -682  |     140	  -686  |      -1	    -1
    [NR_PHY] (  11)      0	     0  |      52	  -690  |      -1	    -1

intRe and intIm are the real and imaginary part of the interpolated
channel, respectively. These are the columns that matter. As we can see,
for example, in subcarrier 0 we have (688, -198), then in subcarrier 1
we have (688, -196), which is almost the same, and then in subcarrier 3
we have a jump (644, -272). This MR improves channel estimation by
taking delay into account. If we look at the following logs, we see that
the values vary more consistently from subcarrier to subcarrier.

LOGs with this MR:

    [NR_PHY] 	  __lsRe__________lsIm__|____intRe_______intIm__|____noiRe_______noiIm__
    [NR_PHY] (   0)    487	  -139  |     490	  -111  |      -1	     0
    [NR_PHY] (   1)    487	  -139  |     483	  -138  |      -1	     0
    [NR_PHY] (   2)    487	  -139  |     465	  -197  |       0	     0
    [NR_PHY] (   3)    487	  -139  |     436	  -254  |       0	     0
    [NR_PHY] (   4)    364	  -353  |     402	  -305  |      -1	    -1
    [NR_PHY] (   5)    364	  -353  |     361	  -352  |      -1	    -1
    [NR_PHY] (   6)    364	  -353  |     317	  -392  |      -1	    -1
    [NR_PHY] (   7)    364	  -353  |     269	  -426  |      -1	    -1
    [NR_PHY] (   8)    160	  -481  |     214	  -455  |       0	    -1
    [NR_PHY] (   9)    160	  -481  |     159	  -478  |       0	    -1
    [NR_PHY] (  10)    160	  -481  |      98	  -495  |      -1	     0
    [NR_PHY] (  11)    160	  -481  |      39	  -502  |      -1	     0
2026-03-19 17:41:59 +01:00
Robert Schmidt
7c81c8ad71 Remove most of oaisim references: does not exist anymore 2026-03-19 17:22:32 +01:00
Robert Schmidt
a7bd188042 Remove unused/useless scripts 2026-03-19 17:17:06 +01:00
Robert Schmidt
79ab29c87f Remove unused defines in NGAP/S1AP 2026-03-19 17:14:05 +01:00
Jaroslava Fiedlerova
040b62e802 Merge remote-tracking branch 'origin/variable_nb_rx_ant_for_rach' into integration_2026_w12 (!3957)
replace static allocation of max antennas in a dynamic structure for gnb rach

NB_ANTENNAS_RX was used in 5G by mistake
there was also a error in O-RU implementation, with no consequences
(index not in right order)
2026-03-19 15:03:38 +01:00
francescomani
e6e5c481d9 fixes for DAS handled via index based analog beamforming 2026-03-19 14:01:33 +01:00
Romain Beurdouche
8d78c97513 feat(FHI72): Fix lcore count on Arm targets
Meson configuration was configuring a wrong maximum number of lcores on
the Arm platforms we are using (Neoverse V2 & NVIDIA Grace) as no
configuration is provided for these platforms with DPDK 20.11.9.
This commit solves this issue by requesting meson to use a generic
config that sets a high maximum number of lcores.
2026-03-19 12:45:44 +00:00
Jaroslava Fiedlerova
785f12720e Merge remote-tracking branch 'origin/fhi_mux3' into integration_2026_w12 (!3986)
handle start symbol on non-zeroth downlink symbol for SIB1 for multiplexing
pattern 3 configuration.

This MR adds support for handling a non-zero start symbol for SIB1 when using
multiplexing pattern 3 with the per-slot CP format.

Previously, the implementation assumed that the first downlink symbol used by
a PDU always starts at symbol 0. However, this assumption does not hold for
SIB1 under multiplexing pattern 3, where the start symbol can be non-zero.

This issue does not apply to the per-symbol CP format.

Testing:
a. Microamp using the branch microamp_1048: UE registration ok. end-to-end ok.
b. Benetel: UE registration ok. end-to-end ok.
2026-03-19 13:04:18 +01:00
Robert Schmidt
49ad65c5a5 FHI72: handle more than 64 cores
xran needs to be informed about the cores to use for packet processing.
Prior to this change, we only filled the first 64bits, but it can go up
to 128 in xran. Change the helper accordingly to support all.
2026-03-19 12:17:07 +01:00
Robert Schmidt
a088f6aab9 Remove OSD
The README says:

> It is just generating the XML file and it is placing it in
> $(OPENAIR_TARGETS)/SIMU/EXAMPLE/OSD/WEBXML/ or http://localhost/xmlfile/
> so that the oaisim could pars and run the simulation/emulation

oaisim does not exist anymore, and corresponding simulation cannot be
done. Also, it requires XAMPP and similar technologies, that I think
nobody uses in the context of OAI.
2026-03-19 12:13:39 +01:00
rmagueta
4f31a4eb89 The nr_srs_channel_estimation function is split into the nr_srs_ls_channel_estimation and nr_srs_channel_interpolation functions to allow the use of a common delay
Define CIRCULAR_INC
2026-03-19 10:07:07 +00:00
rmagueta
0db8ddac08 Implementing delay compensation during SRS-based channel estimation 2026-03-19 09:18:18 +00:00
Jaroslava Fiedlerova
16cac5c2f7 Merge remote-tracking branch 'origin/bugfix-T-rfsim' into integration_2026_w12 (!3999)
bugfix: use proper pointer

Use proper pointer to trace the buffer.
2026-03-18 22:44:28 +01:00
Sakthivel Velumani
04d35f90ec ue: simplify dlsch LLR functions
Change layer_llr buffer from 2D to 3D with symbol as first dimenstion. Refactor
layer demapping function.
2026-03-18 19:15:33 +00:00
Sakthivel Velumani
07f5e01ee8 bugfix: PTRS phase compensation
PTRS phase error is estimated in each symbol and should be compesation in the
last symbol. So far nr_dlsch_llr() used rxdataF_comp before PTRS phase
correction for all symbol except the last one. This commit fixes it by calling
nr_dlsch_llr() for all symbols after rxdataF_comp is compensated for PTRS phase
error. To do so, dl_ch_mag arrays are moved out of nr_rx_pdsch() to hold values
of all symbols.
2026-03-18 18:59:04 +00:00
Sakthivel Velumani
7c36011669 refactor: make rxdataF_comp 4D array
put symbol index as first dimension. It is necessary because the offset for
the buffer to start of a symbol can be arbitrary and hence not aligned to 32
byte boundary. Having each symbol in a separate dimension ensures alignment.
2026-03-18 18:57:45 +00:00
Sakthivel Velumani
cb8e129397 clean-up: change type from int32_t to c16_t
Change rxdataF_comp buffer of PDSCH and PUSCH to c16_t and the functions that
use the buffer.
2026-03-18 18:26:18 +00:00
Sakthivel Velumani
b3add42c0f clean-up: invert if condition, eliminate nesting 2026-03-18 17:30:36 +00:00
Jaroslava Fiedlerova
ae5cd27361 Merge remote-tracking branch 'origin/remove-unused-ci-files' into integration_2026_w12 (!4001)
Remove unused ci-scripts/mysql4testresults/ dir and content
2026-03-18 16:44:53 +01:00
Jaroslava Fiedlerova
00c587af8f Merge remote-tracking branch 'origin/ci-add-fhi72-phytest' into integration_2026_w12 (!3964)
CI: Add FHI7.2 phytest pipeline

This MR consists of multiple changes related to FHI7.2 setups in CI.

- remove unused fhi72 configurations in CI
- introduce dpdk-init service in fhi72 deployments to setup sriov on the machine
- update phytest fhi72 configurations for running on bulbul
- add phytest fhi72 to RAN-SA-FHI72-CN5G pipeline
2026-03-18 16:26:19 +01:00
Robert Schmidt
e3ac95035f Remove unused ci-scripts/mysql4testresults/ dir and content 2026-03-18 14:26:47 +01:00
francescomani
8aebe7c423 further cleanup since not using NB_ANTENNAS_TX/RX in 5G code 2026-03-18 12:20:48 +01:00
Jaroslava Fiedlerova
3b0d834635 Merge remote-tracking branch 'origin/vrtsim-zero-gain' into integration_2026_w12 (!3998)
Set rxgain to 0 in vrtsim

Set rxgain to 0 in vrtsim to match rfsimulator behavior
This addresses the issue where RSRP is different between rfsim and vrtsim. With
this RSRP values between rfsim and vrtsim should be similar.
2026-03-18 11:36:26 +01:00
Jaroslava Fiedlerova
4162369428 Merge remote-tracking branch 'origin/fix-prach-diff-mu' into integration_2026_w12 (!3935)
[FHI72] Fix long PRACH format

The problem was that xran_is_prach_slot() compared if the current slot is the
scheduled one. However, this becomes irrelevant if long PRACH format used.
Successfully tested end-to-end the PRACH index 7 with TDD DDDDDDDSUU and Benetel
v2.0.5.
2026-03-18 11:31:39 +01:00
Jaroslava Fiedlerova
a6687b6040 CI: Add FHI72 2x2 phytest on cacofonix 2026-03-18 11:14:55 +01:00
Jaroslava Fiedlerova
b400d1ee3f CI: Update FHI72 VVDN deployment files
- Introduce dpdk-init service for SR-IOV initialization within the container
- Execute script to enable low-latency RT performance (restored after tests)
2026-03-18 11:11:27 +01:00
Jaroslava Fiedlerova
858c8b5bdb CI: remove unused FHI72 confs 2026-03-18 11:11:27 +01:00
Jaroslava Fiedlerova
05273269d2 CI: Allow to select service for RT stats analysis
When running phytest with FHI7.2 in Docker, two services are deployed:
dpdk-init and oai-gnb. Previously, AnalyzeRTStatsObject selected the
first deployed service for RT stats analysis.
Allow to explicitly select the service used for RT stats analysis instead
of relying on the first deployed service.
2026-03-18 11:11:27 +01:00
Jaroslava Fiedlerova
7232b0a11b Adjust FHI72 phytest yaml file
Add dpdk-init service into docker-compose.yaml file to execute
setup_sriov script during startup.
2026-03-18 11:11:23 +01:00
Jaroslava Fiedlerova
92b274de08 Merge remote-tracking branch 'origin/vrtsim-doc-update-container' into integration_2026_w12 (!3997)
vrtsim doc: clarify container requirements

Describe how to set up vrtsim in containers, e.g., docker, and link to an
example. Add a minor clarification for the connection descriptor as well.
2026-03-18 10:37:51 +01:00
Jaroslava Fiedlerova
8f4378e412 Merge remote-tracking branch 'origin/nr-ue-roaming-fix' into integration_2026_w12 (!3993)
UE: Derive Serving Network Name from SIB1 PLMN

This MR modifies the nrUE to use the Serving Network Name derived from data
communicated by the Serving Network instead of data stored in the UICC.
Previously, the Serving Network Name (SNN) used during authentication was
constructed from the IMSI, implicitly assuming the UE was attached to its
home network. In roaming scenarios, this produced an incorrect SNN, causing
authentication and key derivation failures.

Changes:
- Extract the MCC and MNC from the SIB1 PLMN identity communicated by the
  serving network.
- Store these values in the UE NAS context in order to propogate them from
  RCC to NAS.
- The NAS key derivation functions (transferRES, derive_kausf, derive_kseaf)
  now build the SNN based on the MCC/MNC broadcast in SIB1.
2026-03-18 10:36:37 +01:00
Bartosz Podrygajlo
f4fc7f331f Set rxgain to 0 in vrtsim
Set rxgain to 0 in vrtsim to match rfsimulator behavior
2026-03-18 10:01:11 +01:00
Cedric Roux
692cec1a24 bugfix: use proper pointer 2026-03-18 09:27:21 +01:00
Robert Schmidt
fb685665e2 vrtsim doc: clarify container requirements 2026-03-18 08:59:05 +01:00
Rakesh Mundlamuri
83587d3fc1 Create an accessor function for nr_ue_nas static variable 2026-03-18 13:07:39 +05:30
Aaron van Diepen
abbd670e5d Derive Serving Network Name from SIB1 PLMN
Extract MCC and MNC from the SIB1 PLMN identity and store them in the
UE NAS context to propogate them to NAS security procedures.

Previously, the Serving Network Name (SNN) used during authentication
was constructed from the IMSI, implicitly assuming the UE was attached
to its home network. In roaming scenarios, this produced an incorrect
SNN, causing authentication and key derivation failures.

The NAS key derivation functions (transferRES, derive_kausf, derive_kseaf)
now build the SNN using the MCC/MNC broadcast by the serving network in SIB1,
ensuring that authentication uses the correct serving PLMN during roaming.
2026-03-17 18:42:11 +01:00
Jaroslava Fiedlerova
3742cdca93 Merge remote-tracking branch 'origin/t-minor-fix-auto-build' into integration_2026_w12 (!3987)
T: minor: remove target record_db from automatic building

We don't install clickhouse by default, so simply running make inside
common/utils/T/ would fail. Remove record_db to not build automatically.
2026-03-17 14:27:47 +01:00
Jaroslava Fiedlerova
06593306d4 Merge remote-tracking branch 'origin/ntn-phy-test' into integration_2026_w12 (!3970)
Fix for NTN phy-test mode

- Corrected the initialisation of ntn params changed flag. Before this change on
  UE, Phy-test was not running in NTN mode.
- Removed the assert wrt slot > 64 to run FR2-NTN in phy-test
- SIB2, 19 required only in SA mode like SIB1
- Introduced new method to schedule a slot in UL/DL in Phy-test mode. Dmod/ Umod
  option in the command line with a value.
  - This ensures that the slot n (in slots per frame) will be scheduled if
    n % value == 0
  - For ex: --Dmod 1 means every slot will be scheduled
  - --Dmod 2 means every 2nd slot will be scheduled, like 0,2,4,6 until the
    slots per frame 1.
  - this can be used for testing FDD FR2 where slots go beyond 64 which is a
    limitation of -D/-U option.
2026-03-17 14:25:40 +01:00
Jaroslava Fiedlerova
2e4445ac7b Merge remote-tracking branch 'origin/liteon-fr2-cleanup' into integration_2026_w12 (!3956)
[FHI72] [xran F] Revert and simplify the code for Liteon FR2 interoperability

The MR !3668 introduced a lot of unnecessary changes. This MR removes useless
code in both OAI and xran F release library.
2026-03-17 14:24:39 +01:00
Teodora
a7ff360c73 [FHI72] Add Liteon FR2 support in the FHI tutorial and a reference config file 2026-03-17 10:16:47 +01:00
Teodora
c2ccca0228 [FHI72] Simplify RunSlotPrbMapBySymbol and add in the README 2026-03-17 10:16:47 +01:00
Teodora
bbecfd5b03 [FHI72] Revert the xran modification introduced in the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3668
1. Remove modifications done in the following xran functions:
process_mbuf_batch();
xran_process_srs_sym().
=> not even used with OAI 7.2 interface.

2. Also, remove xran_fs_get_num_dl_sym_sp() and xran_fs_get_num_ul_sym_sp() introduced in the same MR.

3. Remove LiteOnIgnoreUPSectionIdEnable parameter. Instead, use RunSlotPrbMapBySymbolEnable in a simple way
for xran_process_rx_sym() function.
Explanation: The xran expects UL UP packets with the same section IDs as indicated per UL CP message.
However, the section IDs of received packets are 3 for mixed slot and 13 for UL slot.
2026-03-17 10:16:47 +01:00
Teodora
7a0311929d [FHI72] Set PRACH offset as optional parameter
If the PRACH offset is set explicitely via config file, then its value will be used.
Otherwise, eAxC_offset = max(Nrx,Ntx).

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-03-17 10:16:47 +01:00
Teodora
3c6644134c Use VERSION_* binary test for checking the xran library E release
An alternative would have been:
if(xran_VERSION MATCHES "^5\.*")

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-03-17 10:16:47 +01:00
Jaroslava Fiedlerova
f361859775 Merge remote-tracking branch 'origin/1058-demote-assertfatal-pucch-list-is-full-message-to-a-warning' into integration_2026_w12 (!3972)
Resolve "Demote AssertFatal PUCCH list is full message to a warning"

Closes #1058
2026-03-16 21:11:18 +01:00
Jaroslava Fiedlerova
37c361b2f5 Merge remote-tracking branch 'origin/better-C-style-pss-sss' into integration_2026_w12 (!3724)
Better c style pss sss

there is a commit to simplify code for pss and sss detection
then a second commit to test a idea: detect SSS with a advantage for SSS
in phase with PSS
2026-03-16 21:09:28 +01:00
Sakthivel Velumani
665551e142 clean-up: remove static function declartion
move function nr_rx_pdsch() to bottom of file and remove static function
declaration of other function.
2026-03-16 15:38:11 +00:00
Teodora Vladić
141690c780 [FHI72] Handle long PRACH format
Only static long PRACH configuration verified, i.e. PRACH C-plane
is ignored by the RU.

Note: Introducing `N_ZC` and `num_prbu` parameters is needed for testing
with xran F release. However, in the K release, this information is
stored in xran_rx_packet_ctl struct.
2026-03-16 15:56:30 +01:00
Teodora Vladić
63b048b2ff [FHI72] Refactor PRACH code
Move PRACH slot checking from oaioran.c to oran_isolate.c because
xran_is_prach_slot() compared the current slot instead of the scheduled.
The current and the scheduled slot are the same in case of short format,
but different in case of format 0. Therefore, with this commit, in xran_is_prach_slot()
we check the `prach_id->slot` and not `slot`.
2026-03-16 15:47:20 +01:00
Teodora Vladić
e0f95f2344 [FHI72] Add verified Benetel FW versions
Note: RAN550-1v1.4.1-M-25fa970 verified with both CUS and CUSM.
At this stage, RAN550-1v2.0.5-M-92a9d2c verified with CUS only.
2026-03-16 15:46:32 +01:00
Cedric Roux
9a77e6edcf T: minor: remove target record_db from automatic building 2026-03-16 11:26:43 +01:00
Laurent THOMAS
246e2ed31d replace static allocation of max antennas in a dynamic structure for gnb rach 2026-03-16 10:28:24 +01:00
Laurent THOMAS
e151366bea SSS detection used PSS phase, but when signal is noisy, use the PSS phase can make a SSS slightly rotated
the code use a precomputed table of rotations: 16 steaps between -PI/3 and +PI/3

This commit replaces the precomputed table by in code computation.
This version improves code understanding, while it won't make any significant difference
2026-03-16 09:49:32 +01:00
Laurent THOMAS
70711633bc code cleaning pss and sss detection, no functional change 2026-03-16 09:49:30 +01:00
Raghavendra Dinavahi
18bf9d583e UE: update pdcch config only after mib read 2026-03-16 08:48:19 +01:00
Mario Joa-Ng
9b7efe8e47 handle start symbol on non-zeroth symbol for SIB for multiplexing pattern 3 configuration. 2026-03-13 22:11:46 +01:00
Robert Schmidt
fdb6b44b05 Merge branch 'fixes-xnap' into 'develop' (!3985)
Fix XNAP to avoid recompilation and unnecessary includes

See merge request oai/openairinterface5g!3985
2026-03-13 18:59:12 +00:00
Robert Schmidt
19d1fe16ff Move xnap lib back to openair2/XNAP/
Remove the ITTI header, because it would trigger compilation errors (we
don't link in LTE/NR RRC headers), but we don't actually need it.
2026-03-13 17:17:51 +01:00
Robert Schmidt
2eacb82da5 Correct list of XNAP ASN.1 files generated by asn1c
Notably, remove asn_codecs_prim_xer.h from the list of files, triggering
problems when re-running ninja, because the "canonical OAI asn1c"
(https://github.com/mouse07410/asn1c, commit ID
940dd5fa9f3917913fd487b13dfddfacd0ded06e) does not generate it:

    ninja explain: output openair2/XNAP/MESSAGES/asn_codecs_prim_xer.h doesn't exist

In this version, a couple of files are not generated, so remove them
from the list.

Also, leave the files in the order as shown by ls.
2026-03-13 17:09:47 +01:00
Robert Schmidt
c1462838b2 Merge branch 'integration_2026_w11' into 'develop'
Integration `2026.w11`

* !3864 remove xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()
* !3967 Harmonize the use of definition for number of symbols per slot
* !3971 Limit dl_DataToUL_ACK values to 15 as per standard
* !3414 Added NTN-FR2 FDD bands defined in release 18 in Ka-band range
* !3919 Reduce number of mutex locking in MAC->RLC direction
* !3923 XNAP: Add encode/decode and unit tests for Xn Setup Request/Response/Failure
* !3965 Enable BladeRF support in gNB Docker image
* !3904 add multi-ue support to vrtsim
* !3980 SDR reordering: correct warning, and USRP: return samples written
* !3834 Use flat buffer for txdataF in gNB L1
* !3981 Bugfix: make longer telnet cmdfunc names
* Reduce timing reference value for feptx_total in 40 MHz phytest

See merge request oai/openairinterface5g!3976
2026-03-13 08:39:06 +00:00
Jaroslava Fiedlerova
96511595f2 Reduce timing reference value for feptx_total in 40 MHz phytest
The reduction reflects improved feptx_total performance introduced in !3834.
2026-03-12 22:17:05 +01:00
Raghavendra Dinavahi
3dbc5b4162 Updated Runmodem.md about the Dmod/Umod options 2026-03-12 18:02:11 +01:00
Raghavendra Dinavahi
f0394364fd gNB PHY-TEST: Introduced --Dmod/Umod option for scheduling slot >= 64 in FR2-FDD case
--Dmod option/--Umod option,
for example --Dmod 1 will schedule every slot in slots per frame
--Dmod 3 will schedule every 3rd slot. You can use --Dmod option togethor with -D option
same for uplink scheduling too.

for FR2 with 120Khz scs, there are 80 slots. Removed the assert such that FR2 config
can be tested in phy-test, currently bitmap works only until 64 slots.
2026-03-12 18:02:11 +01:00
Jaroslava Fiedlerova
e734f0a6bf Merge remote-tracking branch 'origin/telnet-longer-command-names' into integration_2026_w11 (!3981)
Bugfix: make longer telnet cmdfunc names

The maximum number of cmdfunc names is 20, which IMO is too low. Worse, if it's
longer, nothing will warn us because C will just fill the array to it's end
(without \0 at the end). To remedy this:

- Allow longer names till 64 bytes (I hit the previous limit of 20)
- Check that the name is within the length limit: if somebody wants a very long
  name, the strnlen() will return the maximum length, hitting that assertion.
- When reading a command during runtime, allow the corresponding maximum length.

On that occasion, also increase total number of permitted cmdfuncs.
2026-03-12 16:34:23 +01:00
Jaroslava Fiedlerova
592cb8ac6a Merge remote-tracking branch 'origin/gnb-txdataF-flatbuff' into integration_2026_w11 (!3834)
Use flat buffer for txdataF in gNB L1

This MR changes txdataF buffer format to hold freq domain data starting from
PRB0 instead of circular buffer that starts from PRB N/2. The motive is to
simplify RE mapping function in L1 and copying data to xran lib.
2026-03-12 14:59:07 +01:00
Jaroslava Fiedlerova
6fa541fe20 Merge remote-tracking branch 'origin/fix-reorder-errors' into integration_2026_w11 (!3980)
SDR reordering: correct warning, and USRP: return samples written

See commits for more information.
2026-03-12 11:29:28 +01:00
Jaroslava Fiedlerova
888d4a91a6 Merge remote-tracking branch 'origin/vrtsim-multi-ue' into integration_2026_w11 (!3904)
add multi-ue support to vrtsim

Summary
Extending vrtsim to support multiple UEs with per-UE channel emulation using
CIRDB. Each UE can have different antenna configurations and independent
channel conditions (TDL models, delay spreads, and mobility speeds). This
includes:
- Add num_ues and ue_id parameters for server and client configuration
- Implement antenna offset multiplexing for UL combining and DL distribution
- Support heterogeneous antenna configurations across UEs (e.g., UE0: 1x2,
  UE1: 2x2)
- Integrate CIRDB for per-UE channel modeling with independent TDL models,
  delay spreads, and speeds
- Replace comma-separated per-UE params with structured ue_config blocks for
  cleaner configuration

Usage:
* Start 5G core network
    cd openairinterface5g/doc/tutorial_resources/oai-cn5g
    docker-compose up -d

* Create network namespaces
    sudo ip netns add ue0
    sudo ip netns add ue1

* Start gNB (2x2 with multi-UE CIRDB)
    sudo ./nr-softmodem -O ../../ci-scripts/conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml --device.name vrtsim --vrtsim.role server --vrtsim.num_ues 2 --vrtsim.cirdb 1 --vrtsim.cirdb_file ~/raytracing-channel-emulator/server/external_taps/cir_db.bin --vrtsim.cirdb_yaml ~/raytracing-channel-emulator/server/external_taps/cir_db.yaml --vrtsim.ue_config.[0].antennas "1x2" --vrtsim.ue_config.[0].model_id 0 --vrtsim.ue_config.[0].ds_ns 10.0 --vrtsim.ue_config.[0].speed_mps 1.5 --vrtsim.ue_config.[1].antennas "2x2" --vrtsim.ue_config.[1].model_id 1 --vrtsim.ue_config.[1].ds_ns 30.0 --vrtsim.ue_config.[1].speed_mps 30.0

* Start UE 0 (1x2 antennas, TDL-A, 10ns DS, 1.5 m/s)
    sudo ip netns exec ue0 ./nr-uesoftmodem -O ../../ci-scripts/conf_files/nrue.vrtsim.chanmod.yaml -C 3319680000 -r 106 --numerology 1 --ssb 516 --device.name vrtsim --vrtsim.role client --vrtsim.ue_id 0 --band 78 --ue-nb-ant-tx 1 --ue-nb-ant-rx 2 --uicc0.imsi 001010000000001

* Start UE 1 (2x2 antennas, TDL-B, 30ns DS, 30 m/s)
    sudo ip netns exec ue1 ./nr-uesoftmodem -O ../../ci-scripts/conf_files/nrue.vrtsim.chanmod.yaml -C 3319680000 -r 106 --numerology 1 --ssb 516 --device.name vrtsim --vrtsim.role client --vrtsim.ue_id 1 --band 78 --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uicc0.imsi 001010000000002
2026-03-12 10:57:53 +01:00
Merkebu Girmay
694f7bea08 Add CI test for multi-UE vrtsim with CIRDB 2026-03-11 20:34:31 -07:00
Merkebu Girmay
fa72a30bf4 add multi-ue support to vrtsim
- Add num_ues and ue_id parameters for server and client configuration
- Implement ul combining and dl distribution to all ues
- Each ue uses dedicated antenna offsets based on ue_id
- Works with no-chanmod mode only and with uniform antenna dimensions across all ues
2026-03-11 20:34:11 -07:00
Jaroslava Fiedlerova
00394d7892 Merge remote-tracking branch 'origin/CI-bladeRF' into integration_2026_w11 (!3965)
Enable BladeRF support in gNB Docker image

The goal of this MR is to add support for building a gNB image that supports
BladeRF.
2026-03-11 16:10:13 +01:00
Robert Schmidt
d82b5c1ec2 Bugfix: make longer telnet cmdfunc names
The maximum number of cmdfunc names is 20, which IMO is too low. Worse,
if it's longer, nothing will warn us because C will just fill the array
to it's end (without \0 at the end). To remedy this:

- Allow longer names till 64 bytes (I hit the previous limit of 20)
- Check that the name is within the length limit: if somebody wants a
  very long name, the strnlen() will return the maximum length, hitting
  that assertion.
- When reading a command during runtime, allow the corresponding maximum
  length.

On that occasion, also increase total number of permitted cmdfuncs.
2026-03-11 16:09:55 +01:00
Robert Schmidt
61b3f3b5b4 Update RF failed to write warning, add for harmonization
The original error was simply "failed to write to RF", which is not very
precise. Update with sample numbers for context, and add it in another
similar case for consistency.

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-03-11 15:48:22 +01:00
Robert Schmidt
e031af0665 USRP: usrp-tx-write-thread: return number of samples written
At least writerProcessWaitingQueue() checks for the exact number of
samples written. In many other places, we check that the return is
non-zero.

The usrp-tx-write-thread functionality returned 0, which triggers
various problems. Return the number of samples, as in the "direct write"
case (if-block before else-block).

Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-03-11 15:47:32 +01:00
Reem Bahsoun
243cd8e9e1 Add BladeRF libraries to gNB and UE Docker image builder 2026-03-11 14:58:12 +01:00
Jaroslava Fiedlerova
968c5abae1 Merge remote-tracking branch 'origin/xn-encdec-setup-messages' into integration_2026_w11 (!3923)
XNAP: Add encode/decode and unit tests for Xn Setup Request/Response/Failure

This MR adds complete support for the following in accordance with
3GPP TS 38.423 v16.2.0
- Add Xn Setup Request, Response, and Failure message type definitions
- Implement ASN.1 encode/decode for all Xn Setup messages
- Add equality checks and memory management helpers
- Create XNAP unit test infrastructure

Co-author: @venkatareddy

Acknowledgement
  This work was carried out as part of research and development at Indian
  Institute of Science (IISc), Bengaluru.
2026-03-10 17:59:59 +01:00
Jaroslava Fiedlerova
8556a1488c Merge remote-tracking branch 'origin/rlc-less-locking' into integration_2026_w11 (!3919)
Reduce number of mutex locking in MAC->RLC direction

Currently, the scheduler locks RLC for each operation. Concretely
- for RLC status indication (to get amount of bytes per LC), it locks per LC
- for RLC indication (UL traffic), it locks for each MAC SDU of which there can
  be multiple in a TB
- for RLC data req (getting data from RLC to put into a transport block), it
  locks for each LCID and PDU to get.
This can have a certain overhead, because we need to re-lock RLC multiple times
instead of once (per operation above). In this MR, rework the interfaces such
that it is possible to get all information/data in a single lock-unlock cycle,
which should also help with "spikes" of scheduler times (in some scenarios, it
seems the scheduler takes longer than 0.5ms, and while it's not only locking,
re-locking might contribute), and an increase of number of UEs (e.g., instead
of doing 3 * N UEs lock cycles for getting status of SRB1, SRB2, DRB1, we do
only N times). Concretely, for each UEs RLC status indication, we lock once,
only once per LCID when filling a TB (in particular for LCID 4, on high
throughput, it might be many times), and only once per UL TB (for the common
case of UL data).

Minor fixes include the increase of the Aerial VNF thread priority, and reducing
the maximum RLC indication size to reduce excessive computation (we can't have
1MB in one TB, it is too much).
2026-03-10 17:57:35 +01:00
Robert Schmidt
17d1e5674c reduce max buffer status size 2026-03-10 13:28:30 +01:00
Robert Schmidt
4c9b7ec679 increase priority of Aerial thread 2026-03-10 13:28:30 +01:00
Robert Schmidt
4426fb1a2e RLC data req: Add API to fill multiple RLC PDUs in one TB, use at gNB
Adds the API, which will always prepend a 3 byte header before writing a
PDU. This can be used to call less often into RLC, and avoid potential
locking.

The API is used at the gNB DLSCH scheduler.  Also, this removes the
"overhead" calculation: since we fill the entire TB at once, RLC will
leave space for headers as necessary.
2026-03-10 13:28:30 +01:00
Robert Schmidt
c0a78e6c47 RLC data ind: single call for complete TB at UE 2026-03-10 13:28:30 +01:00
Robert Schmidt
2e0493632d RLC data ind: single call for complete TB at gNB 2026-03-10 13:28:30 +01:00
Rakesh BB
e34cb24073 XNAP: add encode/decode and unit test for Xn Setup Failure
- Add Xn Setup Failure message type definitions.
  - Implement encoder and decoder for Xn Setup Failure.
      Xn Setup Failure (3GPP TS 38.423v16.2.0 §9.1.3.3)
      - Cause (M)
  - Add equality check and memory management helpers.
  - Extend XNAP library unit tests to cover Setup Failure
2026-03-10 11:07:11 +00:00
Rakesh BB
467015e005 XNAP: add encode/decode and unit test for Xn Setup Response
- Add Xn Setup Response message type definitions
- Implement encoder and decoder for Xn Setup Response
     Xn Setup Response (3GPP TS 38.423v16.2.0 §9.1.3.2)
   - Global NG-RAN Node ID (M)
   - TAI Support List (M)
- Add equality check and memory management helpers
- Extend XNAP library unit tests to cover Setup Response
2026-03-10 11:00:31 +00:00
Rakesh BB
08b454bd15 XNAP: Introduce XnAP library framework and add encode/decode, unit test for Xn Setup Request
- Add initial XnAP library structure under openair2/XNAP/lib
  - Implement common XnAP helper utilities (xnap_lib_common)
  - Add gNB interface management module for Xn Setup procedures
  - Introduce XnAP message type definitions in xnap_messages_types.h
  - Integrate XnAP library into build system (CMakeLists.txt)
  - Add standalone XnAP library unit test (xnap_lib_test)
  - Implement encoder, decoder + test for Xn Setup Request
     Xn Setup Request (3GPP TS 38.423v16.2.0 §9.1.3.1)
	- Global NG-RAN Node ID (M)
	- TAI Support List (M)
	- AMF Region Information (M)
  - Extend conversions.h with MACRO_BIT_STRING_TO_GNB_ID utility

Co-authored-by: Sreeshma Shiv <sreeshmau@iisc.ac.in>
2026-03-10 10:56:43 +00:00
Rakesh BB
5d9f7b41c1 XNAP: add logging support and update ASN.1 runtime sources
- Add XNAP component to the logging framework in log.h
  - Introduce LEGACY_XNAP log message definitions (INFO, ERROR, WARNING, DEBUG, TRACE)
    in T_messages.txt for tracing and debugging XNAP procedures
  - Update xnap_R16.2.0.cmake formatting for consistency
  - Add missing ASN.1 runtime sources required by XNAP (e.g. asn_codecs_prim_xer.c,
    BIT_STRING_print.c, BIT_STRING_rfill.c, etc.)
2026-03-10 10:23:33 +00:00
Jaroslava Fiedlerova
ee8de3eaad Merge remote-tracking branch 'origin/NTN_FR2_bands' into integration_2026_w11 (!3414)
Added NTN-FR2 FDD bands defined in release 18 in Ka-band range

* NTN-FR2 bands 510, 511, 512 added. TS 38.101-5 v 18.9 defines these 3 FR2-FDD
  bands for NTN operation.
* These bands are defined in Ka band range (17.3Ghz - 31Ghz).
* Tested using the added conf files using RFSIM and GEO configuration.
* There were some inconsistencies observed when testing with RFSimulator before UE
  Syncs to the gNB in terms of samples being written for FR2 configurations. Once
  the UE syncs, the inconsistencies disappear.
* this is the problem - UE writes incorrect number of samples and gNB complains
  about getting samples in past
* The above inconsistencies were also fixed in this merge request.
* These commits solving above inconsistencies were removed from this MR and a
  different MR was raised. MR with those commits: !3928.
2026-03-10 10:32:07 +01:00
Sakthivel Velumani
044ca835d6 phy: use fftshift'ed buffer for txdataF
So far txdataF buffer has DC RE as the first element. This was prefered
most likely to avoid memcpy before iFFT but comes with a small
complexity in RE mapping functions.

Instead, we use a flat buffer that holds freq domain data starting from
first negative SC. After resource mapping is done on all channels, each
OFDM symbol is shifted before iFFT so that the buffer start with DC RE.

This reduces complexity in mapping functions and later on when passing
beam IDs to 7.2 split RU especially when a beam is associated to
interleaved RB and/or REs.

There is already a memcpy in place to copy txdataF from gNB stuct to RU
struct. So this change does not introduce new memcpy.
2026-03-09 18:27:27 +00:00
Sakthivel Velumani
d7512bdc8b oaioran: fix compression for arm
read data from start PRB of each section.
2026-03-09 17:58:26 +00:00
Thomas Schlichter
eaaf880d37 gNB: skip CU and DU SIBs if not SA mode 2026-03-09 16:07:44 +01:00
Jaroslava Fiedlerova
c86bb6f7b9 Merge remote-tracking branch 'origin/limit_dl_DataToUL_ACK' into integration_2026_w11 (!3971)
Limit dl_DataToUL_ACK values to 15 as per standard

If min feedback time is high enough otherwise we might fail to encode/decode
pucch-Config

Assertion (enc_rval.encoded > 0 && enc_rval.encoded <= max_buffer_size * 8) failed!
In encode_cellGroupConfig() /home/francesco/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4029
ASN1 message encoding failed (dl-DataToUL-ACK, 18446744073709551615)!
2026-03-09 15:08:22 +01:00
Jaroslava Fiedlerova
e73759e60f Merge remote-tracking branch 'origin/harmonize_symbols_per_slot' into integration_2026_w11 (!3967)
Harmonize the use of definition for number of symbols per slot

No need to have both NR_NUMBER_OF_SYMBOLS_PER_SLOT and NR_SYMBOLS_PER_SLOT
2026-03-09 15:07:48 +01:00
Jaroslava Fiedlerova
b5b73e9fb8 Merge remote-tracking branch 'origin/liteon_refactor' into integration_2026_w11 (!3864)
remove xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()

We have separate functions ran_fh_tx_send_slot_BySymbol() and
xran_fh_rx_read_slot_BySymbol() for liteon. This MR is to remove those separate
functions. 

Main author: Teodora Vladić
Co-author: Mario Joa-Ng

Changes:
xran_fh_tx_send_slot() is using if then else to handle per slot and per symbol
logic. xran_fh_rx_read_slot() is straightforward.

Testing:
- Liteon: Verified end-to-end.
- Benetel: (per slot without beam_id): Verified end-to-end.
- Microamp: (per slot with beam_id): Verified end-to-end. The branch
  microamp_F_harmonize is used instead as microamp could not be run with develop
  branch.
2026-03-09 15:05:33 +01:00
Mario Joa-Ng
a240e21ddd remove xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()
Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-03-09 13:16:06 +01:00
Raghavendra Dinavahi
81c1479429 UE PHY-TEST : phy-test mode works now in NTN
params_changed flag is set to true when reconfig.raw file gets processed,
as NTN config is present in reconfiguration.
but due to this initialisation happening at a later point
params_changed is reset which results in incorrect writes on RFsimulator
2026-03-09 11:53:47 +01:00
Thomas Schlichter
f6c04c2672 COMMON: fix ssb_offset_point_a calculation
Even though the NR ARFCN uses a 15 kHz raster until 24250 MHz,
the ssb_offset_point_a is still scaled by 60 kHz for FR2.

So we need two different scaling factors.
2026-03-09 11:50:30 +01:00
Raghavendra Dinavahi
1f3faac18f Added Conf files for NTN-FR2 band512, SCS-BW: 120Khz-50, 100Mhz, 200Mhz 2026-03-09 11:50:30 +01:00
Raghavendra Dinavahi
6c5a8aa1fc Added NTN-FR2 FDD bands defined in release 18. Bandtable modified.
NTN-FR2 bands 510, 511, 512 added.
    TS 38.101-5 v 18.9 defines these 3 FR2-FDD bands for NTN operation.
    These bands are defined in Ka band range (17.3Ghz - 31Ghz)
    UL STEPSIZE, UL NOFFS added into band table
2026-03-09 11:50:30 +01:00
Raghavendra Dinavahi
0b100620f4 Changed uplink_frequency_offset from int32 to int64, required for NTN-FR2 2026-03-09 11:50:30 +01:00
Robert Schmidt
d0a6be27da RLC data ind: change API to handle multiple TB, but use only one 2026-03-09 11:08:34 +01:00
Robert Schmidt
f8aeba44f4 RLC status ind: make only one call per UE 2026-03-09 11:08:34 +01:00
Gabriele Gemmi
3f3576bba6 Minimal TLVs to do Beamforming with Aerial 25.2 2026-03-07 23:49:05 +00:00
Sakthivel Velumani
c84c858c56 phy: use smaller buffer for txdataF
It is enough to allocate txdataF for one slot.
2026-03-06 18:18:19 +00:00
francescomani
edef075000 reduce the use of NR_SYMBOLS_PER_SLOT in favor of the value in frame_parms 2026-03-06 18:55:56 +01:00
francescomani
803d87ef54 harmonize the use of definition for number of symbols per slot (no need to have two of them) 2026-03-06 18:38:55 +01:00
Jaroslava Fiedlerova
582ce818d7 Merge branch 'integration_2026_w10' into 'develop'
Integration `2026.w10`

* !3946 UE L1 cleanup
* !3929 UE: Fix if target cell during handover has SSB at a different offset as in source cell
* !3961 Remove Ubuntu 20 and RHEL/Rocky 8 support, increase cmake min version
* !3884 Integrate NRPPA and NGAP messages required for positioning
* !3784 CI: Create new pipeline for testing with Aerial and Jetson
* !3697 fix: issue 911 - OAI gNB hangs when AMF connection goes down
* !3914 Fix dB_fixed() function
* !3800 Add tracer to record configured events to database
* !3954 UHD streamer thread priorities in nrUE
* !3846 rename with distinct names structs and related typedefs, remove spread struct keyword
* !3958 Remove unused function arguments

Closes #911

See merge request oai/openairinterface5g!3962
2026-03-06 17:33:40 +00:00
andrewse
36f24d94c3 demoted "PUCCH list is full" message to a warning 2026-03-06 12:06:01 +00:00
francescomani
8ad867837c Merge remote-tracking branch 'origin/unused_function_arguments' into integration_2026_w10 (!3958)
Remove unused function arguments

Some of them, because there are hundreds if not thousands. Warnings at compilation time can be enabled using -Wunused-parameter.
2026-03-06 13:05:47 +01:00
Jaroslava Fiedlerova
acf9c25e18 Merge remote-tracking branch 'origin/change-typedef-names-for-coding-style' into integration_2026_w10 (!3846)
rename with distinct names structs and related typedefs, remove spread struct keyword
2026-03-06 12:18:43 +01:00
francescomani
94a8573521 limit dl_DataToUL_ACK values to 15 as per standard to prevent ASN1 encoding/decoding failure when min feedback time is too high 2026-03-06 11:14:09 +01:00
Jaroslava Fiedlerova
4e3ac9e98c Merge remote-tracking branch 'origin/uhd_priority_in_nrUE' into integration_2026_w10 (!3954)
Increase UHD streamer thread priority in nrUE

This minor change allows nrUE UHD threads to inherit priority
OAI_PRIORITY_RT_MAX.
2026-03-06 11:13:04 +01:00
Jaroslava Fiedlerova
e6105b9d6a Merge remote-tracking branch 'origin/recordDb' into integration_2026_w10 (!3800)
Add tracer to record configured events to database

This extends the functionality provided by record in that it allows
collection of data into a Clickhouse database, allowing aggregation of
data from gNB and UE for functions like channel estimation for PUSCH
transmissions that did not decode successfully at the gNB.

It is intended to be used in conjunction with Aerial Data Lake but is
not limited to it. Data access is simpler than in !3462 (merged), but
could be improved using the metadata approach from !3462 (merged).

Usage is similar to the exsting record tracer:

        docker exec -it oai-nr-ue bash -c "record_db -on UE -off VCD -ch-droptables -off UE_PHY_UL_TICK -off UE_PHY_DL_TICK -off UE_PHY_PDSCH_IQ"

Which outputs recorded data every 5 seconds:

        17:35:40.945037 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:21   name:UE_PHY_INITIATE_RA_PROCEDURE    has_frame_slot:false columns:5
        17:35:40.945924 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:26   name:NRUE_PHY_MIB                    has_frame_slot:true columns:6
        17:35:40.946717 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:53   name:NRUE_MAC_DL_PDU_WITH_DATA       has_frame_slot:true columns:7
        17:35:40.947467 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:54   name:NRUE_MAC_UL_PDU_WITH_DATA       has_frame_slot:true columns:7
        17:35:40.948208 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:55   name:NRUE_MAC_DL_RAR_PDU_WITH_DATA   has_frame_slot:true columns:6
        17:35:40.948912 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:318  name:UE_MASTER_TICK                  has_frame_slot:true columns:5
        17:35:40.949679 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:321  name:UE_PHY_DLSCH_UE_DCI             has_frame_slot:true columns:10
        17:35:40.950397 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:322  name:UE_PHY_DLSCH_UE_ACK             has_frame_slot:true columns:7
        17:35:40.951125 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:323  name:UE_PHY_DLSCH_UE_NACK            has_frame_slot:true columns:7
        17:35:40.951903 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:324  name:UE_PHY_ULSCH_UE_DCI             has_frame_slot:true columns:12
        17:35:40.952604 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:325  name:UE_PHY_ULSCH_UE_ACK             has_frame_slot:true columns:7
        17:35:40.953305 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:326  name:UE_PHY_ULSCH_UE_NACK            has_frame_slot:true columns:7
        17:35:40.954035 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:327  name:UE_PHY_INPUT_SIGNAL             has_frame_slot:true columns:7
        17:35:40.954778 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:328  name:UE_PHY_DL_CHANNEL_ESTIMATE      has_frame_slot:true columns:8
        17:35:40.955533 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:329  name:UE_PHY_DL_CHANNEL_ESTIMATE_FREQ has_frame_slot:true columns:8
        17:35:40.956250 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:330  name:UE_PHY_PDCCH_IQ                 has_frame_slot:false columns:5
        17:35:40.957010 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:331  name:UE_PHY_PDCCH_ENERGY             has_frame_slot:true columns:9
        17:35:40.957781 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:333  name:UE_PHY_PDSCH_ENERGY             has_frame_slot:true columns:9
        17:35:40.958599 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:334  name:UE_PHY_PUSCH_TX_POWER           has_frame_slot:true columns:10
        17:35:40.959364 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:335  name:UE_PHY_PUCCH_TX_POWER           has_frame_slot:true columns:9
        17:35:40.960154 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:336  name:UE_PHY_MEAS                     has_frame_slot:true columns:12
        17:35:40.961126 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:337  name:UE_PHY_UL_PAYLOAD_TX_BITS       has_frame_slot:true columns:30
        17:35:40.962126 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:338  name:UE_PHY_UL_SCRAMBLED_TX_BITS     has_frame_slot:true columns:30
        17:35:40.962455 record_db.cpp:1063 INF[main  ] Tables created, waiting for messages...

        17:36:00.842116 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_SCRAMBLED_TX_BITS     rows:       52  total:        119
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_PAYLOAD_TX_BITS       rows:       55  total:        119
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_MEAS                     rows:        5  total:         12
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   UE_PHY_PDSCH_ENERGY             rows:        6  total:         29
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   NRUE_MAC_DL_PDU_WITH_DATA       rows:        6  total:         28
        17:36:00.842117 record_db.cpp:1096 INF[main  ]   NRUE_MAC_UL_PDU_WITH_DATA       rows:       54  total:        118
        17:36:00.842118 record_db.cpp:1096 INF[main  ]   NRUE_PHY_MIB                    rows:      260  total:        495
        17:36:00.842118 record_db.cpp:1100 INF[main  ]
        17:36:05.861012 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_SCRAMBLED_TX_BITS     rows:       55  total:        174
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_UL_PAYLOAD_TX_BITS       rows:       55  total:        174
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_MEAS                     rows:        5  total:         17
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   UE_PHY_PDSCH_ENERGY             rows:       12  total:         41
        17:36:05.861013 record_db.cpp:1096 INF[main  ]   NRUE_MAC_DL_PDU_WITH_DATA       rows:       12  total:         40
        17:36:05.861014 record_db.cpp:1096 INF[main  ]   NRUE_MAC_UL_PDU_WITH_DATA       rows:       56  total:        174
        17:36:05.861014 record_db.cpp:1096 INF[main  ]   NRUE_PHY_MIB                    rows:      260  total:        755

This can also be done for the L2 on the gNB side:

        $ docker exec -it oai-gnb-aerial bash -c "record_db -on GNB_MAC_DL_PDU_WITH_DATA"
        turning ON GNB_MAC_DL_PDU_WITH_DATA
        connecting to 127.0.0.1:2021
        16:31:01.742287 record_db.cpp:1000 INF[main  ] on: item: GNB_MAC_DL_PDU_WITH_DATA, on_off_name: GNB_MAC_DL_PDU_WITH_DATA, on_off_action: 1
        16:31:01.742340 record_db.cpp:1011 INF[main  ] No database file provided, using default: T_messages.txt
        16:31:01.751101 record_db.cpp:1020 INF[main  ] Number of events: 801
        16:31:01.752264 record_db.cpp:439 INF[main  ] ClickHouse connection initialized
        16:31:01.752997 record_db.cpp:570 INF[main  ] Initialized buffer for event_id:49   name:GNB_MAC_DL_PDU_WITH_DATA        has_frame_slot:true columns:9
        16:31:01.753065 record_db.cpp:1063 INF[main  ] Tables created, waiting for messages...
        16:31:07.299147 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:        1  total:          1
        16:31:07.299148 record_db.cpp:1100 INF[main  ]
        16:31:12.299490 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:      234  total:        235
        16:31:12.299491 record_db.cpp:1100 INF[main  ]
        16:31:17.299594 record_db.cpp:1096 INF[main  ]   GNB_MAC_DL_PDU_WITH_DATA        rows:      260  total:        495
2026-03-06 10:29:34 +01:00
Jaroslava Fiedlerova
257de65782 Merge remote-tracking branch 'origin/fix_db_fixed' into integration_2026_w10 (!3914)
Fix dB_fixed() function

- dB_fixed(0) returns 0 in develop branch;
- 0 in dB is -INF, but since we're dealing with integer variables, we'll put
  20*log10(2^-15) in the output of dB_fixed() function, instead of 0.
- make all users use signed variables
2026-03-06 10:23:30 +01:00
Jaroslava Fiedlerova
ef14a2b977 Merge remote-tracking branch 'origin/issue-911-fix' into integration_2026_w10 (!3697)
fix: issue 911 - OAI gNB hangs when AMF connection goes down

Once the AMF is down, based on the AMF UE NGAP ID and RAN UE NGAP ID,
the UE associated with the AMF is found

All the contexts related to the UE are released and the timer is started
in the NGAP to look up for the SCTP association. The AMF-gNB reconnection
is made if an SCTP connection is found, also the registration of multiple
UE is triggered

These actions are based on the reference from 4.2.6 AN release Specs
TS 123 502 V16.7.0 (2021-01)

When the NG-AP signalling connection is lost due to (R)AN or AMF failure,
the AN release is performed locally by the AMF or the (R)AN as described
in the procedure flow below without using or relying on any of the signalling
shown between (R)AN and AMF. The AN release causes all UP connections of the UE
to be deactivated.

closes #911
2026-03-06 10:08:10 +01:00
Jaroslava Fiedlerova
5b66b53707 Merge remote-tracking branch 'origin/ci-add-jetson-test' into integration_2026_w10 (!3784)
CI: Create new pipeline for testing with Aerial and Jetson
2026-03-06 10:00:38 +01:00
Jaroslava Fiedlerova
d7fc76b726 Merge remote-tracking branch 'origin/nrppa_ngap_integration' into integration_2026_w10 (!3884)
Integrate NRPPA and NGAP messages required for positioning

This MR integrates NRPPA and NGAP messages required for positioning.
The following NGAP messages are integrated (3GPP 38.413 Version 16.0.0):

NGAP UPLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP UPLINK NON UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT

The following NRPPA messages are integrated (3GPP 38.455 Version 16.7.1):

TRP Information Request
TRP Information Response
Positioning Information Request
Positioning Information Response
Positioning activation request
Positioning Activation Response
Measurement Request
Measurement Response

This MR tests these messages via a standalone tester nr-cu-nrppa-test that
connects to the AMF to perform NGAP enc/dec and NRPPA enc/dec

Core Network:
To pull the docker images:

docker pull oaisoftwarealliance/ims:latest
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-upf:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-lmf:develop

openairinterface5g$ cd doc/tutorial_resources/oai-cn5g
To deploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml up -d

To undeploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml down -t 0

RAN:
To compile:
openairinterface5g$ mkdir build
openairinterface5g$ cd build
openairinterface5g/build$ cmake .. -GNinja
openairinterface5g/build$ ninja nr-cu-nrppa-test

To run:
openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-cu-nrppa/nr-cu-nrppa-test -O ../tests/nr-cu-nrppa/nr-nrppa-test.conf

To initiate positioning procedure:
openairinterface5g$ cd doc/tutorial_resources/positioning/
openairinterface5g/doc/tutorial_resources/positioning$ curl --http2-prior-knowledge -H "Content-Type: application/json" -d "@InputData.json" -X POST http://192.168.70.141:8080/nlmf-loc/v1/determine-location
2026-03-06 09:59:34 +01:00
Reem Bahsoun
80fb09ba21 Build BladeRF strictly from source.
To avoid version mismatch between built Docker image and BladeRF FW.
2026-03-06 09:19:10 +01:00
Bartosz Podrygajlo
7d058eb0d0 Run nrue_ru_start in a high priority thread
Launch a temporary high-priority thread to start the UE RU,
ensuring radio library threads inherit this priority
2026-03-05 17:34:22 +01:00
Robert Schmidt
1d69eb0e1e Add T tracer to record configured events to database
This extends the functionality provided by record in that it allows
collection of data into a Clickhouse database, allowing aggregation of
data from gNB and UE for functions like channel estimation for PUSCH
transmissions that did not decode successfully at the gNB.

It is intended to be used in conjunction with Aerial Data Lake but is
not limited to it. Data access is simpler than in !3462, but could be
improved using the metadata approach from !3462.

The integration uses logfmt for fast logging, and a clickhouse DB
client, both integrated using CPM.

This change set also adds a docker-compose file for a UE on 100MHz, to
be used with Aerial configurations, and builds the tracer for Aerial and
nrUE docker files.
2026-03-05 14:39:28 +01:00
Aswanth KC
c90d7f7f26 fix: issue 911 - OAI gNB hangs when AMF connection goes down
- Extended fix to support multiple UEs instead of single UE
- Actions now trigger upon AMF reconnection

Per 3GPP TS 123 502 V16.7.0 (2021-01) Section 4.2.6 (AN Release):
When NG-AP signalling connection is lost due to (R)AN or AMF failure,
AN release is performed locally by AMF or (R)AN without relying on
signalling between (R)AN and AMF. This deactivates all UP connections.
2026-03-05 09:53:00 +01:00
Jaroslava Fiedlerova
e107f81d54 CI: update documentation for CI setups
Add information about the new CI setup and the RAN-SA-AERIAL-OAIUE-CN5G
testing pipeline.
2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
f12a3f4d45 CI: Set WNC BW in Aerial pipeline
Since the setup script is available, use it to ensure the correct bandwidth
configuration before each run.
2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
c9065df7f8 CI: Add test into Jenkinsfile-Gitlab-Container 2026-03-04 22:16:03 +01:00
Jaroslava Fiedlerova
970577c7c4 Merge remote-tracking branch 'origin/remove-u20-cmake-fixes' into integration_2026_w10 (!3961)
Remove Ubuntu 20 and RHEL/Rocky 8 support, increase cmake min version

Ubuntu 20 is EOL [1]. This was the version with the lowest CMake version, so
we can increment the minimum CMake version to 3.19 as well. Increasing the
minimum version will in particular help with the integration of CUDA (updates
in 3.17 and 3.18), the current 3.19 brings better support for apple silicon.

Some minor CMake updates (removing superfluous files and dependencies).

[1] https://ubuntu.com/blog/ubuntu-20-04-lts-end-of-life-standard-support-is-coming-to-an-end-heres-how-to-prepare
2026-03-04 21:18:38 +01:00
Jaroslava Fiedlerova
9c741e9ccf Merge remote-tracking branch 'origin/NR_fix_ssbpos_ho' into integration_2026_w10 (!3929)
UE: Fix if target cell during handover has SSB at a different offset as in source cell

These changes fixed these observed issues:
- If target cell has a different SSB position compared to source cell during
  ho - sync was not successful.
- RAR does not get decoded if SSB position has changed on the target cell
  compared to source cell.
2026-03-04 21:15:46 +01:00
rmagueta
bc6963c588 Fix dB_fixed() function
0 in dB is -INF, but since we're dealing with integer variables, we'll put 10*log10(2^-30) in the output, which corresponds to the symmetrical maximum output of the function.
2026-03-04 16:26:59 +00:00
rmagueta
0e38bd239e Use signed types for dB measurements to support negative values 2026-03-04 16:26:59 +00:00
Robert Schmidt
356a905d5a Remove RHEL and Rocky 8 from supported distributions 2026-03-04 16:10:07 +01:00
Jaroslava Fiedlerova
63575e54bf CI: Add XML file for RAN-SA-AERIAL-OAIUE-CN5G 2026-03-04 14:02:29 +01:00
Jaroslava Fiedlerova
ff358dde6f CI: Add configuration and yaml files for new pipeline with Jetson 2026-03-04 14:02:29 +01:00
Jaroslava Fiedlerova
b33424b790 CI: Add script for BW configuration on WNC RU 2026-03-04 14:02:29 +01:00
Raghavendra Dinavahi
dafabe381c UE: update PDCCH config if MAC config changes
without this fix, after sync is successful, RAR is not getting decoded.
PDCCH area also changes as SSB offset can change. if MAC configuration changes.
2026-03-03 16:36:52 +01:00
Jaroslava Fiedlerova
352188fbd3 Merge remote-tracking branch 'origin/nb_antennas_rx_hardcode' into integration_2026_w10 (!3946)
UE L1 cleanup

Mostly related to remove dependence from NB_ANTENNAS_RX parameter
2026-03-02 19:11:55 +01:00
Rakesh Mundlamuri
7de93489cf Add README for the nr-cu-nrppa tester 2026-03-02 21:43:32 +05:30
Rakesh Mundlamuri
cbc85dd448 Add Measurement Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
4f8cde6223 Add Measurement Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
192508e6cc Add Positioning Activation Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
defafa8d24 Add Positioning Activation Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
559e3c31de Add Positioning Information Response NRPPA message encoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
3dcdedb3f8 Send dummy UE registration request to the AMF to register the UE.
This is required for positioning as we initiate positioning procedure
based on the imsi.
2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
1be578e893 Add Positioning Information Request NRPPA message decoding procedures 2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
0282e64a3b Add TRP Information Response NRPPA message encoding procedures
Supported TRP Information Response Types:
 - PCI NR
 - NG RAN CGI
 - NR ARFCN
 - GEOGRAPHICAL COORDINATES
2026-03-02 21:36:03 +05:30
Rakesh Mundlamuri
446a905013 Add TRP Information Request NRPPA message decoding procedures 2026-03-02 21:36:02 +05:30
Rakesh Mundlamuri
ccf4b42541 Add RCconfig_nr_positioning to obtain and fill TRP related parameters from config file 2026-03-02 21:35:54 +05:30
Raghavendra Dinavahi
757a3131a1 UE: Fix if target cell has SSB at a different offset as in source cell
Actual problem is that SYNC does not happen on the target cell as frame parameters is not updated
and ssb start carrier is not correct in the UE frame parameters
function nr_get_ssb_start_sc to determine ssb_start_subcarrier
2026-03-02 15:49:12 +01:00
Robert Schmidt
1ea2b1b3ac Upgrade Fedora req to 43 2026-03-02 14:07:08 +01:00
Robert Schmidt
d37cb161ea Update minimum cmake version to 3.19 2026-03-02 12:13:25 +01:00
Robert Schmidt
649ae91e59 Remove Ubuntu 20 support
Ubuntu 20 is EOL [1] unless people pay for support. Therefore, remove it
from build_helper. People can still use it, but might need to install a
more recent cmake version (which the next commit will upgrade). The rest
should be the same.

[1] https://ubuntu.com/about/release-cycle
2026-03-02 11:28:09 +01:00
Robert Schmidt
710ac4e29c Remove unused files/targets in CMakeLists.txt 2026-03-02 11:26:39 +01:00
Laurent THOMAS
d6858d01a0 make distinct names for structs and tyepdefs 2026-02-27 16:53:58 +01:00
francescomani
b07dc35c92 fix some of the unused function arguments (found using -Wunused-parameter) 2026-02-27 13:27:54 +01:00
Rakesh Mundlamuri
6eceaacb73 Add NGAP decoding procedures of Downlink NRPPA Transport procedures 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
2cfff7520f Add NGAP encoding procedures of Uplink NRPPA Transport procedures 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
040b25bf00 Add NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT message decoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
d4c0431cc7 Add NGAP DOWNLINK UE ASSOCIATED NRPPA TRANSPORT message decoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
AMF UE NGAP ID (supported)
RAN UE NGAP ID (supported)
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
e832424240 Add NGAP UPLINK NON UE ASSOCIATED NRPPA TRANSPORT message encoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
bf90e523a7 Add NGAP UPLINK UE ASSOCIATED NRPPA TRANSPORT message encoding
Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
AMF UE NGAP ID (supported)
RAN UE NGAP ID (supported)
Routing ID (supported)
NRPPa-PDU (supported)
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
08d7a150b1 Add json file to initiate positioning procedure from the LMF 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
dabb8d338f Add docker compose file of the 5G core network with the LMF feature 2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
786d8b34c0 Introduce NGAP emulator that connects to the AMF to perform NGAP enc/dec
- Performs NGAP setup request and handles NGAP setup response
 - This is introduced to test NGAP enc/dec of the NRPPa messages

To compile:

openairinterface5g$ mkdir build
openairinterface5g$ cd build
openairinterface5g/build$ cmake .. -GNinja
openairinterface5g/build$ ninja nr-cu-nrppa-test

To run:
openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-cu-nrppa/nr-cu-nrppa-test -O ../tests/nr-cu-nrppa/nr-nrppa-test.conf
2026-02-27 17:51:27 +05:30
Rakesh Mundlamuri
1d9418097f Move RCconfig_NR_NG() to NGAP 2026-02-27 17:51:27 +05:30
francescomani
a0a0f2104f further cleanup in defs_nr_UE.h 2026-02-27 10:31:33 +01:00
francescomani
c57a112aae cleanup of PHY_NR_MEASUREMENTS structure to remove unused fields and dependence from NB_ANTENNAS_RX 2026-02-27 10:31:29 +01:00
francescomani
dea42f7e4a remove some unnecessary use of NB_ANTENNAS_RX at UE 2026-02-27 10:17:05 +01:00
Robert Schmidt
46b7670672 Merge branch 'integration_2026_w09' into 'develop'
Integration `2026.w09`

* !3944 Fail early if configuration module can not initialize properly
* !3945 gNB: Reset NDI only after usage in case of disable HARQ
* !3822 NR UE: fix PRACH k1 calculation at MAC when handover
* !3874 print better message for rsrp: invalid doesn't mean it is not measures, it...
* !3928 NR UE: correctly compute writeTimestamp for SCS > 30 kHz with rf-simulator
* !3949 fix: removed the nssai_sd parameter in the ue.conf file
* !3897 Change Aerial config file in targets to match Nvidia's CI setup
* !3951 Fix handling of IPv4v6 PDU sessions
* !3940 IPV6 support for telnet socket binding
* !3947 Add missing packing for CONFIG.request parameter BetaPSS
* !3871 Support for up to 12 ports in NR gNB
* !3943 Remove L1 dependence from NR band number
* !3892 Synchronize multiple gNBs by aliging their the slot boundaries
* !3952 Fixes for Initial UE Context Setup
* !3953 Improvements in compilation dependence
* change dl_absoluteFrequencyPointA in targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.24PRB.usrpb210.conf to 640032
* !3900 [CI] Pull Ubuntu base image from internal registry
* !3910 GPU Channel Simulation: nr_dlsim/nr_ulsim Integration + CI Test
* !3942 CI: rework log analysis to simplify and allow new use cases
* !3870 Configure CSI-RS according to beam_id used by UE

Closes #897 and #834

See merge request oai/openairinterface5g!3950
2026-02-27 08:41:22 +00:00
Jaroslava Fiedlerova
6f9e624193 Merge remote-tracking branch 'origin/config_csi_beam' into integration_2026_w09 (!3870)
Configure CSI-RS according to beam_id used by UE

This MR is to configure CSI-RS according to beam_id used by UE and
reconfigure upon beam change.

It has been tested with RFSIM, Liteon and Microamp under multiple beams.
2026-02-26 22:43:19 +01:00
Jaroslava Fiedlerova
f12b8cb44d Merge remote-tracking branch 'origin/ci-rework-logs' into integration_2026_w09 (!3942)
CI: rework log analysis to simplify and allow new use cases

The CI has some log analysis, but it is unmaintainable (huge functions
that mix eNB/gNB or lteUE/nrUE, are not tested, most of it is not used
or useful...) or limited to specific use cases (the timing-phytest time
analysis is hardcoded to source builds instead of also handling analysis
when running from docker images). This MR reimplements both functions.
For the log analysis, the CI team decided to throw away the old
analysis, and reimplement a mechanism that checks the couple of things
we care for.

- Allow to analyze phy-test timing analysis from docker files, and add a
  unit test
- Rework existing log analysis to remove useless checks, and make it
  more composable
  * The undeployment steps (Undeploy_Object(), Terminate_eNB()) take an
    <analysis> XML object which then either has a <services> subelement
    with check that are whitespace delimited (similar to how other xml
    task steps have <services>). For checks that contain whitespace,
    they can use <service> (singular) that encodes a single check, such
    that e.g., arguments could include spaces.
  * Each check is of form service=check[=arguments], where service is
    the docker services, check is a checking function (implemented as a
    class with run(file, options) function inside cls_loganalysis.py,
    and options arguments after the second = that is to be read by run()
    (basically, options will contain arguments that can be freeform)
  * these definitions can occur multiple times, e.g., it could be
    serviceA=Check1 and serviceA=Check2=Args and it will execute both
    Check1 and Check2
  * if a service is declared, it will execute alse the Default check
    which currently checks for an assertion
  * Implemented (and inspired from the existing CI analysis) are:
    - Default check to check for assertions (will be extended, to e.g.,
      address/undefined behavior sanitizer analysis)
    - RetxCheck: retransmission check as used in the CI
    - LastLineContains to check the last line containes a specific
      string
    - ContainsString to check a specific string appears in logs
    - EndsWithBye: check that towards the end (but not necessarily the
      last line), there is a Bye. string (a workaround since we don't
      always terminate with 0)
- There is a plan to use return codes after stopping in docker, but most
  executables do not end with 0 most of the time, such that we needed to
  abandon this plan.
- Additional fixes (see commit messages) and delete unused code
2026-02-26 22:39:29 +01:00
Jaroslava Fiedlerova
3eabd5363a Merge remote-tracking branch 'origin/multipath-testing-ci-physim' into integration_2026_w09 (!3910)
GPU Channel Simulation: nr_dlsim/nr_ulsim Integration + CI Test

This MR is a follow-up to !3886 (merged) and extends CUDA-based channel
simulation support to nr_dlsim and nr_ulsim, together with the
corresponding CI tests.

The MR incorporates:

- Cherry-picked commits e0c204f7 and 5f344876 from !3588
- Integration of new CI physim tests using GPU-accelerated channel
simulation in nr_dlsim and nr_ulsim tests, see commit c727b3bb

New CI job: RAN-Channel-Simulation
https://jenkins-oai.eurecom.fr/job/RAN-Channel-Simulation/
2026-02-26 22:38:15 +01:00
Jaroslava Fiedlerova
da28708459 CI: Add config files for phytest with 7.2 2026-02-26 17:34:07 +00:00
Mario Joa-Ng
f51f5d1f6e Get ssb_index using UE_beam_index under different beam_mode correctly. 2026-02-26 18:20:58 +01:00
Mario Joa-Ng
a77ba75b10 Configure CSI-RS according to beam_id used by UE and reconfigure upon beam change.
No need to call get_config_srs() anymore in update_cellGroupConfig_for_BWP_switch().
2026-02-26 18:20:25 +01:00
Jaroslava Fiedlerova
0a437db57c CI: Add physim tests with CUDA channel simulation 2026-02-26 17:03:54 +00:00
Robert Schmidt
e7360679f4 Merge remote-tracking branch 'origin/pull-noble-internal' into integration_2026_w09 (!3900)
[CI] Pull Ubuntu base image from internal registry

This MR updates the Docker build process for OAI images to use a private
registry for the Ubuntu base image ubuntu:noble. This will reduce the
possibility for CI disruption if no internet connection exists.

  - Replace FROM ubuntu:noble with FROM <DEFAULT_REGISTRY>/ubuntu:noble in Ubuntu Dockerfiles

This change overcomes the pull rate limit issues from DockerHub in the
CI.

The <DEFAULT_REGISTRY> contains a multi-architecture image (arm64 and
amd64)

    $ docker buildx imagetools inspect gracehopper3-oai.sboai.cs.eurecom.fr/ubuntu:noble | grep Platform
      Platform:  linux/amd64
      Platform:  linux/arm64

- The scripts run from the jenkins server everyday using a crontab.
- It pulls the AMD and ARM ubuntu:noble image on respective servers and
  checks if the internal registry is in sync.
- If not, it pushes the ubuntu:noble image to the registry to remain in
  sync with dockerhub.
2026-02-26 16:52:44 +01:00
Robert Schmidt
af19e6bce8 Fix dl_absoluteFrequencyPointA in config file
Analogously to other files under ci-scripts/.
2026-02-26 16:51:58 +01:00
Robert Schmidt
378d3a7a6b Add AnalyzeRTStatsObject() XML step 2026-02-26 14:17:28 +01:00
Robert Schmidt
c6bb50edb1 Add LogAnalysis in all XML files
I try to retain/match the previous log checks, without adding new
checks.
2026-02-26 14:17:28 +01:00
Robert Schmidt
5165834051 Introduce EndsWithBye log analysis check
It was initially foreseen to just check the program exit code, but most
executables don't return with 0 (so the CI would always fail). Add a
separate check that will check for the Bye., only going through the last
X lines instead of the entire file.
2026-02-26 14:17:28 +01:00
Robert Schmidt
735058f5c4 New log-analysis checker LastLineContains 2026-02-26 14:17:28 +01:00
Robert Schmidt
366df408a1 Default checker: check for assertions 2026-02-26 14:17:28 +01:00
Robert Schmidt
30a27432f0 Remove unused logging and unused imports 2026-02-26 14:17:28 +01:00
Robert Schmidt
707cb560d5 Implement retransmission checker, include unit test 2026-02-26 14:17:28 +01:00
Robert Schmidt
fe464ec6d0 Initial code for log analysis
- we agreed to basically throw away the old log checker (as it is
  unmaintainable)
- now: provide list of analysis to do
  * all checkers in cls_log_analysis, can be unit tested (see also next
    commit)
  * looked up dynamically to simplify adding of new tests + config
  * configured with

      <analysis>
        <services>DESCRIPTION [DESCRIPTION...]</services>
        <service>DESCRIPTION</service>
        ...
      </analysis>

    where DESCRIPTION follows service=func[=options]:
    - service is name of service to check
    - func is function to call, which receives filename
    - option are arbitary options to pass to func
    <services> is whitespace delimited (so can take multiple service
    analysis definitions)
    <service> exists to allow service definitions with whitespace
    changes that would not work in <services>
- I initially planned to check return code, but most softmodems actually
  exit with non-zero return code, so this is still TODO
- Default analyzer (checking for assertions, ...) is always run if a
  service is listed
- checks for file size
- add unit tests
2026-02-26 14:17:28 +01:00
Robert Schmidt
03f56c10e7 GetDeployedServices(): return container ID
will be relevant to get the return code in the next commit.
2026-02-26 13:39:39 +01:00
Robert Schmidt
2e85f67646 Remove air_interface: it's not used 2026-02-26 13:39:39 +01:00
Robert Schmidt
9e35799ca6 Remove X2HO eNBmbmsEnables variables
- it is spaghetti code: difficult to understand which code paths are
  taken
- the only effect seems to be in the UE log analysis function: it might
  make the log fail. However, we test that iperf is successful
  (Iperf2_Unidir()), and would detect before the log analysis if MBMS
  traffic does not work
- the rest is only messages that likely nobody reads

The real reason for this change is to reduce the number of class members
in the ran.py class, to simplify the functioning of the eNB analysis
function (no self) to reduce dependencies on the ran.py class.
2026-02-26 13:39:39 +01:00
Robert Schmidt
65dab3e027 Add unit test phytest analysis 2026-02-26 13:39:39 +01:00
Robert Schmidt
e809841aea Move Real-Time Stats Analysis to separate step
Factor out to make existing log analysis simpler. It will also allow to
more easily port this functionality to docker-based setups.
2026-02-26 13:39:39 +01:00
Robert Schmidt
41a6188c04 Change bash set options to improve run_locally.sh
set -e makes the script exit on error. However, there is code to handle
a non-zero return code of the script, and -e prevents from writing the
footer.

add set -x to see all the commands that are being executed.
2026-02-26 13:39:39 +01:00
Robert Schmidt
44ad255195 Remove unused USRP_IPAddress 2026-02-26 13:39:39 +01:00
Robert Schmidt
92997fba2b Update tests/README.md 2026-02-26 13:39:39 +01:00
Robert Schmidt
4a2f6cd823 Remove unused docker file 2026-02-26 13:39:39 +01:00
Robert Schmidt
84a49886d8 Move unused configs to untested 2026-02-26 13:39:39 +01:00
Robert Schmidt
cc1d663190 Remove unused code in args_parse.py 2026-02-26 13:39:39 +01:00
Robert Schmidt
7fe3183d1e Remove dead code 2026-02-26 13:39:39 +01:00
Robert Schmidt
0b219bf443 Fix invalid escape sequences
Use a raw string as suggested:

    ci-scripts/cls_static_code_analysis.py:93: SyntaxWarning: invalid escape sequence '\:'
      result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
    ci-scripts/cls_static_code_analysis.py:125: SyntaxWarning: invalid escape sequence '\.'
      ret = re.search('cppcheck version="(?P<version>[0-9\.]+)"', str(line))
    ci-scripts/cls_oai_html.py:221: SyntaxWarning: invalid escape sequence '\/'
      cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
    ci-scripts/ran.py:428: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[gNB [0-9]+\]\[RAPROC\] PUSCH with TC_RNTI 0x[0-9a-fA-F]+ received correctly, adding UE MAC Context RNTI 0x[0-9a-fA-F]+', str(line))
    ci-scripts/ran.py:457: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[PHY\]\s+problem receiving samples', str(line))
    ci-scripts/ran.py:461: SyntaxWarning: "\[" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\["? A raw string is also an option.
      result = re.search('\[MAC\]\s+Removing UE', str(line))
2026-02-26 13:39:39 +01:00
Robert Schmidt
3a9fdb674a Shorten logging output to time
I am not sure we ever need the millisecond output. The date is typically
also clear from the output (we could print the date at the beginning,
once, instead, but this is not done here. Finally, in Jenkins, we
typically get time stamps. Thus, it's not necessary to print this by
default.

On the other hand, since it might be useful when running locally, make
time stamps in logs configurable.
2026-02-26 13:39:39 +01:00
Robert Schmidt
e1b7e91f8a Use nocolor in various CI pipelines 2026-02-26 13:39:39 +01:00
Jaroslava Fiedlerova
a6bf72e895 Fix compilation
Fix compilation error:
/oai-ran/openair1/SIMULATION/NR_PHY/dlsim.c:932:42: error: variable 'h_channel_coeffs' set but not used [-Werror,-Wunused-but-set-variable]
  932 |                                   float *h_channel_coeffs = NULL;
      |                                          ^
2026-02-26 11:32:14 +00:00
Jaroslava Fiedlerova
c32d881be8 doc: Add instructions about dlsim/ulsim with cuda channel simulation 2026-02-26 11:32:14 +00:00
Jaroslava Fiedlerova
864d378a25 nr_ulsim: add -f option to support feature flags (e.g. CUDA)
- Introduce usage of the -f option in ulsim to allow enabling specific
  feature flags at runtime.
- Add support for the "cuda" flag to enable CUDA channel simulation when
  compiled with CUDA support. If an unsupported flag is provided, nr_ulsim
  reports an error.
2026-02-26 11:32:13 +00:00
Nika Ghaderi
afc52abb8a Integrate CUDA Channel Pipeline into UL Simulator
This commit integrates the GPU-based channel simulation pipeline into
the ulsim.

A `--cuda` command-line flag is added to enable the GPU path at
runtime. When activated, the simulator will:
- Allocate all necessary GPU and pinned host memory via the
  `init_cuda_chsim_buffers` helper function.
- In the main simulation loop, call the `run_channel_pipeline_cuda`
  function to perform the channel simulation on the GPU, bypassing the
  CPU-based functions.
- Clean up all CUDA resources on exit using the
  `free_cuda_chsim_buffers` helper.
The cpu path is also updated to use multipath_channel_float and add_noise_float.
2026-02-26 11:32:13 +00:00
Jaroslava Fiedlerova
de3dfee0c2 nr_dlsim: add -f feature flag support and remove unused SCG handling
- Replace previous handling of -f with a generic feature flag option.
- Add support for the "cuda" flag to enable CUDA channel simulation when
  compiled with ENABLE_CUDA.
- Remove unused SCGroupConfig file handling (scg_fd) and related code.
- Clean up deprecated code and variables associated with SCG reading - not
  required anymore after b232be94ed
2026-02-26 11:32:09 +00:00
Robert Schmidt
96a465c02b Merge remote-tracking branch 'origin/compil_improv' into integration_2026_w09 (!3953)
Improvements in compilation dependence

Once more I ended up in a long trip inside OAI intricate compilation
2026-02-26 11:01:24 +01:00
Robert Schmidt
10c26a79a5 Link log_headers to ldpc_aal to also force build of T headers 2026-02-26 11:00:37 +01:00
francescomani
e9cef10491 other small minor cleanup 2026-02-26 11:00:37 +01:00
francescomani
fd69dc0823 include license header in nr_prs.c 2026-02-26 11:00:37 +01:00
francescomani
a35c272e04 improvements in NR_REFSIG headers 2026-02-26 11:00:37 +01:00
francescomani
8c4fe047d0 remove some LTE dependence in NR files 2026-02-26 11:00:37 +01:00
francescomani
d6759b35d2 remove unnecessary gNB DLSCH header in UE dlsch demodulation 2026-02-26 11:00:37 +01:00
francescomani
96bc3a0ee9 remove unnecessary defs_gNB from LTE files 2026-02-26 11:00:37 +01:00
francescomani
4447d67650 remove unnecessary gNB header dependence in coding files 2026-02-26 11:00:37 +01:00
Robert Schmidt
4f7cd88e4c Merge remote-tracking branch 'origin/fixes-initial-context-setup' into integration_2026_w09 (!3952)
Fixes for Initial UE Context Setup

This MR fixes DRB aggregation from E1 so DRBs from multiple PDU sessions
are appended correctly into the F1 DRB array instead of overwriting
existing entries. It also makes NGAP Initial Context Setup skip PDU
sessions that are already established for the UE, only setting up new
sessions.

DRB aggregation from E1: Adjust fill_drb_to_be_setup_from_e1_resp to
pass &drbs[nb_drb] into fill_f1_drbs_from_e1, ensuring DRBs from later
PDU sessions are appended after the current count.

Duplicate PDU sessions in NGAP Initial Context Setup: In
rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ, detect requested PDU
session IDs that already exist with PDU_SESSION_STATUS_ESTABLISHED, log
a warning, and skip them so they are not added to UE->initial_pdus.
2026-02-26 10:59:54 +01:00
Robert Schmidt
433bd7be3f Merge remote-tracking branch 'origin/multi_gNB_sync' into integration_2026_w09 (!3892)
Synchronize multiple gNBs by aligning the slot boundaries

Currently, we derive frame and slot number based on proc->timestamp_rx
using

    proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
    proc->tti_rx = get_slot_from_timestamp(proc->timestamp_rx, fp);

This ignores the samples

    proc->timestamp_rx % fp->samples_per_frame

while computing the frame and slot number creating a mis-alignment with
the slot boundaries. A detailed description of the slot misalignment
in a pictorial representation can be seen in an attachment in the MR [1].

We fix this alignment issue by compensating these samples during the
first reception.

We can test the synchronization of the multiple gNBs from the estimated
ToAs from the PRS in the Downlink and the estimated ToAs from the SRS in
the Uplink using rfsim.

In order to test this, make sure you build gNB and nrUE along with the
telnetsrv flag using the option --build-lib telnetsrv.

Also, enable the following log in the function
nr_est_srs_timing_advance_offset() in
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c to observe SRS ToAs

    LOG_I(NR_PHY, "SRS estimatd ToA %d [RX ant %d]: TA offset %d, TA offset ns %d (max_val %ld, mean_val %ld, max_idx %d)\n", srs_toa, ant, *ta_offset, *ta_offset_nsec, max_val, mean_val, max_idx);

Furthermore, update the option Active_gNBs = 2; in
targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf to enable
decoding PRS transmitted from two gNBs

To run:

nrUE:

    sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --uicc0.imsi 001010000000001 --rfsim --phy-test -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf --rfsimulator.serveraddr server

gNB 0:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.prs.band78.fr1.106PRB.usrpx310.conf --gNBs.[0].min_rxtxtime 6 --rfsim --phy-test --rfsimulator.[0].serveraddr 127.0.0.1 --rfsimulator.[0].options chanmod --rfsimulator.[0].modelname AWGN --telnetsrv

gNB 1:

    sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb1.prs.band78.fr1.106PRB.usrpx310.conf --gNBs.[0].min_rxtxtime 6 --rfsim --phy-test --rfsimulator.[0].serveraddr 127.0.0.1 --rfsimulator.[0].options chanmod --rfsimulator.[0].modelname AWGN --telnetsrv

When we run the nrUE, gNB0 and gNB1, we can see the following logs

nrUE:

    [PHY] [gNB 0][rsc 0][Rx 0][sfn 976][slot 2] DL PRS ToA ==> 0.0 / 2048 samples, peak channel power -16.4 dBm, SNR +4.0 dB, rsrp -42.2 dBm
    [PHY] [gNB 1][rsc 0][Rx 0][sfn 976][slot 3] DL PRS ToA ==> 0.0 / 2048 samples, peak channel power -16.4 dBm, SNR +4.0 dB, rsrp -42.2 dBm

gNB 0:

    [NR_PHY] SRS estimatd ToA 0 [RX ant 0]: TA offset 31, TA offset ns 0 (max_val 99820162, mean_val 80176, max_idx 0)

gNB 1:

    [NR_PHY] SRS estimatd ToA 0 [RX ant 0]: TA offset 31, TA offset ns 0 (max_val 98784562, mean_val 79369, max_idx 0)

From the above logs, when we run the rfsim and when no delays introduced, we can observe the following results

In the Downlink at the UE, the estimated ToAs using PRS from both gNB0
and gNB1 are 0 and in the uplink, the ToA estimated from the SRS
transmitted by the UE at both the gNBs are also 0. This indicates that
both the gNBs are synchronized along with their slot boundaries. We also
highlight that this is not the case in the current develop branch since
the slot boundaries are not aligned.

We also can test the multi gNB synchronization by introducing delays
using telnet as follows,

Introduce new_offset (delay) of 4 samples to the gNB 0 from UE in the
uplink as follows,

    openairinterface5g$ echo rfsimu setdistance rfsimu_channel_enB0 20 | ncat --idle 1 127.0.0.80 9080
    softmodem_gnb> rfsimu_setdistance_cmd: new_offset 4, new (exact) distance 19.518 m, new delay 0.000065 ms
    Ncat: Idle timeout expired (1000 ms).

We can oberve this delay of 4 samples being reflected in the estimated
SRS ToAs at gNB 0 while not changing the ToA in gNB 1

    [NR_PHY] SRS estimatd ToA 4 [RX ant 0]: TA offset 31, TA offset ns 65 (max_val 98803636, mean_val 79430, max_idx 8)

similarly, Introduce new_offset (delay) of 2 samples to the gNB 1 from
UE in the uplink as follows,

    openairinterface5g$ echo rfsimu setdistance rfsimu_channel_enB0 10 | ncat --idle 1 127.0.0.81 9081
    softmodem_gnb> rfsimu_setdistance_cmd: new_offset 2, new (exact) distance 9.759 m, new delay 0.000033 ms
    Ncat: Idle timeout expired (1000 ms).

We can oberve this delay of 2 samples being reflected in the estimated
SRS ToAs at gNB 1 while not changing the ToA in gNB 0

    [NR_PHY] SRS estimatd ToA 2 [RX ant 0]: TA offset 31, TA offset ns 32 (max_val 98962768, mean_val 79552, max_idx 4)

Closes #897

[1] https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3892
2026-02-26 08:42:47 +01:00
Robert Schmidt
6715464b3a Merge remote-tracking branch 'origin/band_number_improv' into integration_2026_w09 (!3943)
Remove L1 dependence from NR band number

L1 band information relied on get_band function that couldn't provide an
unambiguous result. Also there is no SCF compliant parameter for L1 and
generally we don't really need that information in L1.

The MR also remove a RU section that used nr_band but was never really
accessed in NR.
2026-02-26 08:42:16 +01:00
Robert Schmidt
d81bda5760 Merge remote-tracking branch 'origin/NR_more_than_4_antennas' into integration_2026_w09 (!3871)
Support for up to 12 ports in NR gNB
2026-02-26 08:41:16 +01:00
Robert Schmidt
d3f851127e Merge remote-tracking branch 'origin/fix_config_request_beta_pss_tlv' into integration_2026_w09 (!3947)
Add missing packing for CONFIG.request parameter BetaPSS

Adds the packing procedure for the parameter BetaPSS, as well as adding this
parameter to the utility functions where it is missing
2026-02-26 08:40:49 +01:00
Robert Schmidt
6dc7c4fe60 Merge remote-tracking branch 'mahmoudb/telnet-IPV6-support' into integration_2026_w09 (!3940)
IPV6 support for telnet socket binding

Now, the listening telnet socket is only bound to the dedicated interface IPs in
config file, both for V4 and V6

Closes #834
2026-02-26 08:40:19 +01:00
Jaroslava Fiedlerova
cde53141be Merge remote-tracking branch 'origin/fix-handling-ipv4v6-pdu-sess' into integration_2026_w09 (!3951)
Fix handling of IPv4v6 PDU sessions

The code previously checked that the supplied PDU sessions's type is
exactly what we requested. However, at least OAI 5GC will only give us
an IPv4 PDU session if we request IPv4v6 (so the check would fail).

Extend the validation to either check exact match, or, if IPv4v6
requested, that it is either IPv4 or IPv6.
2026-02-25 18:50:33 +01:00
francescomani
2bd3685d6b add check for input number of antennas to be compliant with NB_ANTENNAS_TX and NB_ANTENNAS_RX 2026-02-25 16:26:21 +01:00
Robert Schmidt
cdfe069c34 Remove unused cmake macros 2026-02-25 16:26:21 +01:00
Robert Schmidt
bb72c4d057 Fix alignment problem in nr_dlsim
Fix error

    openair1/SIMULATION/NR_PHY/dlsim.c:1057:37: runtime error: member access within misaligned address 0x7f8a67e01010 for type 'struct NR_Sched_Rsp_t', which requires 32 byte alignment
2026-02-25 16:26:21 +01:00
Robert Schmidt
1b619bed03 Remove unused sched_response_id 2026-02-25 16:26:21 +01:00
Robert Schmidt
5b9d4550ba Remove unused defines 2026-02-25 16:26:21 +01:00
Robert Schmidt
0ea119ec39 Align t_nrPolar_params allocation to 32 bytes 2026-02-25 16:26:21 +01:00
Robert Schmidt
448f273248 Write NB_ANTENNAS_RX/TX to header file and use in stack
Prior to this commit, constants NB_ANTENNAS_RX/TX are provided on the
command line to each compiler invocation. This has the drawback (1) that
also files that don't need that get the constants, and (2) it is not
easy to find them using ctags or similar, as the only definition is in
CMakeLists.txt (where it is not found).

In this commit, use cmake configure_file() to write a header file with
these constants. The file will be generated during cmake invocation, and
written to <build-dir>/common/cmake_defs.h. The relevant files that
need this definition will pick it from the header.

This has been used previously also in a commit to write git information.

See-also: 8bffd1666d ("Avoid complete rebuild on cmake run with git info change")
2026-02-25 16:26:21 +01:00
francescomani
0a79dce24b configuration of PUCCH2 PRB number depending on antenna ports 2026-02-25 16:26:07 +01:00
Behrad Mahmoudi
7f8e0b2cd5 Now, the listening telnet socket is only bound to the dedicated interface IPs in config file, both for V4 and V6 2026-02-25 14:53:32 +01:00
francescomani
862f84bb68 remove band from frame parameters and get_band function not used anymore 2026-02-25 14:32:03 +01:00
francescomani
3c2853e1c0 remove RU functios gated by has_ctrl_prt parameter never set in NR code 2026-02-25 14:32:03 +01:00
francescomani
8180a5db03 remove L1 nr_band dependence in frame parameters 2026-02-25 14:31:58 +01:00
Jaroslava Fiedlerova
68ecf9f860 Merge remote-tracking branch 'origin/aerial-targets-config' into integration_2026_w09 (!3897)
Change Aerial config file in targets to match Nvidia's CI setup and modify tutorial
2026-02-25 14:12:13 +01:00
francescomani
5ed309166b use FAPI field to set SSB case from upper layers 2026-02-25 12:43:10 +01:00
Rúben Soares Silva
f66a7b2108 Add SSB Case V3 vendor extension TLV to CONFIG.request pack/unpack and to utility functions 2026-02-25 12:43:10 +01:00
Robert Schmidt
0219e4d3c7 Remove band number from openair0_config_t 2026-02-25 12:43:10 +01:00
francescomani
530b692208 simplified version of to_nrarfcn function to remove not necessary checks for band consistency 2026-02-25 12:43:07 +01:00
Guido Casati
3f4b72df67 Handle duplicate PDU sessions in NGAP InitialContextSetup
Ensure the CU-CP only sets up PDU sessions that are not already
established for the UE, skipping duplicates while keeping the NG UE
context valid. This aligns with 3GPP TS 38.413 PDU Session setup
semantics for duplicate session IDs

Changes:
- Change rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ to scan requested
  PDU sessions and detect IDs that already exist in UE->pduSessions with
  PDU_SESSION_STATUS_ESTABLISHED
- Log a warning and skip already established PDU session IDs so they are
  not added to UE->initial_pdus
- Collect only non-established PDU sessions into a temporary stack array,
  allocate UE->initial_pdus with the exact count, copy them in, update
  UE->n_initial_pdu, and only refresh UE AMBR when there is at least one
  session to set up
2026-02-25 09:50:27 +01:00
Rakesh Mundlamuri
af438ef5e5 Handover doc: mention ssb_PositionsInBurst_Bitmap config 2026-02-25 08:58:33 +01:00
Robert Schmidt
4e9a853696 Fix ssb_PositionsInBurst_Bitmap to work with slot-synchronization
Since the grand-parent commit, if possible, the gNBs synchronize on a
slot-level boundary. Some configuration files/command line overrides
left the same SSB position for two DUs in RFsim-based handover
scenarios, which then makes that the UE cannot decode the SSB.

This commit changes the positions such that this is possible again. In
the F1 HO docker-compose
(ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml), we set it
to 2 to send only one SSB (not 2 with bitmap 3).
2026-02-25 07:58:57 +01:00
Guido Casati
dae251ddcb Fix DRB array offset when aggregating E1 DRBs
Ensure DRBs from multiple PDU sessions are appended into the F1 DRB array
without overwriting previously filled entries.

Update fill_drb_to_be_setup_from_e1_resp to call fill_f1_drbs_from_e1
with &drbs[nb_drb] so each PDU session’s DRBs are written after the
current count
2026-02-24 12:55:24 +01:00
Jaroslava Fiedlerova
800b238492 Merge remote-tracking branch 'origin/fix-ueconf-nssaisd' into integration_2026_w09 (!3949)
fix: removed the nssai_sd parameter in the ue.conf file

Following the tutorial in the RF simulator, the PDU session cannot
be established because the  Slice Differentiator to request(nssai_sd)
parameter in the ue.conf file is 1(integer) but in the documentation
the default value of the nssai_sd is 0xFFFFF(meaning "no SD")

Now the nssai_sd parameter is removed in the ue.conf to establish the
PDU session.
2026-02-24 10:44:56 +01:00
Jaroslava Fiedlerova
71041877fd Merge remote-tracking branch 'origin/nrue_write_timestamp_fix' into integration_2026_w09 (!3928)
NR UE: correctly compute writeTimestamp for SCS > 30 kHz with rf-simulator

Contains also two minor cleanups for nr-ue.c:
- make fp point to constant NR_DL_FRAME_PARMS where possible
- use c16_t type for I/Q sample arrays
2026-02-24 10:43:58 +01:00
Jaroslava Fiedlerova
b8ac4869c5 Merge remote-tracking branch 'origin/fix-rsrp-range' into integration_2026_w09 (!3874)
print better message for rsrp: invalid doesn't mean it is not measured

print better message for rsrp: invalid doesn't mean it is not measured,
it means it is out of usable range
2026-02-24 10:40:55 +01:00
Jaroslava Fiedlerova
a628cd9602 Merge remote-tracking branch 'origin/fix-ue-ho-msg1fdm' into integration_2026_w09 (!3822)
NR UE: fix PRACH k1 calculation at MAC when handover

The k1 for PRACH calculation in config_common_ue() should be the same as in
config_common_ue_sa(), otherwise k1 is wrong when handover to target cell if
msg1-FDM not 0 in reconfigurationWithSync.

Verified with 3rd-party gNB.
2026-02-24 10:39:51 +01:00
Robert Schmidt
933984fab1 Fix handling of IPv4v6 PDU sessions
The code previously checked that the supplied PDU sessions's type is
exactly what we requested. However, at least OAI 5GC will only give us
an IPv4 PDU session if we request IPv4v6 (so the check would fail).

Extend the validation to either check exact match, or, if IPv4v6
requested, that it is either IPv4 or IPv6.
2026-02-24 08:37:36 +01:00
Robert Schmidt
90bf723eae nr-uesoftmodem: end with Bye.
Similarly to gNB, eNB, lteUE, end with a "Bye." that the CI (will) check
for.

The right way to do this would be to use the exit code, but most
executables do not actually end with 0, such that we need to check for
this. Thus, this commit is only to harmonize with other executables.
2026-02-24 08:24:02 +01:00
aswanthkc
ac9232d6fc fix: updated the nssai_sd paramter in the ue.conf file
Following the tutorial in the RF simulator, the PDU session cannot
be established because the  Slice Differentiator to request(nssai_sd)
parameter in the ue.conf file is 1(integer) but in the documentation
the default value of the nssai_sd is 0xFFFFF(meaning "no SD")

Now the nssai_sd parameter is removed in the ue.conf to establish the
PDU session.
2026-02-23 10:36:52 -05:00
Shubhika Garg
0a9c3a07eb ci: Pull ubuntu:noble image from our internal docker registry to build ubuntu images
- This is to overcome the issue of pull rate limits from DockerHub
        - Make Ubuntu base image configurable via build-arg
2026-02-23 16:34:06 +01:00
Nika Ghaderi
5fb9a9c665 Integrate CUDA Channel Pipeline into DL Simulator
This commit integrates the CUDA-based channel simulation pipeline into
the nr_dlsim.

A new `--cuda` command-line flag is added to enable the GPU path at
runtime. When activated, the simulator will:
- Allocate all necessary GPU and pinned host memory via the new
  `init_cuda_chsim_buffers` helper function.
- In the main simulation loop, call the `run_channel_pipeline_cuda`
  function to perform the channel simulation on the GPU, bypassing the
  CPU-based functions.
- Clean up all CUDA resources on exit using the
  `free_cuda_chsim_buffers` helper.
Additionally, dlsim is now using the float version of channel_multipath and add_noise functions.
Also, The input data is formatted as interleaved IQ, with separate antennas to ensure a fair comparison with the GPU operation.
2026-02-23 13:14:26 +00:00
Laurent THOMAS
59aed14153 print better message for rsrp: invalid doesn't mean it is not measures, it means it is out of usable range 2026-02-23 13:00:09 +01:00
Laurent THOMAS
66efe92551 separate report list from each report as a table of struct instead of a struct of tables 2026-02-23 13:00:09 +01:00
Jaroslava Fiedlerova
b5634c6615 Merge remote-tracking branch 'origin/NR_fix_ndi_reset' into integration_2026_w09 (!3945)
gNB: Reset NDI only after usage in case of disable HARQ

Solves this warnings seen in the UE trace:
NDI indicates re-transmission but computed TBS 3968 doesn't match with what previously stored 3368

Issue happens only if feature disable_harq is enabled. GNB resets the harq
process (including NDI) as PUCCH will not be sent for this harq process, but
before the harq process is used in DCI payload preparation.

Fix is to reset the harq process after harq process in case of no PUCCH.
2026-02-23 10:19:53 +01:00
Jaroslava Fiedlerova
10ac7a2711 Merge remote-tracking branch 'origin/fail-early-no-config' into integration_2026_w09 (!3944)
Fail early if configuration module can not initialize properly

In the case that the config module cannot load the driver for libconfig or yaml,
currently, there might be a cascade of errors that are difficult for users to
understand. For instance (partially redacted for clarity):

[CONFIG] Error calling dlopen(libparams_libconfig.so): libparams_libconfig.so: cannot open shared object file: No such file or directory
[CONFIG] config module "libconfig" couldn't be loaded
[CONFIG] config_get, section log_config skipped, config module not properly initialized
[LOG] init aborted, configuration couldn't be performed
[CONFIG] config_get, section (null) skipped, config module not properly initialized
[CONFIG] /home/francesco/openairinterface5g/common/config/config_userapi.c 68 nfapi has no processed integer availablle
[CONFIG] config_get, section (null) skipped, config module not properly initialized

Assertion (get_softmodem_params()->default_pdu_session_id == -1) failed!
In get_common_options() /home/francesco/openairinterface5g/executables/softmodem-common.c:161
Use uicc0.pdu_sessions.[0].id to change the requested PDU session ID (is 0)

Here, the error is the missing shared object, but a user is more likely to look
at the last error instead of the first.

This commit addresses it by checking early for CONFIG_ISFLAGSET(CONFIG_ABORT),
and stopping if it is set. Additionally changes include making functions static,
removing late CONFIG_ISFLAGSET() checks, and the CONFIG_ISFLAGSET() in
load_configmodule(), because at that time "uniqCfg" is not set yet and thus does
not do anything (this is likely a regression of an earlier cleanup).

See-also: f50d5f5a ("make multiple config instead of one implicit global")
2026-02-23 10:17:01 +01:00
Rúben Soares Silva
46d4659706 Add missing packing for CONFIG.request parameter BetaPSS
Adds the packing procedure for the parameter BetaPSS, as well as adding this parameter to the utility functions where it is missing
2026-02-20 13:29:57 +00:00
francescomani
db2bcf0eee preventing include of log.h in nr_common.h by moving function in nr_common.c 2026-02-20 11:05:43 +01:00
francescomani
7a59f28ae3 RRC CSI-RS config for 8 and 12 ports 2026-02-20 11:05:43 +01:00
francescomani
b53f4a6e37 using constants for FAPI precoding weigths instead of hardcoded values 2026-02-20 11:05:43 +01:00
Thomas Schlichter
f7265977ad NR UE: when compensating for large timing_advance changes, set writeBlockSize to 0 instead of 1 2026-02-20 09:59:54 +01:00
Thomas Schlichter
ba0ead6809 NR UE: correctly compute the writeBlockSize in readFrame() and the writeTimestamp in syncInFrame() 2026-02-20 09:59:54 +01:00
Thomas Schlichter
09b3fc03c7 NR UE: make RX and TX pointer arrays of type c16_t instead of void in nr-ue.c 2026-02-20 09:52:42 +01:00
Thomas Schlichter
1707aafc2c NR UE: make fp pointer to a _constant_ NR_DL_FRAME_PARMS in nr-ue.c 2026-02-20 09:52:42 +01:00
Rakesh Mundlamuri
5e0e359dd6 Update PRS configuration files to test multi gNB synchronization 2026-02-20 13:27:26 +05:30
Rakesh Mundlamuri
b1f32ea049 Synchronize multiple gNBs by aliging to the slot boundary
Currently, we derive frame and slot number based on `proc->timestamp_rx`
using
`proc->frame_rx    = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;` and
`proc->tti_rx = get_slot_from_timestamp(proc->timestamp_rx, fp);`

This ignores the samples `proc->timestamp_rx % fp->samples_per_frame`
while computing the frame and slot number creating a mis-alignment with the slot boundaries.
We fix this alignment by compensating these samples during the first reception.
2026-02-20 13:27:26 +05:30
Robert Schmidt
520360a629 Merge branch 'integration_2026_w08' into 'develop'
Integration: `2026.w08`

* !3934 Fix Ubuntu build: reinstate -Werror
* !3803 remove cblas and atlas dependancy
* !3918 Add a simple GTP unit test
* !3924 T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)
* !3925 Fix race condition on double RA during RRC reestablishment
* !3930 bugfix: add PCell to serving_cells in fallback path and refactor update logic
* !3936 [FHI72] Remove support for xran E release
* !3893 NR Paging on CU

See merge request oai/openairinterface5g!3939
2026-02-20 06:46:39 +00:00
Raghavendra Dinavahi
e129fd0ede GNB: RESET NDI only after usage in case of disable HARQ
solves this warnings seen in the trace
NDI indicates re-transmission but computed TBS 3968 doesn't match with what previously stored 3368
2026-02-19 19:37:54 +01:00
Robert Schmidt
82315ead3e Fail early if configuration module can not initialize properly
In the case that the config module cannot load the driver for libconfig
or yaml, currently, there might be a cascade of errors that are
difficult for users to understand. For instance (partially redacted for
clarity):

    [CONFIG] Error calling dlopen(libparams_libconfig.so): libparams_libconfig.so: cannot open shared object file: No such file or directory
    [CONFIG] config module "libconfig" couldn't be loaded
    [CONFIG] config_get, section log_config skipped, config module not properly initialized
    [LOG] init aborted, configuration couldn't be performed
    [CONFIG] config_get, section (null) skipped, config module not properly initialized
    [CONFIG] /home/francesco/openairinterface5g/common/config/config_userapi.c 68 nfapi has no processed integer availablle
    [CONFIG] config_get, section (null) skipped, config module not properly initialized

    Assertion (get_softmodem_params()->default_pdu_session_id == -1) failed!
    In get_common_options() /home/francesco/openairinterface5g/executables/softmodem-common.c:161
    Use uicc0.pdu_sessions.[0].id to change the requested PDU session ID (is 0)

Here, the error is the missing shared object, but a user is more likely
to look at the last error instead of the first.

This commit addresses it by checking early for
CONFIG_ISFLAGSET(CONFIG_ABORT), and stopping if it is set. Additionally
changes include making functions static, removing late
CONFIG_ISFLAGSET() checks, and the CONFIG_ISFLAGSET() in
load_configmodule(), because at that time "uniqCfg" is not set yet and
thus does not do anything (this is likely a regression of an earlier
cleanup).

See-also: f50d5f5a9b ("make multiple config instead of one implicit
  global")
2026-02-19 17:06:29 +01:00
Robert Schmidt
90c6bbce65 Merge remote-tracking branch 'origin/nr-paging-cu' into integration_2026_w08 (!3893)
NR Paging on CU

Implements the NR paging path on the CU:

- NGAP Paging is decoded and passed to RRC
- RRC builds F1AP Paging, and distributes it to DUs via F1 callback

Changes:

- Refactor and extend F1AP Paging encode/decode libraries
  * add missing enc/dec/eq/cp functions
  * add unit test
  * IEs: CN UE 5G-S-TMSI, RAN UE I-RNTI; optional DRX/priority/origin)
- Refactor CU callback CU_send_Paging
- Refactor DU handler DU_handle_Paging
- Refactor old F1 callback for Paging indication, extend it and align
  with existing F1 callbacks in stack
- Refactor and extend NGAP Paging encode/decode lib
  * add missing enc/dec/eq/cp functions
  * add unit test
  * Fixes NGAP paging to accept Paging only on SCTP stream 0 per TS
    38.412
- Includes supporting refactors (PDU session split, shared 5G-S-TMSI
  helpers, NGAP/F1AP cleanups)

Testing

- NGAP and F1AP Paging lib unit tests (enc/dec)
- Stream-0 fix validated with Open5GS AMF

This MR does not address the DU changes besides the F1 handler. F1AP
Paging does not have an RRC container to pass the PCCH message to the
DU, and F1 DL RRC Message Transfer does not apply to PCCH. PCCH-Message
shall be built at DU per TS 38.331 §5.3.2, with padding as per §8.5 and
delivered as RLC SDU per §8.2. For each cell in Paging Cell List that
belongs to this DU, queue for MAC. MAC schedules at PF/PO per TS 38.304
§7.

Refs:

- F1AP 3GPP TS 38.473 version 16.21.0 Release 16
- NGAP 3GPP TS 38.413 version 16.17.0 Release 16
2026-02-18 16:06:09 +01:00
Jaroslava Fiedlerova
e2f20eea8a Merge remote-tracking branch 'origin/remove-xran-e' into integration_2026_w08 (!3936)
[FHI72] Remove support for xran E release

All the use cases we tested with E release are working end-to-end with F release.
The near future plan is to support K release which is ongoing in the MR !3444.
2026-02-18 15:03:58 +01:00
Robert Schmidt
2b7f3e2f72 Merge remote-tracking branch 'origin/rrc-fix-rrcsetup-fallback' into integration_2026_w08 (!3930)
bugfix: add PCell to serving_cells in fallback path and refactor update logic

Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:

- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path

Fixes CI failure in !3908
2026-02-18 10:44:38 +01:00
Teodora
5a339d66f2 Use the same pattern for checking the existance of F_RELEASE definition
In general, `#ifdef` and `#if defined` are the same.

Note: `#elif` is not the same as `#elif defined`.
2026-02-18 09:46:27 +01:00
Teodora
c68068f144 Remove support for xran E release
All the use cases we tested so far, are supported with xran F release.
Therefore, we can proceed with removing the support with E release.

In addition, our plan is to bring the support for K release which is ongoing activity in
the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3444.
2026-02-18 09:44:08 +01:00
Robert Schmidt
3520eb3c0d Merge remote-tracking branch 'origin/rrc-race-condition' into integration_2026_w08 (!3925)
Fix race condition on double RA during RRC reestablishment

Sometimes, especially in poor channel conditions, a UE can trigger
multiple RA procedures during RRC reestablishment, causing
reconfigCellGroup to be overwritten with a CellGroup that already has
spCellConfig removed, leading to an assertion failure in
update_cellgroup_for_reestablishment(). See logs below

    [NR_MAC]  456.13 UE 991d: Received Ack of Msg4. CBRA procedure succeeded (UE Connected)
    [NR_MAC] Adding new UE context with RNTI 0x991d
    [NR_PHY] [RAPROC] 461.9 Initiating RA procedure with preamble 8, energy 48.0 dB (I0 274, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 461.9 UE RA-RNTI 0081 TC-RNTI ecd8: initiating RA procedure
    [NR_MAC] UE ecd8: Sync beam index 0
    [NR_MAC] UE ecd8: Msg3 scheduled at 462.3 (461.18 TDA 2) start 0 RBs 8
    [NR_MAC] UE ecd8: 461.18 Generating RA-Msg2 DCI, RA RNTI 0x81, state 1, preamble_index(RAPID) 8, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  462. 3 PUSCH with TC_RNTI 0xecd8 received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0xecd8
    [NR_MAC]  462. 3 RA with C-RNTI 991d complete
    [NR_PHY] [RAPROC] 471.19 Initiating RA procedure with preamble 6, energy 51.0 dB (I0 276, thres 130), delay 21 start symbol 2 freq index 0
    [NR_MAC] 471.19 UE RA-RNTI 010d TC-RNTI 022d: initiating RA procedure
    [NR_MAC] UE 022d: Sync beam index 0
    [NR_MAC] UE 022d: Msg3 scheduled at 472.13 (472.8 TDA 2) start 0 RBs 8
    [NR_MAC] UE 022d: 472.8 Generating RA-Msg2 DCI, RA RNTI 0x10d, state 1, preamble_index(RAPID) 6, timing_offset = 21 (estimated distance 820.3 [m])
    [NR_MAC]  472.13 PUSCH with TC_RNTI 0x022d received correctly
    [NR_MAC] Received a MAC CE for C-RNTI with 991d
    [NR_MAC] Remove NR rnti 0x022d
    [NR_MAC]  472.13 RA with C-RNTI 991d complete
    [NR_RRC] [UL] (cellID 1, UE ID 1 RNTI 991d) Received RRCReestablishmentComplete
    [NR_RRC] UE 1 Processing NR_RRCReestablishmentComplete from UE
    [NR_MAC] UE 991d: gNB-DU Configuration Query received, will include CellGroupConfig in response

    Assertion (new_CellGroup->spCellConfig) failed!
    In update_cellgroup_for_reestablishment() /phy/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:666

This MR solves it by skipping the reconfigCellGroup overwrite when it
already holds a valid config with spCellConfig, and by replacing the
fatal assertion on missing spCellConfig with an early return.
2026-02-17 18:16:27 +01:00
Robert Schmidt
a264937825 Merge remote-tracking branch 'origin/T-macpdu-fix' into integration_2026_w08 (!3924)
T: macpdu2wireshark: gentle exit (and some other minor work in the T tracer)

When outputting to a file, typing ctrl+c exits the program without
calling fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().

Also include a small fix for compilation of _check_vcd, some work on
extract and hacks/plot-ofdm, minor stuff.
2026-02-17 18:10:59 +01:00
Robert Schmidt
8abb535481 Merge remote-tracking branch 'origin/gtp-unit-test' into integration_2026_w08 (!3918)
Add a simple GTP unit test

Add a simple unit test for GTP that as of now tests the main
functionality, i.e., for a single UE, set up a bearer between two
endpoints and checking that traffic sending works. This is a start to
extend it further, e.g., with API changes, extensions to support new
functionality such as IPv6, and refactorings.

A number of supporting cleanup has been done as well.
2026-02-17 18:10:04 +01:00
Robert Schmidt
3671a47a7d Merge remote-tracking branch 'origin/remove-blas-atlas-dep' into integration_2026_w08 (!3803)
remove cblas and atlas dependancy

With new Fedora, we have again the cblas.h place not working

cblas+atlas dependancy is annoying for years

i start this MR to remove this dependancy

first commit: only cleaning: remove dead code, make static functions,
simplify code

after this commit, we see we use blas only in: conjugate_transpose()
that is a quite trivial function H_hermH_plus_sigma2I() a bit more
complex, but still possible to recode mutl_matrix_matrix_col_based() i
think we have the same elsewhere in OAI

atlas is used only in: lin_eq_solver() in don't know if replacement is
hard

We can observe all is related to MMSE, that is also coded in OAI 5G, so
maybe the solution is to use 5G code in 4G

Since nothing seems to be used, we can remove it.
2026-02-17 18:09:09 +01:00
alexjiao
9e7822cf1c NR UE: fix PRACH k1 calculation at MAC when handover
The k1 for PRACH calculation in config_common_ue() should be the same as in config_common_ue_sa(),
otherwise k1 is wrong when handover to target cell if msg1-FDM not 0 in reconfigurationWithSync.
2026-02-17 17:46:18 +01:00
Robert Schmidt
2a925d6cd4 GTP: add second test for tunnels without QFI 2026-02-17 13:56:07 +01:00
Robert Schmidt
d6c7321077 Implement removal of endpoint
For unit testing, allow to remove endpoints such that we could reuse a
port/IP combination.

The function does not take care of endpoints that are still "dangling",
it is the user's responsibility to remove all existing TEIDs.
2026-02-17 13:52:32 +01:00
Robert Schmidt
d290850e59 Add basic GTP unit test
Add a simple unit test that tests sending unidirectional traffic. So
far, it merely replicates what is already in nr-cuup-load-test, but it's
a single executable (so easier to handle), and could be more easily
extended to further tests (e.g., IPv6).

A couple of ideas for refactoring/improvements have been added in
comments in the test.
2026-02-17 13:52:32 +01:00
Guido Casati
df11c946f9 Paging (NGAP): fix stream handling to comply with TS 38.412
Paging messages are classified as non-UE-associated signalling per
3GPP TS 38.412 clause 7 (TL), which requires them to be sent on
stream 0 (or a reserved stream pair).

Paging message is received when UE is in RRC_IDLE or RRC_INACTIVE
state, as the RAN has no active UE context and paging targets the
UE by 5G-S-TMSI rather than RAN-UE-NGAP-ID.

The previous implementation incorrectly rejected paging messages
received on stream 0, causing paging failures when using Open5GS AMF.

Changes:
- Accept paging on stream 0 (non-UE-associated signalling)
- Reject paging on non-zero streams (UE-associated streams)
- Add documentation
2026-02-17 12:25:58 +01:00
Guido Casati
8209dcb5d9 Paging (RRC): refactor NGAP Paging handler in CUCP
RRC now builds F1AP paging messages directly by calling F1AP/direct
callbacks and aligning the CU/DU intergace with the F1AP design in the CU.
Messages are forwarded based on TAI-based cell matching across DUs.

- Remove F1AP_PAGING_IND message def and f1ap_paging_ind_t.
  RRC no longer sends ITTI F1AP_PAGING_IND; it builds f1ap_paging_t
  and passes it to the DU path.

- rrc_gNB_process_PAGING_IND: new signature (rrc, instance, msg)
  with const where appropriate; call in rrc_gnb_task() updated.

- NGAP handler logic: For each TAI, match (PLMN + TAC) to
  rrc->configuration; collect matching TAIs. Build one f1ap_paging_t
  (5G-S-TMSI via nr_construct_5g_s_tmsi(), identity type
  F1AP_PAGING_IDENTITY_CN_UE, optional drx/priority/origin copied
  from ngap_paging_ind_t), call rrc_send_paging_to_dus(), then
  free_f1ap_paging(). Remove the previous AssertFatal stub, CC loop,
  NODE_IS_CU branch, and UE lookup logic: it is now handled by
  F1AP/direct CU callbacks.

- rrc_gNB_du: Add rrc_send_paging_to_dus(rrc, tais, n_tai, msg).
  Iterate DUs with RB_FOREACH; for each DU, fill msg->cells from
  du->cells whose (PLMN + TAC) matches any requested TAI, set
  n_cells, then call rrc->mac_rrc.paging_transfer(du->assoc_id,
  msg). Skip DUs with no matching cells. Prevents duplicate paging
  when multiple TAIs map to the same PLMN.
2026-02-17 12:25:58 +01:00
Guido Casati
6022ac8bf1 Paging (F1AP): wire paging through mac_rrc_dl and use F1AP free/decoding lib on CU/DU
Introduce paging_transfer in the mac_rrc_dl interface so the CU can pass
paging to the DU (F1 or direct). Use the F1AP paging lib on both CU and DU
for decode/free and to avoid leaking the message after send.

- Add f1_paging_transfer_func_t and paging_transfer to nr_mac_rrc_dl_if_s
  (mac_rrc_dl.h, nr_rrc_defs.h).
- F1AP path: paging_f1ap() allocates F1AP_PAGING, copies with cp_f1ap_paging(),
  sends via ITTI to TASK_CU_F1. Direct path: f1_paging_transfer_direct() stub
- CU task: call free_f1ap_paging() after CU_send_Paging() to release the message.
- DU: DU_handle_Paging() uses decode_f1ap_paging()/free_f1ap_paging() from lib,
  returns on decode failure; remove inline ASN.1 IE parsing.
- cleanup outdated header comments in header files
- Left a TODO not in DU code to build PCCH (in F1 and direct paths)
2026-02-17 12:25:58 +01:00
Guido Casati
cf7879f038 Paging (F1AP): refactor CU_send_Paging() to use PAGING message
- Add F1AP_PAGING message type and macro; F1AP defines Paging, not
  Paging Indication. CU task now handles F1AP_PAGING instead of
  F1AP_PAGING_IND.
- In CU_send_Paging(): take const f1ap_paging_t *; replace inline
  ASN.1 encoding with encode_f1ap_paging(); refine memory management;
  clean up in the process

Note: F1AP_PAGING_IND definitions left in place and still used in the
RRC callback - to be removed in a follow-up commit.
2026-02-17 12:25:58 +01:00
Guido Casati
08f0f9369c Paging (F1AP): add F1 paging library (9.2.6.1 3GPP TS 38.473)
Add F1AP Paging library and new message type to follow the existing F1AP
library pattern and to support multi-cell paging and both RAN UE (I-RNTI)
and CN UE (5G-S-TMSI) paging identities at the library level per TS 38.473.

* New library (f1ap_paging.c/h, f1ap_lib_includes.h, CMakeLists.txt)
  - Implement encode/decode/copy/eq/free for F1AP Paging (procedure 9.2.6).
  - Add ASN.1 includes for Paging, PagingIdentity, CN/RAN UE identities.
  - Enables unit testing of Paging enc/dec in f1ap_lib_test.c.

* New types in f1ap_messages_types.h (existing f1ap_paging_ind_t unchanged)
  - f1ap_paging_t: UE Identity Index, paging identity (union + type enum),
    optional paging_drx, paging_priority, paging_origin, and paging_cells[].
  - f1ap_paging_cell_item_t, f1ap_paging_identity_type_t, f1ap_paging_identity_t
    for multi-cell list and RAN/CN identity discrimination.
  - Paging Origin IE is optional per F1AP 8.7.1.2.

Tests: test_f1ap_paging() roundtrip and copy for CN UE (5G-S-TMSI) and
RAN UE (I-RNTI) cases, with optional IEs.
2026-02-17 12:25:58 +01:00
Guido Casati
b026e6b4ee Paging (NGAP): add paging encode/decode library and unit tests (3GPP TS 38.413)
- Refactor ngap_paging_ind_t (openair2/COMMON/ngap_messages_types.h):
  - optional paging_drx and paging_priority as pointers
  - TAI list as tai_list[] and n_tai
  - add optional IEs: Paging Origin, Paging Attempt Information,
    UE Radio Capability for Paging.
  - Introduce nr_tai_t, ngap_paging_attempt_info_t, ngap_paging_origin_t;
  - generate paging enums via FOREACH macros.
- Add NGAP Paging encode/decode/eq/free in openair3/NGAP/ngap_gNB_paging.c
  (encode_ng_paging, decode_ng_paging, eq_ng_paging, free_ng_paging).
- Replace inline Paging decode in ngap_gNB_handle_paging() with
  decode_ng_paging() and add error handling; add eq_ngap_plmn() in
  ngap_common.
- Update rrc_gNB_NGAP.c to use tai_list/n_tai and optional paging_drx
  when forwarding paging to F1AP.
- Add ASN.1 includes for Paging in ngap_msg_includes.h; register
  ngap_gNB_paging.c in root CMakeLists.txt.
- Add NGAP unit test (openair3/NGAP/tests/ngap_lib_test.c): encode/decode
  roundtrip for Paging; tests subdirectory and executable under
  ENABLE_TESTS in openair3/NGAP/CMakeLists.txt.
2026-02-17 12:25:58 +01:00
Guido Casati
41942c96d2 Refactor (NGAP): split out NGAP utilities from common lib
ngap_common.h is for common IEs enc/dec functions, utilities
should go into a separate file. Changes in this commit:

* Add ngap_utils.h (utilities)
* Move helper macros (NGAP_ERROR, NGAP_DEBUG, NGAP_FIND_PROTOCOLIE_BY_ID, etc.) to ngap_utils.h
* Move equality check macros (_NGAP_EQ_CHECK_*) to ngap_utils.h
* Clean up includes

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
c436f05ea9 Refactor (NGAP): adopt TO_ENUM/TO_TEXT pattern for NGAP enums
TO_ENUM/TO_TEXT are already used in NAS, and can be adopted in NGAP.
To avoid duplication, the following changes are introduced:

* Move text_info_t, TO_ENUM, TO_TEXT to common/utils/utils.h
* Include utils.h include to ngap_messages_types.h, fgs_nas_utils.h, and fgmm_lib.h
* RRC establishment cause: refactor to FOREACH_RRC_ESTABLISHMENT_CAUSE macro
* Cause Group: refactor to FOREACH_CAUSE_GROUP macro
* Radio Network Cause: refactor to FOREACH_CAUSE_RADIO_NETWORK macro
* Protocol Cause: refactor to FOREACH_CAUSE_PROTOCOL macro

This change is preparatory to the introduction the paging lib with unit
tests, with the goal of reducing the inter-dependency between concurrent
NGAP libs.
2026-02-17 12:25:58 +01:00
Guido Casati
3dc8647a58 Refactor (NGAP): add conversion functions to ngap_common.c
These conversion functions will be needed across different
NGAP libraries upon refactoring: tnl_to_bitstring, bitstring_to_tnl
Therefore, they are moved to the common lib.
2026-02-17 12:25:58 +01:00
Guido Casati
e062f40137 Refactor (NGAP): extract PDU session management procedures to dedicated library
PDU session related NGAP messages do not belong to NAS procedures lib.

* Create ngap_gNB_pdu_session_management.c and .h
* Move out ngap_gNB_pdusession_setup_resp, ngap_gNB_pdusession_modify_resp,
  ngap_gNB_pdusession_release_resp from ngap_gNB_nas_procedures.c
* Move encode_ngap_pdusession_setup_response_transfer to ngap_common.c:
  this transfer IE is common used both in PDU Session Management and
  Initial Context Setup, so it's moved to the common lib
* Add ngap_gNB_pdu_session_management.c to CMakeLists.txt
2026-02-17 12:25:58 +01:00
Guido Casati
563a0cfa61 Refactor: unify equality-check macros across protocol libs
This commit centralizes equality-check behavior and removes duplicated
macro implementations across protocol stacks.

Major changes:
- add `common/utils/eq_check.h` with shared `_EQ_CHECK_*`,
  `EQ_CHECK_GENERIC`, and optional-IE pointer helpers
- replace E1AP/F1AP/NAS local equality macros and call sites with
  the shared helpers
- remove duplicated layer-specific error/equality macro definitions from
  common headers and switch includes to `eq_check.h`
- update CMake test flags to define `ENABLE_TESTS` for `e1ap_lib`,
  and 5GS NAS libraries; drop `E1AP_LOG_ERRORS` - equality-check/error
  printing is now consistently controlled by `ENABLE_TESTS`
2026-02-17 12:25:58 +01:00
Guido Casati
f295252b2e Refactor 5G-S-TMSI: harmonize 5G-S-TMSI handling with centralized helpers
Centralizes 5G-S-TMSI bit manipulation logic for consistency and
maintainability. All manual bit operations replaced with documented
helper functions following TS 23.003 bit layout specification.

- Add helper functions for 5G-S-TMSI operations:

  * nr_construct_5g_s_tmsi_part1: 5G-S-TMSI construction is defined
    in 3GPP TS 23.003 and relevant at both gNB and UE side
    * Add helper functions to be later used in NG Paging
    * Adopt in NAS UE
  * nr_extract_5g_s_tmsi_part1() - extract Part1 (39 bits) from full
  * nr_extract_5g_s_tmsi_part2() - extract Part2 (9 bits) from full
  * nr_build_full_5g_s_tmsi() - reconstruct full from Part1+Part2
  * nr_deconstruct_5g_s_tmsi() - deconstruct into components
- Refactor manual bit manipulation to use helper functions:
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part1() in RRCSetupRequest
  * asn1_msg.c: use nr_extract_5g_s_tmsi_part2() in RRCSetupComplete
  * rrc_gNB.c: use nr_build_full_5g_s_tmsi() when reconstructing from parts
  * rrc_gNB.c: use nr_deconstruct_5g_s_tmsi() when extracting components
- Optimize nr_construct_5g_s_tmsi_part1() to reuse extract function
2026-02-17 12:25:58 +01:00
Guido Casati
3c164ef138 Minor (NGAP): clarify ngap_register_gnb_req_t actually refers to NG SETUP REQUEST
There is no such thing as NG Register message, the naming is
inaccurate, however the goal of this commit is only to clarify that
and major refactoring is not yet carried out.
2026-02-17 12:25:58 +01:00
Guido Casati
b27833fbd2 Cleanup (NGAP): remove unused message definitions
* NGAP_PATH_SWITCH_REQ_LOG, NGAP_PATH_SWITCH_REQ_ACK_LOG
* NGAP_UE_CTXT_MODIFICATION_RESP, NGAP_UE_CTXT_MODIFICATION_FAIL, NGAP_UE_CTXT_MODIFICATION_REQ
2026-02-17 12:25:58 +01:00
Guido Casati
2da094dd66 Cleanup (NGAP): remove NR_HandoverPreparationInformation.h from NGAP includes
this is not an NGAP header and does not belong to ngap_msg_includes.h
2026-02-17 12:25:58 +01:00
Guido Casati
372f121cf6 Refactor (RRC): extract rrc_update_ue_pcell() to public API and adopt consistently
Move rrc_update_ue_pcell() from static function in rrc_gNB.c to public
function in rrc_cell_management.c, making it reusable across RRC code
paths. Replace duplicate PCell addition logic in handover paths
(intra-CU and inter-CU) and RRCSetup path with calls to this shared
function.

This eliminates code duplication between handover and RRCSetup paths,
centralizes PCell update logic (including cleanup of old PCell's DU
serving cells) in a single reusable function and makes the function
available for future use in other RRC procedures
2026-02-17 11:36:25 +01:00
Guido Casati
f247a6cc2e fix(RRC): add PCell to serving_cells in fallback path and refactor update logic
Fix assertion failure in rrc_gNB_send_NGAP_NAS_FIRST_REQ() when RRC
Reestablishment falls back to RRC Setup. The fallback path was not
adding the PCell to the UE's serving_cells array, causing
rrc_get_pcell_for_ue() to return NULL.

Major changes:
- Add rrc_update_ue_pcell() helper function that handles PCell updates
  for both new UEs (fallback) and existing UEs (normal reestablishment)
- Refactor normal reestablishment path to use rrc_update_ue_pcell()
  helper instead of manual cleanup + add sequence
- Add PCell update to fallback_rrc_setup path using the same helper
- Move C-RNTI validation after current_cell fetch to ensure current_cell
  is initialized before fallback_rrc_setup label
- Change error handling: return instead of fallback when PCell add fails
  in normal reestablishment path
2026-02-17 11:36:25 +01:00
Cedric Roux
c1f41caa8d T: hacks: plot-ofdm: handle more skipped samples 2026-02-17 11:18:37 +01:00
Cedric Roux
61bdee3e61 T: extract: extract all traces by default 2026-02-17 11:18:37 +01:00
Cedric Roux
0c4655448f T: minor: fix compilation of _check_vcd
"make _check_vcd" was failing.
2026-02-17 11:18:37 +01:00
Cedric Roux
7e74d4c43e T: macpdu2wireshark: gentle exit
When outputting to a file, typing ctrl+c exits the program without calling
fclose(), leading to loss of traces in the output file.

Let's intercept ctrl+c and exit gently, calling fclose().
2026-02-17 11:18:37 +01:00
Teodora
dcfd16bd83 Remove useless definitions for E&F releases in _BySymbol() functions
Those functions are already encapsulated in #ifdef F_RELEASE condition.
2026-02-17 09:58:24 +01:00
Robert Schmidt
8925654c07 Remove unused 4G MMSE code
Since the parent commit, USE_MMSE is not defined. Thus, the
corresponding code is commented out. Since there are no linker problems,
it is obvious that this code is never called, and we can remove it.
2026-02-16 20:05:05 +01:00
Laurent THOMAS
da7897be04 remove cblas and lapack dependency, as the calling code can't be called in present master branch (likely never worked/fished code 2026-02-16 20:05:04 +01:00
Laurent THOMAS
345b44d9b3 re-order the functions to have them in natural C order (function implemented before call). Add a #if to be able to disable never called code, but the flag is not activated in this commit 2026-02-16 20:04:29 +01:00
Laurent THOMAS
b6171949cd only cleaning: remove dead code, make static functions, simplify code 2026-02-16 20:04:29 +01:00
Robert Schmidt
40e61d59a6 Merge branch 'fix-ubuntu-build' into 'develop' (!3934)
Fix Ubuntu build: reinstate -Werror

See merge request oai/openairinterface5g!3934
2026-02-16 14:31:23 +00:00
Robert Schmidt
a159f1b78a Revert "Compile everything in Ubuntu builder"
This reverts commit 16c333b1a3.

I tried to build everything in Ubuntu images, but

- this introduced a regression (ignores $BUILD_OPTION)
- made that we don't use -Werror (when we should)

I tried to fix the use of the first, but it would involve more changes
than I prefer. On the second, we cannot enable -Werror, as FlexRIC does
not build warning-free (in Release mode). We thus have to build only the
targets that we require, and therefore we can keep using build_oai,
which is the simplest option (cf. the first point).
2026-02-16 11:04:11 +01:00
Robert Schmidt
9c1603cfbb Remove BUILD_ARG: Will never build sanitize
xran does not work with Address Sanitizer. Thus, there is no reason to
keep these build arguments.
2026-02-16 11:01:37 +01:00
Jaroslava Fiedlerova
7fa4d018d4 Merge branch 'integration_2026_w07' into 'develop'
Integration: `2026.w07`

* !3899 Solving issues caused by invalid RRC configuration
* !3905 Add undocumented Aerial ERROR.indication vendor specific error codes
* !3896 Add fallbacks for ARMv8a to make it compile
* !3734 vrtsim: add CIR DB playback with CLI flags
* !3886 Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline
* !3907 RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements
* !3891 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
* !3913 Remove VCD signal dumper from NR code
* !3783 RRC: Multi-cell handling architecture
* !3916 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
* !3922 Fix and update tracy tag to v0.13.1
* !3917 Fix SRS power computation
* !3915 Cleanup Cmake: remove some double compilation
* !3883 Improvements in handling beamforming inputs
* !3906 fix(ci): remove git reset command from Jenkinsfile
* !3894 Reimplement BladeRF radio driver, make it work for 5G

Closes #845

See merge request oai/openairinterface5g!3908
2026-02-13 11:41:25 +00:00
Robert Schmidt
bf325466b3 Merge remote-tracking branch 'origin/bladerf_testing' into integration_2026_w07 (!3894)
Reimplement BladeRF radio driver, make it work for 5G

This MR reimplements the BladeRF radio driver such that it is usable for
5G. On the way, we remove unused code, refactor it for readability, and
update configuration.

Tested:

- 40MHz carrier as gNB
- 20MHz carries as gNB

An initial focus was 2x2, but I did not manage to do this yet.
Documentation on the format is here [1] and there is a helper [2]. I
will do this later.

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6
[2] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___s_t_r_e_a_m_i_n_g___f_o_r_m_a_t.html#gac754a927c12cd8aa3fc270e9dd9c108e
2026-02-12 17:04:10 +01:00
Maxime
37cb854319 Fix crash on double reestablishment: guard reconfigCellGroup overwrite 2026-02-12 11:03:23 -05:00
Robert Schmidt
d87696e583 Merge remote-tracking branch 'origin/fix-ci-reset' into integration_2026_w07 (!3906)
fix(ci): remove git reset command from Jenkinsfile

- By default, the variable eNB_CommitID is set as 'develop' in the
  config
- When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC
  push events, it takes develop
- Triggered by RAN takes commit SHA where origin/SHA does not work

Below are issues seen after this week's merge to develop:

    https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-Ubuntu-ARM-Image-Builder/4103/pipeline-overview/?selected-node=44

    08:43:07  + git reset --hard origin/9777d23173a740de7cf982659fae13ad6627d3aa
    08:43:07  fatal: ambiguous argument 'origin/9777d23173a740de7cf982659fae13ad6627d3aa': unknown revision or path not in the working tree.

When triggered through upstream FlexRIC (as a PUSH Event), it is taking
the branch as shown in the logs:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3832/pipeline-overview/?selected-node=47

    13:45:27  + git reset --hard origin/develop
    13:45:27  HEAD is now at 9777d23173 Merge branch 'integration_2026_w06' into 'develop'
2026-02-12 15:31:05 +01:00
Reem Bahsoun
8f9abfb7f4 Tutorial improvement 2026-02-12 14:37:56 +01:00
Robert Schmidt
76c2dbf23f Merge remote-tracking branch 'origin/beam_fix' into integration_2026_w07 (!3883)
Improvements in handling beamforming inputs

Fix a bug in setting analog beamforming structure and improves config
file parameter
2026-02-12 12:04:22 +01:00
Robert Schmidt
7bf290d674 Merge remote-tracking branch 'origin/cleanup-cmake' into integration_2026_w07 (!3915)
Cleanup Cmake: remove some double compilation

Harmonize some cmake code to avoid double compilation, notably around
polar and smallblock. In develop, we just add their sources to other
targets, whereas now we define STATIC libraries (further changed to
shared library in !3856) to avoid double compilation.

With this command line:

    cmake .. -GNinja -DENABLE_TESTS=ON && ninja

shows that before we compile 12631 files, where after it is 12583

there is additional supporting cleanup (move code, remove headers,
types, ...).

there is more harmonization to do, I limited myself to some easy wins.
For instance, we do the same with PDCP/SDAP, and this should be
refactored into STATIC libraries as well.
2026-02-12 12:00:24 +01:00
Robert Schmidt
5d004818d4 Merge remote-tracking branch 'origin/fix-srs-power' into integration_2026_w07 (!3917)
Fix SRS power computation

The SRS symbols have been remapped recently in
srs_estimated_channel_freq, and therefore the calculation of the SRS
power has to retrieve the symbols from different positions.
2026-02-12 11:57:42 +01:00
Robert Schmidt
4d14aac494 Merge remote-tracking branch 'origin/tracy-fix' into integration_2026_w07 (!3922)
Fix and update tracy tag to v0.13.1
2026-02-12 11:57:03 +01:00
Bartosz Podrygajlo
144f0de222 Fix and update tracy tag to v0.13.1 2026-02-12 11:45:02 +01:00
Robert Schmidt
37e969d1ed Merge remote-tracking branch 'origin/ci-pipeline-rename' into integration_2026_w07 (!3916)
CI: Rename RAN-SA-2x2-Module-CN5G pipeline

RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a
4x4 MIMO configuration. The pipeline name has been generalized to
RAN-SA-Multi-Antenna-CN5G to cover multiple antenna configurations.
2026-02-12 09:08:55 +01:00
Robert Schmidt
a0d2c172ad Merge remote-tracking branch 'origin/rrc-multi-cell' into integration_2026_w07 (!3783)
RRC: Multi-cell handling architecture

This MR implements a foundational multi-cell handling architecture for
RRC by separating DU management from cell management and establishing a
hierarchical cell organization within each DU container. The changes
enable proper multi-cell support where each DU can serve multiple cells,
addressing the previous limitation where DU and cell management were
tightly coupled with the assumption of one cell per DU.

Key Changes:

- Data Structure Separation: Separated for DU containers (DU-specific
  info) from cell containers (cell-specific data)
- Global DU and Cell Trees: Cells are now stored in global RB trees in
  RRC, similarly to DUs
- Du-specific cell seq_arr: within each DU container (du->cells) is
  stored a seq_arr of cells belonging to the DU
- UE Cell Association Framework: Introduced serving_cells array to track
  PCell and SCells for each UE with servCellIndex indexing
- Cell Management Library: Extracted cell management functions into
  rrc_cell_management.c/h for better testability and maintainability

Other relevant changes:

- F1AP Refactoring: cell list definitions, heap allocation to prevent
  stack overflow
- 5G-S-TMSI Helpers: Common helper functions for 3GPP TS 23.003
  compliant construction
- Integration Tests: Comprehensive test suite for DU lookup, cell
  lookup, and UE cell association
- Cell Duplication Checks: Validation in F1 DU configuration update to
  prevent duplicate cells
- Documentation: Updated RRC developer documentation with multi-cell
  architecture details

Validated with RFsim in re-establishment and handover scenarios.
2026-02-12 09:07:58 +01:00
Robert Schmidt
0464329eed Make 5G RRC not depend on LTE code 2026-02-12 08:47:08 +01:00
Robert Schmidt
4d4d0d4dd4 Move RRC config to RRC header, rename
openair2/COMMON/rrc_messages_types.h has mostly 4G types. The only 5G
(gNB) RRC type is gNB_RrcConfigurationReq, which we can move to a header
in the corresponding directory (where it is used).

This allows to separate 5G gNB RRC module from the 4G types in
rrc_messages_types.h in the next commit.
2026-02-12 08:47:08 +01:00
Robert Schmidt
12e9ab1412 Remove unused type 2026-02-12 08:47:08 +01:00
Robert Schmidt
d1aa6b1d7c Remove unused headers 2026-02-12 08:47:07 +01:00
Robert Schmidt
b14127b3ff Remove double-declared C files
Is already linked in through MAC_NR_COMMON.
2026-02-12 08:47:07 +01:00
Robert Schmidt
7da5d3889f Split common_lib.c in separate compilation unit
This avoids double compilation.
2026-02-12 08:47:07 +01:00
Robert Schmidt
e1736b2fb5 Move softmodem-common.c to separate library
This potentially reduces multiple compilation of the same file.
2026-02-12 08:47:07 +01:00
Robert Schmidt
ee1f9dfede Move hashtable to ds/ folder
Notably, remove the include_directories(), which is not necessary, as
most files do not actually use this.
2026-02-12 08:47:07 +01:00
Robert Schmidt
49eeba339a Move smallblock cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
f159d22499 Move crc_byte cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
76a5aad7c4 Move polar coding cmake code to subdirectory 2026-02-12 08:47:06 +01:00
Robert Schmidt
cc33a01cee Remove unused -lz from simulators
We don't use zlib in the simulators, we don't need this.
2026-02-12 08:47:06 +01:00
Robert Schmidt
7a7ffc18e2 Move reverse_bits*() to separate source file
reversing bits is not NR specific. Think of it like this: LTE code might
use reverse_bits*() as well, but in the old location, it would pull in a
bunch of NR dependencies that are superfluous.
2026-02-12 08:47:06 +01:00
Robert Schmidt
bfc0f9e2a3 Merge remote-tracking branch 'origin/remove_nr_vcd' into integration_2026_w07 (!3913)
Remove VCD signal dumper from NR code

We don't test VCD in 5G NR code (and haven't tested it in 4G for years).
Remove the VCD traces in 5G code to avoid any ambiguity. 4G code remains
in place, as well as the tools to analyze existing traces.
2026-02-12 08:43:27 +01:00
Robert Schmidt
be4461ccca Move GTPV1U cmake code to subdirectory
Move the module cmake code to its subdirectory for better organization,
and  remove superfluous include_directories() that are not recommended
to be used (as it populates all other targets with those directories,
most of which don't need it anyway).

Slightly clean up the module by removing headers to unused dependencies.
The GTP module has a dependency to 4G and 5G RLC, which should not exist
(the RLC modules have a dependency on GTP, not the other way around),
but in this commit, make as little modifications as possible.
2026-02-12 06:48:52 +01:00
Robert Schmidt
11c2791527 Remove 5G code from LTE RRC 2026-02-12 06:14:49 +01:00
Robert Schmidt
9a248b4411 Move rrc_eNB_GTPV1U.c from GTP to LTE RRC module in cmake 2026-02-12 06:14:35 +01:00
Robert Schmidt
d9d18f07fd Remove unused functions 2026-02-12 06:06:19 +01:00
Robert Schmidt
40cfe2e5f2 Remove unused GTP types 2026-02-12 06:02:59 +01:00
Robert Schmidt
abe3ee9624 Fixes bladerf install scripts
- at least in CI, there is no bladerf, so don't try to upgrade a
  firmware (we don't do that either with USRPs)
- the base distro for ubuntu is debian
2026-02-11 18:37:45 +01:00
Robert Schmidt
054d0f55cd base&build: install with BladeRF 2026-02-11 18:37:45 +01:00
Robert Schmidt
16c333b1a3 Compile everything in Ubuntu builder
Compile all targets in Ubuntu build to avoid breakage of software.
Remove ldd in build dockerfile, as we don't need that (can also be
inspected manually).
2026-02-11 18:37:45 +01:00
Robert Schmidt
0a585c1235 Add BladeRF configs 2026-02-11 18:37:45 +01:00
Reem Bahsoun
f83b53d6d1 Update BladeRF documentation 2026-02-11 18:37:45 +01:00
Robert Schmidt
80b5d4ef22 Make functions static, reformat, use logging module
This commit does not introduce a functional change.
2026-02-11 18:37:45 +01:00
Robert Schmidt
792e1ed7d9 Rewrite BladeRF's device_init()
- Add more sampling rates to support, e.g., 40MHz in 5G
- Allocate memory only at end to avoid memory leaks in case of failure
- Group recurring configuration functionality in configure_channel() to
  reduced code duplication and uniform output
- Read maximum TX gain to set maximum automatically, and analogous to
  USRP radio lib
- Check if BladeRF config (buffer size, num transfers, ...) fulfills
  requirements as specified in documentation [1]
- Set BladeRF logging early to see BladeRF output

[1] https://www.nuand.com/bladeRF-doc/libbladeRF/v2.6.0/group___f_n___s_t_r_e_a_m_i_n_g___a_s_y_n_c.html#ga72752f2a047b95544e7686596a409abd

Co-authored-by: Brice Robert <robert@eurecom.fr>
Closes: #845
2026-02-11 18:37:45 +01:00
Robert Schmidt
f14aa8283c Active BladeRF on startup only, introduce BLADERF_CHECK
Don't enable radios twice, and only do it on device startup. Simplify
that function by using a new BLADERF_CHECK macro that checks return
codes and that will be reused in the following commits.
2026-02-11 18:37:45 +01:00
Brice Robert
4fdcb11edd BladeRF: Use global constant for used sampling format 2026-02-11 18:37:45 +01:00
Robert Schmidt
5fdec24b52 Delete unused or useless code
Note: device->Mod_id is deleted in !3831. The calibration table has no
purpose.

Co-authored-by: Brice Robert <robert@eurecom.fr>
2026-02-11 18:37:45 +01:00
Robert Schmidt
93c37e96e6 Make BladeRF library compile
Fixes: dd8a25524a ("remove dead code in common_lib.h")
2026-02-11 18:37:45 +01:00
Robert Schmidt
4e5d92401b Add Debian 12 to list of supported distributions 2026-02-11 18:37:45 +01:00
Robert Schmidt
38975ef120 Allow installation of multiple hardwares in same build_oai invocation
There is no reason to not allow

    ./build_oai -I -w USRP -w BLADERF

To install USRP and BladeRF together (which will be used in the CI in a
later commit). Fix this.
2026-02-11 18:37:45 +01:00
Robert Schmidt
977c484524 Remove option --disable-hardware-dependency 2026-02-11 18:37:45 +01:00
Robert Schmidt
c5834e6c1b Fix nr_srssim linking problems when building with E2 support
In this case, there are a number of linker errors:

    /usr/bin/ld: libL2_NR.a(rrc_gNB.c.o): in function `nr_rrc_transfer_protected_rrc_message':
    /home/richie/oai/openair2/RRC/NR/rrc_gNB.c:330:(.text+0x6f6): undefined reference to `signal_rrc_msg'

However, nr_srssim does not need RRC, while it is being linked in. Thus,
link without nr_rrc and L2. For the remaining two linker problems:

- provide a definition of NR_IF_Module_init() as in most other
  simulators
- move rrc_get_max_nr_csrs() to nr_common.c. It is already declared in
  the corresponding header, and itself does not have anything to do with
  RRC radio configuration, therefore it does not belong to
  nr_radio_config.c
2026-02-11 18:37:45 +01:00
Robert Schmidt
7fd9e99f5c Merge remote-tracking branch 'origin/fix-mplane-du-address' into integration_2026_w07 (!3891)
Fix for split 7.2 DU configurations including DU & RU ethernet addresses

Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used in
MPlane to configure the RU.
2026-02-11 15:03:35 +01:00
Robert Schmidt
2a4cbda212 Merge remote-tracking branch 'origin/rrc-qos-refactor' into integration_2026_w07 (!3907)
RRC QoS refactor: PDU Session Modify support, SDAP fixes, and code improvements

The goal of this MR is to prepare the RRC/NGAP layer for the multi-QoS
support. The MR:

- enables PDU Session Resource Modify support in RRC/NGAP/E1AP
- fixes SDAP header mapping
- enables SDAP by default
- refactors QoS flow handling in RRC/NGAP
- improves error handling, and code maintainability in RRC/NGAP

Changes:

- NGAP PDU Session Modify:
  * add NGAP PDU Session Resource Modify Request/Response handling with
    proper error reporting for unrecognized sessions and AMF UE NGAP ID
    validation
- E1AP Bearer Context Modification:
  * add DRB To Remove List IE to support DRB release during modify
  * rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
- RRC QoS flow handling:
  * enable multi-QoS flow support per DRB
  * add utilities to map NGAP QoS parameters to E1AP
  * filter QoS flows by DRB ID
- SDAP configuration:
  * Fix SDAP header UL/DL mapping between internal representation and
    ASN.1 enum (invert mapping)
  * change SDAP header fields from long to bool for clarity
- F1 DRB setup refactoring:
  * Extract shared helpers for F1 DRB setup list filling
  * reduce duplication between E1 response and direct DRB setup paths
- AMBR management:
  * Store AMBR in UE context
  * validate AMBR is set before bearer setup
- Configuration:
  * remove unused drbs configuration parameter
  * enable SDAP by default (change default from false to true)
2026-02-11 15:02:01 +01:00
rmagueta
b2093089ab Fix SRS power computation 2026-02-11 11:24:21 +00:00
Jaroslava Fiedlerova
abd2bc0e45 CI: Rename RAN-SA-2x2-Module-CN5G pipeline
RAN-SA-2x2-Module-CN5G performs tests not only with 2x2 but also with a 4x4 MIMO
configuration. The pipeline name has been generalized to RAN-SA-Multi-Antenna-CN5G
to cover multiple antenna configurations.
2026-02-11 11:58:16 +01:00
francescomani
0a447fd304 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from NR code and remaining unused header include 2026-02-11 10:30:07 +01:00
Robert Schmidt
f8d9c54eff Merge remote-tracking branch 'origin/multipath-testing-ci' into integration_2026_w07 (!3886)
Integrate GPU-Accelerated Channel Simulation + CI Test Pipeline

This MR builds on top of MR !3588 (feat: GPU Accelerated Channel
Simulation Pipeline).

The main portion of the changes is directly taken from MR !3588, and
focuses on integrating the GPU-accelerated channel simulation. On top of
that, this MR adds CI-related configurations to introduce a new channel
simulation testing pipeline into the CI --> RAN-Channel-Simulation

This MR introduces a CUDA-based pipeline to offload the
multipath_channel and add_noise channel simulation functions to the GPU.
This enables large-scale, real-time physical layer simulations not
possible on the CPU.

For full documentation, please see the file at openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md.

System & Compiler Requirements: An NVIDIA GPU with a compatible driver
and the CUDA Toolkit installed.

This feature was developed and tested on the GH200 server using the GCC
12 toolchain. To ensure reproducibility, building with GCC 12 is highly
recommended.  Build Instructions

The primary flag to enable this feature is -DCUDA_ENABLE=ON. The
following command shows a sample configuration used during development
on the GH200 server:

    ./build_oai --phy_simulators --cmake-opt "\
      -DCUDA_ENABLE=ON \
      -DUSE_UNIFIED_MEMORY=ON \
      -DUSE_ATS_MEMORY=OFF \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-12 \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-12 \
      -DENABLE_TESTS=ON"

Memory Model Configuration

The pipeline supports multiple CUDA memory management modes, which can
be configured at compile time. ATS Memory (-DUSE_ATS_MEMORY=ON) is
enabled by default. To use another memory model, you must first disable
ATS.

For a detailed explanation of these models, please refer to Section 3 of
the gpu_acceleration.md report.
2026-02-11 10:21:44 +01:00
Robert Schmidt
9f5acb7242 Merge remote-tracking branch 'origin/vrtsim_cirdb_read' into integration_2026_w07 (!3734)
vrtsim: add CIR DB playback with CLI flags

VRTSIM: CIR DB playback via CLI

This change adds an optional in-process CIR DB path to VRTSIM. When
enabled with --vrtsim.cirdb and optional --vrtsim.cirdb-path, VRTSIM
reads precomputed taps from cir_db.bin. Default behavior is unchanged
when the flag is not set.

Build

    cmake ../../ -GNinja -DOAI_VRTSIM_CIRDB=ON -DOAI_VRTSIM_TAPS_CLIENT=OFF
    cmake --build . --target vrtsim

How to run

gNB

    sudo ./nr-softmodem \
      -O ./targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf \
      --device.name vrtsim \
      --vrtsim.role server \
      --gNBs.[0].min_rxtxtime 3 \
      --vrtsim.cirdb 1 \
      --vrtsim.cirdb-path /home/merkeb/oai-cir-emitter/cir_db.bin

UE

    sudo ./nr-uesoftmodem \
      -C 3619200000 -r 106 --numerology 1 --ssb 516 --band 78 \
      --device.name vrtsim

Expected logs

- VRTSIM prints that channel modelling is active and uses DB backed taps
- CIRDB ready: model=..., shape=Tx x Rx, L=..., S=..., fs=..., dt=...,
  speed=...

CLI behavior and fallbacks

- TAPS client and chanmod paths are unchanged
- If --vrtsim.cirdb is not set or equals 0, VRTSIM uses the existing
  channel model path
2026-02-11 10:20:28 +01:00
Merkebu Girmay
33cc04b3e1 Add CIRDB playback test pipeline
Increase retx threshold in vrtsim with CIRDB.
2026-02-10 21:19:34 -08:00
francescomani
8410ecac29 remove VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME from gNB code 2026-02-10 16:26:24 +01:00
Robert Schmidt
42ef7bac98 Merge remote-tracking branch 'origin/armv8-a-compatibility' into integration_2026_w07 (!3896)
Add fallbacks for ARMv8a to make it compile

The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.

Add some specific compile options for this platform.

Add debian 12 to the list of architectures.
2026-02-10 14:46:57 +01:00
Eric Mittag
d7ea319b59 cmac0_prec128()/rotate_cpx_vector(): Add ARMv8.0-A fallback
The current code, on ARM, uses ARMv8.1-A RDM instructions. Add a
fallback for processors that do not have this instruction set.
2026-02-10 14:45:20 +01:00
Eric Mittag
15ee75980b Set ARMv8.2-A (Cortex-A53) specific compile options 2026-02-10 14:45:15 +01:00
Eric Mittag
7b86f61383 Add support for Debian 12 in build_oai 2026-02-10 14:45:10 +01:00
Jaroslava Fiedlerova
66e55acca0 CI: Add new pipeline to CI doc 2026-02-10 09:02:47 +00:00
Nika Ghaderi
b9df7eb84f add markdown report for gpu benchmark 2026-02-10 08:38:50 +00:00
francescomani
f15994da14 improvement in config file parameter to set analog beamforming 2026-02-10 09:04:18 +01:00
Merkebu Girmay
a707094196 vrtsim: implement batched TX writes for channel modelling
- Move buffer allocation per-batch
- Convert and write per batch
- Fix saved_samples gap handling bug
2026-02-09 23:23:10 -08:00
Merkebu Girmay
ccf5021072 radio/vrtsim: Add CIRDB support for precomputed channel taps
Integrate Channel Impulse Response Database (CIRDB) to enable playback
of precomputed realistic channel taps in vrtsim, with runtime selection
via YAML metadata.

Features:
- Read precomputed channel taps from binary database with YAML sidecar
- Runtime enable via --vrtsim.cirdb with optional paths (cirdb_yaml, cirdb_file, cirdb_path)
- Channel parameter configuration: model_id (TDL-A..E), delay spread (ds_ns), UE speed (speed_mps)
- Fallback to existing channel model options when disabled
- Time-driven snapshot progression based on elapsed simulation time

Fixes:
- RNG initialization: Add randominit() call before gaussZiggurat()
- FlatBuffers linking: Handle both 'FlatBuffers' and 'flatbuffers' package names when working with external channel emmulator
- Address review comments: use pthread directly, update calloc_or_fail, simplify CMake
2026-02-09 23:22:40 -08:00
Guido Casati
d1150d90e1 NR RRC/SDAP: enable SDAP by default and update CI/docs
- Change gNB RRC enable_sdap default to true
- Update RRC and RUNMODEM docs to reflect new default behavior
- Clean up CI gNB configs by removing redundant enable_sdap=1
- Keep explicit SDAP disable config for NFAPI gNB VNF
2026-02-09 17:01:25 +01:00
Guido Casati
3d41d28f1d RRC: enhance AMBR management in CU-CP
According to TS 38.413:

* AMBR is conditional to PDU Session Resource to setup in the Initial UE
  Context Setup procedure
* The UE Aggregate Maximum Bit Rate IE should be sent to the NG-RAN node
  if the AMF has not sent it previously. If it is included in the PDU
  SESSION RESOURCE SETUP REQUEST message, the NG-RAN node shall store
  it in the UE context
* Range is INTEGER [0..4,000,000,000,000]

To this purpose, changes in the commit:
* Init AMBR to out of range value when creating UE context
* Store AMBR in UE context whenever is received
* Assert if not set at the time of Bearer Setup (should be known at that stage)
2026-02-09 17:01:25 +01:00
Jaroslava Fiedlerova
e17350a10d Adjust ssPBCH_BlockPower in FHI7.2 configs
Compute ssPBCH_BlockPower from RU max TX power and bandwidth

ssPBCH_BlockPower = P_TX(dBm) − 10 x log10(N_RB x 12)

Assume P_TX = 24 dBm for indoor RUs and 35 dBm for outdoor RUs.
2026-02-09 16:58:14 +01:00
Bartosz Podrygajlo
85f8d70376 Fix for split 7.2 DU configurations including DU & RU ethernet addresses
Fix parsing of DU configurations that include both RU and DU ethernet
addresses in the fhi_72 section. The extraneous DU addresses are used
in MPlane to configure the RU.
2026-02-09 16:36:50 +01:00
Jaroslava Fiedlerova
33ab261ac8 Add RAN-Channel-Simulation into parent CI pipeline 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
036793f55e CI: ensure proper alignment of ctest log report 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
50411ad86d CI: build and run CUDA channel simulation unit tests 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
2c4885c662 CI: Add XML for channel simulator testing 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
34e072823d CI: Unify PhySim build/deploy actions and select script from XML 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
400e7b7ea3 CI: Add Dockerfile for channel simulation build on GH with CUDA support 2026-02-09 15:19:07 +00:00
Jaroslava Fiedlerova
4d7ed95179 CI: Add cmake file for CUDA channel simulation ctest threshold check 2026-02-09 15:18:50 +00:00
Jaroslava Fiedlerova
1ef9812e59 Add ctests for test_channel_scalability
For now, test in the following configuration:
- 16 parallel channels
- channel length of 32 and 128
- with 61440 and 122880 samples
- 12 trials per each test (due to CUDA kernel loading delay in first iterations)
- multiple MIMO configurations: 2TX - 2/4/8/32 RX, 2/4/8/32 TX - 2RX
2026-02-09 15:01:05 +00:00
Robert Schmidt
9dddad86a1 Merge remote-tracking branch 'origin/add_undocumented_aerial_error_codes' into integration_2026_w07 (!3905)
Add undocumented Aerial ERROR.indication vendor specific error codes

This MR adds the remaining vendor-specific ERROR.indication error codes
that are undocumented in the Aerial online documentation, but are
present in the cuPHY-CP/scfl2adapter/lib/scf_5g_fapi/scf_5g_fapi.h
header file.

This change stems from the appearance of an undocumented error code
during testing (SCF_ERROR_CODE_L1_MISSING_UL_IQ = 0x44) It aims to ease
the comprehension of the errors thrown by Aerial L1.
2026-02-09 14:40:52 +01:00
Robert Schmidt
a1f1726d92 Merge remote-tracking branch 'origin/check_rrc_config_ue' into integration_2026_w07 (!3899)
Solving issues caused by invalid RRC configuration

Verify RRC configuration.
2026-02-09 14:39:43 +01:00
Guido Casati
5ad1f14cb8 RRC: refactor F1 DRB setup list filling into shared helpers
Extract common code from `fill_drb_to_be_setup_from_e1_resp` and
`rrc_fill_f1_drb_to_setup` into reusable helper functions to reduce
duplication and improve maintainability. This refactoring enables
multi-QoS flow handling per DRB and prepares helpers for upcoming
PDU Session Modify changes.

Impact:
- Enables multi-QoS flow support: `rrc_fill_f1_drb_to_setup` now
  collects all QFIs mapped to a DRB instead of only the first one
- Reduces code duplication between E1 response and direct DRB setup
  code paths
- Improves maintainability by centralizing F1 DRB setup logic

Major changes:
- Add `fill_f1_drb_info_nr`: fills DRB information IE including QoS
  flows from QFI list
- Add `fill_f1_drb_to_be_setup`: creates F1 DRB to setup structure
  from RRC DRB, PDU session, and QFI list
- Add `fill_f1_drbs_from_e1`: processes DRBs from E1 response and
  extracts QFIs from drb_config->qosFlows
- Refactor `fill_drb_to_be_setup_from_e1_resp` to use
  `fill_f1_drbs_from_e1`
- Refactor `rrc_fill_f1_drb_to_setup` to collect all QFIs mapped to
  each DRB and use `fill_f1_drb_to_be_setup`
2026-02-09 14:02:12 +01:00
Guido Casati
2ed28c84b3 RRC/NGAP: refactor rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ
TS 38.413 8.2.3 PDU Session Modify:

> For each PDU session which failed to be modified, the PDU Session Resource Modify
> Unsuccessful Transfer IE shall be included containing the failure cause

> If the NG-RAN node receives a PDU SESSION RESOURCE MODIFY REQUEST message containing
> some PDU Session ID IEs (in the PDU Session Resource Modify Request List IE) that the
> NG-RAN node does not recognize, the NG-RAN node shall report the corresponding invalid
> PDU sessions as failed in the PDU SESSION RESOURCE MODIFY RESPONSE message
> with an appropriate cause value

Changes in the commit:

* add rrc_gNB_ngap_pdusession_mod_failure helper function to handle
  abnormal conditions and send NGAP response with (all) failed PDU sessions
  * improve error handling: send NGAP response instead of silently returning -1
    when UE context lookup fails (unknown RAN UE NGAP ID)
  * add AMF UE NGAP ID validation: check stored AMF UE NGAP ID matches request
    and send failure response if mismatch (per 3GPP TS 38.413)
* handle unrecognized PDU Session IDs per 3GPP TS 38.413 8.2.3.4: add to
  failed list to be sent in the reponse message
* simplify failure path: reuse rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
  instead of manually constructing response message
* remove failed PDU sessions from RRC list in rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
* remove redundant code and improve code organization
* add bounds checking
* improve function signature
2026-02-09 14:01:50 +01:00
Guido Casati
eaf27acb3b RRC/NGAP: refactor rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP
This commit refactors the rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP function
to improve code clarity, fix bugs, and ensure compliance with 3GPP TS 38.413
section 9.2.1.6.

The main improvement is ensuring the PDU Session Resource Modify Response message
is always sent with mandatory IEs, even when there are no PDU sessions to report
in the optional lists.

Key changes:
- Initialize message structure parameters to 0 by leveraging structure
  initialization, ensuring clean state
- Replace local counter variables (pdu_sessions_done, pdu_sessions_failed)
  with direct access to resp->nb_of_pdusessions and resp->nb_of_pdusessions_failed,
  eliminating redundant state tracking and improving code clarity
- Remove conditional message sending: always send the response message
  (per 3GPP TS 38.413 9.2.1.6, PDUSessionResourceModifyResponse must always
  be sent with mandatory IEs: AMF-UE-NGAP-ID and RAN-UE-NGAP-ID, even when
  optional lists are empty)
- Fix duplicate assignment: remove redundant p->pdusession_id assignment
  (was assigned twice in the PDU_SESSION_STATUS_DONE case)
- Improve failed PDU session handling: use direct structure assignment
  (failed->cause = session->cause) instead of field-by-field copying,
  making the code more maintainable
- Remove failed PDU session upon response
- Enhance logging: improve log messages for better debugging and clarity
- Add function documentation comment
2026-02-09 14:01:50 +01:00
Guido Casati
7982374f6a RRC/NGAP: add utility function to fill E1 QoS to setup list from NGAP
Introduce fill_e1_qos_flow_to_setup to translate pdusession_level_qos_parameter_t (NGAP)
into qos_flow_to_setup_t (E1), including ARP and QoS characteristics (dynamic/non-dynamic).

Refactor fill_e1_drb_to_setup to use the new helper for building QoS flows.
* Only include QoS flows whose drb_id matches the target DRB.
* Add DevAssert(drb_ngran.numQosFlow2Setup > 0) to ensure at least one QoS flow is added.

This change centralizes and simplifies QoS mapping logic between NGAP inputs
and E1 DRB configuration. It ensures correctness by associating QoS flows
to the appropriate DRB.

Major changes:
- Extract QoS flow mapping logic into fill_e1_qos_flow_to_setup helper function
- Filter QoS flows by matching drb_id before adding to DRB setup list
- Replace inline mapping code with helper function call
- Add assertion to verify at least one QoS flow is added per DRB
2026-02-09 14:01:08 +01:00
Guido Casati
2923e50ed0 RRC/E1AP: Fix SDAP header mapping in E1AP and test callback header handling
This commit fixes two related issues:

1. SDAP Header Mapping Bug (cucp_cuup_handler.c):
   The original code incorrectly mapped SDAP header configuration from
   internal E1AP representation to ASN.1 enum values. The internal
   representation (`bearer_context_sdap_config_t`) uses true=present/false=absent,
   while ASN.1 enum (`E1AP_SDAP_Configuration_t`) uses
   0=present/1=absent. The fix correctly inverts the mapping:
   - Internal true (1) → ASN.1 0 (present)
   - Internal false (0) → ASN.1 1 (absent)

The commit also clarifies internal representation in the stack.

2. Test Overhead Adjustment (nr-cuup-load-test.c):
   The change in (1) led to a failure in nr_cuup_functional_test
   with assertion: "size % 4 == 0" in recv_ng()

   - Changed UL packet overhead from 3 bytes to 2 bytes in sender_thread()
   - Before the SDAP fix, the test incorrectly accounted for 3 bytes:
     * 2 bytes PDCP header (correct)
     * 1 byte SDAP header (incorrectly included)
   - After the SDAP fix, SDAP headers are correctly set to absent, so
     only 2 bytes (PDCP header) are needed

   This ensures the test sends packets with the correct header size,
   matching what CU-UP expects after the SDAP configuration fix.

The load test does not enable SDAP headers, therefore the original 3-byte
overhead was possibly a workaround for the SDAP header bug.
With the bug fixed, the test correctly uses 2-byte overhead (PDCP header).
2026-02-09 13:19:02 +01:00
Guido Casati
53c0d2d306 NGAP: refactor PDU Session Resource Modify struct definition
This commit refactors the PDU Session Resource Modify Response message
structures to improve naming, documentation, and compliance with 3GPP TS 38.413 9.2.1.6.

Changes in NGAP:
- Rename qos_flow_tobe_modified_t to qos_flow_addmod_response_item_t to better
  reflect its purpose as a QoS Flow Add or Modify Response Item IE (as per specs)
- Add mandatory AMF UE NGAP ID field to ngap_pdusession_modify_resp_t structure
- Optimize field types: change nb_of_pdusessions and nb_of_pdusessions_failed
  from uint16_t to uint8_t (NGAP_MAX_PDU_SESSION limit) (ref 3GPP TS 38.413, 9.2.1.6)
- Update PDU Session Modify Response encoder to use amf_ue_ngap_id from the
  message structure (pdusession_modify_resp_p->amf_ue_ngap_id) instead of
  retrieving it from UE context (ue_context_p->amf_ue_ngap_id)
- Add comprehensive comments with 3GPP TS 38.413 section references throughout

Changes in RRC/NGAP:
- Populate amf_ue_ngap_id field in PDU Session Modify Response message from
  UE context
- Update type reference to qos_flow_addmod_response_item_t
2026-02-09 13:19:02 +01:00
Guido Casati
fa0542f845 NGAP: fix NGAP PDU Session Modify transfer encoding
Encode response/unsuccessful transfers using existing stack-allocated transfer structs.
2026-02-09 13:19:02 +01:00
Guido Casati
c679b5953b E1AP: rename numQosFlow2Setup to numQosFlowsMod in DRB To Modify List
A DRB To Modify Item contains a Flow Mapping Information,
which overrides previous mapping information. For consistency,
rename the count member to reflect a QoS Flow modification,
since it is not limited to setup only.

- Rename DRB flow mapping counters to `numQosFlowsMod`
  for a DRB To Modify List
- Adjust encode/decode/equality + E1AP tests
2026-02-09 13:19:02 +01:00
Guido Casati
e490faa60c E1AP: add DRB To Remove list to E1 Bearer Context Modification lib
Add DRB To Remove List IE to PDU Session To Modify list, which is sent
in the Bearer Context Modification request. This allows the CUCP to
inform the CUUP about DRBs to be released in a specific PDU session
during a MODIFY procedure.

Changes:

* Add struct definition
* Add enc/dec/eq/cp func
* Add test
2026-02-09 13:19:02 +01:00
Guido Casati
d38188e153 RRC: remove unused drbs configuration parameter
- Delete drbs field from gNB_RrcConfigurationReq and its use in RCconfig_NRRRC()
- Remove GNB_CONFIG_STRING_DRBS, help text, index, and GNBPARAMS_CHECK entry from gnb_paramdef.h
- Drop DU-side verification and DRB count logging in gnb_config.c
2026-02-09 13:19:02 +01:00
Jaroslava Fiedlerova
b40d2f60c5 Adjust output reporting of test_channel_scalability
This modification enables us to use the same analysis function in CI
as we use for physims.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
44875e1c58 Add Scalability Benchmark
This commit introduces a new, configurable benchmark,
`test_channel_scalability`, designed to measure the performance and
scalability of the CUDA channel simulation pipeline under various
conditions.

This benchmark provides several key features:
- It supports multiple GPU execution models, including a high-throughput
  "batch" mode, an asynchronous "stream" mode, and a "serial" mode for
  baseline measurements.
- It includes an optional interference simulation mode, activated by the
  `--sum-outputs` flag, which sums the outputs of multiple parallel
  channels.
- Simulation parameters (MIMO configuration, signal length,
  channel length, and batch size) are configurable via command-line
  arguments.
- It runs the full simulation pipeline on both the CPU and the GPU,
  reporting the average execution time for each and calculating the
  overall speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
affab00c90 Add Batched and Streamed Functions for Scalability
This commit extends the CUDA API with new functions designed for
high-throughput scalability testing and advanced concurrency.

Key additions include:
- Batched versions of the kernels (`..._batched`) that use the
  `blockIdx.z` grid dimension to process many independent channel
  simulations in parallel.

- A C-callable wrapper, `run_channel_pipeline_cuda_batched`, to
  orchestrate the execution of these new kernels.

- A "streamed" version of the pipeline,
  `run_channel_pipeline_cuda_streamed`, which accepts a
  `cudaStream_t` as an argument. This allows the calling
  application to manage the execution stream, enabling overlap
  with other GPU or CPU tasks.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
d43d267626 Add Performance Benchmark for Full Channel Pipeline
This commit adds a performance benchmark for the end-to-end channel simulation pipeline, named `test_channel_simulation`. Its methodology is as follows:

- It systematically iterates through a matrix of test cases, varying
  MIMO configuration (Tx/Rx antennas), signal length, and channel
  length.
- For each case, it runs both the full CPU pipeline (`multipath_channel_float`
  followed by `add_noise_float`) and the single `run_channel_pipeline_cuda`
  function.
- It measures the average execution time for both implementations over
  many trials and calculates the resulting speedup.

This provides a performance characterization of the GPU pipeline across different workloads and directly compares it to the CPU baseline.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
2cb960df4e Create End-to-End CUDA Channel Simulation Pipeline
This commit introduces the main C-callable pipeline function,
`run_channel_pipeline_cuda`, located in a new `channel_pipeline.cu`
file.

This function serves as the primary entry point for the GPU channel
simulation. It orchestrates the entire sequence of operations:
- Manages Host-to-Device data transfers for the input signal and
  channel coefficients.
- Launches the `multipath_channel_kernel` and the
  `add_noise_and_phase_noise_kernel` in the correct order.
- Manages the Device-to-Host data transfer for the final output signal.
- Synchronizes to ensure completion before returning.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
7101dc04d1 Add Performance Benchmark for Noise Generation
This commit adds a new standalone benchmark, `test_noise`, to measure
and compare the performance of the CPU and CUDA implementations of noise
generation.

The benchmark's methodology is as follows:
- It iterates through various configurations, including different
  numbers of receive antennas and signal lengths.
- For each configuration, it runs both the CPU (`add_noise_float`)
  and CUDA (`add_noise_cuda`) functions multiple times to get a stable
  average execution time.
- It prints a formatted table comparing the CPU and GPU latencies and
  calculates the resulting speedup.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
257b296e41 Implement CUDA Noise and Phase Noise Kernel
This commit adds the CUDA implementation for adding Additive White
Gaussian Noise (AWGN) and phase noise to the signal. The code is
located in phase_noise.cu.

- The `add_noise_and_phase_noise_kernel` uses the NVIDIA cuRAND
  library for efficient parallel random number generation.
- Helper functions are included to create, initialize, and destroy
  the cuRAND states required by the kernel.
- Placeholder for a C-callable wrapper, `add_noise_cuda`, is also
  provided.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
97a14c3960 Add Unit Test for CUDA Multipath Channel Kernel
This commit adds a new standalone unit test, `test_multipath`, to
validate the CUDA implementation of the multipath channel.

The test performs the following steps:
- Generates a random input signal and channel model.
- Runs the CPU version (`multipath_channel_float`) to get a baseline result.
- Runs the CUDA version (`multipath_channel_cuda`) with the same inputs.
- Compares the two outputs by calculating the Mean Squared Error (MSE)
  and ensures it is below a small tolerance.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
77d854bdf3 Implement CUDA Multipath Channel Simulation
This commit introduces the CUDA implementation of the multipath channel
model in `multipath_channel.cu`.

- Implements `multipath_channel_kernel` using shared memory for
  efficient, high-performance convolution.

- Provides a C-callable wrapper, `multipath_channel_cuda`, to
  orchestrate the full pipeline of data transfers and kernel
  launches.

- The wrapper includes support for multiple memory models (Explicit
  Copy, Unified Memory, ATS) via preprocessor directives to adapt to
  different build configurations.

- Adds a `interleave_channel_output_cuda` utility to convert signal
  data from the CPU's planar format to the GPU's interleaved format.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
c54f0f7955 Refactor and extend CPU channel model with float support
This commit refactors the CPU-based channel model for improved reusability and extends it with single-precision floating-point support.
This serves as a performance and correctness baseline for the new CUDA implementation.

Key changes include:

	- The original double-based multipath_channel function is refactored to remove hardcoded antenna dimensions from its signature. It now accepts dynamically sized arrays, making it more flexible for use in simulators like dlsim and ulsim.

	- A new multipath_channel_float function is introduced to operate on float data types, matching the GPU's native format.

	- A corresponding add_noise_float function is also added to complete the floating-point CPU pipeline.

	- The new float-based functions are designed to work with an interleaved IQ sample format ([I, Q, I, Q]), which is more suitable for vectorized (SSE) and GPU processing.
2026-02-09 09:29:36 +00:00
Nika Ghaderi
70726903f3 Configure CMake for CUDA and SSE simulations
This commit adds the initial infrastructure for building accelerated simulation components.

   - Adds the CUDA_ENABLE option and logic to find the CUDA toolkit.

   - Adds the CHANNEL_SSE option to enable SSE-specific code paths.

   - Sets required properties on the SIMU target to allow linking with CUDA-compiled objects.

   - Creates the initial oai_cuda.h header for the public API.
2026-02-09 09:29:36 +00:00
francescomani
1d5e2d84c2 add safety check to prevent segfault when dealing with DMRS mapping type for DLSCH and ULSCH (#1019) 2026-02-08 09:13:00 +01:00
francescomani
9b381f5d10 declare RLF to re-establish or restart the connection if the ASN1 decoding fails 2026-02-08 09:13:00 +01:00
francescomani
296fb2bd72 checking csi-rs resource mapping consistency to handle #1017 2026-02-08 09:12:58 +01:00
francescomani
562fcd322f checking SRS symbol mapping consistency to handle #1016 2026-02-08 09:09:44 +01:00
francescomani
833ff548c5 checking consistency in CSI-ResourceConfigId for channel and interference measurements in received RRC configuration
This handles issue #1018
2026-02-08 09:07:22 +01:00
francescomani
0b500d412a adding a function to check the received RRC configuration (function to be expanded in later commits)
also move functions to check RRC configuration to a new file not to overload the already big rrc_UE.c
2026-02-08 08:51:17 +01:00
Shubhika Garg
824d9035c1 fix(ci): remove git reset command from Jenkinsfile
- By default, eNB_CommitID is set as 'develop' in the config
       - When OAI-FLEXRIC-RAN-Integration-Test is triggered by upstream FlexRIC push events, it takes `develop`
       - Triggered by RAN takes commit SHA where `origin/SHA` does not work
2026-02-06 13:16:12 +01:00
Rúben Soares Silva
1271f166e0 Add undocumented Aerial ERROR.indication vendor specific error codes 2026-02-06 10:09:02 +00:00
francescomani
a2a354a447 fix analog beamforming fapi structure generation 2026-02-06 09:03:32 +01:00
Jaroslava Fiedlerova
9777d23173 Merge branch 'integration_2026_w06' into 'develop'
Integration `2026.w06`

* !3690 [FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU emulator designed to run 7.2 with an USRP
* !3887 Update RHEL UBI image source to `registry.redhat.io`
* !3882 Change Aerial to pack directly in nvIPC message buffer
* !3895 CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds
* !3873 Ensure noise power is non-zero
* !3889 Enable imscope for split7.2
* !3801 Resolve "7.2 split ru_thread slot miss
* !3898 Fix config_libconfig_get for string
* !3876 Removing the duplicate loop in ULSCH power computation

Closes #972

See merge request oai/openairinterface5g!3888
2026-02-06 07:42:09 +00:00
Jaroslava Fiedlerova
068e91ad0c Merge remote-tracking branch 'origin/string_libconfig_fix' into integration_2026_w06 (!3898)
Fix config_libconfig_get for string

Change in libconfig reading input for string to reject if it is not of type
string with an error message
2026-02-05 17:53:45 +01:00
Jaroslava Fiedlerova
543fab819e Merge remote-tracking branch 'origin/fix-ulsch_power' into integration_2026_w06 (!3876)
Removing the duplicate loop in ULSCH power computation

- Removing the duplicate loop in ULSCH power computation.
- The logs obtained are as follows:

[NR_MAC] UE dc65: 134.11 Generating RA-Msg2 DCI, RA RNTI 0x113, state 1, preamble_index(RAPID) 42, timing_offset = 5 (estimated distance 195.3 [m])
[PHY]    PUSCH not detected in 134.17 (307,302,50)
[PHY]    PUSCH not detected in 134.17 (311,309,50)
[NR_MAC]  135 4: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[NR_MAC]  135 4: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,8)
[PHY]    PUSCH not detected in 134.18 (310,312,50)
[NR_MAC]  135 5: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (135,9)
[PHY]    PUSCH not detected in 135.8 (309,309,50)
[PHY]    PUSCH not detected in 135.8 (313,308,50)
[NR_MAC]  13515: RA RNTI 41c5 CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[NR_MAC]  13515: RA RNTI a3cc CC_id 0 Scheduling retransmission of Msg3 in (135,19)
[PHY]    PUSCH not detected in 135.9 (308,300,50)
[NR_MAC]  136 4: RA RNTI dc65 CC_id 0 Scheduling retransmission of Msg3 in (136,8)
[NR_PHY] [RAPROC] 135.19 Initiating RA procedure with preamble 6, energy 19.1 dB (I0 63, thres 120), delay 4 start symbol 0 freq index 0
[PHY]    PUSCH not detected in 135.19 (310,310,50)
[PHY]    PUSCH not detected in 135.19 (312,310,50)
[NR_MAC] 135.19 UE RA-RNTI 010b TC-RNTI 0888: initiating RA procedure
[NR_MAC] UE 0888: Sync beam index 0
[NR_MAC] UE 0888: Msg3 scheduled at 136.17 (136.10 TDA 2) start 0 RBs 8
[NR_MAC] UE 0888: 136.10 Generating RA-Msg2 DCI, RA RNTI 0x10b, state 1, preamble_index(RAPID) 6, timing_offset = 4 (estimated distance 156.3 [m])

- For the same scenario, develop branch gives exactly the same result. When
  there is no PUSCH, the power measured for ULSCH and noise are practically
  the same. Furthermore, the value in develop branch is also approximately
  310 for the same noise level.
2026-02-05 17:49:06 +01:00
Guido Casati
337cc4bbe7 Doc: update RRC documentation with new multi-cell architecture
Expand RRC developer and usage documentation to match the current
multi-cell design with separate DU and cell management.

- rrc-dev.md: Document DU and cell data structures and key functions
  (get_du_by_assoc_id, get_cell_by_cell_id, rrc_add_cell_to_du, etc.);
  add DU and cell lifecycle (F1 Setup, config update, disconnection)
  and UE cell association (serving cells, PCell/SCells) with sequence
  diagrams; add handover and cell association update flow; update UE
  context description.
- rrc-usage.md: Update DU/cell list output format and description
  (e.g. integrated DU-CU) and multi-cell per DU wording.
2026-02-05 16:57:31 +01:00
Guido Casati
e75399707c RRC multi-cell (finalise): add informative comments and logging
This commit adds documentation comments and logging to improve
code readability and debugging capabilities for the multi-cell
architecture.

Changes:
- gnb_config.c: Add logging when configuring DU with cell ID and PCI
- rrc_gNB_du.c: Add documentation comment for ssb_arfcn_mtc()
- rrc_gNB_du.c: Add documentation comment for dump_du_info()
2026-02-05 16:57:31 +01:00
Guido Casati
9bfe62b85b RRC multi-cell (finalise): make internal helper functions static
After introduction of new cell management design, these helper functions
are now only used internally within their respective modules and do not
need to be part of the public API. They are made static and their
declarations are removed from public headers.

Changes:
- f1ap_interface_management.c: Make free_f1ap_cell() and
  copy_f1ap_served_cell_info() static
- f1ap_interface_management.h: Remove declarations for the above functions
- rrc_gNB_du.c: Make get_dl_band() and get_ssb_scs() static
- rrc_gNB_du.h: Remove declarations for get_dl_band() and get_ssb_scs()
2026-02-05 16:57:31 +01:00
Guido Casati
bd2fc0d237 RRC multi-cell: enable multiple cell in F1 Setup
Remove the single-cell limit in F1 Setup Request processing and
refactor to loop-based cell handling. Move cell validation (PLMN
check, neighbor configuration validation, system info extraction),
cell creation, SIB encoding, and neighbor labeling inside a loop
over all available cells.

Update F1 Setup Response to include all cells instead of hardcoding to 1.

Add warning log when more than one cell is received. Add proper
cleanup with free_f1ap_setup_response() on error paths.

Impact:
- F1 Setup now accepts and processes multiple cells from a single
  DU, enabling multi-cell deployments
- All cells are validated, created, and included in the setup
  response
2026-02-05 16:55:32 +01:00
Jaroslava Fiedlerova
0858ee8877 Merge remote-tracking branch 'origin/972-7-2-split-ru_thread-slot-miss' into integration_2026_w06 (!3801)
Resolve "7.2 split ru_thread slot miss"

Closes #972
2026-02-05 15:21:25 +01:00
rmagueta
0c2a9384d0 Removing the duplicate loop 2026-02-05 13:33:03 +00:00
francescomani
269880f89d change in libconfig for string to reject an input that is not of type string with error message 2026-02-05 13:35:13 +01:00
Robert Schmidt
12fc8112d9 Merge remote-tracking branch 'origin/imscope-for-7.2' into integration_2026_w06 (!3889)
Enable imscope for split7.2
2026-02-05 13:28:08 +01:00
andrewse
95c8fa468a fhi_72: Track delay processing via atomic variable
Add xran_queue_length atomic variable to count the number of messages in
oran_sync_fifo (as notifiedFIFO_t does not do this). Use this to
tolerate some double messages (e.g. excessive processing delay), but
start to skip if messages accumulate.

Prior to this change, "Detected double sync message" was printed each
time there was more than one message, which reflected the previous
behavior when using polling, but the gNB might catch up if it is only
once. The new logic ensure that we don't skip individual slots but do so
once messages start to accumulate.
2026-02-05 13:19:12 +01:00
Guido Casati
d471046623 RRC multi-cell: complete migration to cell container architecture
Finalize the migration from single-cell-per-DU to the multi-cell
architecture: remove legacy DU/cell fields and refactor RRC procedures
to use cell containers and UE serving cells instead of DU-based lookups.

Data structure changes:
- Remove nr_cellid from gNB_RRC_UE_t; cell identity comes from the UE's
  serving_cells (PCell entry via ue_get_pcell_entry(ue)). UE_LOG_ARGS
  and LOG_UE_* macros take a PCell entry pointer for null-safe cell_id
  in logs; all call sites pass ue_get_pcell_entry(ue).
- Remove setup_req, mib, sib1, mtc from nr_rrc_du_container_t (held in
  cell containers); remove nr_cellid from gNB_RRC_INST and its
  assignment in gnb_config.c.

Function and signature updates:
- get_ssb_arfcn(): take cell container instead of DU.
- label_intra_frequency_neighbours(): drop du parameter, use cell only.
- Handover: Handover context (source and target) now stores cell
  pointers (source->cell, target->cell) instead of DU pointers. When
  the context is created (N2: on Handover Request; F1: in
  nr_rrc_trigger_f1_ho), the target cell is set in ho_context->target->cell
  and, for F1, the source cell in ho_context->source->cell.
  nr_initiate_handover() takes only source_cell and reads the target
  from ho_ctx->target->cell, so it no longer takes a target parameter.
  The target is known at handover creation time, while the UE’s
  serving_cells are only updated after F1 UE Context Setup Response.
- nr_rrc_trigger_f1_ho() and the N2 handover path pass cell pointers
  and set ho_context->target->cell (and for F1, source->cell) when
  the handover is triggered.

Procedure refactoring:
- Lookups: replace get_du_by_cell_id() with get_cell_by_cell_id()/
  get_cell_by_pci(); remove get_du_by_cell_id() and
  get_cell_information_by_phycellId().
  Rationale: cell-specific data (MIB, SIB1, mtc, info) now lives in
  cell containers, and a DU can host multiple cells. Callers need the
  cell (to use cell->info, cell->mtc, etc.), not the DU. Looking up
  by cell_id therefore returns the cell container
  (get_cell_by_cell_id()); when the DU is needed, use
  cell->assoc_id and get_du_by_assoc_id(). Looking up by PCI is
  scoped (e.g. get_cell_by_pci_for_du() for a given DU, or via the
  UE’s serving cells) because PCI is not globally unique.
- Setup/Reestablishment: resolve cell, register as PCell via
  rrc_add_ue_serving_cell(); reestablishment resolves cell by PCI
  (rrc_get_cell_by_pci_for_du), then rrc_remove_ue_scells_from_du +
  rrc_add_ue_serving_cell; validate_ue_cell_association() after update.
- Measurement config: use cell->info (SCS/band) and cell->mtc.
- Handover: use cell containers end-to-end; after UE context
  modification response call nr_rrc_update_cell_assoc_after_ho().
- NGAP: cell_id and TAC from UE PCell via rrc_get_pcell_for_ue();
  Handover Notify: get cell for message content, use get_du_for_ue() for
  DU existence check; paging resolves UE by 5G-S-TMSI-Part1 and uses that
  UE's PCell (rrc_get_pcell_for_ue) for F1AP_PAGING_IND nr_cellid.

Performance and robustness:
- Use rrc_get_pcell_for_ue() when cell data is needed; use
  get_du_for_ue() when only the DU is needed (F1/N2 HO trigger,
  Handover Notify DU check) for efficiency.
- Reestablishment: remove old PCell before adding new; error handling
  for PCell add and validation.

Code cleanup:
- F1 setup: stop copying/storing setup request in DU container; F1
  disconnect only frees cell containers via rrc_free_cell_container().
- dump_du_info(): iterate du->cells and show all cells per DU.
- telnetsrv_ci.c: use du->gNB_DU_id directly and fix format (%ld).
- UeContextSetupRequest servCellIndex set to RRC_PCELL_INDEX; remove
  servCellIndex from F1AP UE context modification request.
2026-02-05 11:44:10 +01:00
Guido Casati
5980dbcb40 RRC multi-cell: use cell lookups in NGAP Handover Request handling
In rrc_gNB_NGAP.c, rrc_gNB_process_Handover_Request() is updated to
resolve the target by cell instead of by DU, then resolve the DU from
the cell's assoc_id. This aligns Handover Request with the new
cell-centric model and cell management APIs.

- Resolve target with get_cell_by_cell_id(&rrc->cells, msg->nr_cell_id)
  instead of get_du_by_cell_id(); on failure, log "no cell found" and
  send NGAP handover failure.
- Resolve DU with get_du_by_assoc_id(rrc, cell->assoc_id); add a
  failure path (log, NGAP handover failure, return -1) when no DU
  exists for the cell's assoc_id.
- Use cell->info (nr_rrc_cell_info_t) for logging and for key
  derivation (nr_derive_key_ng_ran_star); use du->assoc_id
  for UE context creation instead of du->setup_req->cell[0].info.

get_ssb_arfcn(du) is unchanged and still takes the DU; other DU-based
lookups are kept where still required.
2026-02-05 11:44:10 +01:00
Guido Casati
15c79b0288 RRC multi-cell: adopt cell management in F1 DU configuration update procedures
Migrate F1 DU configuration update procedures in openair2/RRC/NR/rrc_gNB_du.c
to use the cell management API instead of accessing cell data through
setup_req, completing the transition to the new multi-cell architecture.

1. update_cell_info:
   - Refactored to use cell management API: takes RRC instance, old cell_id,
     and new cell info; finds cell via get_cell_by_cell_id() internally.
   - Returns cell container pointer (or NULL on failure) instead of void.
   - When cell_id changes: removes cell from RB tree (old key), updates via
     cp_f1_served_cell_info_to_cell(), re-inserts (new key); validates no
     duplicate cell_id/PCI before allowing change.
   - Frees old MTC when new measurement timing config is present.
   - Encapsulates cell lookup and update logic.

2. rrc_gNB_process_f1_du_configuration_update:
   - Uses update_cell_info() for cell modify; validates cell belongs to DU
     (assoc_id) after update.
   - Duplicate checking via get_cell_by_cell_id() and
     rrc_get_cell_by_pci_for_du()
   - For cells to add: validates duplicate cell_id globally and duplicate
     PCI within DU; rejects with logging.
   - MIB/SIB1 updated in cell container (cell->mib, cell->sib1); uses
     du->gNB_DU_id; passes cell to label_intra_frequency_neighbours();
     removes direct setup_req->cell[0] access.

Backward compatibility: setup_req remains until migration is completed;
cell-specific data is managed in the cell container and accessed via
the cell management API. Improves separation of concerns and enables
proper multi-cell support.
2026-02-05 11:44:09 +01:00
Guido Casati
95d35b9b7d RRC multi-cell: integrate cell containers into F1 setup flow
Refactor F1 setup processing to create and manage cell containers during DU
initialization, establishing the foundation for multi-cell architecture where
cells are managed independently from DUs.

Why: Cell information is currently tied to F1AP structures (f1ap_served_cell_info_t),
which complicates multi-cell support. Introducing cell containers at F1 setup
decouples RRC cell management from F1AP and allows cells to be managed
independently while keeping existing code paths working.

Key changes:

1. Cell container creation (cp_f1_served_cell_info_to_cell):
   New helper copying F1AP served cell info into nr_rrc_cell_container_t (cell_id,
   pci, plmn, tac, TDD/FDD frequency info). Extracts and stores MTC in the cell.

2. Function signature updates:
   get_cell_neighbour_list() and label_intra_frequency_neighbours() now take
   nr_rrc_cell_container_t* and use cell->info; improved logging (cell_id, PCI,
   SSB ARFCN).

3. valid_du_in_neighbour_configs:
   Removed ssb_arfcn parameter; MTC is extracted and freed inside the function.

4. F1 Setup (rrc_gNB_process_f1_setup_req):
   Initialize DU cell tree (RB_INIT(&du->cells)). Populate DU-only fields
   (gNB_DU_id, gNB_DU_name, rrc_ver).
   Flow:
   - create cell with cp_f1_served_cell_info_to_cell
   - add to global tree via rrc_add_cell()
   - add DU via rrc_add_du()
   - attach cell to DU with rrc_add_cell_to_du().
   Store MIB/SIB1/MTC in cell.
   Use cell container for neighbour labeling and SIB encoding.

5. Duplicate cell detection:
   Use rrc_add_cell() for global cell tree insert; collision return indicates
   duplicate cell_id. Clearer error messages for Cell ID vs PCI conflicts.
   Use F1AP_CauseRadioNetwork_cell_not_available for cell conflicts.

6. DU configuration update:
   Use get_cell_by_cell_id() to find cell, check assoc_id, pass cell container
   to label_intra_frequency_neighbours().

7. DU disconnection:
   Use rrc_cleanup_du() to remove cells from global tree and free resources;
   logging uses DU fields (gNB_DU_id, gNB_DU_name).

8. Global cell tree:
   Initialize rrc->cells in openair_rrc_gNB_configuration().

Backward compatibility: setup_req still built via cp_f1ap_setup_request();
du->mib, du->sib1, du->mtc remain set (shared with cell container).
2026-02-05 11:44:09 +01:00
Guido Casati
c453c342ed RRC multi-cell: add integration tests
Add integration tests for RRC cell and DU management and UE serving-cell
logic so that multi-cell behaviour and regressions can be validated
without running the full stack.

* test_du_lookup() – DU container lookup by assoc_id:
  - Multiple DU creation and insertion into RRC DU tree
  - Lookup of existing DUs by assoc_id
  - Non-existing and invalid assoc_ids
  - Cleanup of DU containers and cells

* test_cell_lookup() – Cell management and UE association:
  - Cell lookup by cell_id and PCI (global and per-DU)
  - DU-specific lookup: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du()
  - Duplicate cell and PCI collision handling (including PCI reuse across
    DUs and rejection of duplicate PCI within same DU)
  - Cell–DU association (add/remove cells from DU containers)
  - UE serving cell: add PCell/SCells, get by ID, get PCell, max serving
    cells limit, single PCell enforcement
  - validate_ue_cell_association(), rrc_remove_ue_scells_from_du()
  - Edge cases and error handling

Add openair2/RRC/NR/tests/rrc_cell_management_test.c and extend
openair2/RRC/NR/tests/CMakeLists.txt to build and register the test.
2026-02-05 11:44:09 +01:00
Guido Casati
2ff071a52e RRC multi-cell: add UE serving cell management functions
Add functions to manage UE serving cells so the RRC can track which cells
a UE is using (PCell and SCells) for multi-cell UE context and future
SCell management.

- rrc_cell_management.c / rrc_cell_management.h:
  * rrc_get_ue_serving_cell_by_id(): return serving cell by servCellIndex
    (O(k) linear search, k ≤ 32).
  * rrc_add_ue_serving_cell(ue, cell, serving_cell_id): add entry to UE
    serving_cells with validation: reject duplicate servCellIndex with
    different nci, enforce max 32 serving cells (TS 38.331), keep PCell
    at index 0 for O(1) access; return existing entry if same
    servCellIndex and nci.
  * rrc_remove_ue_scells_from_du(ue, assoc_id): remove all serving cells
    for the given DU (handover/DU disconnect); use stored assoc_id for
    O(k) comparison.
  * ue_get_pcell_entry(): return PCell entry (first element, O(1)).
  * rrc_get_pcell_for_ue(): return PCell container from cell tree using
    UE's PCell entry.
  * Header: RRC_PCELL_INDEX (0), RRC_MAX_NUM_SERVING_CELLS (32), and
    declarations for the above.

- UE context lifecycle:
  * rrc_gNB_create_ue_context(): seq_arr_init(serving_cells).
  * rrc_delete_ue_data(): seq_arr_free(serving_cells).
2026-02-05 11:44:09 +01:00
Guido Casati
6d0c7945c2 RRC multi-cell: extract DU management to cell management library
Move DU tree management from rrc_gNB_du.c into rrc_cell_management so that
DU and cell lookup logic live in one place, improving maintainability and
testability (there is no DU lib).

- rrc_cell_management: add du_compare(), RB_GENERATE(rrc_du_tree),
  get_du_by_assoc_id(), rrc_add_du(), rrc_rm_du(), rrc_cleanup_du(),
  rrc_free_du_container(); declare them in rrc_cell_management.h.
- rrc_gNB_du: move du_compare(), RB_GENERATE, get_du_by_assoc_id()
  to rrc_cell_management
2026-02-05 11:44:09 +01:00
Guido Casati
3dfdc66c41 RRC multi-cell: add cell management library with lookup and cleanup
This commit introduces a new library module (rrc_cell_management.c/h)
to centralise functions that provides cell lookup, DU-specific cell
management, and cell lifecycle managements.

The design uses a dual-tree architecture:
- Global cell tree: RB-tree at RRC level (rrc->cells) keyed by cell_id,
  used for O(log N_CELL) lookups and for maintaining num_cells.
- DU-specific storage: seq_arr_t per DU (du->cells) for iteration and
  management of cells belonging to each DU.

API added:
- Global tree: get_cell_by_cell_id()(finds cell using global RB-tree
  lookup (O(log N_CELL) complexity); rrc_add_cell(); rrc_rm_cell()
  (rrc_rm_cell removes from tree, decrements num_cells, and frees the
  cell via rrc_free_cell_container).
- DU-local seq_arr: rrc_get_cell_for_du(), rrc_get_cell_by_pci_for_du(),
  rrc_add_cell_to_du() (with duplicate cell_id/PCI checks).
- Cleanup: rrc_free_cell_container() (frees ASN.1 MIB/SIB1/MTC and
  container

Build: add rrc_cell_management static library in openair2/RRC/NR;
link it into nr_rrc from top-level CMakeLists.txt.
2026-02-05 11:44:09 +01:00
Guido Casati
b699884ae4 RRC multi-cell: add data structure definitions for multi-cell architecture
Add foundational data structures in nr_rrc_defs.h for multi-cell handling
in RRC, separating DU management from cell management.
Design uses a global cell tree for O(log N) lookups while keeping cell
ownership in DUs for locality and maintenance.

The implementation maintains backward compatibility and follows the same
patterns as existing DU and CUUP management in the codebase, i.e. RB-trees
with logarithmic complexity for scalable multi-cell deployments.

- Cell container structures:
  * nr_rrc_cell_container_t: cell-specific data (cell_id, pci, plmn, tac,
    frequency info, mib, sib1, mtc)
  * nr_rrc_cell_info_t: TDD/FDD modes; frequency structs nr_rrc_freq_info_t,
    nr_rrc_tdd_info_t, nr_rrc_fdd_info_t

- UE serving cell tracking:
  * ue_serving_cell_t: nci, serving_cell_id (ServCellIndex TS 38.331,
    0=PCell, 1-31=SCell), assoc_id for fast DU lookup
  * gNB_RRC_UE_t: seq_arr_t serving_cells, with PCell always being the
    first in the sequence

- DU container refactoring:
  * nr_rrc_du_container_t: DU-only fields (gNB_DU_id, gNB_DU_name, rrc_ver);
    seq_arr_t cells for per-DU iteration; setup_req/mib/sib1/mtc kept for
    backward compatibility

- Global cell tree:
  * gNB_RRC_INST_s: RB_HEAD(rrc_cell_tree, nr_rrc_cell_container_t) cells,
    num_cells (data only; lookup helpers get_cell_by_cell_id/get_cell_by_pci
    to be added separately)
2026-02-05 11:44:09 +01:00
Guido Casati
c6229a9c7a RRC multi-cell: enforce unique PCI in per-cell neighbour lists
Neighbour lists are built per serving cell in fill_neighbour_cell_configuration.
Each neighbour in a list is identified by PCI; having two entries with the same
PCI in one cell's list would be ambiguous and indicate a configuration error.
This commit adds validation so that duplicate PCIs within a cell's neighbour
list are detected at configuration load time and cause a fatal assertion with
a clear error message.

Changes:
- Add eq_neighbour_pci() and get_neighbour_by_pci() using
  common/utils/alg/find.h to look up a neighbour by PCI in a seq_arr.
- In fill_neighbour_cell_configuration(), before appending each
  cell's neighbour list, iterate over neighbours and assert that no PCI
  appears more than once
2026-02-05 11:44:09 +01:00
Guido Casati
4c56c6b2de Refactor (RRC): improve UE context removal logging
Replace generic UE event log with explicit INFO log including UE ID and RNTI
when removing a UE context and centralize access to UE fields via a local
pointer.

rrc_delete_ue_data removes the all the list in the UE context, including the
serving cells, and therefore the cell id should not be logged in the function
responsible for the removal of the UE context, which at this point is already
emptied and while the cells themselves are still there (in the DU/global cell
structures), the lists in the UE context are empty.
2026-02-05 11:43:59 +01:00
Jaroslava Fiedlerova
f4b9e04c61 Merge remote-tracking branch 'origin/fix-noise-calc' into integration_2026_w06 (!3873)
Ensure noise power is non-zero

Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd ("changes in PUCCH0 SNR measurement, testing for
PUCCH power control")
2026-02-05 10:20:45 +01:00
Reem Bahsoun
b285f91968 Change Aerial config file in targets to match Nvidia's CI setup 2026-02-05 10:13:01 +01:00
Laurent THOMAS
74b998a0d8 Rewrite n0_subband_power_avg_dB calculation with better locality 2026-02-04 19:22:00 +01:00
Laurent THOMAS
ee00eb346e Reformat dump_nr_I0_stats() 2026-02-04 19:11:10 +01:00
Laurent THOMAS
656b1d52a0 Remove unused global variables 2026-02-04 19:09:38 +01:00
Robert Schmidt
b533127553 Ensure noise power is non-zero
Prior to this commit, noise power estimation could be zero because of a
call to clearArray() in gNB_I0_measurements(). This is problematic, as
this can lead to a noise power of 0 if all symbols in a RB are used,
which in turn leads to a spike in SNR.

To avoid this, use an intermediate array to store noise power, and only
update n0_subband_power if not all RBs are used (i.e., we can detect
noise power). Further, use an exponential moving average to smoothen
noise estimation.

Fixes: fb4235fd50 ("changes in PUCCH0 SNR measurement, testing for
    PUCCH power control")
2026-02-04 18:36:08 +01:00
Robert Schmidt
ec0b97beae Merge remote-tracking branch 'origin/ci-fix-jenkinsfile' into integration_2026_w06 (!3895)
CI: Ensure OAI-FLEXRIC-RAN-Integration-Test pipeline always uses latest commit for non-MR builds

Related MR -> mosaic5g/flexric!77

For push events, we have:

    sh "git fetch"
    sh "git checkout -f ${commitID}"

We need to do a reset hard so that the run is executed on synchronized
develop branch.

In the pipeline, we see:

    17:38:34  + git checkout -f develop
    17:38:34  Previous HEAD position was 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
    17:38:34  Switched to branch 'develop'
    17:38:34  Your branch is behind 'origin/develop' by 526 commits, and can be fast-forwarded.
    17:38:34    (use "git pull" to update your local branch)

After implementing the fix:

Below are the runs for pipeline triggered by a merge request event:

    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC/229/
    https://jenkins-oai.eurecom.fr/job/OAI-FLEXRIC-RAN-Integration-Test/3788/

In the OAI-FLEXRIC-RAN-Integration-Test pipeline, which is executed by
Build with Parameters from OAI-FLEXRIC

We see the pipeline took the latest develop:

    11:26:02  + git reset --hard origin/develop
    11:26:02  HEAD is now at 9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
2026-02-04 12:55:33 +01:00
Robert Schmidt
357496a88a Merge remote-tracking branch 'origin/Change_nvIPC_send_functions' into integration_2026_w06 (!3882)
Change Aerial to pack directly in nvIPC message buffer

This MR changes the Aerial pack/send procedures to pack the messages
directly into the nvIPC message buffers.

This saves the use of some memcopy calls, as well as clean up the code.

The P7 message packing/send is now only handled in the file
`fapi_nv_p7.c`

Add 3 functions in fapi_nvIPC.c to allow message allocation, release and
send from fapi_vnf_p7.c

Add 2 functions to access the memory pool sizes allocated from nvIPC, as
we can't use sizeof to report the buffer size to the packing functions

Remove now unused aerial_send_P5_msg , aerial_send_P7_msg and
aerial_send_P7_msg_with_data functions

Now Aerial only has one function to handle sending P5 and another to
send P7 messages

Remove fapi_phy_api_msg from fapi_nvIPC.h as it is duplicated in
nr_fapi.h
2026-02-04 12:12:47 +01:00
Shubhika Garg
df7db3ab27 ci-fix: Ensure downstream pipeline always uses latest commit for non-MR events
- ensure the local branch is synchronized with the latest commit from the remote.
     - Related MR!77 on mosaic5g/Flexric repository
2026-02-04 11:15:18 +01:00
Rúben Soares Silva
b7867a4053 Change data_len type in aerial_pack_tx_data_request to match with nv_ipc_msg_t.data_len type 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
54076927ba Remove duplicated FAPI header struct from fapi_nvIPC.h 2026-02-03 10:20:45 +00:00
Rúben Soares Silva
aeba59a9ad Change Aerial to pack directly in nvIPC message buffer.
Get mempool sizes from nvIPC for usage in the packing procedures.

Remove now unused functions.
2026-02-03 10:20:45 +00:00
Bartosz Podrygajlo
315fe92253 Enable imscope for split7.2 2026-02-03 10:04:42 +01:00
Jaroslava Fiedlerova
2c1687e44f Merge remote-tracking branch 'origin/rhel-fix' into integration_2026_w06 (!3887)
Update RHEL UBI image source to registry.redhat.io

This merge request updates the RHEL UBI base image source to registry.redhat.io,
aligning with Red Hat’s supported container registry and avoiding potential
access or availability issues with registry.access.redhat.com.
2026-02-03 08:12:06 +01:00
Jaroslava Fiedlerova
358c17ce58 Merge remote-tracking branch 'origin/xran-large-delay-profile' into integration_2026_w06 (!3690)
[FHI72] Support large DU delay profiles in the xran F, and include ProtO-RU
emulator designed to run 7.2 with an USRP

This MR does the following:
- we patch xRAN to support large DU delay profiles (i.e., T1a/Ta4 values larger
  than a TTI)
- we update the FHI72 docs to introduce ProtO-RU, a software implementation of a
  Split-7.2 O-RU with large delay profile
- we provide an example configuration for ProtO-RU

Details on the xRAN patch:
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI. When
T1a/Ta4 values larger than a TTI are used, this causes two issues:
(1) C-plane packets to be generated later than expected, and
(2) oai_xran_fh_rx_callback() receives the wrong timing information, resulting
    in potentially empty/stale PUSCH/PRACH data to be read.
In the xRAN patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include:
(1) three additional variables in offset_num_slots_* (xran_dev.h),
(2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline"
    (xran_cb_proc.c), and
(3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from
sending U-plane packets when it is not a downlink slot.
2026-02-03 08:07:56 +01:00
Xin Zhe Khooi
95df8b174e protoru: fix doc indent 2026-02-02 15:28:06 +00:00
Guido Casati
5d657c801c Refactor (F1AP): align cell lists definitions with TS 38.473
* Commit applies to Setup Request, CU/DU Configuration Update
* Set standard compliant max number of cells per DU
* Allocate large lists on the heap to prevent stack overflow
  due to the large size
* Update relevant free functions
* Also, fix bug in eq_f1ap_cu_configuration_update

Also, improve comments in struct definition.
2026-02-02 16:26:10 +01:00
Guido Casati
d73a9148de Refactor: add common helper functions to construct 5G-S-TMSI
* 5G-S-TMSI construction is defined in 3GPP TS 23.003 and
  relevant at both gNB and UE side
* Add helper functions to be later used in NG Paging
* Adopt in NAS UE
2026-02-02 16:25:47 +01:00
Xin Zhe Khooi
34c001d488 protoru: sample config update 2026-02-02 15:07:42 +00:00
Xin Zhe Khooi
0388bf0e67 protoru: add docs and sample config 2026-02-02 15:01:44 +00:00
Xin Zhe Khooi
003d72c859 fhi7.2: introduce support for T1a and Ta4 values larger than TTI interval
In xRAN, it appears that T1a/Ta4 values are assumed to be within a TTI.
When T1a/Ta4 values with larger than a TTI are used, this causes two issues: (1) C-plane packets to be generated later than expected and (2) oai_xran_fh_rx_callback() receives the wrong timing information resulting in potentially empty/stale PUSCH/PRACH data to be read.

In this patch, we modify xRAN to make it handle large T1a/Ta4 values properly.
The changes include: (1) three additional variables in offset_num_slots_* (xran_dev.h), (2) modify "xran_timing_create_cbs" and "xran_timer_arm_for_deadline" (xran_cb_proc.c), and (3) revise "tx_cp_dl_cb" and "tx_cp_ul_cb" (xran_main.c).
Additionally, we add additional guard conditions to prevent xran_tx_proc.c from sending U-plane packets when it is not a downlink slot.
2026-02-02 15:00:01 +00:00
Robert Schmidt
9cb79027e4 Merge branch 'integration_2026_w05' into 'develop'
Integration `2026.w05`

* !3850 Update vrtsim timing job thread
* !3853 Clear memory in shm_td_iq_channel after RX
* !3823 Fix RSRP overflow
* !3766 UE support to send CSI report on PUSCH
* !3848 Initial implementation of O-RU for 7.2 emulator
* !3860 NGAP: improve error handling in RRCReconfiguration from Handover Command decoding
* !3507 Create Debian and Redhat packages with CPack
* !3875 Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()
* !3593 NR UE: add support for multiple RF frontends
* !3769 Add Ethernet PDU session support and make PDU session request configurable
* !3831 semi-manual remove of not used #define commands
* Update RFsim4G UE configs for RFsim changes after !3593
* !3821 [FHI72] [xran F] Handle fragmented (un)compressed packets
* !3732 Implement TS 38.473 transparency for CellGroupConfig forwarding and handle re-establishment on a different DU
* !3880 Prevent the PNF from sending P7 messages after sending a STOP.indication
* !3868 CI: Upgrade Aerial pipeline to 25-3
* Revert one CI XML change after !3732

Closes #1045, #837, and #1043

See merge request oai/openairinterface5g!3877
2026-01-30 16:38:25 +00:00
Robert Schmidt
50e133f791 Revert "CI: upgrade RAN-SA-Handover-CN5G F1 handover test to test Reestablishment on a different DU"
The CI test proved not as stable as expected (because the UE triggers A3
events which we don't want), so revert this functionality while we work
on a new pipeline.

This reverts commit bc62e8abca.
2026-01-30 15:55:33 +01:00
Jaroslava Fiedlerova
5ff032f9a7 Merge remote-tracking branch 'origin/aerial_25-3' into integration_2026_w05 (!3868)
CI: Upgrade Aerial pipeline to 25-3

Upgrade Aerial CI pipeline to 25-3 after aerial-cuda-accelerated-ran became
open source.
2026-01-30 12:17:10 +01:00
Reem Bahsoun
81eb336add Add -l option to DL throughput tests in the Aerial pipeline 2026-01-30 12:13:05 +01:00
Reem Bahsoun
37b1a0a9f3 Align configuration file in targets/ with the configuration file in ci-scripts/ and fix spacing. 2026-01-30 12:13:05 +01:00
Reem Bahsoun
283063f3da Update tutorial to align with the new Aerial release (25-3) 2026-01-30 12:13:01 +01:00
Shubhika Garg
f393300da1 RHEL: switch registry to registry.redhat.io
- Switched base image source from registry.access.redhat.com to registry.redhat.io for all RHEL9 variants.
2026-01-30 10:11:21 +01:00
Jaroslava Fiedlerova
7ba52783fb CI: fix missing rfsimulator section in UE conf file in 5G RF-Sim
Update UE config introduced in !3769 to align with changes from !3593.
2026-01-30 09:18:23 +01:00
Robert Schmidt
a0ff4828cf Merge remote-tracking branch 'origin/prevent-p7-msg-after-stop-indication' into integration_2026_w05 (!3880)
Prevent the PNF from sending P7 messages after sending a STOP.indication

Upon stopping the PNF, when sending the STOP.indication to the VNF, set
pnf_p7->terminate to 1.

Add a check on the PNF P7 send functions to not send a message after
pnf_p7->terminate is set.

This prevents the PNF from sending SLOT.indications after stopping,
which sometimes was causing the VNF to process a SLOT.indication after
it had received the indication to STOP.

Also, this MR adds a sanity check on the VNF P7 message handler to
ignore any P7 messages it receives after having it's own terminate flag
set to 1

This MR closes issue #1045
2026-01-29 17:22:15 +01:00
Robert Schmidt
bc6f710b23 Merge remote-tracking branch 'origin/uncompressed-f' into integration_2026_w05 (!3821)
[FHI72] [xran F] Handle fragmented (un)compressed packets

In both E and F, the radio-transport fragmentation is not supported, and
all the "fragmented" (not seen as fragments in the xran, only as
sections) packets contain "E-bit" equal to 1. Per spec, the value 1 for
"E-bit" signifies the last fragment of one symbol. For more info, please
see "ecpriSeqid" section in the spec.

In E:

- nRBStart and nRBSize is updated according to the sent/received packet;
- max sections = 1;
- when a packet is fragmented, the xran uses memcpy(pos, iq_data_start,
  size) function, and nothing is stored in start_prbu , num_prbu ,...

In F:

- nRBStart and nRBSize is only used for C-plane messages;
- nPrbElm represents the number of sections for DL only;
- based on the nPrbElm, each section contains UP_nRBStart and UP_nRBSize
  parameters which represent the start and number of PRBs in one section
  or one fragment;
- when a packet is fragmented, the xran uses nSecDesc and sec_desc to
  extract the packet section content, and the data is stored in
  start_prbu , num_prbu ,...

Previous work on the fragmentation in F:

- #884
- !3394 - only increases the XRAN_MAX_FRAGMENT from 4 to 6, since it was
  only tested with BFP 8, but not end-to-end unfortunately. But this MR
  fixes all the issues.

Tested with VVDN RU, 2x2, 16 bits, 100MHz, 30kHz, MTU <= 9216 B, and
Quectel UE RM520N-GL Revision: RM520NGLAAR03A03M4G.
2026-01-29 17:20:54 +01:00
Robert Schmidt
c8bcfedae0 Merge remote-tracking branch 'origin/issue-837' into integration_2026_w05 (!3732)
Implement TS 38.473 transparency for CellGroupConfig forwarding and handle re-establishment on a different DU

This MR implements the following fixes that are relevant in RRC
procedures (e.g. re-establishment, reconfiguration):

1. Transparent CellGroupConfig forwarding

This MR implements TS 38.473 transparency requirements by ensuring that
the CellGroupConfig IE is transparently forwarded from the gNB-DU to the
UE without any re-encoding at the gNB-CU. The CU stores and forwards the
encoded bytes transparently, while the DU is responsible for all
encoding and modifications (e.g., reestablishRLC flags).  Motivation

Motivation: The 3GPP TS 38.473 specification mandates that the
CellGroupConfig IE shall be transparently signaled to the UE.
Previously, the CU was re-encoding CellGroupConfig depending on the
scenario, instead of retrieving it from the DU, violating the
transparency requirement. CU may decode for internal use but must not
re-encode for forwarding.  Solution

Solution: Core Principle: The CU stores the encoded CellGroupConfig
bytes received from the DU and forwards them directly to the UE without
any re-encoding. The DU handles all encoding and modifications.

Key Changes:

  1. Transparent Forwarding in RRC Reconfiguration
     - Modified build_RRCReconfiguration_IEs() to use pre-encoded bytes
       directly
     - Changed parameter from cell_group_config to cgc (encoded byte
       array with buffer and size)
  2. Encoded Bytes Storage
     - Added byte_array_t mcg field to RRC UE structure to store encoded
       CellGroupConfig
     - Added store_cgc() helper function to save encoded cell group in
       the RRC UE Context at gNB (from F1AP messages)
  3. DU Encoding Responsibilities
     - Add gNB-DU Configuration Query IE support to trigger cgc encoding
       to request CellGroupConfig from DU
     - DU encodes CellGroupConfig with proper reestablishRLC flags
       during re-establishment
     - DU removes SRB1 from rlc-BearerToAddModList during
       re-establishment (SRB1 re-establishment is done before
       RRCReconfiguration)
  4. New functions
     - Add rrc_detect_reestablishment() function to detect
       re-establishment during UE Context Modification
     - Extracted rrc_gNB_first_reconfiguration_after_reestablishment()
       function to handle first reconfiguration after re-establishment
     - Added dump_cgc() and dump_mcg() utility functions for debugging
       purposes
  5. Re-establishment Flow
     - rrc_gNB_process_RRCReestablishmentComplete() requests
       CellGroupConfig from DU via gNB_DU_Configuration_Query in UE
       Context Modification Request
     - DU detects re-establishment and add reestablishRLC IEs
     - CU stores encoded CGC from the UE Context Modification Response
       and forwards it transparently in subsequent RRC Reconfiguration

Testing

Manual Testing:

  - RRC re-establishment procedure completes successfully
  - RRC Reconfiguration after re-establishment includes all DU-provided information

Issues fixed

Closes issue #837

2. Trigger UE Context Setup fallback upon reestablishment on DU
   different from the original one

As per 38.401 §8.7: if the UE accesses a DU different from the original
one during re-establishment, the CU must trigger UE Context Setup toward
the new DU. This refers to steps 9-10 and steps 9’-10’. Either one or
the other can be executed during re-establishment.

e.g. if this happens during handover, it shall trigger a UE Context
Setup fallback on the CU.

This MR implements the required behavior by:

- Adding a new helper function rrc_handle_f1_ho_reestab_on_target() to
  handle F1 handover reestablishment on target DU. The function triggers
  UE Context Setup procedure when the UE reestablishes on the target DU
  during an ongoing F1 handover.
- Calling this function when detecting that the UE is reestablishing on
  the target DU during handover, i.e.: (1) from
  handle_rrcReestablishmentComplete(), as per 38.401 §8.7, NOTE on steps
  9-10: CU gets UL RRC MESSAGE TRANSFER from a DU different than the
  original (2) from rrc_CU_process_ue_modification_required, as per
  38.401 §8.7, NOTE on steps 9'-10': CU gets a UE CONTEXT MODIFICATION
  REQUIRED from a DU different from the original one.

Also:

- add helper rrc_fill_f1_ue_context_setup and adopt it in handover
- move DRB list filler fill_drb_to_be_setup into rrc_gNB.c and rename it
  rrc_fill_f1_drb_to_setup for consistency

See also TS 38.401 Figure 8.7-1 "RRC connection reestablishment
procedure" for reference

3. DU: Handle missing old UE context in DL RRC Message Transfer

During F1 handover reestablishment, the CU may forward a DL RRC Message
Transfer to the target DU with old_gNB_DU_ue_id included, even though
the target DU does not have the old UE context yet.

The code previously used AssertFatal when the old UE context was not
found, causing a crash: "CU claims we should know UE %04x, but we don't"

According to TS 38.473, the gNB-DU shall release the old gNB-DU UE F1AP ID only:

> if the gNB-DU identifies the UE-associated logical F1-connection If
> there is no matching connection, there is nothing to release.

Fix:

- Check if old UE context exists before accessing it
- If old UE does not exist, log error, clean up any stale F1 UE data,
  and return early (do not deliver RRC message since reestablishment
  can't be completed)

The goal is to address a recurrent issue in the F1 pipeline, see
jenkins-oai.eurecom.fr/job/RAN-SA-Handover-CN5G/514:

    Assertion (oldUE) failed!
    In dl_rrc_message_transfer() /oai-ran/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:956
    CU claims we should know UE 35ce, but we don't
2026-01-29 17:20:43 +01:00
Reem Bahsoun
de0d100d67 Update nvIPC library to match the new cuBB image 2026-01-29 15:45:52 +01:00
Reem Bahsoun
bf78ef08e1 Add Nvidia L1 configuration file in sa_gnb_aerial and sa_gnb_aerial_ul 2026-01-29 15:45:42 +01:00
Thomas Schlichter
9048ab1860 CI: fix missing rfsimulator section in UE conf files for 4G RF-Sim tests 2026-01-29 14:49:21 +01:00
Teodora
b24fd337ba Update xran F release patch
The sufficient number of fragments needed for MTU 1500 and 8b compression is 6.
However, XRAN_MAX_FRAGMENT must be incremented by one (6+1 = 7).

In the MR https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3394, XRAN_MAX_FRAGMENT was increased to 6,
but the Tx data was actually copied 5 times, and unfortunately I haven't tested end-to-end back then.

This commit was successfully tested with Liteon FR1.
2026-01-29 10:59:24 +01:00
Teodora
109569e38c Add Benetel 550 config file for 2x2 100MHz uncompressed mode 2026-01-29 10:59:24 +01:00
Teodora
88c74dc07f Correct the MTU for 7.2 config files
Even though the jumbo frame has 9600 bytes by the spec, the max MTU is limited to the MTU of a switch, if any used.
However, the value can be < max MTU of a switch.

This is very important for fragmentation purposes. If not properly set, the PDSCH packets will be missing.
2026-01-29 10:59:15 +01:00
luis_pereira87
bc62e8abca CI: upgrade RAN-SA-Handover-CN5G F1 handover test to test Reestablishment on a different DU
- increase requirements for Event A3 trigger to avoid unwanted handovers
  and allow testing reestablishment on different DUs
- increase ping_packetloss_threshold from 5 to 30 because we are forcing
  a reestablishment, thus, packet loss will inevitably happen
- further adjustments to avoid A3 Events
2026-01-29 10:17:42 +01:00
Guido Casati
3c35bad530 Doc: update RRC re-establishment documentation 2026-01-29 10:17:42 +01:00
luis_pereira87
d401cf0d31 Prevent CU to process UE context release requests from DUs for UEs with outdated or unexpected association ids 2026-01-29 10:17:42 +01:00
Guido Casati
84a49e93ad DU: Handle missing old UE context in DL RRC Message Transfer
During F1 handover reestablishment, the CU may forward a DL RRC
Message Transfer to the target DU with old_gNB_DU_ue_id included,
even though the target DU does not have the old UE context yet.

The code previously used AssertFatal when the old UE context was
not found, causing a crash: CU claims we should know UE %04x, but we don't

According to TS 38.473, the gNB-DU shall release the old gNB-DU UE
F1AP ID only "if the gNB-DU identifies the UE-associated logical
F1-connection". If there is no matching connection, there is nothing
to release.

However, the primary purpose of DL RRC MESSAGE TRANSFER is to deliver
the RRC message to the UE. The RRC message delivery is independent of
whether the old UE context can be retrieved. Per TS 38.473, the RRC
message must be delivered to the new UE regardless of old context
retrieval status.

Additionally, per TS 38.331 5.3.7.2 and 5.3.7.4, during reestablishment:
- The UE releases spCellConfig, which must be removed from CellGroupConfig
- SRB1 RLC must be reconfigured with specific parameters

These operations are required for the new UE during reestablishment and
are independent of whether the old UE context can be retrieved.

Fixes:
- Check if old UE context exists before accessing it
- If old UE does not exist, log error and clean up any stale F1 UE data,
  but continue to deliver the RRC message
- Restructure code so context transfer only happens when oldUE exists
- Keep GTP-U update and RLC context transfer inside oldUE check (they
  require old UE context to exist)
- Move spCellConfig handling and reestablish_rlc flag to execute
  regardless during re-establishemnt (per TS 38.331 5.3.7.2)
- Move SRB1 RLC reconfiguration outside the oldUE check so it executes
  regardless during re-establishment (per TS 38.331 5.3.7.4)
- Add function documentation and improve spec references in comments
2026-01-29 10:17:42 +01:00
Guido Casati
fc8e537f20 RRC: align SRB and PDCP re-establishment timing with TS 38.331 specifications
This commit fixes the timing of SRB and DRB PDCP re-establishment
during RRC connection re-establishment to align with 3GPP TS 38.331
specifications.

Key Changes:

1. SRB1 activation and re-establishment (TS 38.331 5.3.7.4):
   - Move SRB1 activation to rrc_gNB_generate_RRCReestablishment()
   - Use SRB1 constant instead of magic number 1 for clarity
   - Remove redundant security configuration loop (handled by
     nr_pdcp_reestablishment internally)

2. SRB2 re-establishment (TS 38.331 5.3.5.6.3 SRB addition/modification):
   - Move SRB2 PDCP re-establishment from rrc_gNB_process_RRCReestablishmentComplete()
   to rrc_gNB_generate_dedicatedRRCReconfiguration(): per spec: SRB2
   should be re-established in the first RRCReconfiguration after
   re-establishment (with reestablishPDCP=true flag)

3. DRB re-establishment (TS 38.331 5.3.5.6.5 DRB addition/modification):
   - Move cuup_notify_reestablishment() from rrc_gNB_process_RRCReestablishmentComplete()
   to rrc_gNB_generate_dedicatedRRCReconfiguration(). e.g at the first
   reconfiguration after reestablishment
   - Ensures CU-UP is notified at the correct time
2026-01-29 10:17:42 +01:00
Guido Casati
c5787aa9a9 RRC: Trigger UE Context Setup upon re-establishment on different DU
As per TS 38.401 §8.7: if the UE accesses a DU different from the original
one during re-establishment, the CU must trigger UE Context Setup toward
the new DU. This refers to steps 9-10 and steps 9'-10'. Either one or the
other can be executed during re-establishment.

e.g. if this happens during F1 handover, it shall trigger a
UE Context Setup fallback on the CU.

This commit implements the required behavior:

1. Detection mechanism:
   - Add `old_du_assoc_id` field to `f1_ue_data_t` to store the original
     DU association ID
   - At RRCReestablishmentRequest: Store original `du_assoc_id` in
     `old_du_assoc_id` and update `du_assoc_id` to the new DU
   - At RRCReestablishmentComplete: Compare `old_du_assoc_id` with the
     `assoc_id` from the Complete message to detect different DU

2. UE Context Setup trigger:
   - In `rrc_gNB_process_RRCReestablishmentComplete()`: When different DU
     is detected, call `rrc_f1_ue_context_setup_for_target_du()` to trigger
     UE Context Setup procedure (per TS 38.401 §8.7, NOTE on steps 9-10)
     upon reception of UL RRC MESSAGE TRANSFER
   - In `rrc_CU_process_ue_modification_required()`: Refuse UE Context
     Modification Required when `old_du_assoc_id != 0` to avoid conflicts
     with the ongoing UE Context Setup procedure (per TS 38.401 §8.7, NOTE
     on steps 9'-10')

3. UE Context Setup:
   - Replace `clone_CellGroupConfig()` with `get_cellgroup_config()` in
     UE Context Setup handler
   - Call `update_cellgroup_for_reestablishment()` during UE Context Setup
     when `reestablish_rlc` flag is set to prepare CellGroupConfig with
     reestablishRLC flags
   - Clean up `old_du_assoc_id` in `rrc_CU_process_ue_context_setup_response()`
   - Add `free_ue_context_mod_req()` call after UE Context Modification request

4. Function signature updates:
   - Update `handle_rrcReestablishmentComplete()` to accept `gNB_DU_ue_id`
     and `assoc_id` parameters, change return type from `int` to `void`
   - Update `rrc_gNB_process_RRCReestablishmentComplete()` to accept
     `assoc_id` parameter
   - Update `rrc_gNB_decode_dcch()` to accept and forward `assoc_id` parameter

Re-establishment on different DU flow (TS 38.401 §8.7, steps 9-10):
1. UE sends RRCReestablishmentRequest to new DU
2. DU forwards to CU via UL RRC MESSAGE TRANSFER
3. CU detects different DU (`assoc_id != ue_data.du_assoc_id`):
   - Stores `old_du_assoc_id = ue_data.du_assoc_id` (original DU)
   - Updates `ue_data.du_assoc_id = assoc_id` (new DU)
4. CU sends RRCReestablishment to UE
5. UE sends RRCReestablishmentComplete to new DU
6. DU forwards to CU via UL RRC MESSAGE TRANSFER
7. CU detects different DU scenario (with old_du_assoc_id):
   - Triggers UE Context Setup Request to new DU via `rrc_f1_ue_context_setup_for_target_du()`
8. DU receives UE Context Setup Request:
   - Detects re-establishment (`UE->reestablish_rlc` flag)
   - Calls `update_cellgroup_for_reestablishment()` to set reestablishRLC flags
   - Encodes CellGroupConfig with reestablishRLC flags and sends to CU
9. CU receives UE Context Setup Response:
   - Stores encoded CellGroupConfig
   - Clears `old_du_assoc_id = 0`
10. CU sends RRC Reconfiguration with transparent CellGroupConfig to UE
2026-01-29 10:17:42 +01:00
Guido Casati
806a15da01 Implement TS 38.473 transparency for CellGroupConfig forwarding
This commit implements transparent forwarding of CellGroupConfig
as required by TS 38.473, eliminating CU-side decode/re-encode
cycles that violate transparency requirements.

Main Design Change:
- Before: CU decoded CellGroupConfig from DU, stored in the UE
  context then re-encoded when sending to UE. CU constructed
  new CellGroupConfig after RRCReestablishmentComplete.
- After: CU requests CellGroupConfig from DU via UE Context Modification
  Request with `gNB_DU_Configuration_Query=true`, DU sends CellGroupConfig
  which CU stores as encoded `byte_array_t` and forwards transparently
  via reconfiguration without decode/re-encode cycles

To this purpose, all decode operations of CellGroupConfig were removed
from DU and all encode operations were removed from the CU.

Key Changes:

CU:
- Replace NR_CellGroupConfig_t* masterCellGroup with byte_array_t mcg in
  gNB_RRC_UE_t for storing encoded CellGroupConfig
- Rename cell_group_config to cgc in nr_rrc_reconfig_param_t for brevity
- Implement transparent forwarding in build_RRCReconfiguration_IEs()
- Add helper functions:
  - `store_cgc()` to store encoded bytes
  - `get_meas_gap_config()`: Decode MeasGapConfig from DU to CU response
  - `rrc_detect_reestablishment()` to detect re-establishment by decoding
    temporarily (only for detection)
- Remove legacy decode/re-encode paths in RRC message generation
- Update all CellGroupConfig storage to use encoded bytes
- Update reconfiguration generation to accept is_reestablishment parameter

DU:
- Add `get_cellgroup_config()` to select source (CellGroup vs reconfigCellGroup)
  based on re-establishment state
- Add re-establishment detection logic in `ue_context_modification_request()`
- Add `update_cellgroup_for_reestablishment()` to set reestablishRLC flags and
  remove SRB1 from bearer list
- When `gNB_DU_Configuration_Query` is present and re-establishment detected:
  - Clones from reconfigCellGroup (which contains spCellConfig) instead of
    CellGroup (where spCellConfig was removed)
  - Sets `reestablishRLC` flags for all bearers except SRB1
  - Removes SRB1 from bearer list (already re-established)

Data Structure Changes:
- gNB_RRC_UE_t: Add byte_array_t mcg field
- nr_rrc_reconfig_param_t: Change cell_group_config to cgc (byte_array_t*)
- Remove masterCellGroup field usage in favor of encoded mcg

New re-establishment flow:
1. UE sends RRCReestablishmentRequest
2. CU processes -> sends RRCReestablishment
3. CU sends RRCReestablishmentComplete
4. CU sends UE Context Modification Request to DU with `gNB_DU_Configuration_Query=true`
5. DU detects re-establishment (`UE->reestablish_rlc && UE->reconfigCellGroup != NULL`):
   - Clones `UE->reconfigCellGroup` -> `new_CellGroup` (contains spCellConfig)
   - Sets `reestablishRLC` flags for all bearers except SRB1
   - Removes SRB1 from bearer list (already re-established)
   - Encodes `new_CellGroup` and sends to CU
6. CU receives encoded CellGroupConfig -> stores in `UE->mcg` via `store_cgc()`
7. CU detects re-establishment via `rrc_detect_reestablishment()`
8. CU calls `rrc_gNB_generate_dedicatedRRCReconfiguration()` with `is_reestablishment=true`:
   - Creates SRB/DRB lists with re-establishment flags
   - Generates RRC Reconfiguration with transparent CellGroupConfig
   - Sends to UE

Why spCellConfig must be added in the DU in case of re-establishment:

With transparent forwarding, CU requests CellGroupConfig from DU instead
of constructing it. During re-establishment, DU's runtime CellGroup has
spCellConfig = NULL (removed per TS 38.331 §5.3.7.2). However, for the
gNB_DU_Configuration_Query response, DU must provide a complete CellGroupConfig
including spCellConfig. Therefore, DU restores spCellConfig by encoding
reconfigCellGroup (with the original spCellConfig) in CellGroupConfig.
In the old design CU constructed CellGroupConfig itself in
`rrc_gNB_process_RRCReestablishmentComplete()` and used `spCellConfig`
from its stored `masterCellGroup`.

Closes #837
2026-01-29 10:17:42 +01:00
Guido Casati
50de6bd8fb F1: encode CGC in UE Context Modification Response upon GNB-DU Configuration Query
Apply CGC encoding through GNB-DU Configuration Query. This applies to the
pdu session release path (rrc_gNB_send_f1_drb_release_request) and E1 bearer
mod / DRB add+release path (rrc_gNB_generate_UeContextModificationRequest).

This is necessary to implement 3GPP TS 38.473 requirement for
gNB-DU Configuration Query IE in UE Context Modification Request:

"If the GNB-DU Configuration Query IE is contained in the UE CONTEXT
MODIFICATION REQUEST message, gNB-DU shall include the CellGroupConfig
IE in the DU To CU RRC Information IE in the UE CONTEXT MODIFICATION
RESPONSE message."

i.e.: The DU sends the CGC only when this IE is enabled in the REQ
message from the CU. The only other scenario according to the same
specs is when the Full Configuration IE is present. Outside of these
two cases, CGC shall not be sent.
2026-01-29 10:17:42 +01:00
Guido Casati
b74cd9c612 F1AP: Add gNB-DU Configuration Query IE support
This field will be adopted to trigger cgc encoding at DU,
according to the specs (see subsequent commit for details).

Changes:
- Add gNB_DU_Configuration_Query field to f1ap_ue_context_mod_req_t
- Implement encoding/decoding
- Add to cp, eq, and free functions for the new field
- Update tests to include the new field
2026-01-29 10:17:42 +01:00
Guido Casati
129b62e708 Telnet: improve fetch_du_by_ue_id to auto-detect connected UE
Issue: sometimes it happens that an ul failure occurs in the handover
pipeline, UE reconnects with different UE ID and fetch_du_by_ue_id fails.

- Modified fetch_du_by_ue_id in telnetsrv_ci.c to automatically find
  the connected UE when no UE ID is provided, similar to other
  telnet commands like rrc_gNB_trigger_f1_ho
- Updated test cases in container_sa_f1_ho_b210_quectel.xml to use
  the improved command without hardcoded UE ID parameter
- This makes the command more robust and easier to use in CI tests
2026-01-29 10:17:42 +01:00
Guido Casati
aff0ea5760 RRC logging: add utility function to dump ASN1 MCG
Add debugging utilities dump_cgc() and dump_mcg() to decode and
print CellGroupConfig in XER format when DEBUG_ASN1 flag is enabled.
This helps debug RRC Reconfiguration messages containing masterCellGroup.
2026-01-29 10:17:42 +01:00
Guido Casati
9a11690f81 RRC: Improve UE context lookup for re-establishment on different DU
Add intermediate fallback to rrc_gNB_get_ue_context_by_rnti_any_du() in
re-establishment request handling to better handle cases where UE
re-establishes on a different DU.

RNTI is NOT globally unique - different DUs can assign the same RNTI to
different UEs. The assoc_id check in rrc_gNB_get_ue_context_by_rnti()
disambiguates RNTI across DUs and prevents returning the wrong UE.

However, during re-establishment on a different DU, du_assoc_id hasn't
been updated yet (message comes from new DU, but ue_data.du_assoc_id
still points to old DU), causing the primary lookup to fail even though
the UE exists.

The lookup now uses a three-tier fallback:
1. Primary: rrc_gNB_get_ue_context_by_rnti() with assoc_id check
   (normal case: same DU)
2. Fallback 1: rrc_gNB_get_ue_context_by_rnti_any_du() by RNTI only
   (re-establishment on different DU)
3. Fallback 2: rrc_gNB_get_ue_context_source_cell() using physCellId
   (handover scenarios)
2026-01-29 10:17:42 +01:00
Guido Casati
d18c2d27f2 RRC: cleanup and improve safety of rrc_gNB_generate_RRCReestablishment()
- Remove unused masterCellGroup_from_DU parameter from rrc_gNB_generate_RRCReestablishment() as it is not used in the RRC
re-establishment generation, RRCReestablishment message does not contain CellGroupConfig which is obtained later via UE Context Modification Request/Response
- Update function documentation
- Initialize security_parameters struct to zero for safety
- Add check on ciphering and integrity algorithm ranges
2026-01-29 10:17:42 +01:00
Guido Casati
825cbcdb47 RRC: Allow re-establishment on different DU when physCellId differs
When a UE re-establishes on a different DU, the physCellId in the
re-establishment request (from the old cell) will differ from the
new DU's physCellId. The previous check incorrectly treated this as
a "too fast movement" scenario and triggered fallback to RRC setup.

This fix distinguishes between two scenarios:
1. Different DU scenario: physCellId differs because UE is on a
   different DU - this is legitimate and should be allowed. UE
   Context Setup will be triggered at RRCReestablishmentComplete.
2. Same DU but different physCellId: "too fast movement" scenario
   - fallback to RRC setup as before.

The fix checks if assoc_id != ue_data.du_assoc_id to detect a
different DU scenario and allows re-establishment in that case.

This addresses the issue where re-establishment on a different DU
was incorrectly rejected, preventing proper UE Context Setup per
TS 38.401 Section 8.7.
2026-01-29 10:17:42 +01:00
Guido Casati
290306d1f8 RRC: Refactor re-establishment request handling
- Extract old_rnti as const variable and reuse consistently
- Move as_security_active check earlier for fail-fast validation
- Move ue_data declaration earlier to avoid duplicates
- Improve code organization and readability

No functional changes.
2026-01-29 10:17:42 +01:00
Guido Casati
ebc9158ca4 RRC/F1: provide DU UE ID for re-establishment scenario
Handle target DU UE context setup when handover preparation info
is unavailable (i.e. re-establishment scenario) by retrieving
secondary UE ID from F1 UE data.

rrc_f1_ue_context_setup_for_target_du is either applying to
handover or re-establishment. In the latter scenario, populate
DU UE ID, which should be known.
2026-01-29 10:17:42 +01:00
Robert Schmidt
a0a68d56d5 Merge remote-tracking branch 'origin/remove-dead-code' into integration_2026_w05 (!3831)
semi-manual remove of not used #define commands

As i was upset to see all these #define with no code under, i made a
global pass to remove the obvious cases semi-manual remove of not used
bodies

manual script, then a lot of manual review

    grep -IRs "#define" ../openair* ../common/* ../executables/ ../nfapi/ ../radio/ | \
        fgrep -v '(' | fgrep -v '//' |awk '{print $2}' | egrep -v "#define *$n"| \
            while read n ; do
              grep -IRs $n ../openair* ../common/* ../executables/ ../nfapi/ ../radio/  | grep -v "#define *$n" | grep -q $n || echo $n;
            done

will give a decent list of #define never used.  Then, I think we should
keep lists of # define when it comes from standards, even if the code
doesn't use it right now
2026-01-29 08:23:41 +01:00
Robert Schmidt
0eb33e69c7 Merge remote-tracking branch 'origin/add-support-eth-pdu-sess' into integration_2026_w05 (!3769)
Add Ethernet PDU session support and make PDU session request configurable

This MR adds support for Ethernet PDU sessions, and makes PDU sessions
configurable: per-PDU session ID, type (IPv4/IPv4v6/IPv6/Ethernet [1]),
DNN, NSSAI.

Concretely, it adds a new configuration file section pdu_sessions below
uicc0 that looks like this if everything is specified (default values
are shown):

    uicc0:
      [...]
      pdu_sessions:
        - id: 1
          type: "IPv4"
          nssai_sst: 1
          nssai_sd: 0xffffff
          dnn: "oai"

It is possible to list multiple PDU sessions (add new line   - id: 2 to
request a second PDU session). It is backwards-compatible to the current
PDU session configuration (uicc0.dnn/nssai_sst/etc), the idea being that
either legacy or new configuration could be used, but (1) if
pdu_sessions exist, it will overwrite the legacy configuration, and (2)
multiple PDU sessions, and type, can only be configured using the new
config. The old parameters --extra-pdu-id and --default-pdu-id are not
accepted anymore. Documentation has been added to the UE tutorial.

It is possible to test an Ethernet PDU session [1]. It is possible to
test the PDU session inside the UE by verifying it has an TAP interface
oaitap_ue1, and ARPing the data network (arping has been added to
oai-nr-ue container for that purpose):

    ip addr add 192.168.72.140/26 dev oaitap_ue1  # same subnet as data network!
    ip link set dev oaitap_ue1 up
    arping -c 20 -I oaitap_ue1 192.168.72.135     # will send ARP request in Ethernet frame to get IP address of data network

[1] See description MR !3769 for more information. On the UE side, only
the type has to be changed to "Ethernet".
2026-01-29 07:52:48 +01:00
Jaroslava Fiedlerova
e1a327ca4f Merge remote-tracking branch 'origin/nr_ue_multiple_rf' into integration_2026_w05 (!3593)
NR UE: add support for multiple RF frontends

This MR adds basic support for multiple RF-frontends at the UE.
There are multiple reasons why we might want this:
1. There might be different antennas needed for different bands (e.g. NTN or
   TN antennas). These antennas might be connected to different RF-frontends.
   In case of Handover, the UE needs to dynamically switch between these
   RF-frontends.
2. Each rf-simulator connection carries baseband I/Q samples. To be able to
   perform a handover between two cells at different frequencies, there must
   be two rf-simulator connections, as the baseband channels should not
   interfere and thus cannot simply be added.
3. When we want to support multiple UE simulation within one instance of
   nr-uesoftmodem, and allow multiple cells and probably even handover between
   these cells, we need either:
   1. dedicated RF-frontends for each simulated UE, or
   2. dedicated RF-frontends for each connected cell and dynamically assign
      simulated UEs accordingly.

This MR implements what is needed for 1., 2. and 3.1.
2026-01-28 20:19:48 +01:00
Jaroslava Fiedlerova
db902afbe4 Merge remote-tracking branch 'origin/liteon_FFT' into integration_2026_w05 (!3875)
Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol()

This MR handles
- Fix FFT size for xran_fh_tx_send_slot_BySymbol() and
  xran_fh_rx_read_slot_BySymbol() (!3809)
- Fix E release build
2026-01-28 20:17:20 +01:00
Jaroslava Fiedlerova
efdd43cf66 Merge remote-tracking branch 'origin/debian_redhat_packages' into integration_2026_w05 (!3507)
Create Debian and Redhat packages with CPack

Use CPack in CMakelists in order to create packages, creation command is
available in build_oai script and options description is available in
packages.md
2026-01-28 20:16:22 +01:00
Robert Schmidt
780a2467aa Add documentation for multi-PDU session configuration 2026-01-28 17:48:43 +01:00
Robert Schmidt
6e69491f4a Convert legacy PDU session config to new format 2026-01-28 17:48:43 +01:00
Rúben Soares Silva
e82e3a35fe Add a check on the VNF P7 message handler to ignore P7 messages after it received a STOP.indication from the PNF 2026-01-28 16:08:50 +00:00
Rúben Soares Silva
f76e530f90 Prevent the PNF from sending P7 messages after sending a STOP.indication
Upon stopping the PNF, when sending the STOP.indication to the VNF, set pnf_p7->terminate to 1.

Add a check on the PNF P7 send functions to not send a message after pnf_p7->terminate is set
2026-01-28 16:08:03 +00:00
Reem Bahsoun
a5e8e10acf Mount the L1 config file in the volumes of the cuBB container,
update cuBB image name and change L2 log to UTC time
2026-01-28 14:40:56 +01:00
Reem Bahsoun
f22769a80f Update the entrypoint script:
- Remove unused line
- Change L1 config file
- Update directories
2026-01-28 14:40:49 +01:00
Mario Joa-Ng
f65b8f564f Correctly extract the PUSCH PRBs from an internet frame (one fragment)
Prior to this commit, all the PRBs had no signal. Only the "PRACH I0" was ~40dB which is expected.

The L1 stats with this commit:
```
Blacklisted PRBs 0/273
 0.-1.-1. 0. 0.-1.-1.-1. 0. 0. 0.-1.-1. 0.-1.-1. 0. 0.-1.-1. 0. 0.-1. 0. 4.
-1. 0. 0.-1. 0. 0.-1. 0.-1. 0. 0. 0.-1.-1.-1. 0. 0. 0. 0. 0. 0.-1.-1.-1. 0.
-1. 0. 0. 0. 0. 0. 0.-1.-1.-1.-1. 0.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1.-1.-1.-1.-1.-2.-1.-1.-2.-2.-1.-2.-1.-1.-2.-1.-1.-2.-1.-2.-1.-1.-1.-1.-2.
-1.-1.-1.-2.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.-20. 3. 0. 0.-1.-1.-1.-1.-1.-1.-1.-1.-1.-1.
-1. 0.-1.-1. 0.-1.-1. 0. 0.-1. 0.-1. 0. 0.-1.-1.-1. 0. 0. 0.-1. 1. 0.-1.-1.
 0. 0. 0. 0.-1. 0.-1. 0. 0. 0. 0. 0. 0. 0. 0.-1. 0.-1. 0. 0.-1. 0.-1.-1. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0.
 1. 0. 0. 1. 0. 0. 0.-1. 0. 0. 1. 1. 0. 1. 0. 0. 1. 0. 0. 0. 1. 0. 1. 0. 0.
 0. 1. 0. 0. 1. 0. 0. 0. 1. 1. 1. 1. 0. 0. 0. 1. 1. 1. 1. 0. 1. 1. 1.
max_IO = 24 (24), min_I0 = 0 (136), avg_I0 = 20 dB(19.20.)
PRACH I0 = 42.1 dB
```

Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-01-28 13:00:24 +01:00
Teodora
8b60466916 Correct the UL C-plane packet
Even after this commit, we still have duplicated UL C-plane packets due to xran F release internal architecture.

Note: in E, all PRBs were in one section of one C-plane DL and UL. It is working even though the U-plane has "fragmented" packets.

Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.com>
2026-01-28 13:00:24 +01:00
Teodora
cf8f24710b Resolves the missing DL symbols
Previously, in F, only the following (subframe, slot, symbol) combinations were sent every frame:
(0, 0, 0)
(2, 1, 0)
(5, 0, 0)
(7, 1, 0)

Now, all the DL symbols are sent.

Notes:
In both E and F, the radio-transport fragmentation is not supported, and
all the "fragmented" (not seen as fragments in the xran, only as sections)
packets contain "E-bit" equal to 1.
Per spec, the value 1 for "E-bit" signifies the last fragment of one symbol.
For more info, please see "ecpriSeqid" section in the spec.

In E:
- nRBStart and nRBSize is updated according to the sent/received packet;
- max sections = 1.

In F:
- nRBStart and nRBSize is only used for C-plane messages;
- nPrbElm represents the number of sections for DL only;
- based on the nPrbElm, each section contains UP_nRBStart and UP_nRBSize parameters
  which represent the start and number of PRBs in one section or one fragment.

Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.com>
2026-01-28 13:00:18 +01:00
calvin_peyron
f7e714894a Add documentation to package creation and installation 2026-01-28 11:43:44 +01:00
calvin_peyron
26d24dbd0b Create Debian and RPM packages from CMakeLists
Packages must have a name, a version, a section, an architecture, a maintainer, a description (long and summary), dependencies
Shared libraries must be stripped, have soversion, version (debug symbols are found in separate packages), since MODULE is used instead of SHARED it works as a plugin library which is opened using dlopen-like functionality, see:  https://cmake.org/cmake/help/latest/command/add_library.html
Packages must have postin and postun scripts
Since it is not recommended to modify CMAKE_EXE_LINKER_FLAGS, cmake's path variables are used : https://discourse.cmake.org/t/how-do-i-replace-the-compiler-options-for-one-target/7815/5
2026-01-28 11:36:34 +01:00
Jaroslava Fiedlerova
ee406b06a4 Merge remote-tracking branch 'origin/issue-1043' into integration_2026_w05 (!3860)
NGAP: improve error handling in RRCReconfiguration from Handover Command decoding

This MR refactors doRRCReconfiguration_from_HandoverCommand for consistency and
safety, and enables NGAP Handover Cancel encoding/decoding.
- Refactored doRRCReconfiguration_from_HandoverCommand function:
  - Changed signature to return byte_array_t instead of taking a buffer parameter
  - Prevents buffer overflow by auto-sizing memory with uper_encode_to_new_buffer
  - Input validation
  - HandoverCommand structure validation
  - Error handling and cleanup for encode/decode failures
  - ASN.1 structure cleanup on all error paths
  - Updated caller in rrc_gNB_NGAP.c: use new byte_array_t return signature,
    added buffer cleanup with free_byte_array(), sends Handover Cancel to AMF on
    decoding failure (source gNB)
  - Improved error logging
- NGAP Handover Cancel encoding/decoding support
  - Added missing Handover Cancel ack case handler for
    NGAP_ProcedureCode_id_HandoverCancel in ngap_gNB_decode_initiating_message()
    to decode and log incoming Handover Cancel Ack message
  - Added NGAP_ProcedureCode_id_HandoverCancel to the list of supported
    initiating message procedure codes in ngap_gNB_encode_initiating() allowing
    the gNB to encode and send Handover Cancel messages

Note: The Handover Cancel procedure is already implemented elsewhere in the NGAP
stack; these changes complete support by ensuring the procedure code is
recognized in both encoder and decoder.

Closes #1043
2026-01-27 20:30:51 +01:00
Jaroslava Fiedlerova
c2d3a3d0c2 Merge remote-tracking branch 'origin/oru-rebased' into integration_2026_w05 (!3848)
Initial implementation of O-RU for 7.2 emulator

Added new executable nr-oru which acts as a 7.2 O-RU.
2026-01-27 20:30:12 +01:00
Thomas Schlichter
fce8185467 use function pointer instead of weak function for openair0_write_reorder_common() 2026-01-27 16:46:02 +01:00
Robert Schmidt
f9e7e5199d Remove remaining unused RAL code 2026-01-27 13:28:35 +01:00
Laurent THOMAS
dd8a25524a remove dead code in common_lib.h 2026-01-27 13:23:18 +01:00
Laurent THOMAS
5b0d34c3ad semi-manual remove of not used #define commands. I let the unused defintions that come from standard bodies 2026-01-27 13:23:10 +01:00
Robert Schmidt
831e407298 Remove outdated comment 2026-01-27 11:47:40 +01:00
Robert Schmidt
eea52e4384 Dockerfile nrUE ubuntu: install arping
The CN team would like to test the ethernet PDU session capabilities of
the UPF. Install arping in the UE by default for ubuntu to help them
test the PDU session by pinging over ARP.
2026-01-27 11:47:40 +01:00
Robert Schmidt
dc968d4dc9 Handle PDU session type Ethernet in NAS and SDAP 2026-01-27 11:47:40 +01:00
Robert Schmidt
78720d5d9c Make default oaitun_ueY name for default (first) PDU session
Look up the index of a PDU session in the list of PDU sessions upon
accept to determine if the PDU session is the default (first PDU
session) or not. If it is the default, it will not append a suffix to
the interface name (oaitun_ueY), otherwise append the PDU session ID
(e.g., for 5: oaitun_ueYp5).
2026-01-27 11:47:40 +01:00
Robert Schmidt
27e01e081b Read PDU session configuration and request
Use the new PDU session configuration functionality of the parent
commit. It is now possible to request multiple PDU sessions, and to
request specific PDU session types. While the new uicc0.pdu_sessions is
preferred, it is still possible to use the "legacy"
uicc0.dnn/nssai_sst/nssai_sd.

The old parameters --default-pdu-id and --extra-pdu-id are not allowed
anymore, as it is possible to manually define this in the UE
configuration. Correspondingly, fix the use of those options, where
applicable.

Note: since the default_pdu_id is changed to -1, all interface names
will have pX to interface names appended (oaitun_ue1pX). The next commit
will correct this.
2026-01-27 11:47:40 +01:00
Robert Schmidt
9b4898ee57 Add new PDU session list configuration
Add new configuration description for PDU sessions, including conformity
checks.
2026-01-27 11:47:40 +01:00
Thomas Schlichter
a91838937f Add documentation on multiple NR UE RF-frontends to RUNMODEM.md 2026-01-27 11:30:16 +01:00
Thomas Schlichter
3435fcc010 update documentation and configuration files reflecting the rfsimulator changes 2026-01-27 11:30:16 +01:00
Thomas Schlichter
4d215b5c95 rfsimulator: add support for providing different parameters to each instance 2026-01-27 11:30:16 +01:00
Thomas Schlichter
ce83a78271 remove unused variables from struct openair0_config 2026-01-27 11:30:16 +01:00
Thomas Schlichter
b24052d2dc rfsimulator: remove static variable last_TS from function rxAddInput()
This static variable creates issues when there are multiple instances of the LEO channel model in use.
2026-01-27 11:30:16 +01:00
Thomas Schlichter
fb9e848d5b NR UE: don't allocate unnecessary data buffers
When writing dummy data or reading to trash, we don't need to allocate data buffers for each antenna.
We can allocate just for one antenna and use this buffer for each antenna.
2026-01-27 11:30:16 +01:00
Thomas Schlichter
8e18e5b3aa NR UE: wrap all direct trx_*() function calls in nr_ue_ru_*() functions 2026-01-27 11:30:14 +01:00
Thomas Schlichter
6297c40423 remove unused variables from struct openair0_config 2026-01-27 11:10:54 +01:00
Thomas Schlichter
0b06d55f5f NR UE: introduce support to define multiple cells
This feature shall allow in future to simulate an arbitratry number of UEs connected to an other arbitrary number of cells.
Therefore each RF-frontend (also called RU) needs to be configured for one specific cell.
In case of handover of a UE from one cell to another cell, it needs to switch RUs accordingly (TODO).

There has to be a 1-to-1 mapping between RUs and cells.
Each UE will be assigned to one of the defined cells.
Initially all UEs are assigned to cell 0.
2026-01-27 11:10:53 +01:00
Thomas Schlichter
bcccfd90b8 NR UE: don't use downlink_frequency[cc_idP][0] and uplink_frequency_offset[cc_idP][0] in MAC, store mac->dl_frequency instead 2026-01-27 10:24:54 +01:00
Thomas Schlichter
dfb217ad0e NR UE: don't use get_softmodem_params()->numerology in MAC, store mac->numerology instead 2026-01-27 10:24:54 +01:00
Thomas Schlichter
b495576c83 make sure defint64val is set for TYPE_UINT64 configuration parameters 2026-01-27 10:24:54 +01:00
Thomas Schlichter
168f329491 NR UE: remove unused array of PHY_VARS_NR_UE pointers 2026-01-27 10:24:53 +01:00
Thomas Schlichter
90ad9fac1a NR UE: introduce support to define multiple RUs 2026-01-27 10:23:01 +01:00
Jaroslava Fiedlerova
623dc19d22 Merge remote-tracking branch 'origin/uci_csi_on_pusch' into integration_2026_w05 (!3766)
UE support to send CSI report on PUSCH

Earlier work on UCI on PUSCH implemented only ACK/NACK. This MR extends that
to send CSI report too.

This branch is verified with MATLAB implementation for multiplexing CSI part 1
and part 2 on PUSCH. It is also verified with srsRAN gNB which successfully
decodes CSI part 1 on PUSCH.
2026-01-26 16:21:31 +01:00
Jaroslava Fiedlerova
b68b42c6e8 Merge remote-tracking branch 'origin/fix_rsrp_overflow' into integration_2026_w05 (!3823)
Fix RSRP overflow

If UE L1 measure an RSRP = 0 it would report to L2 and RSRP value of -INT_MAX
dBm causing overflow in the qsort to determine the best RSRPs
2026-01-26 11:46:41 +01:00
Thomas Schlichter
256a54ce6c NR UE: move initialization of frame_parms->N_RB_DL and frame_parms->ssb_start_subcarrier to nr_init_frame_parms_ue_sa()
This harmonizes the implementations of nr_init_frame_parms_ue(), nr_init_frame_parms_ue_sa() and nr_init_frame_parms_ue_sl().
2026-01-26 11:41:33 +01:00
Thomas Schlichter
eed98b2bf9 NR UE: support nr_get_carrier_frequencies() on constant PHY_VARS_NR_UE 2026-01-26 11:41:33 +01:00
Thomas Schlichter
877b8ed0a0 remove some unused global variables from nr-softmodem.c and nr-uesoftmodem.c 2026-01-26 11:41:33 +01:00
Thomas Schlichter
af4ceea12c NR UE: remove global variable rx_gain_off, which has no function
The global variable rx_gain_off was always 0.0, as it was not even modified by the NR UE command line parameter --ue-rxgain-off.
That command line parameter modified only a parameter in the struct nrUE_params_t, which was not used at all and is removed in this commit, too.
Also, the global variable rx_gain_off was just added to rx_total_gain_dB and subtracted from it again in nr_rf_card_config_gain().
So we simplify that function slightly, too.
2026-01-26 11:41:33 +01:00
Thomas Schlichter
fef4e7b23e NR UE: move openair0_config_t and openair0_device_t out of PHY_VARS_NR_UE and consistently use UE->rf_map.card 2026-01-26 11:41:33 +01:00
Jaroslava Fiedlerova
7c64fe0f60 Merge remote-tracking branch 'origin/shm-channel-fix' into integration_2026_w05 (!3853)
Clear memory in shm_td_iq_channel after RX

Clear memory in shm_td_iq_channel after RX. This prevents the IQ
from being read twice. This can happen if the application crashes
and will keep the other side reading historical IQ samples.
2026-01-26 10:43:20 +01:00
Jaroslava Fiedlerova
2acc8b6a08 Merge remote-tracking branch 'origin/vrtsim-fix-timing' into integration_2026_w05 (!3850)
Update vrtsim timing job thread

List of changes:
- avoid calculating accumulated rounding error by calculating absolute
  sample index based on CLOCK_REALTIME every time.
- use threadCreate instead of plain pthread_create which assigns a unique
  thread name and simplifies debugging
2026-01-26 10:42:18 +01:00
Sakthivel Velumani
f9fb02b1d7 clean-up: minimize code repetition
harmonize ACK and CSI mapping into a single function.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
36a5dbdfff mac: harmonize function to get csi reports
Use nr_get_csi_measurements() function to get CSI report for PUCCH and
UCI on PUSCH.

Harmonize filling csi report for UCI on PUSCH for periodic and aperiodic
CSI reports.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
cecfec82a8 mac: harmonize csi_payload_t struct
1. Reuse csi_payload_t struct to hold CSI report payload on PUSCH and
PUCCH PDU.
2. Move the struct to fapi header file
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
d1febb5fc2 clean-up: reduce nested if in CSI meas function 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
207b061e22 ulsim: enable CSI part 2 in unit test 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
1ba8502bdd phy: map CSI part 2 bits on PUSCH 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
b464ff6bd7 ulsim: enable CSI part 1 in unit test
Update matlab script too.
2026-01-26 10:02:30 +01:00
Sakthivel Velumani
bea7afcbd3 phy: map CSI part 1 bits on PUSCH 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
004a472c52 fix: return value assigned inside function 2026-01-26 10:02:30 +01:00
Sakthivel Velumani
84aa1f8ff5 clean-up: fix code repetition 2026-01-26 10:02:24 +01:00
Sakthivel Velumani
dc70b621a5 clean-up: Add const to input pointers 2026-01-26 09:45:02 +01:00
Thomas Schlichter
75df29a333 consistenty use suffix _t for openair0_* types 2026-01-23 18:30:39 +01:00
Laurent THOMAS
7e0440433a remove used definitions, and group dupilcated extern for cpuf global var 2026-01-23 10:57:44 +01:00
calvin_peyron
8496e88a10 On Fedora libusb-devel is called libusb1-devel 2026-01-23 09:39:38 +01:00
Calvin Peyron
6af6789f65 Fix python-tk has no installation candidate 2026-01-23 09:39:38 +01:00
Guido Casati
b621929f9b Refactor (MAC): extract RRC container handling into shared function
Extract the common RRC container handling logic from
ue_context_setup_request() and ue_context_modification_request() into
a new static function handle_ue_context_rrc_container().

This refactoring:
- Eliminates code duplication between the two functions
- Centralizes RRC container forwarding logic
- Improves code maintainability and consistency
2026-01-22 14:56:11 +00:00
Guido Casati
0b8fb49a38 Refactor (MAC): extract CellGroupConfig encoding into shared function
Extract common CellGroupConfig encoding logic from
ue_context_setup_request() and ue_context_modification_request() into
encode_cellgroup_config().

Replace uper_encode_to_buffer() with uper_encode_to_new_buffer() to:
- Remove 1024-byte buffer size limit
- Automatically allocate correct buffer size
- Simplify code (no manual bit-to-byte conversion)
- Align with other protocol encoders
2026-01-22 14:56:11 +00:00
Guido Casati
94bb169ac5 RRC/F1: add documentation/logs for F1 UE context setup functions
- Add function documentation blocks for `rrc_fill_f1_ue_context_setup`,
  `rrc_f1_ue_context_setup_for_target_du`, and `rrc_f1_ue_context_setup_from_e1_response`
  explaining their purpose, parameters, and usage scenarios
- Add inline comments throughout these functions
2026-01-22 14:56:11 +00:00
Guido Casati
0ea07517fb Refactor (RRC/F1): extract common F1 UE context setup code
Improve maintainability by centralizing common F1AP UE context setup
logic into reusable helper functions, enabling consistent handling
and clear serving/target DU entry points for different scenarios.

Code duplication prevention is a beneficial side effect, since at
least one helper function is adopted in subsequent commits.

Major changes:

- Move DRB list filler from external file into rrc_gNB.c and rename
  fill_drb_to_be_setup to rrc_fill_f1_drb_to_setup for naming
  consistency
- Add static helper rrc_fill_f1_ue_context_setup to populate common
  fields shared between serving DU and target DU scenarios:
- Rename rrc_gNB_generate_UeContextSetupRequest to
  rrc_f1_ue_context_setup_from_e1_response to clarify it prepares
  F1AP context setup from E1AP bearer setup response for serving DU
- Add rrc_f1_ue_context_setup_for_target_du (for target DU in
  handover/reestablishment scenarios)
- Adopt helper rrc_fill_f1_ue_context_setup in both functions
2026-01-22 14:56:11 +00:00
Guido Casati
0c879cdf62 MAC: clarify reconfigCellGroup warning for handover scenario
Document that reconfigCellGroup remaining present is expected during
handover (target DU doesn't send RRC Reconfiguration).
2026-01-22 14:56:11 +00:00
Guido Casati
1c6acfbc20 RRC Bugfix: Propagate DU association ID from PDCP to RRC via ITTI message header
When processing UL RRC messages from PDCP, the DU association ID (assoc_id)
was not being propagated to RRC, resulting in assoc_id being 0 in
rrc_gNB_decode_dcch.

Fix by setting originInstance in the ITTI message header to the stored
du_assoc_id from ue_data when PDCP creates the F1AP_UL_RRC_MESSAGE.
2026-01-22 14:56:11 +00:00
Guido Casati
b8c44aaf2c OAI UE bugfix: set is_srb flag to false for DRBs 2026-01-22 14:56:11 +00:00
Jaroslava Fiedlerova
ed4cca814a Merge branch 'integration_2026_w04' into 'develop'
Integration `2026.w04`

* !3787 CI: disable aerial x86 build pipeline
* !3820 Integrate F1AP messages required for NRPPa
* !3789 fix A3 event configuration
* !3861 add a csv T tracer
* !3669 NR UE: add neighboring cell measurements and measurement report of event A3
* !3866 nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode
* !3402 Test FDM PRACH in CI
* !3852 Cleanup nr_slot_fep_ul
* !3782 Improvements to support CSET0 multiplexing pattern 3 for FR2
* !3862 Check for PDSCH overlapping CORESET during RA
* !3430 NR gNB handling TCI state indication for beam switching
* !3872 Fix compilation issues with vrtsim taps client
* !3687 Standardize Documentation Formatting and Navigation for MkDocs

Closes #705

See merge request oai/openairinterface5g!3867
2026-01-22 14:27:15 +00:00
Jaroslava Fiedlerova
e84b0714d3 Merge remote-tracking branch 'origin/fix-docs' into integration_2026_w04 (!3687)
Standardize Documentation Formatting and Navigation for MkDocs

This merge request improves and organizes the documentation to align with MkDocs
requirements. The following guidelines have been applied:

Guidelines Followed

Fix Broken Links and Paths
- Updated all links with proper paths to ensure correct rendering in MkDocs.

Correct Headings
- Removed multiple H1 headings (#).
- Subheadings use H2–H6 (## to ######) for consistent structure.

Proper URL Formatting
- All URLs now follow standard Markdown syntax,
  e.g., [Example](https://www.example.com).

Proper Syntax
- Tables, lists, and code blocks use standard Markdown formatting to ensure
  correct rendering.

Remove HTML Formatting
- Removed unnecessary inline HTML styling from documents, retaining only the
  content.

Notes and Warnings
- Converted notes and warnings into blockquote syntax (>).

This ensures the documentation is properly structured, consistent, and
MkDocs-friendly.
2026-01-22 11:48:14 +01:00
Shubhika Garg
a1da4b716c docs: Add Documentation Best Practices guide for contributors
- Add it as a reference in README.md
2026-01-22 10:55:29 +01:00
Shubhika Garg
4d5f9d3cb3 docs(episys): Convert README text files to markdown files
- Include functions/file_names in backticks for readability
     - Include the images directly inside the document (rather than plain image file name)
     - Give relevant spacing if required
2026-01-22 10:55:05 +01:00
Shubhika Garg
87410b1d25 docs: updated HTML <img> tags in the doc/ to use standard Markdown image syntax 2026-01-22 10:55:05 +01:00
Shubhika Garg
a025ce30ff doc: fix internal anchor links for section references in system_requirements.md
-  Updated links to use proper Markdown anchor format for section references(e.g. `#simulated-radio`)
2026-01-22 10:55:05 +01:00
Shubhika Garg
17c6d0feb2 docs: replace HTML header with Markdown heading
- Removed HTML table and font tags for the OAI titles and replaced them with a clean Markdown H1 heading
      - Added missing # H1 headings in some files
2026-01-22 10:55:05 +01:00
Robert Schmidt
5c480ffd50 docs: Standardize documentation headings (remove multiple # H1)
- Remove multiple single top-level (# H1) headings per file
 - Use (# H2 and ###### H6) sub-headings for consistency
 - Remove any trailing # in the headings
 - This ensures proper table of contents rendering in MkDocs.

 - Also removed RUN_NR_multiple_BWPs.md as it is moved to MAC usage
2026-01-22 10:55:05 +01:00
Shubhika Garg
a9ba6290b9 docs(architecture): Remove HTML Formatting: retain only the contents and not styling 2026-01-22 10:55:05 +01:00
Shubhika Garg
ed2acc135c docs(architecture): use inline code formatting with backticks
- To improve readability
2026-01-22 10:54:43 +01:00
Shubhika Garg
34d3b5d386 doc(episys): format test-setup and current status blocks for clarity and consistency
- bold current status for clarity and add spacing for better readability
     - Wrap processes in the test setup block inside code blocks as they were rendered as GitLab issues
     - Remove extra spacing in the test setup block
2026-01-22 10:50:50 +01:00
Shubhika Garg
ed734c389f doc(tutorials): ORAN FHI 7.2 - Fix internal links to match the correct heading anchors
- Replace incorrect anchors with the correct formatting
- Ensures that references navigate correctly within the document
2026-01-22 10:50:50 +01:00
Shubhika Garg
273b9fba4d doc: Fix the formatting of gNB RACH Processing document
- Organize into a main title and sub-headings
      - Put var/func as inline code
      - Add anchor links for the referenced step
2026-01-22 10:50:50 +01:00
Shubhika Garg
1aa13e4f23 doc: Fix formatting for mkdocs parsing
- Give a line in between bullet points to reflect bullet points correctly
        - Split long statement into bullet points for readability
        - Format the document for proper rendering
        - Fix table formatting
        - Use standard TOC syntax in 5GNAS
2026-01-22 10:50:50 +01:00
Shubhika Garg
57f8e69c13 doc: render HTML-like tag correctly by escaping
- The parser was incorrectly interpreting `</` as the start of an HTML closing tag, leading to a crash in mkdocs
     - Replace with HTML entity to ensure it is treated as a plain text.
2026-01-22 10:50:50 +01:00
Shubhika Garg
c0d0bab0d8 docs: standardize Markdown links to [Text](URL) format
- Fixed inconsistent or raw URL links across multiple documentation files
  - Ensure proper link formatting for Markdown rendering
2026-01-22 10:50:50 +01:00
Shubhika Garg
f5501ed725 docs: enhance readability of Notes, Cautions, Issues, and Attention sections
- Standardized appearance of Notes, Cautions, Issues, and Attention blocks for better clarity
2026-01-22 10:50:45 +01:00
Mario Joa-Ng
2f6b30cdb4 Fix FFT size for xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol() 2026-01-22 02:54:03 +01:00
Jaroslava Fiedlerova
7cf6181ff4 Merge remote-tracking branch 'origin/vrtsim-compilation-fix' into integration_2026_w04 (!3872)
Fix compilation issues with vrtsim taps client

Fix two issues regarding vrtsims taps client implementation:
- Incorrect #define used to enable taps socket handling
- flatbuffers package name changing between ubuntu versions
2026-01-21 21:17:11 +01:00
Jaroslava Fiedlerova
5225f60194 Merge remote-tracking branch 'origin/NR_TCI_states' into integration_2026_w04 (!3430)
NR gNB handling TCI state indication for beam switching

This MR implements the procedure to send in DLSCH MAC-CE for TCI state
indication to UE
- if new beam is reported via SSB RSRP, gNB allocates MAC-CE with TCI
  indication
- DLSCH is scheduled to be transmitted with priority
- a timer is started when receiving ACK according to the delay mandated
  by standard (8.10.3 of 38.133)
- at timer expiry the gNB switches beam
2026-01-21 17:37:15 +01:00
Bartosz Podrygajlo
9ac9e3ba91 Add support for taps client to ubuntu gNB & nrUE images 2026-01-21 12:58:09 +01:00
Jaroslava Fiedlerova
4d19b4732e Merge remote-tracking branch 'origin/issue-705' into integration_2026_w04 (!3862)
Check for PDSCH overlapping CORESET during RA

CORESET 0 is configured in the configuration file by
'initialDLBWPcontrolResourceSetZero' and PDSCH TDA list is configured based on
the current BWP size.

It may happen that the user configures a 2 symbol CORESET 0 for a BWP >= 48 PRBs
(which is a valid 3GPP configuration) but in function 'nr_rrc_config_dl_tda'
this scenario is not taken in account causing an overlap between PDSCH and PDCCH
symbols during RA.

This leads to very unreliable Msg2 and Msg4 decoding at the UE, but from time to
time it succeeds, which becomes hard to identify this issue.

closes #705
2026-01-21 11:55:42 +01:00
Bartosz Podrygajlo
13f46a0c0a Fix compilation issues with vrtsim taps client
Fix two issues regarding vrtsims taps client implementation:
 - Incorrect #define used to enable taps socket handling
 - flatbuffers package name changing between ubuntu versions
2026-01-21 11:35:12 +01:00
Jaroslava Fiedlerova
231966753d Merge remote-tracking branch 'origin/fix_mux_23' into integration_2026_w04 (!3782)
Improvements to support CSET0 multiplexing pattern 3 for FR2
2026-01-21 11:02:40 +01:00
francescomani
bcfa68347f fix bug in selecting MSG3 re-transmission slot 2026-01-21 03:53:25 +01:00
francescomani
c903d9f640 refactoring nr_generate_Msg3_retransmission
replacing if(X) logic with if(!X) logic
2026-01-21 03:53:25 +01:00
francescomani
9031b26cf8 add safety check to avoid scheduling MSG4 ACK if there is less than 2 symbols in mixed slot
(PUCCH for MSG4 ACK is 2 symbols)
2026-01-21 03:53:25 +01:00
francescomani
15bd09dd24 use commonControlResourceSet instead of CSET0 as coreset for common SearchSpaces in case of MUX pattern 3 2026-01-21 03:53:22 +01:00
francescomani
5e6d9dbbc6 fix for SSB larger than 7 at UE 2026-01-21 03:48:17 +01:00
Jaroslava Fiedlerova
705fbb3818 Merge remote-tracking branch 'origin/cleanup-nr-slot-fep' into integration_2026_w04 (!3852)
Cleanup nr_slot_fep_ul

Rename nr_slot_fep_ul to nr_symbol_fep_ul to relfect its function

Simplify logic so that the function does not require RU context and
the implementation is not dependent on the implementation of RU buffer
management.

This makes the function easier to understand and moves the responsibility
to set the correct buffer offset on the caller.
2026-01-20 20:48:08 +01:00
Jaroslava Fiedlerova
2a8683202e Merge remote-tracking branch 'origin/prach-fdm-ci' into integration_2026_w04 (!3402)
Test FDM PRACH in CI
2026-01-20 14:46:32 +01:00
Jaroslava Fiedlerova
1411b03c4f Merge remote-tracking branch 'origin/nfapi-pnf-l1-xran-race-cond-fix' into integration_2026_w04 (!3866)
nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode

PROBLEM: In PNF mode, L1 is started from nfapi_pnf.c without verifying RU
readiness. The only gate is config_sync_var, but nr_softmodem.c sets this before
the RU  (e.g., FHI-72) is actually started. As a result, START_REQUEST can
trigger L1  init while the RU is not yet ready -- this is an issue when using
FHI72 with  DPDK BBDEV, where a pre-mature L1 init will crash the entire program
as DPDK BBDEV depends on xRAN's DPDK EAL. Note that this issue is more like a
"race" condition, so it may not always manifest, and happens at random.

FIX: Perform RU readiness checks before setting config_sync_var in NFAPI PNF mode.
This aligns PNF behavior with other modes and prevents L1 from starting before the
RU is operational.
2026-01-20 14:45:38 +01:00
Sakthivel Velumani
31c6d1d3d6 Test FDM PRACH in CI
SSB position in burst is set to 2 so only SSB index 1 is transmitted.
prach_msg1_FDM is set to 1 so there are two occasions per time slot.
All the UE connecting to gNB will receive SSB index 1 and trigger PRACH
in the second FDM prach occasion.
2026-01-20 12:38:13 +01:00
Robert Schmidt
3fa6b7e59e Check that there is more than zero PRACH FD occasion
FHI 7.2 does not have a field for the number of RACH Occasions.
It seems this needs to be manually configured, and M plane has field
num-prach-re to set the number of frequency domain PRACH occasions.
2026-01-20 12:38:13 +01:00
Bartosz Podrygajlo
28d821bd0f Cleanup nr_slot_fep_ul
Rename nr_slot_fep_ul to nr_symbol_fep_ul to relfect its function

Simplify logic so that the function does not require RU context and
the implementation is not dependent on the implementation of RU buffer management.

This makes the function easier to understand and moves the responsibility
to set the correct buffer offset on the caller.
2026-01-20 12:18:18 +01:00
Robert Schmidt
69edfa25cb Extend PDU session types and make PDU session req flexible 2026-01-20 11:47:28 +01:00
Robert Schmidt
0eddb4d3e3 get_user_nssai_idx(): make NSSAI check configurable
We need to check arbitrary PDU session configurations in a later commit,
so make this configurable.
2026-01-20 11:43:15 +01:00
Robert Schmidt
542b2d017e Add configurable DNN in PDU session request encoding 2026-01-20 11:43:15 +01:00
Robert Schmidt
cadd031c81 Modify TUN interface handling to also handle TAP
Modify all functions to also handle TAP (where applicable). The actual
TAP interface code is not used in this commit, it will be used later.

To make the interface creation stand out, make "Interface XXX
successfully configured" a LOG_A.
2026-01-20 11:42:08 +01:00
Robert Schmidt
1e5c28279e Rename tun_if.{c,h} => tuntap_if.c{c,h}
The next commit introduces functions to also manage TAP interfaces.
2026-01-20 11:11:36 +01:00
Robert Schmidt
7ede84cb1d SDAP entity: store interface name
Simplify interface handling by storing the name: this allows to simplify
to remove_ip_if(), which does not need to recreate a valid name, and
will simplify handling of ethernet PDU sessions with a possibly
different name.
2026-01-20 11:11:36 +01:00
Robert Schmidt
2557df87f5 Hardcode (noS1) PDU session ID to 10
Defacto, the PDU session ID for noS1 modes is already hardcoded, as
starting the nr-softmodem with --noS1 --default-pdu-id 1 leads to

    Assertion (entity != ((void *)0)) failed!
    In start_sdap_tun_gnb_first_ue_default_pdu_session() openair2/SDAP/nr_sdap/nr_sdap.c:163

Further, the --default-pdu-id parameter will be deactivated in a later
commit, and we cannot rely on it. Therefore:

- hardcode noS1 PDU ID (also used in --do-ra/--phy-test modes) to 10 and
  use in gNB&UE
- pass the PDU session ID used in SDAP entity initialization down to
  start_sdap_tun_gnb_first_ue_default_pdu_session() to always use the
  correct one
2026-01-20 11:11:36 +01:00
Robert Schmidt
e9ac0c70c8 Separate change_interface_state() into get/set_if_flags()
For configuring a TAP interface, we need to set different options, which
is not easily feasible with the current change_interface_state() API (or
would make it more complex). To simplify while allowing to set flags
more flexibly, separate into two functions get/set_if_flags().
2026-01-20 11:11:28 +01:00
Robert Schmidt
42fd19dc5c Bugfix: Abort processing on PDU session establishment accept decode failure 2026-01-20 11:11:19 +01:00
Robert Schmidt
345d5315e5 config_module: make pointers const 2026-01-20 10:02:38 +01:00
Xin Zhe Khooi
c978d1664f nr-softmodem: ensure RU is ready before L1 init in NFAPI PNF mode
PROBLEM: In PNF mode, L1 is started from nfapi_pnf.c without verifying RU
readiness. The only gate is config_sync_var, but nr_softmodem.c sets this before
the RU  (e.g., FHI-72) is actually started. As a result, START_REQUEST can
trigger L1  init while the RU is not yet ready -- this is an issue when using
FHI72 with  DPDK BBDEV, where a pre-mature L1 init will crash the entire program
as DPDK BBDEV depends on xRAN's DPDK EAL.

FIX: Perform RU readiness checks before setting config_sync_var in NFAPI PNF mode.
This aligns PNF behavior with other modes and prevents L1 from starting before the
RU is operational.
2026-01-19 17:04:13 +01:00
Robert Schmidt
53095c7239 Remove unnecessary header function declaration 2026-01-19 15:44:01 +01:00
Robert Schmidt
48f9d8a56d Clean up: header not required 2026-01-19 15:36:11 +01:00
Jaroslava Fiedlerova
775051c5d2 Merge remote-tracking branch 'origin/meas-report-a3' into integration_2026_w04 (!3669)
NR UE: add neighboring cell measurements and measurement report of event A3

This is a rework of MR !2385 (closed), the goal is to add neighboring cell
measurements and measurement report of event A3 for NR UE.

This MR was tested with:
- 3rd-party gNB
- 2 OAI-gNB-DUs

The neighboring cell measurements and measurement report of event A3 for OAI-UE
are working as expected.
2026-01-19 14:00:57 +01:00
Jaroslava Fiedlerova
ecd600f38b Merge remote-tracking branch 'origin/t-tracer-csv' into integration_2026_w04 (!3861)
add a csv T tracer

Add a CSV T tracer to dump stuff to a CSV file.
2026-01-19 13:58:12 +01:00
Jaroslava Fiedlerova
70322348f8 Merge remote-tracking branch 'origin/fix-a3-event' into integration_2026_w04 (!3789)
fix A3 event configuration

See commit message for more information.
As a reference, for comparison purpose, PCAPs and TXT files for various tests
done in develop and in this MR are available in the MR description.
2026-01-19 13:55:40 +01:00
Cedric Roux
63b805a5a4 minor: T tracer: add generated binaries to .gitignore 2026-01-19 11:32:47 +01:00
Cedric Roux
d4ebb76e45 T: fix compilation of tracee
there is a warning, but so be it, at least it compiles and run,
no need for more, it's a quick hack
2026-01-19 11:32:47 +01:00
Cedric Roux
152dfae7bc T tracer: log to stderr
stdout messes up with the new csv tracer
2026-01-19 11:32:47 +01:00
Cedric Roux
34a58676ce T tracer: add a csv tracer 2026-01-19 11:32:40 +01:00
Jaroslava Fiedlerova
08edcb43ea Merge remote-tracking branch 'origin/nrppa_f1ap_integration' into integration_2026_w04 (!3820)
Integrate F1AP messages required for NRPPa

This MR is one of the several MRs that will follow in the integration of NRPPa
protocol (!2437) required for positioning in 5G NR. We specifically introduce
encoding and decoding of several F1AP messages including unit tests for
verification in this MR.

The details of the F1AP messages introduced here can be seen below:
- POSITIONING INFORMATION REQUEST
- POSITIONING INFORMATION RESPONSE
  - Supported optional field: SRS Configuration
- POSITIONING INFORMATION FAILURE
- POSITIONING INFORMATION UPDATE
  - Supported optional field: SRS Configuration
- POSITIONING ACTIVATION REQUEST
- POSITIONING ACTIVATION RESPONSE
- POSITIONING ACTIVATION FAILURE
- POSITIONING DEACTIVATION
- TRP INFORMATION REQUEST
- TRP INFORMATION RESPONSE
  - Supported : NR PCI, NG-RAN CGI, NR ARFCN, Geogarphical Coordinates
- TRP INFORMATION FAILURE
- POSITIONING MEASUREMENT REQUEST
  - Supported optional field: SRS Configuration
- POSITIONING MEASUREMENT RESPONSE
- POSITIONING MEASUREMENT FAILURE
- POSITIONING MEASUREMENT REPORT
- POSITIONING MEASUREMENT ABORT
- POSITIONING MEASUREMENT FAILURE INDICATION
- POSITIONING MEASUREMENT UPDATE
  - Supported optional field: SRS Configuration

The reference to these messages can be found in 3GPP 38.473 v16.21.0
2026-01-19 10:28:22 +01:00
Jaroslava Fiedlerova
8df5bcc533 Merge remote-tracking branch 'origin/remove-aerial-x86' into integration_2026_w04 (!3787)
CI: disable aerial x86 build pipeline

We use Aerial exclusively on ARM/gracehopper, so no need to build it on
x86. On this occasion, rename the "kind" (ID which images to build) to
x86 for clarity and align with the other "kinds" (build_cross_arm,
native_armv9, ...).
2026-01-19 10:23:55 +01:00
Cedric Roux
ac535b6338 fix A3 event configuration
While testing the gNB with two hypotetical neighbors, some issues were found
with A3 event configuration.

The configuration of neighbors is:

neighbour_list = (
  {
    nr_cellid = 12345679L;

    neighbour_cell_configuration = (
      {
        gNB_ID              = 0xba0;
        nr_cellid           = 720898;
        physical_cellId     = 1;
        absoluteFrequencySSB= 621312;
        subcarrierSpacing   = 1;
        band                = 78;
        plmn                = { mcc = 505; mnc = 01; mnc_length = 2 };
        tracking_area_code  = 1;
      },
      {
        gNB_ID              = 0xea0;
        nr_cellid           = 1345678L;
        physical_cellId     = 2;
        absoluteFrequencySSB= 640000;
        subcarrierSpacing   = 1;
        band                = 78;
        plmn                = { mcc = 505; mnc = 01; mnc_length = 2 };
        tracking_area_code  = 1;
      }
    );
  }
);

There were two problems.

The first problem is:
- when only default A3 event is configured, it is duplicated in the
  RRC Reconfiguration Report Config To AddMod list with IDs 4 and 5

To test this case, the event configuration is:

nr_measurement_configuration = {
  Periodical = {
    enable                     = 1;
    includeBeamMeasurements    = 1;
    maxNrofRS_IndexesToReport  = 4;
  };

  A2 = {
    enable          = 1;
    threshold       = 60;
    time_to_trigger = 1;
  };

  A3 = (
  {
    physCellId      = -1;
    offset          = 15;
    hysteresis      = 2;
    time_to_trigger = 3
  }
  );
};

The second problem is:
- when configuring an A3 event with an unknown physCellId, the gNB
  does not include any A3 event in the RRC Reconfiguration Report
  Config To AddMod list (which is correct), but configures some
  meas ID with nonexistant Report Config IDs

To test this case, the event configuration is:

nr_measurement_configuration = {
  Periodical = {
    enable                     = 1;
    includeBeamMeasurements    = 1;
    maxNrofRS_IndexesToReport  = 4;
  };

  A2 = {
    enable          = 1;
    threshold       = 60;
    time_to_trigger = 1;
  };

  A3 = (
  {
    physCellId      = 10;
    offset          = 15;
    hysteresis      = 2;
    time_to_trigger = 3
  }
  );
};

Reworking A3 event configuration as done in this commit solves both
issues.
2026-01-17 23:00:32 +01:00
luis_pereira87
03d3a94038 Check for PDSCH overlapping CORESET during RA
CORESET 0 is configured in the configuration file by 'initialDLBWPcontrolResourceSetZero' and PDSCH TDA list is configured based on the current BWP size.
It may happen that the user configures a 2 symbol CORESET 0 for a BWP >= 48 PRBs (which is a valid 3GPP configuration) but in function 'nr_rrc_config_dl_tda' this scenario is not taken in account causing an overlap between PDSCH and PDCCH symbols.
This leads to very unreliable Msg2 and Msg4 decoding at the UE, but from time to time it succeeds, which becomes hard to identify this issue.
2026-01-16 11:54:48 +00:00
Bartosz Podrygajlo
ee2af75bff O-RU: Add Dockerfile and image build step 2026-01-16 11:56:33 +01:00
Bartosz Podrygajlo
27a21cc8aa O-RU: update build_oai to build nr-oru 2026-01-16 11:56:33 +01:00
Raymond Knopp
48bcbc316c Initial implementation of O-RU for 7.2 emulator
Added new executable oainr_ru which acts as a 7.2 O-RU.

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Co-authored-by: Mario Joa-Ng <mario.joa-ng@openairinterface.org>
2026-01-16 11:56:25 +01:00
francescomani
64091c9a51 remove workaround to take into account first symbol index, necessary when only SS for SSB 0 was pre-computed 2026-01-16 00:55:04 +01:00
francescomani
e22c6c8438 change sched_ctrlCommon to be SIB1 specific and to allow to store search spaces for each SSB at pre-configuration 2026-01-16 00:55:04 +01:00
francescomani
def635ad7d type int for aggregation level and candidates 2026-01-16 00:55:04 +01:00
francescomani
39e32c5998 simplify SIB1 scheduling by removing unnecessary storage of information in sched_ctrlCommon 2026-01-16 00:55:04 +01:00
francescomani
e0af1a2e75 convert RFsim FR2 32 PRB test into 66 PRB to test MUX pattern 3 2026-01-16 00:55:02 +01:00
francescomani
143a2f87a7 fix in ld condition in DMRS function 2026-01-16 00:43:00 +01:00
francescomani
75820422a4 check if CSET0 exceeds upper BW limit 2026-01-16 00:43:00 +01:00
francescomani
28f3037581 fix for PDCCH channel estimation start subcarrier 2026-01-16 00:43:00 +01:00
francescomani
7173bb6cac formatting 2026-01-16 00:43:00 +01:00
francescomani
b64c4e5708 fixes to make multiplexing pattern 2 and 3 work for Type0-PDCCH CSS
Correct how the slot for SIB1 is computed in case of MUX pattern 2 and 3.
Renamed n_0 to slot for clarity. n_c was never used outside of the function, so
remove it where it is not used.
2026-01-16 00:43:00 +01:00
Robert Schmidt
6317fdd9df CI: Remove kind from RunTests: not used 2026-01-15 15:55:59 +01:00
Robert Schmidt
f2de345b09 CI: don't build Aerial on x86
We use Aerial exclusively on ARM/gracehopper, so no need to build it on
x86. On this occasion, rename the "kind" (ID which images to build) to
x86 for clarity and align with the other "kinds" (build_cross_arm,
native_armv9, ...).
2026-01-15 15:55:20 +01:00
Rakesh Mundlamuri
180e06112f Add F1AP positioning measurement update message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Optional fields:
SRS Configuration (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
57ab56cce2 Add F1AP positioning measurement abort message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)

Add F1AP positioning measurement failure indication message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Cause (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
4eec984159 Add F1AP positioning measurement report message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Positioning Measurement Result List (range: 1)
 > Positioning Measurement Result List Item (range: 1..64)
   >> Positioning Measurement Result (supported)
   >> TRP ID (supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
8a97d94725 Add F1AP positioning measurement failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transaction ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
372ab68056 Add F1AP positioning measurement response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
Positioning Measurement Result List (range: 0..1)
 > Positioning Measurement Result List Item (range: 1..64)
   >> Positioning Measurement Result (supported)
   >> TRP ID (supported)

Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
e8ae7cb711 Add F1AP positioning measurement request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
LMF Measurement ID (supported)
RAN Measurement ID (supported)
TRP Measurement Request List (range : 1)
 > TRP Measurement Request Item (range : 1..64)
   >> TRP ID (supported)
   >> Search Window Information (optional : not supported)
Positioning Report Characteristics (supported)
Positioning Measurement Periodicity (supported)
Positioning Measurement Quantities (range : 1)
 > Positioning Measurement Quantities Item (range : 1..16384)
   >> Positioning Measurement Type (supported)
   >> Timing Reporting Granularity Factor (optional: not supported)
Optional fields:
SFN Initialisation Time (not supported)
SRS Configuration (supported)
Measurement Beam Information Request (not supported)
System Frame Number (not supported)
Slot Number (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
6240ad40aa Add F1AP trp information failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:35 +05:30
Rakesh Mundlamuri
30d3479782 Add F1AP trp information response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
TRP Information List (range : 1)
 > TRP Information Item (range : 1..65535)
   >> TRP Information (supported)

Further details of TRP Information:
TRP ID
TRP Information Type Response List (range : 1)
 > TRP Information Type Response Item (range : 1..64)
   >> CHOICE TRP Information Type Response Item
      >>> NR PCI (madatory : supported)
      >>> NG-RAN CGI (madatory : supported)
      >>> NR ARFCN (madatory : supported)
      >>> PRS Configuration (madatory : not supported)
      >>> SSB Information (madatory : not supported)
      >>> SFN Initialisation Time (madatory : not supported)
      >>> Spatial Direction Information (madatory : not supported)
      >>> Geographical Coordinates (madatory : supported)

For now, we only use Geographical Coordinates.

Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:26:28 +05:30
Rakesh Mundlamuri
af4a030997 Add F1AP trp information request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
Transcation ID (supported)
TRP list (range : 0..1)
 > TRP list Item (range : 1..65535)
   >> TRP ID (supported)
TRP Information Type List (range : 1)
 > TRP Information Type Item (range : 1..64)
   >> TRP Information Type Item (supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
a6b83a6ed7 Add F1AP positioning information update message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
SRS Configuration (supported)
SFN Initialisation Time (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
f579e03b16 Add F1AP positioning deactivation message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
CHOICE Abort Transmission
 > SRS Resource Set ID deactivation
 > Release ALL
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
99b1bfbdfd Add F1AP positioning activation failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
cf5467e4cc Add F1AP positioning activation response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
System Frame Number (not supported)
Slot Number (not supported)
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
9b64634652 Add F1AP positioning activation request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
CHOCIE SRStype (supported)
 > Semi-persistent
   >> SRS Resource Set ID (supported)
   >> SRS Spatial Relation (optional : not supported)
 > Aperiodic
   >> Aperiodic (supported)
   >> SRS Resource Trigger (optional : not supported)
Optional fields:
Activation Time (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
746d12b2d2 Add F1AP positioning information failure message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Cause (supported)
Optional fields:
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
9cd6c68623 Add F1AP positioning information response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
SRS Configuration (supported)
SFN Initialisation Time (not supported)
Criticality Diagnostics (not supported)
2026-01-15 15:00:31 +05:30
Rakesh Mundlamuri
32718da5a5 Add F1AP positioning information request message enc/dec + test
Reference: 3GPP 38.473 v16.21.0
Mandatory fields:
gNB-CU UE F1AP ID (supported)
gNB-DU UE F1AP ID (supported)
Optional fields:
Requested SRS Transmission Characteristics (not supported)
2026-01-15 15:00:31 +05:30
Robert Schmidt
8f2e98a475 Upgrade F1AP to version 16.21.0
While implementing NRPPA-related F1AP messages, we remarked that
extension field "UL-AoA-ExtIEs" needs to be OPTIONAL (e.g., in NRPPA it
is optional in the OAI-compiled version), but it was not marked as such.
This later version 16.21.0 fixes this.
2026-01-15 15:00:31 +05:30
Robert Schmidt
102965a669 Merge branch 'integration_2026_w03' into 'develop'
Integration: `2026.w03`

* !3818 Update threadCreate
* !3845 Update physim timing thresholds in gNB-N300-Timing-Phytest-LDPC
* !3849 Make gpd config utility global
* !3812 Fix reestablishment after handover
* !3826 Define speed of light
* !3799 Fix for threadpool abort function
* !3791 fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient
* !3718 Introduce SRS physical simulator and improvements
* !3857 Fix bug "no AMF for UE"
* !3858 remove function decode_cellGroupConfig
* !3668 Support beam index for LiteON FR2 RU that needs per symbol section in CP packets
* !3844 CI: Remove testcase ids from XML files
* !3620 update multi-RU 7.2 documentation for DAS scenario
* !3788 Fix handover documentation and configuration files for event configuration

See merge request oai/openairinterface5g!3854
2026-01-15 09:07:10 +00:00
Robert Schmidt
22b6298e44 Merge remote-tracking branch 'origin/fix-handover-doc' into integration_2026_w03 (!3788)
Fix handover documentation and configuration files for event configuration
2026-01-15 07:53:51 +01:00
Robert Schmidt
75f53384ca Merge remote-tracking branch 'origin/update_72_doc_with_das' into integration_2026_w03 (!3620)
update multi-RU 7.2 documentation for DAS scenario
2026-01-15 07:53:17 +01:00
Jaroslava Fiedlerova
e47452987d Merge remote-tracking branch 'origin/ci-remove-testcase-ids' into integration_2026_w03 (!3844)
CI: Remove testcase ids from XML files

Automatically enumerate testcases given in XML files
2026-01-15 00:40:09 +01:00
Jaroslava Fiedlerova
dab44db9aa CI: Update ShowTestID to include the source file and line
Replace xml.etree.ElementTree with lxml.etree for to enable line tracking.
Update ShowTestID to include the source file and line number for each
test.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
3893d5c8ef CI: harmonize test case identifier
Remove unused testCase_id definitions and replace all occurrences of test_id
with test_idx across the ci-scripts folder.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
0166bbd493 CI: Remove requested and exclusion test parsing and validation
Requested and exclusion test lists are no longer present in the XML files,
so related parsing, format checks, and filtering logic have been removed.
2026-01-14 23:43:08 +01:00
Jaroslava Fiedlerova
12f4167f99 CI: Automatically enumerate test cases, remove hardcoded IDs
Update all XML files in ci-scripts folder, using Python script
attached in MR !3844.
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/3844#note_198132
2026-01-14 23:43:03 +01:00
Guido Casati
d613cf7b0b RRC: improve error handling in doRRCReconfiguration_from_HandoverCommand
- Refactor function to return byte_array_t instead of taking buffer
  parameter for consistency with other encoding functions
  (do_RRCReconfiguration, do_HO_RRCReconfiguration) and to prevent buffer
  overflow issues since the memory size is determined automatically

- Add comprehensive error checking:
  * Input validation
  * Check return of each decode (HandoverCommand
    and RRCReconfiguration)
  * Validate HandoverCommand structure before access
  * Validate OCTET_STRING before decoding RRCReconfiguration
  * Error handling and cleanup for enc/dec failures

- Update caller in rrc_gNB_NGAP.c
  * use new signature
  * free buffer
  * send HO Cancel on decoding failure (source gNB)

Closes #1043
2026-01-14 17:05:35 +01:00
Guido Casati
f6d23422aa NGAP: enable Handover Cancel encoding
This commit adds support for the Handover Cancel initiating message
procedure code (NGAP_ProcedureCode_id_HandoverCancel).

Changes:
- ngap_gNB_decoder.c: Added case handler for Handover Cancel in
  ngap_gNB_decode_initiating_message() to properly decode and log
  incoming Handover Cancel messages from the AMF.

- ngap_gNB_encoder.c: Added Handover Cancel to the list of supported
  initiating message procedure codes in ngap_gNB_encode_initiating(),
  allowing the gNB to encode and send Handover Cancel messages.

The Handover Cancel procedure is already implemented in other parts of
the NGAP stack, these changes were missing to complete the support
by ensuring the procedure code is properly recognized in both the encoder
and decoder switch statements, following the same pattern as other
procedure codes.
2026-01-14 17:05:35 +01:00
Robert Schmidt
91e0388180 Merge remote-tracking branch 'origin/liteon_develop_F' into integration_2026_w03 (!3668)
Support beam index for LiteON FR2 RU that needs per symbol section in CP packets

This branch supports beam index for LiteOn FR2 RU and others. It adds
the support of beam index for LiteOn RU that uses per-symbol CP packet
and is a sequel of MR !3605 (merged) that supports beam index for RU
that uses per-slot CP packets.

A. To support LiteOn FR2 RU, the following are needed.

a. Per symbol beamforming. Need separate section for each symbol on CP packet.

b. Handle these two bugs:

- section ID on UP packet is set wrongly to 13 for all sections
- prach eAxC offset starts from 0 instead of from last antenna port
  number used by other channels.

B. Implementation

a. set fh_config->RunSlotPrbMapBySymbolEnable based on the setting in the configuration file

- if disable, the existing per-slot scheme is run on xran.
- if enable, RunSlotPrbMapBySymbolEnable mode is on in xran so that xran
  will generate PrbElm per symbol (aka total of 14)and perform
  per-symbol processing on the corresponding PrbElm.

b. set fh_config->LiteOnIgnoreUPSectionIdEnable based on the setting in
the configuration file if enable, handle 2 "features" of Liteon:

- To handle the section_id = 13 issue on Liteon where section ID is set
  wrongly to 13 for all sections
- To handle the prach eAxC offset issue on Liteon where it starts from 0
  instead of from the end of last antenna port number

c. if fh_config->RunSlotPrbMapBySymbolEnable, OAI FHI

- invoke xran_fh_rx_read_slot_BySymbol() instead of xran_fh_rx_read_slot()
- invoke xran_fh_tx_send_slot_BySymbol() instead of xran_fh_tx_send_slot()

C. Testing

a. Command to test benetel RU

    sudo LD_LIBRARY_PATH=.:$DPDK_INST/lib/x86_64-linux-gnu/ ./nr-softmodem -O /etc/ran_development/CONFs/gnb.sa.band77.273prb.fhi72.4x4-benetel550_c0.conf --thread-pool 21,22,23,24,25,26,27,28

    Results:
    iperf UDP uplink
    [  5]   0.00-10.22  sec  87.3 MBytes  71.6 Mbits/sec  0.100 ms  370/63081 (0.59%)  receiver
    iperf UDP downlink
    [  5]   0.00-10.00  sec   796 MBytes   668 Mbits/sec  0.017 ms  1824/586404 (0.31%)  receiver

b. Command to test LiteOn FR2 RU

    sudo LD_LIBRARY_PATH=.:$DPDK_INST/lib/x86_64-linux-gnu/ ./nr-softmodem -O /etc/ran_development/CONFs/gnb.sa.band78.66prb.fhi72.2x2-liteon-F-Release.conf--thread-pool 21,22,23,24,25,26,27,28

    Result:
    iperf UDP uplink
    [  5]   0.00-10.20  sec  89.9 MBytes  73.9 Mbits/sec  0.156 ms  212/64848 (0.33%)  receiver
    iperf UDP downlink
    [  5]   0.00-10.00  sec   361 MBytes   303 Mbits/sec  0.077 ms  277662/542891 (51%)  receiver

D. Difference between LiteOn FR2 E release configuration file and that for F release is

    diff gnb.sa.band78.66prb.fhi72.2x2-liteon-KB.conf gnb.sa.band78.66prb.fhi72.2x2-liteon-F-Release.conf 39d38

    <     beam_weights = [1, 1];
    225a225
    >     beam_weights = [1];
    312c312,313
    <   mtu = 1500; # check if xran uses this properly
    ---
    >   #mtu = 1500; # check if xran uses this properly
    >   mtu = 9000; # check if xran uses this properly
    313a315,316
    >   RunSlotPrbMapBySymbol = 1;
    >   LiteOnIgnoreUPSectionId = 1;
2026-01-14 14:47:52 +01:00
Mario Joa-Ng
c96aa4e740 use a single OAI FHI to handle both liteon and others. liteon uses xran_fh_tx_send_slot_BySymbol() and xran_fh_rx_read_slot_BySymbol() to send CP one section per sysmbol 2026-01-14 14:34:18 +01:00
Mario Joa-Ng
48247ecc1d Add F release patch fh_config parameters RunSlotPrbMapBySymbol and LiteOnIgnoreUPSectionId.
Add the F patch that work on both Benetel and LiteOn RU. support
fh_config parameters RunSlotPrbMapBySymbol and LiteOnIgnoreUPSectionId.
Change version number.
2026-01-14 14:33:30 +01:00
francescomani
f09a74fbb3 Add 7.2 documentation and a reference DU config file for DAS scenario
Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-01-14 14:32:35 +01:00
Reem Bahsoun
4e4023a455 Align config fields in N2 HO config files 2026-01-14 14:02:56 +01:00
Robert Schmidt
b8b2a36a30 Merge remote-tracking branch 'origin/remove_decode_cellGroupConfig' into integration_2026_w03 (!3858)
remove function decode_cellGroupConfig

it's never used
2026-01-14 11:06:50 +01:00
Robert Schmidt
bd6ce9bad9 Merge remote-tracking branch 'origin/fix-bug-release-no-amf' into integration_2026_w03 (!3857)
Fix bug "no AMF for UE"

It might happen that the RRC does not know the AMF UE NGAP ID, yet. Even
in that case, we should forward the release request to the NGAP module,
which can either forward a message to the AMF, or reply back to release
the UE. This avoids an error where the CU claims there was no AMF, when
there actually is.

One possible problematic behavior is if a UE disconnects before the gNB
receives an NGAP Initial Context Setup. In this case, the AMF UE NGAP ID
was not forwarded to the RRC (although it was known at NGAP), thus
blocking the release of the UE.

This is the main fix, the rest are minor fixes:

- store AMF UE NGAP ID as early as possible
- warn in MAC if UE unknown for UE context release command
- show TEIDs with correct endianness in GTP
- avoid NG Setup Failure+Setup log.
2026-01-14 11:06:15 +01:00
francescomani
c00b5b8c1c remove function decode_cellGroupConfig since it is declared but never used anywhere 2026-01-14 10:14:20 +01:00
Robert Schmidt
93b3a5aedb Merge remote-tracking branch 'origin/srs_phy_simulator' into integration_2026_w03 (!3718)
Introduce SRS physical simulator and improvements

This MR consists of two parts:

- Introduces SRS physical simulator to test different configurations of
  SRS
- Improvements in the SRS channel estimation (Addressing the comments
  from old, unfinished MR !2875)
  - rewrite nr_srs_channel_estimation() to loop over rx antennas and
    antenna ports to be able to parallelize
  - Improvements in timing_advance_offset and timing_advance_offset_nsec
    computation
  - Introduce SRS multi-symbol channel estimation
    - The channel impulse response is estimated from the averaged
      channel frequency response over multiple symbols
    - The channel frequency estimates are left as they are to be able to
      estimate doppler in the future
  - Simplify SRS channel estimation to handle memory alignment in the
    case of different SRS configurations (eg: comboffset)

To use multiple symbols when running gNB, the following parameters needs
to be edited in the function get_srs_resource()

- srs_res->resourceMapping.startPosition with a range from {0,1,..,5}
  corresponds to the start symbol {13, 12, .. 8} with in a slot
- srs_res->resourceMapping.nrofSymbols indicates the number of symbols
  {n1, n2, and n4}

Make sure the that start symbol + number of symbols is < 14

The timing results for SRS in develop and srs_phy_simulator are as follows:

Command used: sudo ./nr_ulsim -n1000 -s50 -S50 -R273 -W2 -y2 -z2 -E 1 -P

develop

|__ RX SRS time                            124.94 us (1000 trials)		(124.94 total [ms])
    |__ Generate SRS sequence time           0.05 us (1000 trials)		(  0.05 total [ms])
    |__ Get SRS signal time                 19.41 us (1000 trials)		( 19.41 total [ms])
    |__ SRS channel estimation time         89.11 us (1000 trials)		( 89.11 total [ms])
    |__ SRS timing advance estimation time  13.10 us (1000 trials)		( 13.10 total [ms])
    |__ SRS report TLV build time            2.80 us (1000 trials)		(  2.80 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.73 us (1000 trials)

srs_phy_simulator

|__ RX SRS time                            211.93 us (1000 trials)		(211.93 total [ms])
    |__ Generate SRS sequence time           0.04 us (1000 trials)		(  0.04 total [ms])
    |__ Get SRS signal time                 19.55 us (1000 trials)		( 19.55 total [ms])
    |__ SRS channel estimation time        152.05 us (1000 trials)		(152.05 total [ms])
    |__ SRS timing advance estimation time  36.67 us (1000 trials)		( 36.67 total [ms])
    |__ SRS report TLV build time            2.96 us (1000 trials)		(  2.96 total [ms])
        |__ SRS beam report build time       0.00 us (  0 trials)
        |__ SRS IQ matrix build time         2.88 us (1000 trials)

Note that in srs_phy_simulator, to compute timing offset ns, an
oversampling factor of 2 is performed. Also, for peak detection, we
average the channel estimates for every port.
2026-01-13 13:39:32 +01:00
Robert Schmidt
0fdc095da5 Merge remote-tracking branch 'origin/fix-simplify-prach-nrue' into integration_2026_w03 (!3791)
fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient

generate_nr_prach() has several errors coming from replace int16_t by
c16_t, and also older error in k wrapping at the end of the symbol

the code is also ridiculously complex, wasting memory and cpu time in
intermediate useless buffers and headache usage of memmove()
2026-01-13 13:37:23 +01:00
Robert Schmidt
5fa624b206 Move NGSetupResponse message to avoid confusion
On NGSetupFailure, before moving, we might have

    [NGAP]   Received NG setup failure for AMF... please check your parameters
    [NGAP]   Received NGSetupResponse from AMF
2026-01-13 13:28:46 +01:00
Robert Schmidt
d7a940baba Log TEID in host order
All over the GTP module, we use ntohl()/htonl() to convert between local
and network order. It seems to have been forgotten here.
2026-01-13 13:28:46 +01:00
Robert Schmidt
b60a37ebb8 Log NGAP Initial Context Setup
For debugging, it might notably be useful to see the AMF UE NGAP ID. Log
it in the single Initial Context Setup message.
2026-01-13 13:28:46 +01:00
Robert Schmidt
89b3eb0132 NR MAC: warn on release for unknown UE 2026-01-13 13:28:46 +01:00
Robert Schmidt
f1db9cb158 Forward AMF UE NGAP ID to RRC on DL NAS Message
In the Initial Context Setup message, the NGAP forwards the AMF UE ID,
but not in the DL NAS Message, although 38.413 says, in $8.3.1.2 either

> The NG-RAN node shall use the AMF UE NGAP ID IE and RAN UE NGAP ID IE
> received in the INITIAL CONTEXT SETUP REQUEST message as identification
> of the logical connection

or in $8.6.2.2

> The NG-RAN node shall use the AMF UE NGAP ID IE and RAN UE NGAP ID IE
> received in the DOWNLINK NAS TRANSPORT message as identification of the
> logical connection

So forward in both cases for harmonization.
2026-01-13 13:27:24 +01:00
Robert Schmidt
c003096176 Always send release request at RRC
It might happen that the RRC does not know the AMF UE NGAP ID, yet. Even
in that case, we should forward the release request to the NGAP module,
which can either forward a message to the AMF, or reply back to release
the UE.

Reported-By: Jegor Zelenjak <jzelenjak@proton.me>
2026-01-13 11:53:42 +01:00
Robert Schmidt
815a5719cd Merge remote-tracking branch 'origin/define_c' into integration_2026_w03 (!3826)
Define speed of light

Common definition for speed of light constant, instead of multiple local
definitions
2026-01-13 11:23:49 +01:00
Robert Schmidt
d456b1901f Merge remote-tracking branch 'origin/tpool-fix' into integration_2026_w03 (!3799)
Fix for threadpool abort function
2026-01-13 11:23:19 +01:00
Sakthivel Velumani
ae8319dbb6 phy: add warning when choosing higher 3/4 sampling 2026-01-13 11:07:17 +01:00
Laurent THOMAS
1e861ac04e fix array lenght errors, k variable wrapping threshold. Make the code smaller and more efficient 2026-01-13 11:07:13 +01:00
Robert Schmidt
3d05c084ba Merge remote-tracking branch 'origin/fix_reestablishment_after_handover' into integration_2026_w03 (!3812)
Fix reestablishment after handover
2026-01-13 10:01:00 +01:00
Robert Schmidt
788cc5f79d Merge remote-tracking branch 'origin/gpd' into integration_2026_w03 (!3849)
Make gpd config utility global

Make gpd a global utility macro for reading config/command line
parameters. Add a corresponding function with full name for clarity,
keep the short name for the macro for backward compatibility and ease of
use.

The main benefit of gpd/config_get_paramdef_from_name macro/function is
that it does not require maintaining a separate parameter index list.
2026-01-12 16:38:13 +01:00
Robert Schmidt
6eeb8d3d4d Merge remote-tracking branch 'origin/ulsch_timing_test_threshold_update' into integration_2026_w03 (!3845)
Update physim timing thresholds in gNB-N300-Timing-Phytest-LDPC

The lower bound for the tests are too tight and any slight improvement
in the timing can result in a test failure. For example, these tests
were failing due to the improvements from the MR !3718
2026-01-12 16:37:44 +01:00
Robert Schmidt
fdf0fdf9f7 Merge remote-tracking branch 'origin/affinity-fix' into integration_2026_w03 (!3818)
Update threadCreate

if the name is too long, the thread name is shortened to the maximum
pthread name (16 characters).
2026-01-12 16:37:17 +01:00
Bartosz Podrygajlo
407d175f5d Clear memory in shm_td_iq_channel after RX
Clear memory in shm_td_iq_channel after RX. This prevents the IQ
from being read twice. This can happen if the application crashes
and will keep the other side reading historical IQ samples.
2026-01-12 11:50:39 +01:00
Rakesh Mundlamuri
25ee8cd7e9 Update the average value of the dlsim, ulsim timing test
The lower bound for the tests are too tight and any slight improvement in the timing can result in a test failure.
For example, these tests were failing due to the improvements from the MR 3718
2026-01-12 15:28:27 +05:30
Rakesh Mundlamuri
5d545a6cc5 Add srssim to the feature set 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
a752f43ad6 Harmonize phy_simulators to use compute_tx_energy_level() and compute_noise_variance() 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
f84ed0bbcf Make nb_antenna as a input parameter to generate_srs_nr()
- We use the same function at gNB and UE.
 - We always use nb_antennas_tx to check the max possible number of ports (which is wrong).
 - At gNB, we should use nb_antennas_rx and at the UE, we should use nb_antennas_tx.
2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
dea4508f89 Update docker file to compile nr_srssim to fix tests in gracehopper 2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
be3ad2beba rewrite srs channel estimation to fix memory alignment in SRS channel estimation
The memory alignment is required to use c16multaddVectRealComplex
in SRS channel interpolation. With a change in SRS comb_offset, the
existing algorithm was giving segmentation fault.

The existing srs channel estimation required memory alignment at two
stages. 1. When k = 0 (the first srs subcarrier), 2. When subcarrier <
K_TC (wrapped around after ofdm_symbol_size). Thus two memory alignments
are required leading to complications.

The srs channel estimation is now simplified to do it linearly instead of
wrapping around. This simplified the memory alignment required only when
k = 0.
2026-01-09 20:49:46 +05:30
Rakesh Mundlamuri
7b698531a9 update phy_simulators testcases 2026-01-09 20:49:38 +05:30
alexjiao
34d53549f3 Refactor SSB RSRP reporting
Add send_ssb_rsrp_meas() helper function to reduce code duplication.
2026-01-09 20:05:17 +08:00
alexjiao
9077a89f17 Add PHY and RRC features in FEATURE_SET.md 2026-01-09 20:05:17 +08:00
alexjiao
83f5e30610 UE sends the measurement report for event A3
UE sends the measurement report for event A3

Co-authored-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-01-09 20:05:17 +08:00
alexjiao
3fdbe01157 Add neighboring cell measurements
Implement intra-frequency neighboring cell measurements including:
- Measurement configuration structures
- Blind search and known PCI validation
- RSRP measurements for neighbor cells

Co-authored-by: Roberto Louro Magueta <rmagueta@allbesmart.pt>
2026-01-09 20:05:11 +08:00
Rakesh Mundlamuri
bfb0c707fe Fix tdd pattern of phy_simulators for mu = 0, 3 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
4c48d91538 Fix issues detected using address sanitizer 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
0b197891cc Introduce SRS multi-symbol channel estimation 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
0b0dce9995 Update T traces to record toa in ns and SRS time/frequency channel over multiple rx antennas and ports 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
729dc02b88 Split the code in the SNR loop as functions for readability
- Introduce signal energy and noise variance functions
- Combine rotation and OFDM modulation RX as a function
- Harmonize the use of number of antennas across the code
- Rename nr_ue_pusch_common_procedures() to nr_tx_rotation_and_ofdm_mod() to decribe the functionality better
2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
14cfbbf425 fix do_tdd_config_sim() while filling uplink slots 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
9a0a89fa88 fix nr_phy_config_request_sim that overwrites threequarter sampling rate parameter 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
1b974c6ab2 merge timing_advance_offset and timing_advance_offset_ns computation 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
b378acf2e0 Introduce SRS oversampling for better accuracy in estimating nanoseconds 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
7846d83b07 use intermediate variables to improve readability and avoid additional computations 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
a5a09676ad rewrite nr_srs_channel_estimation() to loop over rx antennas and antenna ports to be able to parallelize 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
1ffb1cfe16 Adding testcases to test nr_srssim 2026-01-09 16:58:34 +05:30
Rakesh Mundlamuri
3d68a44da0 Introduce SRS physical simulator 2026-01-09 16:58:26 +05:30
Rakesh Mundlamuri
5803e2037e bugfix to avoid error after enabling DEBUG_CH 2026-01-09 09:26:48 +05:30
Rakesh Mundlamuri
4b102ea237 Make SRS receive procedures as a function 2026-01-09 09:26:48 +05:30
Rakesh Mundlamuri
3684c3e0e8 Declare ue_srs_procedures_nr in a header file to use in nr_srssim 2026-01-09 09:26:48 +05:30
alexjiao
dfd3ad267e Refactor pss_search_time_nr() with configurable search window
Add search_start and search_length parameters to pss_search_time_nr()
to support targeted PSS searches within specific time windows.
2026-01-09 11:25:16 +08:00
alexjiao
13933f9db8 Refactor SSB search to common function
Extract common SSB search logic into nr_search_ssb_common() to enable
code reuse between initial sync and neighbor cell measurements.
2026-01-09 11:25:16 +08:00
francescomani
d4e3c5d384 define speed of light in utils to avoid multiple local definitions 2026-01-09 02:16:49 +01:00
Jaroslava Fiedlerova
699a5453a0 Merge branch 'integration_2026_w02' into 'develop'
Integration: `2026.w02`

* !3828 L2 UE files code cleanup for static functions
* !3839 Couple rfsim fixes
* !3835 Correctly include cblas include directories for RHEL
* !3840 Fix missing return statements in SIB1 TDA validation
* !3836 move NTN UE L1 functions to a new file
* !3793 CI: Remove redundant Jenkinsfiles
* !3770 RRC UE: Implement proper NH chain synchronization for RRC Reestablishment
* !3843 fix(documentation): issue 1042
* !3842 Remove unused cmake_targets files
* !3832 Remove global iq_txshift and iq_rxrescale
* !3847 Minor CI and nr_ulsim reporting adjustments
* !3838 NR NGAP (N2HO) : Fix Time UE Stayed in Cell IE type and calculation
* !3677 Support prach with start symbol of PRACH not at symbol 0

Closes #1042 and #857

See merge request oai/openairinterface5g!3841
2026-01-08 17:10:47 +00:00
Bartosz Podrygajlo
afb861dc0c Update vrtsim timing job thread
List of changes:
 - avoid calculating accumulated rounding error by calculating absolute
   sample index based on CLOCK_REALTIME every time.
 - use threadCreate instead of plain pthread_create which assigns a unique
   thread name and simplifies debugging
2026-01-08 14:11:15 +01:00
Bartosz Podrygajlo
11ae7e7993 Make gpd config utility global
Make gpd a global utility macro for reading config/command line parameters.
Add a corresponding function with full name for clarity, keep the short name
for the macro for backward compatibility and ease of use.

The main benefit of gpd/config_get_paramdef_from_name macro/function is that
it does not require maintaining a separate parameter index list.
2026-01-08 13:57:13 +01:00
Robert Schmidt
c8866651fb Merge remote-tracking branch 'origin/oran_prach_start_symbol' into integration_2026_w02 (!3677)
Support prach with start symbol of PRACH not at symbol 0

The following PRACH indice have been tested.

    index / format (nf mod x = y) / Subframe/ start_symbol /no_of_slot / occ / duration
    152     B4     2 1                4,9          0               2      1    12
    151     B4     2 1                4,9          2               1      1    12
    157     B4     1 0                 4           0               1      1    12
    159     B4     1 0                 9           0               1      1    12
2026-01-08 13:03:39 +01:00
Jaroslava Fiedlerova
16c5f59e9a Merge remote-tracking branch 'Rakesh_B_B/fix-ngap-time-in-cell' into integration_2026_w02 (!3838)
NR NGAP (N2HO) : Fix Time UE Stayed in Cell IE type and calculation

According to 3GPP TS 38.413, the 'Time UE Stayed in Cell' IE is an
integer ranging from 0 to 4095. This patch updates the data structure
to reflect the correct bit width and implements the dynamic calculation
based on the UE's residence time.

- Change time_in_cell from long to uint16_t in ngap_messages_types.h.
- Replace dummy value with real-time calculation in rrc_gNB_NGAP.c.
- Implement a ceiling of 4095 to comply with the 12-bit protocol limit.

Ref: 3GPP TS 38.413 Section 9.3.1.97
2026-01-08 12:16:48 +01:00
Jaroslava Fiedlerova
4b32dc58e6 Merge remote-tracking branch 'origin/fix-usage-iq_rxrescale-iq_txshift' into integration_2026_w02 (!3832)
Remove global iq_txshift and iq_rxrescale

iq_txshift and iq_rxrescale are defined but not used, this commit fixes it
2026-01-08 12:14:15 +01:00
Jaroslava Fiedlerova
937a90ee6e Merge remote-tracking branch 'origin/minor-adjustments' into integration_2026_w02 (!3847)
Minor CI and nr_ulsim reporting adjustments
2026-01-08 12:13:39 +01:00
Mario Joa-Ng
0ddf21db12 support prach with non-zero start symbol. 2026-01-07 21:31:48 +01:00
Jaroslava Fiedlerova
1ff1cb1200 Adjustment of nr_ulsim timing report 2026-01-07 12:10:17 +01:00
Jaroslava Fiedlerova
c382d78051 CI: include VNF container in xNB log analysis 2026-01-07 12:09:59 +01:00
Bartosz Podrygajlo
47ff7010a4 Update threadCreate
- if the name is too long, the thread name is shortened to maximum
   pthread name (16 characters).
2026-01-07 10:58:17 +01:00
Jaroslava Fiedlerova
f9edf20ae8 Merge remote-tracking branch 'origin/cleanup-cmake-modules' into integration_2026_w02 (!3842)
Remove unused cmake_targets files

See individual commits
2026-01-06 22:24:20 +01:00
Jaroslava Fiedlerova
c54daeaf54 Merge remote-tracking branch 'origin/fix_issue_1042' into integration_2026_w02 (!3843)
fix(documentation): issue 1042

A merge conflict header was left by mistake in
openair1/PHY/CODING/DOC/LDPCImplementation.md

Closes #1042
2026-01-06 20:05:31 +01:00
Jaroslava Fiedlerova
82bccfb9fe Merge remote-tracking branch 'origin/fix-nhcc-reestablishment' into integration_2026_w02 (!3770)
Refactor key derivation logic to properly handle Next Hop (NH) chain
synchronization according to 3GPP TS 33.501 specifications for both RRC
Reestablishment and Master Key Update procedures.

Changes in rrc_gNB.c:
- Clarify key derivation in rrc_gNB_generate_RRCReestablishment by explicitly
  selecting base key (NH or KgNB) based on nh_ncc value
- Add comment explaining vertical vs horizontal derivation logic

Changes in rrc_UE.c:
Refactored the NH chain synchronization and key derivation code to match
TS 33.501 terminology:
- nr_sync_nh_chain(): Common helper to synchronize NH parameter chain per
  TS 33.501 Annex A.10, supporting both Master Key Update and RRC Reestablishment
  procedures
- nr_derive_kgnb_horizontal(): Derive KNG-RAN* from current KgNB when NCC values
  match (horizontal derivation per TS 33.501 A.11/A.12)
- nr_derive_kgnb_vertical(): Derive KNG-RAN* from synchronized NH after NH chain
  sync (vertical derivation per TS 33.501 A.11/A.12)
- nr_update_kgnb_from_ncc(): Unified function implementing TS 33.501 6.9.2.3.4
  logic for updating KgNB based on received nextHopChainingCount
- Refactor as_security_key_update(): Use new nr_update_kgnb_from_ncc() helper
  function for cleaner, more maintainable code
- Fix nr_rrc_ue_process_rrcReestablishment(): Properly handle received
  nextHopChainingCount and update KgNB using unified helper function
- Replaced the previous nr_rrc_nh_update() helper with these functions to
  improve clarity and alignment with the specification.
- Add debug logging for key derivation process

Key NAS deriver utils:
- update derive_kgnb documentation and protect input keys with const attribute

Closes #857
2026-01-06 20:01:57 +01:00
Jaroslava Fiedlerova
ec739c23fa Merge remote-tracking branch 'origin/Jenkinsfiles-cleanup' into integration_2026_w02 (!3793)
CI: Remove redundant Jenkinsfiles

All the removed files can be replaced by Jenkinsfile introduced in !3738
2026-01-06 20:01:13 +01:00
Rakesh B B
e7bcca88bb Add time units for better clarity and readability. 2026-01-06 15:01:17 +05:30
Jaroslava Fiedlerova
c13b2294eb Merge remote-tracking branch 'origin/move_ntn_l1_files' into integration_2026_w02 (!3836)
move NTN UE L1 functions to a new file

Moved from nr-ue not to overload that file with functions of a specific mode
2026-01-06 10:00:10 +01:00
Jaroslava Fiedlerova
cd19acd65a Merge remote-tracking branch 'origin/fix-sib1-tda-check' into integration_2026_w02 (!3840)
Fix missing return statements in SIB1 TDA validation

Provides fix to commit d7cc1c2c in MR !3641 (merged).
2026-01-06 09:45:58 +01:00
Jaroslava Fiedlerova
2dcb515930 Merge remote-tracking branch 'origin/change-method-cblas-variant' into integration_2026_w02 (!3835)
Correctly include cblas include directories for RHEL
2026-01-06 09:45:16 +01:00
Romain Beurdouche
35e2289bc6 fix(documentation): issue 1042
A merge conflict header was left by mistake in
`openair1/PHY/CODING/DOC/LDPCImplementation.md`
2026-01-06 09:28:16 +01:00
Laurent THOMAS
6313c71b83 remove unused iq_txshift and iq_rxrescale variables
improve comments in usrp_lib.cpp
2026-01-06 09:02:08 +01:00
Robert Schmidt
b1fa6e6cdf Remove unused CMake helper files
These files are not used anywhere. The only remaining cmake find files
are:

- findarmral and findxran: used by FHI7.2 driver
- findsctp: used by top-level CMakeLists.txt
- findgnutls: NOT actually used but GnuTLS is a dependency of websrv, so
  I leave it for the moment (should be removed if the webserver is
  removed)

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:35:12 +01:00
Robert Schmidt
ca707b3987 Remove old MME/eNB instructions
There is no HSS/MME in this repository, which is the majority of this
file. Remove it, since it is outdated.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:26:45 +01:00
Robert Schmidt
8176fd3063 Remove old FlexRAN file
Setup routes was added by the author of FlexRAN. The UEs always set up
routes automatically, and this file is therefore not needed.

See-also: 287c182925 ("Remove FlexRAN")
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:25:55 +01:00
Rakesh BB
d5cf363bfe NR NGAP: Fix Time UE Stayed in Cell IE type and calculation
According to 3GPP TS 38.413, the 'Time UE Stayed in Cell' IE is an
integer ranging from 0 to 4095. This patch updates the data structure
to reflect the correct bit width and implements the dynamic calculation
based on the UE's residence time.

- Change time_in_cell from long to uint16_t in ngap_messages_types.h.
- Replace dummy value with real-time calculation in rrc_gNB_NGAP.c.
- Implement a ceiling of 4095 to comply with the 12-bit protocol limit.

Ref: 3GPP TS 38.413 Section 9.3.1.97
2026-01-06 12:51:39 +05:30
Robert Schmidt
40ea8f7592 Remove unused snap_environment.sh
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-06 08:18:34 +01:00
Laurent THOMAS
98e278b0d5 Correctly include cblas include directories
RHEL uses a dedicated cblas include directory. Correctly include this
for the one target PHY_UE that relies on this.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-01-05 16:56:33 +01:00
Cedric Roux
b91a4c33bd fix configuration files
'timeToTrigger' has to be 'time_to_trigger'.

For A3 events, 'cell_id' has to be 'physCellId' and the value has to be
the one of the physical cell ID.
2026-01-05 16:25:28 +01:00
Cedric Roux
f917a2a2fa fix: use correct variables' names
- timeToTrigger must be named time_to_trigger
- cell_id must be named physCellId
2026-01-05 16:24:42 +01:00
Cedric Roux
a1712ce774 fix utf-ascii problem and clamp text to 80 columns 2026-01-05 16:11:12 +01:00
Jaroslava Fiedlerova
9657cbecd3 Merge remote-tracking branch 'origin/rfsim-fixes' into integration_2026_w02 (!3839)
Couple rfsim fixes
2026-01-05 15:49:17 +01:00
Jaroslava Fiedlerova
b1d9279655 Merge remote-tracking branch 'origin/more_static_cleanup' into integration_2026_w02 (!3828)
L2 UE files code cleanup for static functions

No functional change, just re-arranging code
2026-01-05 15:48:30 +01:00
Jaroslava Fiedlerova
692b3cf99c Fix missing return statements in SIB1 TDA validation
Provides fix to commit d7cc1c2c1d (MR !3641).
Addresses an issue with low DL throughput in 100 MHz 2×2 test case observed
in CI.
2026-01-05 14:54:44 +01:00
Bartosz Podrygajlo
f8f7bc890b rfsim: fix replay_node when used for rfsim without beamforming 2026-01-05 08:49:20 +01:00
Bartosz Podrygajlo
2a94a42397 rfsim: fix linking issue
Fix an issue caused by assuming C++ linkage of get_currentchannels_type
2026-01-05 08:43:13 +01:00
Guido Casati
605b39bd9d Fix RRCReestablishment key derivation to use horizontal derivation
Per TS 33.501 6.9.2.3.4 and Fig 6.9.2.1.1-1, when sending
RRCReestablishment with nextHopChainingCount, the gNB is staying at
the same NCC level (not advancing). Therefore, horizontal derivation
from the currently active KgNB must be used, not vertical derivation
from NH.

Vertical derivation (from NH) is only used when advancing to a new
NCC level, which happens during handover or masterKeyUpdate procedures.

The previous implementation incorrectly used vertical derivation from
NH whenever nh_ncc > 0, which caused key mismatch between gNB and UE
during reestablishment after handover, leading to integrity check
failures.

This fix ensures both gNB and UE use horizontal derivation when
nextHopChainingCount matches the current NCC level, aligning with the
specification's "virtual NH at NCC=0" model where:
- Horizontal derivation = derive KNG-RAN* from currently active KgNB
- Vertical derivation = derive KNG-RAN* from NH (only when advancing NCC)
2025-12-29 13:31:22 +01:00
Guido Casati
91a08b1ba7 Fix MAC frequency overwrite during handover causing integrity check failures
During N2 handover, the UE receives reconfigurationWithSync which correctly
sets the target cell frequency in mac->phy_config.config_req.carrier_config
via config_common_ue() call.

However, when SIB1 is decoded after reconfiguration,
nr_rrc_mac_config_req_sib1() calls config_common_ue_sa() which unconditionally
overwrites the frequency with the command-line parameter (downlink_frequency),
which corresponds to the source cell frequency.

This causes a critical issue during RRC re-establishment:
- The UE uses the wrong frequency (source cell) for key derivation (kgnb*)
- The gNB uses the correct frequency (target cell) for key derivation
- This mismatch results in different kgnb* keys on UE and gNB
- Integrity check fails: "Integrity of RRCReestablishment failed, going to IDLE"

Root cause:
config_common_ue_sa() is used for SIB1 processing (initial cell selection) and
uses ServingCellConfigCommonSIB which doesn't contain absoluteFrequencyPointA.
It must derive frequency from command-line parameters. However, after handover,
the frequency has already been correctly set by config_common_ue() (used for
reconfigurationWithSync) which uses ServingCellConfigCommon with absolute
frequency information.

Solution:
Modify config_common_ue_sa() to preserve the existing frequency if it's already
initialized (non-zero). Only set frequency from command-line parameters during
initial cell selection when dl_frequency is 0. This ensures:
- Initial cell selection: frequency derived from command-line parameter, just once
- After handover: frequency preserved from reconfigurationWithSync
- MAC maintains its own frequency state independently

The fix applies to both DL and UL frequencies to maintain consistency.
There is probably room for more refactoring to the resync flow, since
the functionalities in config_common_ue and config_common_ue_sa are
partially overlapping and upon reconfigurationWithSync some other
configurations might be applied twice.
2025-12-29 13:31:22 +01:00
Guido Casati
eebf79a097 Add logs to inform about cell updates in MAC-PHY and RRCReestablishment failures
These logs are very helpful to identify cell configuration
changes in MAC/PHY, for monitoring purposes, and to rapidly
signal integrity failures during re-establishment.
2025-12-29 13:31:22 +01:00
Guido Casati
4f8feaf513 RRC: update RNTI after N2 HO acknowledge
The RNTI from the target context was not updated after HO acknowledge
this led to a failure in the first re-establishment after HO.

This commit is introducing the function nr_rrc_apply_target_context
in nr_rrc_n2_ho_acknowledge() and also updates the cell ID for
consistency.
2025-12-29 13:31:22 +01:00
Guido Casati
b0d8c1f3b6 RRC (refactor): extract target context application into dedicated function
Refactor handover target context application logic into a reusable
function nr_rrc_apply_target_context() that updates both F1AP
associations (secondary UE and DU association) and RNTI from the
target handover context.

And apply to rrc_CU_process_ue_context_modification_response()
2025-12-29 13:31:22 +01:00
francescomani
3aad8d7748 move NTN L1 functions to a new file from nr-ue 2025-12-28 11:14:55 +01:00
francescomani
d2fec82411 making TCI configuration optional 2025-12-26 12:20:50 +01:00
francescomani
7f1974b0f6 schedule DLSCH immediatly if there is a MAC-CE for TCI indication to send 2025-12-26 12:08:16 +01:00
francescomani
8d857ab794 handling beam switching via TCI state indication MAC CE 2025-12-26 12:08:16 +01:00
francescomani
4edc5c2d33 fix tci_StatesPDCCH 2025-12-26 12:08:16 +01:00
francescomani
90d4d2726c cleanup of functions in nr_ue_power_procedures (no code change, just moving things around) 2025-12-26 09:11:09 +01:00
francescomani
a623908518 declare static some static functions in dci procedure file 2025-12-26 09:11:09 +01:00
francescomani
98530b5b70 cleanup of functions in nr_ue_procedures (no code change, just moving things around) 2025-12-26 09:11:08 +01:00
francescomani
75367249c5 cleanup of functions in nr_ue_scheduler (no code change, just moving things around) 2025-12-26 09:07:46 +01:00
Robert Schmidt
9b0bb594f0 Merge branch 'integration_2025_w52' into 'develop'
Integration: `2025.w52`

* !3809 [FHI72] Fix the PRACH FFT size
* !3829 Hotfix for handling the case where the number of physical antennas is larger than the number of logical antennas
* !3663 NR UE: calculate DL and UL Doppler based on SIB19 information in NTN mode, fixing LEO reestablishment
* !3819 CORESET start multiple of 6 fix
* !3641 automatic selection of SIB1 TDA
* !3804 gNB: apply new NR_CellGroupConfig when RRCReconfiguration is acknowledged
* !3833 Add missing CMakeLists entries for test_nr_frame_params
* !3656 Rfsimulator beam reception/transmission

Closes #1037 and #1002

See merge request oai/openairinterface5g!3830
2025-12-25 08:11:02 +00:00
Robert Schmidt
aaaaa35d42 Merge remote-tracking branch 'origin/beams-to-rf-board' into integration_2025_w52 (!3656)
Rfsimulator beam reception/transmission

A simplified beam switching simulation for rfsimulator. This works
mainly in 1 gNB - N UEs scenarios. This is not a real beamformer with
antenna, channel and propagation model. The way it works is that the
peers inform each other about the beams they transmit in, and on
reception before channel modelling, the beam data is combined based on
preconfigured rx_beam/tx_beam gain matrix.

Usage:

- Add --rfsimulator.enable_beams to enable beam simulation

- Add --rfsimulator.beam_gains .

    Example list: 0,-5,-10

    Resulting matrix:

    [[0, -5, -10] [-5, 0, -5]] [-10, -5, 0]]

- Add --telnetsrv if you want to control the beams manually. The command
  in telnet is "rfsimu setbeam <beam_map>", where beam_map is a uint64_t
  controling the reception beam and transmission beam. If the
  application is switching the beams automatically the beams will be
  overwritten as soon as the application chooses to switch beams.

Supports up to 64 concurrent TX and RX beams.
2025-12-24 10:53:04 +01:00
Robert Schmidt
6396c804b2 Merge remote-tracking branch 'origin/ctest-cmake-fix' into integration_2025_w52 (!3833)
Add missing CMakeLists entries for test_nr_frame_params
2025-12-23 18:23:22 +01:00
Robert Schmidt
26d0246059 Merge remote-tracking branch 'origin/apply_new_CellGroup_later' into integration_2025_w52 (!3804)
gNB: apply new NR_CellGroupConfig when RRCReconfiguration is acknowledged

Currently part of the NR_CellGroupConfig is already applied when the
RRCReconfiguration message is created. This is not correct and this MR
fixes this by applying it when the RRCReconfiguration message is
acknowledged.

With this fixed, we also move disabling the feedback (in case
disable_harq is used) from the RRCSetup message to the
RRCReconfiguration message.

Closes: #1002
2025-12-23 18:21:27 +01:00
Robert Schmidt
6a7ec3498a Merge remote-tracking branch 'origin/autumatic_sib1_tda' into integration_2025_w52 (!3641)
automatic selection of SIB1 TDA
2025-12-23 18:20:06 +01:00
Bartosz Podrygajlo
2a3755441b Add missing CMakeLists entries for test_nr_frame_params 2025-12-23 11:57:55 +01:00
Bartosz Podrygajlo
ade7901fb2 RFSim: Add beamids list based user interface for beam domain simulation
Add CLI parameter rfsimulator.beam_ids which uses a list of beam ids instead of a
beam map. The beam map API is still present and can be used interchangably.

Add telnet command setbeamids which has similar semantics
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
ac97ba4e64 RFsim: Disable beam API if beam simulation is disabled 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
8a36b9b85b rfsimulator: fix beam_ctrl_t leak. 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
56970390f2 RFsim: handle additional channel offset from CLI
Handle extra channel offset coming from CLI parameter prop_delay.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
d6bd2d295f Add beam section to RFSimulator README.md 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
d6da7a5605 vrtsim: add stubs to beam functions
Add stubbed versions of _beam_ apis to vrtsim.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
b10617607a RFsim: Allow arbitrary order of beams.
Allow arbitrary order of beam ids in set_beams2 function. This
allows the application to select any arbitrary order of beam ids.
The underlying transport mechanism still uses beam_map so the beam_ids
are ordered before sending.

Also replaced tx_beam_map/rx_beam_map into beam_map.

Also fixed an issue where --rfsimulator.enable_beams required an argument.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
033aed736e Rfsim: Optimization for simple configurations
- Added first beam optimization to combine_tx_buffers.
 - Added first beam & first peer optimization to rfsimulator_read_internal

This results in significant speed up for the first rx beam, first tx
beam and first peer which is the base case with beam simulation disabled.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
c587aab6b6 RFsim: Fix freeing packets in case of non-negative channel offset
In rfsim, received packets are dynamically allocated and freed when no longer
needed, which is dependent on the channel model, packet timestamp and packet
size (number of samples carried).

This commit fixes the packet age check for channels with nonzero channel offset
(most notalby NTN channels).

Also present:
 - extract the NTN satellite position update code to a separate function and
   call it once per trx_read call instead of once per rx beam.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
05de66d811 Make RFSIMULATOR_PARAMS_DESC C++ compatible.
Add a set of macros with designated initializers to simplify using
paramdef_t arrays in C++ source code. Fix clang error with
RFSIMULATOR_PARAMS_DESC using mixed designated and non-designated
initializers.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
435dfd57d8 RFsim: Optimization for operation without chanmod 2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
643be87832 RFsim: read_beams function
Added a new function for reading multiple beams concurrently.
The TX to RX beam combination is simplistic and based on beam gain.
2025-12-23 10:05:14 +01:00
Bartosz Podrygajlo
669be5b42e Rfsim: Process received packets on demand
- Received packets are dynamically allocated and kept in a
queue for as long as they are needed.

- The layout of the packets was changed from interleaved antennas
to non-interleaved antennas.

- Generate a contiguous buffer from saved packets as needed.

There is extra work caused by this change due to recv() call no
longer saving data directly into the circular buffer, however further
processing is easier due to contiguous nature of the tx antenna buffers
prepared. The impact on performance was not measured.
2025-12-23 10:05:12 +01:00
Bartosz Podrygajlo
4ec69cad1f Fix formatting for apply_channelmod.c 2025-12-23 10:04:39 +01:00
Bartosz Podrygajlo
f0d4325cd7 rfsim: process received packet when its received completely
The simplifies some code in packet reception and is a prerequisite
for processing received without relying on circular buffer
2025-12-23 10:04:39 +01:00
Bartosz Podrygajlo
143c545928 Beam simulation for rfsimulator
A simplified beam switching simulation for rfsimulator. This works
mainly in 1 gNB - N UEs scenarios. This is not a real beamformer with
antenna, channel and propagation model. The way it works is that the
peers inform each other about the beams they transmit in, and on
reception before channel modelling, the beam data is combined based on
preconfigured rx_beam/tx_beam gain matrix.

Usage:
 - Add --rfsimulator.enable_beams to enable beam simulation
 - Add --rfsimulator.beam_gains <comma separated Toepliz form matrix of gains in dB>.

   Example list: 0,-5,-10

   Resulting matrix:

   [[0, -5, -10]
    [-5, 0, -5]]
    [-10, -5, 0]]

 - Add --telnetsrv if you want to control the beams manually. The command in telnet
   is "rfsimu setbeam <beam_map>", where beam_map is a uint64_t controling the
   reception beam and transmission beam. If the application is switching the beams
   automatically the beams will be overwritten as soon as the application chooses to
   switch beams.

Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-12-23 10:04:20 +01:00
Robert Schmidt
668ff6a4c3 Merge remote-tracking branch 'origin/fix_coreset_start' into integration_2025_w52 (!3819)
CORESET start multiple of 6 fix

According to the standard any CORESET (except CSET0) would always start
from the first common resource block index which is multiple of 6 in the
BWP. This was not taken into account in the code. The BWP switch CI test
is modified to test a BWP start not multiple of 6.

An exception is the case where rb-Offset-r16 parameter is set, but can't
be used at gNB for FAPI compatibility.

Closes: #1037
2025-12-23 09:22:10 +01:00
Robert Schmidt
8463ebf24b Merge remote-tracking branch 'origin/nr_ue_sib19_doppler' into integration_2025_w52 (!3663)
NR UE: calculate DL and UL Doppler based on SIB19 information in NTN mode, fixing LEO reestablishment
2025-12-23 09:21:42 +01:00
francescomani
d7cc1c2c1d computing SIB1 TDA (for each SSB) only in the first iteration and stored for the rest of the run 2025-12-23 09:20:47 +01:00
francescomani
e9d410dc28 change in CI config file for BWP testing to have 1 BWP which doesn't start from a multiple of 6 2025-12-22 17:31:29 +01:00
francescomani
61d0559445 take into account effective CSET start RB to define frequencyDomainResources 2025-12-22 17:31:29 +01:00
francescomani
2a3a27a48f fix CORESET start PRB according to standard at OAI gNB 2025-12-22 17:31:26 +01:00
francescomani
74690ceb1d fix CORESET start PRB according to standard at OAI UE 2025-12-22 17:29:09 +01:00
Robert Schmidt
3fac50a288 Merge remote-tracking branch 'origin/ru_procedures_hotfix' into integration_2025_w52 (!3829)
Hotfix for handling the case where the number of physical antennas is larger than the number of logical antennas
2025-12-22 15:29:50 +01:00
Robert Schmidt
16a43f0edb Merge remote-tracking branch 'origin/prach-fft' into integration_2025_w52 (!3809)
[FHI72] Fix the PRACH FFT size

ru_config->fftSize is used for the C-plane Section Type 3 which is
dedicated for PRACH and mixed numerology. Previously, we assumed that
PRACH FFT size is equivalent to PxSCH FFT size, but should be based on
the PRACH format.

Tests with the following RUs:

- [x] Benetel v1.2.2 & v1.4.1
- [x] VVDN Gen 3
- [x] Liteon 02.00.10
- [x] Metanoia v2.2.8 (Jura)
2025-12-22 15:28:34 +01:00
Raymond Knopp
b0f402dfdc hotfix for when there are more physical TX antenna ports (ru->nb_tx) than logical antenna ports (config->carrier_config.num_tx_ant.value). 2025-12-20 21:48:09 +01:00
francescomani
2454a2ea1e automatic selection of SIB1 TDA 2025-12-20 08:54:11 +01:00
Jaroslava Fiedlerova
b916c6d8d4 Merge branch 'integration_2025_w51' into 'develop'
Integration `2025.w51`

* !3816 Add two missing include guards
* !3715 Pass beam ID as per FAPI v222.10
* !3777 UE NTN : Fix in case SIB19 periodicity is greater than 2 secs
* !3813 Reset outdated PUCCHs to avoid Assertion caused by non-processed and active PUCCHs
* !3815 Remove phy_extern_nr_ue file
* !3824 CI: adjust UE attach timeout handling
* !3735 vrtsim: Optimize channel modelling

See merge request oai/openairinterface5g!3817
2025-12-19 20:22:06 +00:00
Guido Casati
5c601b7d62 Fix RRCReestablishment key derivation to use horizontal derivation
Per TS 33.501 6.9.2.3.4 and Fig 6.9.2.1.1-1, when sending
RRCReestablishment with nextHopChainingCount, the gNB is staying at
the same NCC level (not advancing). Therefore, horizontal derivation
from the currently active KgNB must be used, not vertical derivation
from NH.

Vertical derivation (from NH) is only used when advancing to a new
NCC level, which happens during handover or masterKeyUpdate procedures.

The previous implementation incorrectly used vertical derivation from
NH whenever nh_ncc > 0, which caused key mismatch between gNB and UE
during reestablishment after handover, leading to integrity check
failures.

This fix ensures both gNB and UE use horizontal derivation when
nextHopChainingCount matches the current NCC level, aligning with the
specification's "virtual NH at NCC=0" model where:
- Horizontal derivation = derive KNG-RAN* from currently active KgNB
- Vertical derivation = derive KNG-RAN* from NH (only when advancing NCC)
2025-12-19 17:16:17 +01:00
Guido Casati
4db49a8767 RRC: Implement proper NH chain synchronization for RRC Reestablishment
Refactor key derivation logic to properly handle Next Hop (NH) chain
synchronization according to 3GPP TS 33.501 specifications for both
RRC Reestablishment and Master Key Update procedures.

Changes in rrc_gNB.c:
- Clarify key derivation in rrc_gNB_generate_RRCReestablishment by
  explicitly selecting base key (NH or KgNB) based on nh_ncc value
- Add comment explaining vertical vs horizontal derivation logic

Changes in rrc_UE.c:
- Add nr_sync_nh_chain(): Common helper to synchronize NH parameter
  chain per TS 33.501 Annex A.10, supporting both Master Key Update
  and RRC Reestablishment procedures
- Add nr_derive_kgnb_horizontal(): Derive KNG-RAN* from current KgNB
  when NCC values match (horizontal derivation per TS 33.501 A.11/A.12)
- Add nr_derive_kgnb_vertical(): Derive KNG-RAN* from synchronized NH
  after NH chain sync (vertical derivation per TS 33.501 A.11/A.12)
- Add nr_update_kgnb_from_ncc(): Unified function implementing TS 33.501
  6.9.2.3.4 logic for updating KgNB based on received nextHopChainingCount
- Refactor as_security_key_update(): Use new nr_update_kgnb_from_ncc()
  helper function for cleaner, more maintainable code
- Fix nr_rrc_ue_process_rrcReestablishment(): Properly handle received
  nextHopChainingCount and update KgNB using unified helper function
- Add debug logging for key derivation process

Key NAS deriver utils:
- update derive_kgnb documentation and protect input keys with const attribute
2025-12-19 17:14:23 +01:00
Thomas Schlichter
aa3a209842 NR UE: add option "--cont-fo-comp 3" to not consider measured residual DL FO for UL FO pre-compensation 2025-12-19 16:42:58 +01:00
Thomas Schlichter
f6fd7b61ec NR UE: improve NTN reestablishment by continuing with previous HFN 2025-12-19 16:42:55 +01:00
Thomas Schlichter
30afbc41a6 update FEATURE_SET.md 2025-12-19 16:42:55 +01:00
Thomas Schlichter
1f8fe224a0 NR UE: correctly apply Doppler and TA for NTN target cell
Make sure to apply Doppler and TA not directly when receiving the target cell ntn_config,
but apply Doppler just before the initial sync, and the TA after the initial sync when
we have tha actuel cell frame and slot numbers.
2025-12-19 16:42:52 +01:00
Thomas Schlichter
3dcaacb63b NR UE FAPI: provide ntn_config as part of phy_config.config_req instead of a dedicated scheduled_response dl_config PDU
We need the ntn_config when reconfiguring the PHY layer for a new initial sync,
e.g. for calculating the DL Doppler frequency.

As a dedicated scheduled_response dl_config PDU it reaches the PHY layer too late,
as part of the phy_config.config_req it reaches the PHY layer in time with the
other configuration values.
2025-12-19 16:42:47 +01:00
Thomas Schlichter
b5a025931c verify reestablishment in 5g_rfsimulator_ntn_leo CI test 2025-12-19 16:42:47 +01:00
Thomas Schlichter
834a6fc1d9 NR UE: improve physical layer for NTN (esp. LEO) reestablishment and HO 2025-12-19 16:42:37 +01:00
Thomas Schlichter
ae12190a9e NR UE: improve log output in MAC 2025-12-19 16:41:02 +01:00
Thomas Schlichter
bc81662c2a NR UE: consider computed DL/UL Doppler shift in continuous FO compensation 2025-12-19 16:41:01 +01:00
Thomas Schlichter
b59bcaf494 NR UE: provide velocity vector down to nr-ue.c, preparing for Doppler calculation 2025-12-19 16:38:59 +01:00
Jaroslava Fiedlerova
19f61af2eb Merge remote-tracking branch 'origin/vrtsim-speedup' into integration_2025_w51 (!3735)
vrtsim: Optimize channel modelling

Optimization pass for channel modelling on transmission in vrtsim. This
comes from a requirement of O-RU to perform channel modelling with minimum
latency. The latency measured in O-RU 4TX 2RX on the UE is lowered from
~400 uS to ~100uS.

- Reduced MAX_CHANNEL_LENGTH to 200 and introduced SAVED_SAMPLES_LEN
- Refactored channel modelling actor allocation to parallelize work better
- Improved batching and task creation for channel modelling
- Replaced static global saved_samples with local static buffer in vrtsim_write_with_chanmod

Create a new CI pipeline for testing with vrtsim on Gracehopper:
https://jenkins-oai.eurecom.fr/job/RAN-VRT-Sim-Test-5G/
2025-12-19 15:54:06 +01:00
Jaroslava Fiedlerova
ffcf49676e Merge remote-tracking branch 'origin/ci-fix-ue-attach' into integration_2025_w51 (!3824)
CI: adjust UE attach timeout handling

This modification addresses an issue in the RFSim-5G 2x2 test where the UE
often fails to attach within the initial 20s window. The timeout may cause
the UE to restart, which leads to two UEs appearing in the gNB log. By
increasing the initial timeout to 40s, we avoid unnecessary restarts.
2025-12-19 12:27:04 +01:00
francescomani
a2625163e6 drop rach_ConfigDedicated once reconfiguration with sync related RA is completed at UE 2025-12-19 11:25:27 +01:00
luis_pereira87
0a0dfae333 Restore previous 'local_bwp_id' on RRCReestablishment 2025-12-19 11:02:39 +01:00
Thomas Schlichter
e74792586f fix BWP switching
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
2025-12-19 11:02:37 +01:00
Thomas Schlichter
21722a9fa1 gNB: fix use after free of old UE->sc_info.csi_MeasConfig 2025-12-19 11:01:27 +01:00
Thomas Schlichter
25cd85fa68 gNB: apply new NR_CellGroupConfig when reconfiguration is complete 2025-12-19 10:59:51 +01:00
Thomas Schlichter
9e434d60a5 gNB: move downlinkHARQ_FeedbackDisabled_r17 from initial spCellConfig to spCellConfigDedicated
This is a preparation for configuring disabled HARQ feedback only for UEs supporting it.
2025-12-19 10:50:58 +01:00
Jaroslava Fiedlerova
bf347a62d4 CI: adjust UE attach timeout handling
- Set default attach_timeout to 40s
- Increase timeout only after failed attach attempts

This modification addresses an issue in the RFSim-5G 2x2 test where the UE
often fails to attach within the initial 20s window. The timeout may cause
the UE to restart, which leads to two UEs appearing in the gNB log. By
increasing the initial timeout to 40s, we avoid unnecessary restarts.
2025-12-18 16:07:12 +01:00
francescomani
6b5cb9a69c prevent int overflow in qsort for RSRP measurements in case measured SSB RSRP is 0 2025-12-18 15:58:38 +01:00
Bartosz Podrygajlo
d355e0412d Add prototype for trx_set_beams function
This function is to be called by the application to switch beams
on reception and transmission. When receiving new samples using
trx_read/trx_write the application is expected to be able to
determine which beam the samples belong to.
2025-12-17 22:24:12 +01:00
Bartosz Podrygajlo
c4b94cff4b Change trx_write_func to add beams definition over multiple tx antennas per beam
Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
2025-12-17 22:24:12 +01:00
Bartosz Podrygajlo
6bd3545a78 RFsimulator C++ conversion
Convert rfsimulator C source code to C++ to access to STL.
2025-12-17 22:24:12 +01:00
Jaroslava Fiedlerova
74eb482fc4 Merge remote-tracking branch 'origin/remove_ext_file' into integration_2025_w51 (!3815)
Remove phy_extern_nr_ue file
2025-12-17 15:27:11 +01:00
Jaroslava Fiedlerova
e2a305825c Merge remote-tracking branch 'origin/Reset_outdated_PUCCHs' into integration_2025_w51 (!3813)
Reset outdated PUCCHs to avoid Assertion caused by non-processed and
active PUCCHs

When there is real-time issues in L1 it may happen that the scheduler
misses/skips some slots, thus, L2 not processing and not freeing some
structures like PUCCH. This commit avoids the Assertion by resetting
any Active outdated PUCCH
2025-12-17 15:25:30 +01:00
Jaroslava Fiedlerova
ee4dc21f25 CI: Add VRT-Sim test pipeline to parent pipeline 2025-12-17 15:15:23 +01:00
Jaroslava Fiedlerova
60f6137d6c Add XML file for running vrtsim on ARM 2025-12-17 15:15:05 +01:00
Jaroslava Fiedlerova
a44fb9bcf8 Change trf-gen-cn5g version for tests on GH
trf-gen-cn5g:latest is available on OAI DockerHub for linux/arm64,
trf-gen-cn5g:focal is only for linux/amd64
2025-12-17 15:07:01 +01:00
Bartosz Podrygajlo
4ac445ac30 vrtsim: add randominit() call
This is required with the updated gaussZiggurat call.
2025-12-17 14:20:58 +01:00
Bartosz Podrygajlo
b9665aac5f vrtsim CI testcase with channel modelling
Add vrtsim CI testcase with channel modelling.
2025-12-17 14:20:49 +01:00
Jaroslava Fiedlerova
511fd29235 Merge remote-tracking branch 'origin/NR_SIB19_timer_fix' into integration_2025_w51 (!3777)
UE NTN : Fix in case SIB19 periodicity is greater than 2 secs

This was observed when testing OAI NTN UE against a third party gNB (UXM).
LEO SIB19 periodicity of > 2000 ms was used, in which case T430 timer expires
before SIB19 is re-read. This fix handles the case where SIB19 periodicity >
2secs, such that SIB19 is re-read in time and T430 timer does not expire.
2025-12-17 10:15:43 +01:00
Jaroslava Fiedlerova
ff524c0380 Merge remote-tracking branch 'origin/fapi-beamid' into integration_2025_w51 (!3715)
Pass beam ID as per FAPI v222.10

This MR
1. Sets MSB of beam ID when passing beam ID to 7.2 radio
2. Modifies phytest scheduler to allocate SSBs on different beams
3. Introduce new MAC config parameter for beam mode to specify HiPHY or LoPHY
   beamforming
2025-12-17 10:11:22 +01:00
Bartosz Podrygajlo
9d3670eefd vrtsim: Enable batch processing in perform_channel_modelling
In perfrom_channel_modelling, do convolution in batches which allows
vrtsim to write the channel samples as they are being produced instead
of waiting for the last sample in the slot to be ready.
2025-12-17 08:43:11 +01:00
Bartosz Podrygajlo
8f116f68d2 vrtsim: fix assert for number of TX antennas 2025-12-17 08:43:04 +01:00
Bartosz Podrygajlo
b5aad5956c vrtsim: rewrite sample history
Limit sample history to 256 samples and copy it into each channel modelling
task instead of relying on globally available buffer. This simplifies the code
and addressing into the saved samples buffer as well as enabling further
optimizations without sacrificing thread safety.
2025-12-17 08:42:57 +01:00
Raghavendra Dinavahi
1cca7f090e UE NTN: changed handling of SIB19 periodic reception 2025-12-16 15:50:56 +01:00
francescomani
912eca1af2 set correct beamforming type in CI FR2 test 2025-12-16 14:48:35 +01:00
Raghavendra Dinavahi
6900edbf92 UE NTN: Fix in case SIB19 periodicity is greater than 2 secs 2025-12-16 14:00:09 +01:00
Jaroslava Fiedlerova
9b95c9c6de Merge remote-tracking branch 'origin/incl-guards' into integration_2025_w51 (!3816)
Add two missing include guards
2025-12-16 13:42:49 +01:00
Teodora
7fe34d779b Fix the PRACH FFT size for 7.2 interface
We assumed that PRACH FFT size is equivalent to PxSCH FFT size.

However, the parameter ru_config->fftSize is used for the C-plane Section Type 3
which is dedicated for PRACH and mixed numerology.
Based on the PRACH format, short or long, the PRACH values 256 or 1024
shall be filled.

Co-authored-by: knopp <raymond.knopp@eurecom.fr>
2025-12-16 10:05:43 +01:00
Sakthivel Velumani
ad366c3b17 fapi: ignore MSB of beam-ID for aerial
Aerial L1 don't support handling of MSB bit in beam-ID. So it is not set
in the fapi functions before sending down.
2025-12-15 14:40:44 +00:00
francescomani
c1747a8109 phy: remove unnecessary vendor extension fields
When doing analogue beamforming, the beam ID for a pre-defined beam
table is passed directly to RU and there is no need to store the beam
table in PHY.
2025-12-15 14:40:44 +00:00
Sakthivel Velumani
644579a4cf clean-up: rename functions
Rename few functions and array related to beam index storing and
allocation. Reduce code duplication in function to get ssb index
bitmap.
2025-12-15 14:40:42 +00:00
Sakthivel Velumani
830d619d3e mac: allocate PDSCH on beams in phytest 2025-12-15 14:35:50 +00:00
Sakthivel Velumani
c288f84651 mac: fix fapi beam id
Set MSB of fapi beam ID based on flag for beamforming done in hiPHY or
loPHY.
2025-12-15 14:35:50 +00:00
Sakthivel Velumani
15e59665e6 mac: change array beam_allocation to int16_t
int16_t is sufficient to hold beam_id and -1 if not allocated. Following
commits will bring changes to only pass LSB 15 bits as beam_id to PHY.
2025-12-15 14:35:50 +00:00
Sakthivel Velumani
35e5cb69d1 clean-up: fix code repetition 2025-12-15 14:35:50 +00:00
Bartosz Podrygajlo
26879d5616 Add two missing include guards 2025-12-15 15:27:23 +01:00
francescomani
9470c51b00 remove phy_extern_nr_ue file 2025-12-15 12:18:28 +01:00
luis_pereira87
71e23b12c2 Reset outdated PUCCHs to avoid Assertion caused by non-processed and active PUCCHs
When there is real-time issues in L1 it may happen that the scheduler misses/skips some slots, thus, L2 not processing and not freeing some structures like PUCCH.
This commit avoids the Assertion by resetting any Active outdated PUCCH
2025-12-12 16:48:24 +00:00
Jaroslava Fiedlerova
479be40b30 Merge branch 'integration_2025_w50' into 'develop'
Integration `2025.w50`

* !3638 NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled
* !3624 NR UE: improve handling of Handover procedures
* !3807 doc: Update doc for IF setup
* !3741 Update documenation for handover
* !3798 Fix for computation of PRACH occasions and association period
* !3808 Add symbol timing functions for NR_DL_FRAME_PARMS + optimization for slot timing counterparts

Closes #981

See merge request oai/openairinterface5g!3806
2025-12-12 14:47:26 +00:00
Jaroslava Fiedlerova
44c64a2ed0 Merge remote-tracking branch 'origin/symbol-duration-functions' into integration_2025_w50 (!3808)
Add symbol timing functions for NR_DL_FRAME_PARMS + optimization for slot timing
counterparts

Add two new functions for calculation symbol timestamp and symbol duration for
NR_DL_FRAME_PARMS. Also includes an optimization focused on removing
inefficiencies related slot-related counterparts.
2025-12-12 11:41:27 +01:00
Sakthivel Velumani
b987b033d5 test: include slot functions to frame parms ctest 2025-12-10 23:40:39 +00:00
Sakthivel Velumani
c9902a8615 bugfix: length of first slot for numerology 0
For 15kHz SCS, symbols with index 0 and 7 have longer cyclic prefix.
This is now fixed in frame parms struct.
2025-12-10 23:26:03 +00:00
Sakthivel Velumani
5b92859cce phy: remove function pointers in frame param
1. Removed function pointers for functions get_samples_per_slot(),
   get_samples_slot_timestamp() and get_slot_from_timestamp() as it does
   not offer any advantage. The functions are now called directly from
   everywhere.
2. Optimized these functions by removing loops where ever possible.
2025-12-10 23:25:24 +00:00
Jaroslava Fiedlerova
be08d655b1 Merge remote-tracking branch 'origin/fix_rach_occasions' into integration_2025_w50 (!3798)
Fix for computation of PRACH occasions and association period
2025-12-10 14:23:00 +01:00
Jaroslava Fiedlerova
f744c4d4bc Merge remote-tracking branch 'origin/handover-doc' into integration_2025_w50 (!3741)
Update documenation for handover

Update documentation for handover to include the changes that were made after
upgrading the CI handover setup (attenuator, USRPs synchronization)
2025-12-10 14:19:41 +01:00
Jaroslava Fiedlerova
d569e7ddc9 Merge remote-tracking branch 'origin/if-freq-doc' into integration_2025_w50 (!3807)
doc: Update doc for IF setup

Update IF setup doc, clarify how to set if_freq with large value in the gNB
configuration file. Per the libconfig manual, 64-bit integers are represented
like regular integers but require an appended "L"
(https://www.hyperrealm.com/libconfig/libconfig_manual.html#g_t64_002dbit-Integer-Values).
2025-12-10 14:18:31 +01:00
Bartosz Podrygajlo
10852cc89b Use get_samples_symbol_duration in nr-ue.c 2025-12-09 14:10:28 +01:00
Reem Bahsoun
7688af6293 Update documenation for F1 handover to include the changes that were made after upgarding the CI handover setup (attenuator, USRPs synchronization) 2025-12-09 13:51:28 +01:00
francescomani
55c8a7bef0 rename max_association_period to association_period to better reflect the role of the field 2025-12-09 13:45:25 +01:00
francescomani
f2a7fb5336 fix computation of RA occasions and association period in gNB 2025-12-09 13:45:21 +01:00
Jaroslava Fiedlerova
45827ee213 Clarify doc for IF setup 2025-12-09 12:27:56 +01:00
francescomani
63f3fb55ae Merge remote-tracking branch 'origin/ue_ho_improve' into integration_2025_w50 2025-12-09 11:06:52 +01:00
Jaroslava Fiedlerova
e44b17668c Merge remote-tracking branch 'origin/nr_ue_sib19_ta' into integration_2025_w50 (!3638)
NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled

To achieve the goal, the hyper frame number (HFN) is introduced at the NR UE
PHY, MAC and RRC layers.

Besides this, we also implemented an orbit propagation to improve the accuracy
of N_UE_TA_adj, and a fix to keep the N_TA from RAR and MAC CE.

Fixes #981
2025-12-08 12:04:31 +01:00
Jaroslava Fiedlerova
91e7030cf8 Merge branch 'integration_2025_w49' into 'develop'
Integration `2025.w49`/`v2.4`

* !3786 Consistently use OAI_RNGSEED env variable for RNG
* !3758 Add yq to edit yaml files and add yaml-dev library in containers missing it
* Fix RFemulator noise device RNG initialization
* !3780 NGAP: fix PDU Session Release Response
* !3795 Increase Aerial-based L2 test core number
* !3794 Fix missing E2SM-RC message forward
* !3660 Fixes for BWP switching
* !3797 Fix FAPI WLS timing, UL counter, doc
* release notes v2.4

See merge request oai/openairinterface5g!3792
2025-12-04 07:55:07 +00:00
Robert Schmidt
e54153ef5c Add release notes v2.4.0 2025-12-03 22:25:56 +01:00
Bartosz Podrygajlo
8f88efd97c Add symbol timing functions for NR_DL_FRAME_PARMS
Add two new functions for calculation symbol timestamp and symbol
duration for NR_DL_FRAME_PARMS. These functions are not using
the existing indirection mechanism via function pointers as this
prevents the compiler from properly optimizing the code.
2025-12-03 19:42:13 +01:00
Bartosz Podrygajlo
244621d8e6 Fix for threadpool abort function
Fixed an issue where if threadpool was aborted when some threads were in a running
state the threadpool would never exit. This was due to the fact that the thread
terminate task (func == NULL && args == NULL) could have been pushed to queues which
were inactive. This change adds a uint64_t mask of threads that have already exited
so whenever the terminate task is sent to another queue, it is ensured that the queue
used will wake up at least one tpool worker.

Also added pushTpool_mask which allows to specify a subset of threads to push the task
to but its only used internally.

Also added in this commit: A way to allocate thread-safe storage for thread pool
workers via get_tpool_worker_index. This index is unique to the thread pool worker
within one threadpool and can be used to access arrays in a thread-safe manner.

An example of such use was added in a testcase that was added which compares delay
between actors and threadpool workers.
2025-12-03 18:32:10 +01:00
Robert Schmidt
a3a6c6d5e9 Merge remote-tracking branch 'origin/fapi-wls-fixes-timing-counter-doc' into integration_2025_w49 (!3797)
Fix FAPI WLS timing, UL counter, doc

- Fix FAPI WLS timing
- Fix periodical PNF UL throughput logs
- Update documentation to better explain how to run WLS with radio (USRP
  B210)
2025-12-03 17:32:32 +01:00
Robert Schmidt
e5050416e4 Merge remote-tracking branch 'origin/bwp_switch_fix' into integration_2025_w49 (!3660)
Fixes for BWP switching

This MR fixes some issues when performing BWP switching via
reconfiguration. It also adds a CI test for BWP switching.  # Please
enter a commit message to explain why this merge is necessary,
2025-12-03 17:31:22 +01:00
Robert Schmidt
f46ddb6aa8 Fix: CFRA: UE can always use dedicated search space
In all cases (CFRA in SA for HO, or CFRA in NSA/do-ra for access), the
UE has the full configuration already. We can therefore directly switch
to a dedicated search space, as it is already known to the UE.
2025-12-03 17:22:06 +01:00
francescomani
f5b885e803 Move BWP doc into mac-usage.md 2025-12-03 17:22:06 +01:00
Robert Schmidt
8d2478662d Add BWP switch test in CI
Trigger various BWP switches through telnet, and test traffic after each
switch.
2025-12-03 17:22:06 +01:00
Robert Schmidt
5c3c374c1b Add implementation to trigger BWP switch from external source 2025-12-03 17:22:06 +01:00
francescomani
805c968b59 Add a check for BWP start and size validity in configuration 2025-12-03 17:22:06 +01:00
francescomani
ca0cc079a6 avoid having negative BWP size if BWP start > BWP size 2025-12-03 17:22:06 +01:00
francescomani
98618a7dc8 The network must configure BWPs with consecutive IDs from 1
... so if we want to have 1 BWP configured at any given time we need to
reconfigure BWP 1 every time. This means that since the gNB has more
than 1 BWPs (for use for different UEs), that there is a "gNB BWP ID"
(as used by the gNB), which can be any BWP ID X, and one "UE BWP ID",
which is always 1. This commit implements this distinction.
2025-12-03 17:20:11 +01:00
Robert Schmidt
5d4e17f8ca doc: nFAPI: add Troubleshoot section and explain ra_responseWindow 2025-12-03 16:16:42 +01:00
Robert Schmidt
2230606f42 doc: (n)FAPI: Correct header levels to also match transport 2025-12-03 16:02:47 +01:00
Jaroslava Fiedlerova
b137478dc8 doc: FAPI WLS: provide information on performance optimization 2025-12-03 16:00:10 +01:00
francescomani
3e5d868018 set coresetID !=0 for dedicated BWP (needed if CSET0 doesn't fit that BWP) 2025-12-03 13:31:37 +01:00
francescomani
b2878f4ab1 fix BWP start for ULSCH at UE 2025-12-03 13:31:37 +01:00
francescomani
88d1964f9c Validate BWP switch
Return from triggering reconfiguration with BWP switch if BWP is the
same as before the switch, and add check to verify if BWP triggered by
switch command exists
2025-12-03 13:31:05 +01:00
Robert Schmidt
b547dfe056 apply new configuration after receiving ACK for RRCreconfiguration message 2025-12-03 13:31:05 +01:00
francescomani
eb9ac76f4d Set MCS table also in initial BWP function 2025-12-03 13:31:01 +01:00
francescomani
ca04193680 Remove hardcoded max_rank = 1 in PUSCH configuration and set it with appropriate function 2025-12-03 13:30:53 +01:00
francescomani
aa7d3668e3 Fix for segfault caused by freed csi_MeasConfig 2025-12-03 13:30:42 +01:00
francescomani
0e7e030907 Fix clean_bwp_structures
Also zero out the pointer in spCellConfigDedicated to avoid
use-after-free.
2025-12-03 13:30:11 +01:00
Robert Schmidt
18edbc0f15 Fix UL throughput counter in periodic PNF logs
Function pointer send_p7_msg() returns a bool, so correctly set the
type, and interpret it correspondingly.
2025-12-03 12:33:53 +01:00
Rúben Soares Silva
d28ae49eee Fix FAPI WLS slot.indication slot ahead
Current FAPI slot_ahead value for WLS is too low for UL, as we see these
errors:

    [NR_MAC] Unexpected ULSCH HARQ PID 14 (have 3) for RNTI 0xa68e
    [NR_MAC] UE a68e expected HARQ pid 3 feedback at  586. 7, but is at  587.17 instead (HARQ feedback is in the past)

Similarly to nFAPI, scale it by mu (for mu=1 => slot_ahead=2) to give
additional time, which removes these warnings at the VNF.
2025-12-03 12:33:47 +01:00
Robert Schmidt
04ac7eb4b9 Merge remote-tracking branch 'origin/aerial-more-cores' into integration_2025_w49 (!3795)
Increase Aerial-based L2 test core number
2025-12-02 19:13:59 +01:00
Robert Schmidt
04318f64ea Merge remote-tracking branch 'origin/fix-e2ap-compilation-rrc-rc-forward' into integration_2025_w49 (!3794)
Fix missing E2SM-RC message forward
2025-12-02 19:13:34 +01:00
Robert Schmidt
388ad30f6b Fix missing E2SM-RC message forward
E2SM-RC RRC message forwarding (e.g., to signal a new UE, measurement
reports, ...) was broken since commit d6c29b2d2c, as we accidentally
removed the E2_AGENT compilation definition from RRC layer.

Although this commit fixes the mentioned issue, it also causes undefined
references to functions defined in ran_func_rc.c file.  Therefore, we
add a hack that provides the definition, and abort if we ever hit these
functions, which in theory should not happen.

Future cleanup should avoid linking in RRC and other layers into
simulators.

Fixes: d6c29b2d2c ("Fix E2_AGENT linking w.r.t. simulators ")
2025-12-02 19:10:08 +01:00
Robert Schmidt
f35a1cd775 Increase Aerial-based L2 test core number
Testing has revealed that if PDCP drops some packets, the scheduler
falls behind with handling Slot.indication. It could be that we don't
have enough cores, which was reduced previously (from total 8 -> 2).
Reincrease to four cores to have a bit more headroom.

See-also: a18a4888ec ("Change number of cores used for OAI gNB from 8 to 2")
2025-12-02 19:05:17 +01:00
Robert Schmidt
8f89637f8c Merge remote-tracking branch 'origin/fix-pdu-session-release-transfer' into integration_2025_w49 (!3780)
NGAP: fix PDU Session Release Response

1. Refactor NG UE Context Release Request

  - Removed incorrect UE Context Release Response code (not in 3GPP TS
    38.413)
  - Fixed UE Context Release Request to use correct PDU Session Resource
    List structure
  - Removed incorrect use of pdusession_release_t type

2. Fix PDU Session Release Response

  - Added missing mandatory PDUSessionResourceReleaseResponseTransfer IE
  - Implemented encode_ngap_pdusession_release_response_transfer()
    function
  - Fixed Release Command handler to correctly decode Cause from command
    transfer
  - Split Command/Response struct type definitions to prevent mixing
2025-12-02 13:45:17 +01:00
Robert Schmidt
5af58cc686 RFemulator: initialize RNG when using noise device
After !3786, we always have to initialize the RNG when using random
numbers. This was not done for RFemulator and has been added here.
2025-12-02 13:35:49 +01:00
Guido Casati
9e45f38fbd fix PDU Sesion Release response: add missing PDUSessionResourceReleaseResponseTransfer IE
The PDUSessionResourceReleaseResponse message was missing the mandatory
pDUSessionResourceReleaseResponseTransfer IE in each released PDU session item. This caused Open5GS to send an error indication.

Changes:
- Add encode_ngap_pdusession_release_response_transfer() function to
  properly encode the transfer structure (empty since Secondary RAT Usage
  Information is optional and not used, per 9.3.4.21)
- Always include the mandatory PDUSessionResourceReleasedListRelRes IE
- Always encode the pDUSessionResourceReleaseResponseTransfer for each
  PDU session item
- Fix Release Command handler to decode and log Cause from command transfer:
  instead of incorrectly copying command data to response: the 2 transfer
  IEs in the Command and the Response messages are different and should
  not be mixed
- Split Command/Response struct type definitions
- Add missing includes
2025-12-01 23:48:06 +01:00
Guido Casati
ad1c92af4f Refactor NG UE Context Release Request
1) Remove UE Context Release Response code: there is no
such thing in the specs, it is either UE Context Release Request
(NG-RAN node initiated) or UE Context Release (AMF initiated)
(3GPP TS 38.413). The former message has only the request, no
response is defined by the specs. The code in the stack had no
purpose at all and was removed.
2) The UE Context Release Request message only contains a PDU
Session Resource List (optional) of PDU Session IDs, therefore
the use of pdusession_release_t was wrong and was refactored
2025-12-01 23:48:06 +01:00
Robert Schmidt
a9e7018b98 Merge remote-tracking branch 'origin/yaml_update' into integration_2025_w49 (!3758)
Add yq to edit yaml files and add yaml-dev library in containers missing it

- nr-cu-up and some containers were missing the yaml-config support
  libraries
- yq tool is required to manipulate YAML files from within the container
  for Helm charts
2025-12-01 17:09:25 +01:00
Robert Schmidt
1140c59bbd Merge remote-tracking branch 'origin/fix-OAI_RNGSEED-usage' into integration_2025_w49 (!3786)
Consistently use OAI_RNGSEED env variable for RNG

use OAI_RNGSEED env variable everywhere. Hide normal table
initialization of Ziggurat generator from outside. Fix atoi() to use
stroul()
2025-12-01 15:20:23 +01:00
Robert Schmidt
ce7cb165dd Fix OAI_RNGSEED to capture unsigned long
atoi() used previously does not capture all of unsigned long (so we
could not reproduce a high seed), and its use is discouraged as it does
not detect errors. Use strtoul() instead, which allows to also use other
bases (so we can e.g., write OAI_RNGSEED=0x1234)
2025-12-01 12:10:31 +01:00
Laurent THOMAS
a1b4220a91 Exclusively use OAI_RNGSEED env variable everywhere
Hide normal table initialization of Ziggurat generator from outside to
force the usage of randominit() for RNG initialization. In this step,
remove the randominit() seed parameter and only rely on OAI_RNGSEED for
a consistent RNG initialization, as this parameter was used differently
("0" as fixed number or to force a random seed).

Now, only use OAI_RNGSEED env variable to force the usage of a fixed
seed.
2025-12-01 12:10:31 +01:00
francescomani
7da7dda71b new UE state to trigger RA after reconfiguration with sync 2025-11-29 23:13:42 +08:00
francescomani
e3b0def6dc conditional scheduling of SIB1 reception when receiving reconfigurationwSync 2025-11-29 23:12:36 +08:00
francescomani
9c8274f6bd separate RRC to MAC message to trigger SIB scheduling 2025-11-29 22:39:43 +08:00
francescomani
56f20d49bc improve handling of ssb_perRACH_OccasionAndCB_PreamblesPerSSB according to need code
(also removing unused FAPI element ssb_per_rach)
2025-11-29 22:39:43 +08:00
alexjiao
d56945e45e Monitor dedicated search spaces for DCIs after C-RNTI MAC-CE in Msg3 is sent 2025-11-29 22:39:43 +08:00
francescomani
e454fc41d1 Trigger MSG3 with C-RNTI in MAC CE if CBRA with newUE-Identity (handover) 2025-11-29 22:39:43 +08:00
alexjiao
2e80700d78 Fix for servedRadioBearer to be NULL in RLC Bearer Config 2025-11-29 22:39:43 +08:00
Jaroslava Fiedlerova
1603077171 Merge branch 'integration_2025_w48' into 'develop'
Integration `2025.w48`

* !3778 CI: Update IP addresses in Aerial gNB config files
* !3659 UE NTN - Epoch time handling for Target cell
* !3772 CI: Ensure EPC is always terminated in NSA-B200 pipeline
* !3773 Fix doc for UTC timestamp
* !3759 NR UE: fix bug for SRS generation when freqDomainShift (n_shift) is not 0
* !3774 Use UL functions for Qm/R determination
* !3767 Fix DRB integrity failures during handover and re-establishment
* !3764 Avoid measGap configuration on handover in intra-freq scenarios
* !3768 Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR
* !3771 CI build analysis: print log file errors
* !3703 Taking into account UE capabilities for TBS_lbrm layers
* !3561 Implementation of STOP exchange
* !3776 Fix reestablishment after handover
* !3763 CI: Reduce the tries to attach the UE in CI runs
* !3761 fix(FHI 7.2): PRACH frame test
* !3616 [FHI72 M-plane] Update the M-plane support to v16.01
* !3790 Correctly copy nFAPI messages
* !3779 CFRA: mark RA complete when sending Msg2 - check CI

Closes #563 and #1034

See merge request oai/openairinterface5g!3775
2025-11-29 11:16:06 +00:00
Robert Schmidt
6fe7581eed Merge remote-tracking branch 'origin/cfra-no-msg3' into integration_2025_w48
CFRA: mark RA complete when sending Msg2

The current contention-free random access forces a "Msg3" (which does
not exist in CFRA) to be received by a UE. Sometimes, this "Msg3" is not
received (for whatever reason), and the MAC declare that RA failed.

This is problematic, as the spec says that RA is complete once Msg2 is
received by the UE. Since the gNB cannot know when this is, simply mark
it as complete once we sent Msg2.

We still send Msg3 in CFRA, which is explained further in the commits.

Also, improve logging and stabilize an RFsim test by reducing sl_ahead.
2025-11-28 18:25:18 +01:00
Jaroslava Fiedlerova
2ff7a56b95 Merge remote-tracking branch 'origin/fix-nfapi-100mhz' into integration_2025_w48 (!3790)
Correctly copy nFAPI messages

All nFAPI message have copy helpers, so use that for "loading" nFAPI
messages into the L1. This also fixes a bug/error message

2. 0 no corresponding tx_data.request for dl_tti.request index 11, dropping

because the loop over DL_tti.request assumed that all messages are PDSCH
PDUs, when we can have others such as PDCCH, etc. In other words, when
looking up indices ("11" in the example above), we were checking also
inside other messages for SSB, PDCCH, etc, which is of course wrong.
That loop was an attempt to validate matching PDSCH PDUs with
TX_data.requests. This check is already done inside
phy_procedures_gNB_TX() through an assert, but this commit replaces with
the equivalent check previously inside nr_pnf_p7_get_msgs(). This is ok,
as the L1 cannot trust the scheduler (in monolithic) to provide the
correct information, either.
Fixes: eefb9da6 ("Reimplement nFAPI message exchange after msgDataTx removal")
2025-11-28 18:16:13 +01:00
Jaroslava Fiedlerova
68a4bb9a61 Merge remote-tracking branch 'origin/mplane-v16.01' into integration_2025_w48 (!3616)
[FHI72 M-plane] Update the M-plane support to v16.01

- retrieve the additional hardware states (oper-state, admin-state,
  availability-state) and update according to the received notifications
- properly configure MIMO mode if a RU supports
- update the yang models to v16.01
- tested with Benetel v1.4.1, and added an example run in the M-plane doc

Note: backwards compatible with M-plane v05.00

Also, memory leakages fixed cause by ru_session_list_t, and xml functions
xmlReadMemory() and xmlNodeGetContent().
2025-11-28 18:11:06 +01:00
Sagar Arora
662c6e1aec Install yaml-cpp-dev for CU-UP and rocky
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-11-28 16:48:08 +01:00
Jaroslava Fiedlerova
c8b4aa2abd Merge remote-tracking branch 'origin/fix_prach_frame_test_fhi72' into integration_2025_w48 (!3761)
fix(FHI 7.2): PRACH frame test

A test was missing in the PRACH RX function of the FHI 7.2 in order to know if
the frame had a PRACH occasion. This was leading to continuous warning messages
as PRACH RX was triggered on frames in which PRACH was not expected by the
scheduler.
2025-11-28 16:34:43 +01:00
Jaroslava Fiedlerova
8300ab5a61 Merge remote-tracking branch 'origin/CI-ue-attach' into integration_2025_w48 (!3763)
CI: Reduce the tries to attach the UE in CI runs

The goal of this MR is to save time in CI runs by reducing the UE attach tries
to 3 instead of 4 and UE timeout to 20 seconds, which will be incremented after
each fail, instead of 60 seconds.
2025-11-28 16:33:39 +01:00
Robert Schmidt
1368bb5a5c CFRA: handle potential Msg3
Since the parent commit, CFRA is inconditionally marked complete on Msg3
reception (successful or not). This works because the current
implementation still sends a UL grant (see parent commit for details).

In this commit, handle Msg3 if received in CFRA (notably for TA and
power). Note that since we declare RA complete, UE->ra does not exist
anymore, and so an intermediate variable is introduced to capture the
CFRA flag. The code should be such that if we are in CFRA, we never
access any UE->ra variable.
2025-11-28 15:47:23 +01:00
Robert Schmidt
923b2ec188 Correctly copy nFAPI messages
All nFAPI message have copy helpers, so use that for "loading" nFAPI
messages into the L1. This also fixes a bug/error message

    2. 0 no corresponding tx_data.request for dl_tti.request index 11, dropping

because the loop over DL_tti.request assumed that all messages are PDSCH
PDUs, when we can have others such as PDCCH, etc. In other words, when
looking up indices ("11" in the example above), we were checking also
inside other messages for SSB, PDCCH, etc, which is of course wrong.

That loop was an attempt to validate matching PDSCH PDUs with
TX_data.requests. This check is already done inside
phy_procedures_gNB_TX() through an assert, but this commit replaces with
the equivalent check previously inside nr_pnf_p7_get_msgs(). This is ok,
as the L1 cannot trust the scheduler (in monolithic) to provide the
correct information, either.

Fixes: eefb9da69a ("Reimplement nFAPI message exchange after msgDataTx removal")
2025-11-28 13:54:01 +01:00
Reem Bahsoun
d6e4e49fcb Reduce the time given to the UE to re-attach after failure
Number of tries is reduced from 4 to 3
After each failure the timeout is incremented by 20
2025-11-28 10:03:58 +01:00
Romain Beurdouche
f6135ff1ff fix(FHI 7.2): PRACH frame test
A test was missing in the PRACH RX function of the FHI 7.2 in order to
know if the frame had a PRACH occasion.
This was leading to continuous warning messages as PRACH RX was
triggered on frames in which PRACH was not expected by the scheduler.
2025-11-28 09:01:20 +01:00
Robert Schmidt
8ea95a0e52 CFRA: mark RA complete when sending Msg2
The current contention-free random access forces a "Msg3" (which does
not exist in CFRA) to be received by a UE. Sometimes, this "Msg3" is not
received (for whatever reason), and the MAC declare that RA failed.

This is problematic, as the spec says that RA is complete once Msg2 is
received by the UE. To avoid this, inconditionally mark RA as complete
as soon as we receive an indication of Msg3 (DTX or not).

Note that after this change, we still send a UL grant in Msg2. This is
because 38.321 §5.1.4 is not clear to me whether we should send UL grant
(it does not explicitly exclude it), and it says

> 3> if the Random Access Response includes a MAC subPDU with RAPID only:
> [...]
>   4> indicate the reception of an acknowledgement for SI request to
>      upper layers.

which is NOT the case (but then I don't know/think we can have CFRA for
SI request?).  Since it also works with COTS UE, I leave Msg3 for the
moment.

The reason to not directly mark RA as complete when sending Msg2 is
because of possible retransmissions in do-ra mode. In fact, in do-ra,
there might already be data awaiting. In that case, the DLSCH scheduler
schedules data _in the same slot as Msg2_, which the UE does not decode,
leading to retransmissions.
2025-11-28 08:29:44 +01:00
Robert Schmidt
f0151c21bd Remove duplicate of RAR log above 2025-11-28 08:29:44 +01:00
Robert Schmidt
d5eb935ecf Log preambles for pre-configured RA 2025-11-28 08:29:44 +01:00
Robert Schmidt
b1b120551d Lower sl_ahead in do-ra config to reduce RA timeout risk 2025-11-28 08:29:44 +01:00
Jaroslava Fiedlerova
0226510c4a Merge remote-tracking branch 'origin/fapi-stop-exchange' into integration_2025_w48 (!3561)
Implementation of STOP exchange

This implements the STOP.request/indication for all 3 transport mechanisms, the
VNF will send the STOP.request to the PNF, indicating it will disconnect, and
await a STOP.indication from the PNF

The WLS VNF is reworked to be able to start before the PNF, by calling call
rte_eal_init and rte_dev_probe to determine if dpdk has been initialized
properly, before calling rte_eal_init in the intended process when it is
appropriate to do so
2025-11-27 15:01:39 +01:00
Jaroslava Fiedlerova
0f6b567ae9 Merge remote-tracking branch 'origin/fix-reestab-ho-cleanup' into integration_2025_w48 (!3776)
Fix reestablishment after handover

- fix reestablishment by not re-creating LCIDs with priority set to 0 (see first
  commit for more details)
- cleanup code
2025-11-27 14:52:23 +01:00
Jaroslava Fiedlerova
df041a0f8c Merge remote-tracking branch 'origin/issue563' into integration_2025_w48 (!3703)
Taking into account UE capabilities for TBS_lbrm layers

Closes #563
2025-11-26 20:37:31 +01:00
Jaroslava Fiedlerova
4b7970d601 Merge remote-tracking branch 'origin/ci-build-print-errors' into integration_2025_w48 (!3771)
CI build analysis: print log file errors

The generated HTML from CI builds so far only shows the number of errors, but
not the errors themselves. This is inconvenient, as this means that developers
have to go to the logs.

This commit modifies AnalyzeBuildLogs(), which already iterates the entire file,
to store the lines containing "error:" (as it would be emitted by a compiler).
The callers of AnalyzeBuildLogs() now also print the analysis outcome in a more
concise manner.

Also, change the return parameter of AnalyzeBuildLogs() to a tuple to make the
variable handling easier, and remove the unused warnings list.
2025-11-26 20:35:59 +01:00
Robert Schmidt
110bbd10bc Simplify RLC reestablishment
The idea is to reestablish all RLC entities (it's a new UE, and we set
reestablishRLC on all bearerrs), so we should reestablish all RLC
entities on gNB side as well, without any additional loop.

Co-authored-by: Roberto Magueta <rmagueta@allbesmart.pt>
2025-11-26 18:18:25 +01:00
Robert Schmidt
87adaafcfc Refactor process_addmod_bearers_cellGroupConfig() and set priority
Move the file process_addmod_bearers_cellGroupConfig() to the file where
it is used. Correctly set priorities as requested in RLC bearer
configuration.
2025-11-26 18:18:25 +01:00
Robert Schmidt
b3c99d8ead Avoid recreation of LCIDs with wrong priority
In all cases (NSA, HO), we create LCIDs before the UE triggers random
access. Hence, process_addmod_bearers_cellGroupConfig() is not
necessary, as it just tries to recreate an LCID.

Furthermore, it includes a bug, as this function does set a wrong
priority (0), so the sorting of LCIDs is not correct. This in turn
creates problems with reestablishment, as LCID 1/SRB1 is not in the
first position, making reestablishment fail (where we assume LCID 1 be
in first position).

The actual bug of setting priorities is fixed in the next commit.
2025-11-26 18:18:25 +01:00
francescomani
10247cfbed taking into account maximum number of layers for PUSCH supported by the UE for TBSlbrm 2025-11-26 16:46:00 +01:00
francescomani
1e610af168 taking into account maximum number of layers for PDSCH supported by the UE for TBSlbrm 2025-11-26 16:45:56 +01:00
Jaroslava Fiedlerova
ebc4bb8409 CI: Remove redundant Jenkinsfiles
All the removed files can be replaced by Jenkinsfile introduced in !3738
2025-11-26 11:12:03 +01:00
Jaroslava Fiedlerova
8966dc2c4f Merge remote-tracking branch 'Rakesh_B_B/develop' into integration_2025_w48 (!3768)
Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR

- The DU was using encode_MIB_NR() while constructing the GNB-DU System
  Information for the F1SetupRequest.
- encode_MIB_NR() encodes a full NR_BCCH_BCH_Message_t, causing the MIB to be
  wrapped in a BCH container.
- This results in incorrect MIB values in the F1SetupRequest PCAP (e.g., wrong
  systemFrameNumber, SCS, DMRS position, cellBarred).
- According to 3GPP TS 38.473, the MIB carried in F1AP must be encoded as a raw
  NR_MIB_t.
- The correct function encode_MIB_NR_setup() encodes MIB in the required format
  but was not used.
- This patch replaces encode_MIB_NR() with encode_MIB_NR_setup() to ensure correct
  and standards-compliant MIB encoding in the F1SetupRequest.

Closes issue #1034.
2025-11-25 17:47:16 +01:00
Jaroslava Fiedlerova
c87a6ecfba Merge remote-tracking branch 'origin/fix-drb-integrity' into integration_2025_w48 (!3767)
Fix DRB integrity failures during handover and re-establishment

This MR fixes DRB integrity protection failures that occur during N2 handover
and connection re-establishment scenarios. The issues were caused by incorrect
security key handling and ciphering configuration during these procedures with
DRB integity enabled.

See merge request !3767 for more details.
2025-11-25 14:01:40 +01:00
Jaroslava Fiedlerova
0c4882940c Merge remote-tracking branch 'origin/fix-measGaps' into integration_2025_w48 (!3764)
Avoid measGap configuration on handover in intra-freq scenarios

During the handover, we are incorrectly configuring the measGap, even though
neighboring cells are on the same frequency. Since gNB is not expecting this
measGap, the SRS scheduling is performed. Therefore, we are periodically
receiving these logs after the handover:

[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2
[NR_MAC] Invalid timing advance offset for RNTI 58e2

These logs occur at a time when UE is performing a MeasGap operation and not
sending the SRS, while gNB thinks it will receive the SRS, but will not receive
any SRS.

This MR resolves this issue, and after the handover, these logs no longer
appear.
2025-11-25 13:57:24 +01:00
Jaroslava Fiedlerova
0e4ade9472 Merge branch 'aerial-gh1-ip-addr' into 'develop' (!3778)
CI: Update IP addresses in Aerial gNB config files

This MR updates the NG-AMF and NG-U IP addresses in both Aerial configuration 
files (standard and UL-heavy) following the IP address change on GH1.
2025-11-25 09:52:18 +00:00
Guido Casati
b7454cf5d4 Enable DRB integrity and ciphering in F1 and N2 HO pipelines with Quectel 2025-11-25 09:47:24 +01:00
Jaroslava Fiedlerova
e8732ed8c8 Merge remote-tracking branch 'origin/fix-mcs-tbl' into integration_2025_w48 (!3774)
Use UL functions for Qm/R determination

During refactoring, the wrong functions and correspondingly tables have
been used to calculate UL TB size. Fix through correct functions.
This should fix these error messages:

3624774.778195 [MAC]    E (nr_get_Qm_dl:2034)             Invalid MCS table index 3 (expected in range [0,2])
3624774.778207 [MAC]    E (nr_get_code_rate_dl:2066)      Invalid MCS table index 3 (expected in range [0,2])
3624774.778211 [NR_MAC] E (nr_compute_tbs:63)             Error in compute TBS with a NULL input, returning NULL TBS

Fixes: 9449f777 ("Remove TBS table and recompute on demand")
2025-11-24 22:26:42 +01:00
Jaroslava Fiedlerova
95affc2a41 Merge remote-tracking branch 'origin/srs-freq-shift-fix' into integration_2025_w48 (!3759)
NR UE: fix bug for SRS generation when freqDomainShift (n_shift) is not 0

According to TS 38.211 section 6.4.1.4.3, the frequency domain shift value
n_shift is from higher-layer parameter freqDomainShift. The quantity n_RRC
is given by higher-layer parameter freqDomainPosition. Also corrected
k_0_overbar_p calculation formula to align with standard.
2025-11-24 22:24:56 +01:00
Reem Bahsoun
be1150a82a Update IP addresses for NG-AMF and NG-U interfaces in Aerial config files to match GH1’s new assigned IP 2025-11-24 17:13:36 +01:00
Jaroslava Fiedlerova
8943975eb3 Merge remote-tracking branch 'origin/fix-logging-doc' into integration_2025_w48 (!3773)
Fix doc for UTC timestamp

After merging !3751 (merged), the UTC timestamp now prints only the time.
Update the documentation to reflect this simplified format.
2025-11-24 14:45:22 +01:00
Jaroslava Fiedlerova
c9c935af01 Merge remote-tracking branch 'origin/ci-ltebox-terminate' into integration_2025_w48 (!3772)
CI: Ensure EPC is always terminated in NSA-B200 pipeline

This change avoids leaving EPC processes running after failed test.
2025-11-24 14:44:32 +01:00
Jaroslava Fiedlerova
894491f2e5 Merge remote-tracking branch 'origin/nr_ue_epoch_target' into integration_2025_w48 (!3659)
UE NTN - Epoch time handling for Target cell

In case of Handover, NTNconfig sent in RRCreconfiguration triggering handover
contains epoch time wrt timing of Target cell. NTNconfig in RRC needs to be
processed only after timing is acquired on the target cell.

In case of Target cell, epoch time is the sfn nearest to the frame timing of the
target cell.
2025-11-24 14:42:39 +01:00
Robert Schmidt
0360175042 Use UL functions for Qm/R determination
During refactoring, the wrong functions and correspondingly tables have
been used to calculate UL TB size. Fix through correct functions.

This should fix these error messages:

    3624774.778195 [MAC]    E (nr_get_Qm_dl:2034)             Invalid MCS table index 3 (expected in range [0,2])
    3624774.778207 [MAC]    E (nr_get_code_rate_dl:2066)      Invalid MCS table index 3 (expected in range [0,2])
    3624774.778211 [NR_MAC] E (nr_compute_tbs:63)             Error in compute TBS with a NULL input, returning NULL TBS

Fixes: 9449f777cc ("Remove TBS table and recompute on demand")
2025-11-24 13:04:02 +01:00
Jaroslava Fiedlerova
0386751da8 Fix UTC timestamp documentation
After merging !3751, the UTC timestamp now prints only the time.
Update the documentation to reflect this simplified format.
2025-11-24 11:45:47 +01:00
Jaroslava Fiedlerova
96ec2be887 CI: Ensure EPC is always terminated in NSA-B200 pipeline
This change updates the NSA-B200 CI pipeline to guarantee that the EPC is
properly terminated regardless of pipeline success or failure. This avoids
leaving EPC processes running after failed test.
2025-11-24 11:14:31 +01:00
Robert Schmidt
bff0e53645 CI build analysis: print log file errors
The generated HTML from CI builds so far only shows the number of
errors, but not the errors themselves. This is inconvenient, as this
means that developers have to go to the logs.

This commit modifies AnalyzeBuildLogs(), which already iterates the
entire file, to store the lines containing "error:" (as it would be
emitted by a compiler). The callers of AnalyzeBuildLogs() now also print
the analysis outcome in a more concise manner.

Also, change the return parameter of AnalyzeBuildLogs() to a tuple to make
the variable handling easier, and remove the unused warnings list.
2025-11-21 17:53:25 +01:00
rmagueta
fea86247da Do not configure NR_MeasurementTimingConfiguration during handover when neighboring cells are at the same frequency 2025-11-21 16:42:24 +00:00
Rakesh BB
176b71ae70 Fix MIB encoding in F1SetupRequest: use encode_MIB_NR_setup instead of encode_MIB_NR
- The DU was using encode_MIB_NR() while constructing the GNB-DU System Information for the F1SetupRequest.
- encode_MIB_NR() encodes a full NR_BCCH_BCH_Message_t, causing the MIB to be wrapped in a BCH container.
- This results in incorrect MIB values in the F1SetupRequest PCAP (e.g., wrong systemFrameNumber, SCS, DMRS position, cellBarred).
- According to 3GPP TS 38.473, the MIB carried in F1AP must be encoded as a raw NR_MIB_t.
- The correct function encode_MIB_NR_setup() encodes MIB in the required format but was not used.
- This patch replaces encode_MIB_NR() with encode_MIB_NR_setup() to ensure correct and standards-compliant MIB encoding in the F1SetupRequest.

Closes issue #1034.
2025-11-19 17:30:22 +00:00
Guido Casati
e1dd62df53 Fix N2 handover integrity failures by enabling ciphering during handover setup
Problem:
During N2 handover with integrity protection (NIA1/NIA2), the target gNB
was disabling ciphering when configuring SRB1 security, while the UE
continued using the old security context from the source gNB until it
received and processed the RRC Reconfiguration with masterKeyUpdate. The
first PDUs sent after CFRA were still ciphered with the old keys, but the
target gNB had ciphering disabled, causing it to skip deciphering and
attempt integrity verification on ciphered data, leading to MAC-I
mismatches and integrity failures.

Specification Reference:
According to TS 33.501 section 6.11, "the UE shall keep the K gNB used in
the source cell until the handover or a connection re-establishment has been
completed successfully". This means the UE continues using the old security
context (old KRRCint, KRRCenc) until it receives and processes the RRC
Reconfiguration with masterKeyUpdate. The target gNB must therefore enable
ciphering during handover setup to correctly decipher and verify integrity
of PDUs sent with the old security context before the UE switches to the new
keys.

Root Cause:
The code was calling nr_rrc_pdcp_config_security(UE, false) during
handover setup, which disabled ciphering. This was incorrect because:
1. The UE already has security active from the source gNB
2. The UE continues using old ciphered keys until masterKeyUpdate
3. The UE sends ciphered PDUs immediately after CFRA succeeds
4. The target gNB must be able to decipher these PDUs to verify integrity

Why it only manifested when drb_integrity = "yes":
The bug was always present, but only caused visible failures when
integrity verification was enabled. When drb_integrity = "no", the config
typically also sets integrity_algorithms to only NIA0, resulting in
UE->integrity_algorithm = 0, which causes has_integrity = 0 for SRB1,
skipping integrity verification and hiding the underlying ciphering bug.
When drb_integrity = "yes", integrity_algorithms typically includes
NIA1/NIA2, resulting in has_integrity = 1 for SRB1, causing integrity
checks to run on ciphered data and fail.

Fix:
Change nr_rrc_pdcp_config_security(UE, false) to
nr_rrc_pdcp_config_security(UE, true) during handover setup to enable
ciphering immediately, allowing the target gNB to correctly decipher and
verify integrity of PDUs sent with the old security context.

Note: This fix is specific to handover. During initial context setup,
ciphering should remain disabled until SecurityModeComplete is received,
as the UE hasn't activated ciphering yet at that point.
2025-11-19 11:37:36 +01:00
Guido Casati
6512a7a9ca Notify security keys change to CUUP during re-establishment
During re-establishment, new KgNB* is derived, requiring new UP keys (KUPint,
KUPenc) to be sent to CU-UP. When do_drb_integrity = true, CU-UP needs the
updated integrity keys to verify DRB PDUs. Without this update, CU-UP uses
old keys while the UE uses new keys, causing integrity failures.

The fix ensures security info is always sent during re-establishment,
which is critical for DRB integrity.
2025-11-19 11:36:39 +01:00
Thomas Schlichter
92107b18fe update FEATURE_SET.md 2025-11-19 10:05:45 +01:00
Thomas Schlichter
a283ef263b rfsimulator: improve calculation of ta-CommonDrift-r17 and ta-CommonDriftVariant-r17
Instead of using the projected velocity and acceleration vectors,
calculate vel_sat_gnb and acc_sat_gnb so the delay is correct for
epoch_time, epoch_time + 5 seconds and epoch_time + 10 seconds.
2025-11-19 10:05:45 +01:00
Thomas Schlichter
842b16092d NR UE: use GET_NTN_UE_K_OFFSET() instead of get_total_TA_ms() in nr_ra_procedures.c 2025-11-19 10:05:45 +01:00
Thomas Schlichter
62fe88d6f4 NR UE: make sure not to lose N_TA when updating N_common_TA_adj + N_UE_TA_adj
Separate timing_advance (N_TA) from timing_advance_ntn (N_common_TA_adj + N_UE_TA_adj)
to keep N_TA when updating N_common_TA_adj + N_UE_TA_adj.

Fixes #981
2025-11-19 10:05:45 +01:00
Thomas Schlichter
59af5e4ad2 NR UE: introduce orbit propagation to improve N_UE_TA_adj accuracy
Instead of trying to estimate N_UE_TA_adj with a second degree polynomial,
we introduce orbit propagation to calculate N_UE_TA_adj with higher accuracy.

When we receive the satellite ephemeris data consisting of the satellite position vector
and the satellite velocity vector, we calculate parameters for orbit propagation, assuming
a circular orbit in the plane created by the satellite position vector and the satellite
velocity vector. This is done in the function prepare_ue_sat_ta().

Every millisecond, we use these parameters together with the time since epoch to calculate
the satellite position on that orbit and from this the reound-trip-time between UE and the
satellite, what corresponds to N_UE_TA_adj. This is done in the function apply_ntn_timing_advance().
2025-11-19 10:05:45 +01:00
Thomas Schlichter
43722e6bac fix compiler warning: ‘phase_tdd_ncp’ may be used uninitialized 2025-11-19 10:05:45 +01:00
Thomas Schlichter
1947f4d60c remove the parameter --autonomous-ta from the UE command line and update RUNMODEM.md accordingly 2025-11-19 10:05:45 +01:00
Thomas Schlichter
b60a40ccbf NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled 2025-11-19 10:05:45 +01:00
Thomas Schlichter
654fadb116 NR UE: calculate the epoch_hfn whenever an ntn_Config_r17 is received 2025-11-19 10:05:45 +01:00
Thomas Schlichter
0bf99d9d16 NR UE: introduce the hyper frame number (HFN) in PHY, MAC and RRC layer
Provide it to the function configure_ntn_ta() so it can be used when a new ntn_Config_r17 is received.
2025-11-19 10:05:44 +01:00
Raghavendra Dinavahi
f9a8898e20 UE: Epoch time handling of Target cell
In case of Handover, NTNconfig sent in RRCreconfiguration triggering handover contains epoch time wrt
timing of Target cell. NTNconfig in RRC needs to be processed only after timing is acquired on the target cell
In case of Target cell, epoch time is the sfn nearest to the frame timing of the target cell.
2025-11-17 15:53:23 +01:00
Robert Schmidt
92980ceb72 Merge branch 'integration_2025_w46' into 'develop'
Integration `2025.w46`

* !3754 NR UE: correctly provide measured SSB SINR value from PHY to MAC
* !3666 NTN: Fixing variable ULDLduplex issue for NTN bands
* !3747 SDAP: guard RX header parsing with enable_sdap and init per-entity
* !3729 DCI 00 alt size fix
* !3753 gNB: fix MAC TA command scheduling if measurement gaps are configured
* !3722 [NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure
* !3745 Collection of small fixes
* !3755 CI: Increase tested UL throughput on Aerial pipeline using 2L UL
* !3752 [MAC] Add UL total/used aggregated MAC stats; [E2 agent] Properly calculate used UE PRBs in KPM
* !3707 Cleanup phy_procedures_gNB_uespec_RX
* !3750 Handling newly opened UE issues
* !3751 Update log header format to align log output
* !3757 Remove schedule response and update L1 threading documentation
* !3748 Refactor imscope
* !3760 gNB: modify RLC configuration applied for SRB1 during RRCReestablishment
* !3684 PDU Session Release

Closes #867, #960, #1025, #1024, #1026, #1031, #1030, and #1012

See merge request oai/openairinterface5g!3756
2025-11-16 07:21:47 +00:00
Sagar Arora
389ca60d5e add yq in 5G NF Dockerfiles
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-11-16 06:14:14 +01:00
Robert Schmidt
1948858c35 Merge remote-tracking branch 'origin/rrc-pdu-session-release' into integration_2025_w46 (!3684)
PDU Session Release

This MR implements end-to-end PDU Session Release functionality
according to 3GPP TS 38.413 and TS 38.331 specifications.

Reason for Change Previous implementation had incomplete and wrongly
places tunnel cleanup during PDU session release. UP cleanup shall be
done at CUUP, RRCReconfiguration shall be sent after retrieval of
updated CellGroupConfig from the DU. This implies F1 and E1 exchanges
during PDU session release procedure.

Major Changes:

1. RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU
   Session Release Response callback
  - Helper Functions: Introduced rm_pduSession,
    find_drb_by_pdusession_id and rm_drbs() helpers to locate and clean
    up DRBs linked to a specific PDU session
  - Targeted Cleanup: RRC PDU Session and per-session DRB removal in
    rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
  - Status Cleanup: Removed unused PDU_SESSION_STATUS_RELEASED status
2. RRC PDU Session Release: Refactor
   rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
  - Any PDU session in the pdusession_release_params list that is
    present in the RRC list can be set to release, regardless of its
    status
  - Function Signature Update: Updated function signature and other
    minor changes
  - Response Handling: rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE is
    sent upon completion of RRCReconfiguration
3. RRC PDU Session Release: add missing procedures E1AP Integration:
  - Populates E1AP Bearer Modification for each to be released session
  - PDCP Enhancement: Added nr_pdcp_release_drbs() to remove all DRBs
    linked to a given PDU session in CUUP
  - GTP-U Cleanup: GTP tunnel teardown handled in CUUP
    e1_bearer_context_modif() using correct F1 or N3 GTP instance
4. NR PDCP/GTP:
  - Enhanced Tunnel Deletion Logic: Separate handling for N3 tunnels (1
    per PDU session) and F1-U tunnels (1 per DRB)
  - New PDCP API Function: Added nr_pdcp_get_drb_ids_for_pdusession()
    function to retrieve all DRB IDs associated with a specific PDU
    session
5. RRC PDU Session Release: F1AP-based UE Context Modification:
  - Replaced direct RRC message transfer with F1AP UE Context
    Modification Request for proper retrieval from DU
  - Cell Group Configuration: handling of updated CellGroupConfig from
    DU ensures DRB release at CU
6. Docs and testing:
  - Added PDU session add/remove test cases to 25 PRB RFSIM pipeline
  - Documentation: Added PDU Session Release sequence diagram
  - Telnet Commands: Added ci command to trigger NGAP PDU Session
    Release and ciUE command to trigger establishment of a new PDU
    Session
7. Additional fixes:
  - UE RLC Management: ensure release of RLC entities
  - Unify NG delay control before calling the RRC NGAP handler, for both
    Setup and Release
8. Code Cleanup: Cleaned up unused GTP teardown functions.

Closes #867
2025-11-15 21:05:46 +01:00
Guido Casati
1fea6108a8 RRC: unify NG delay control before calling the RRC NGAP handler
- Add delayed_action_state_t in the UE context for ongoing delayed action
- Move delay check and timer re-enqueue to rrc thread in rrc_gNB.c (rrc_delay_transaction)
- Call delay before NGAP setup/release handlers; remove local delay logic from rrc_gNB_NGAP.c
- Clear on RRCReconfigurationComplete (reset_delayed_action)

Closes #960
2025-11-15 21:04:55 +01:00
Guido Casati
c3ef64d292 Add PDU Session Release documentation 2025-11-15 21:04:55 +01:00
Guido Casati
ed6a25be75 Add PDU session add/remove test cases to 25 PRB RFSIM pipeline
- Enable telnet server on VNF (gNB) and UE in docker-compose.yaml
- Add new test cases for PDU session management:
  * Add PDU session via UE telnet
  * Release PDU session via telnet
  * Verify connectivity after PDU session release
- Integrate telnet commands into existing container_5g_rfsim_u0_25prb.xml pipeline
- Test cases added before undeploy step in proper execution order
2025-11-15 21:04:54 +01:00
Guido Casati
55c3cd2b31 Telnet: add ciUE command to trigger establishment of a new PDU Session 2025-11-15 21:04:53 +01:00
Guido Casati
653c0fd6d5 Telnet: add ci command to trigger NGAP PDU Session Release
This commit introduces a new telnet server command `pdu_session_release` to
manually trigger the NGAP PDU Session Release Command message from the telnet ci shell.
This is useful for integration testing of PDU session teardown behavior.

Details:
- Added `trigger_ngap_pdu_session_release()` to send NGAP_PDUSESSION_RELEASE_COMMAND
  to the RRC task, targeting the specified `gNB_ue_ngap_id`.
- The command currently releases PDU session ID 10 (hardcoded).
- Hooked into telnet shell with command: `pdu_session_release [gNB_ue_ngap_id]`

Usage example:
telnet > pdu_session_release 1
2025-11-15 21:04:53 +01:00
Guido Casati
3cfe2e265a RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU Session Release Response callback
We need to keep PDU sessions and DRBs in list until the NGAP PDU Session Release Response is sent.

* Introduced find_drb() and remove_drbs_by_pdu_session() helpers to locate
  and clean up DRBs linked to a specific PDU session
* Targeted per-session DRB removal in rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
* Ensures DRBs for unaffected PDU sessions remain intact
* Remove unused PDU_SESSION_STATUS_RELEASED status: keeping this status is no longer relevant
  since the PDU sessions are effectively removed from the RRC lists

Closes #867

Also, refactor rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND

3GPP TS 38.413 8.2.2 PDU Session Resource Release says:

> upon reception the NG-RAN node shall execute the release of the requested PDU sessions.
> For each PDU session to be released the NG-RAN node shall release the corresponding
> resources over Uu and over NG, if any.

Therefore, any PDU session in the pdusession_release_params list that is
also present in the RRC list can be set to release, regardless of its status.

The function signature was also updated along with other minor changes.
2025-11-15 21:04:50 +01:00
Guido Casati
7d5e20fd03 gtpu: cleanup unused newGtpuDeleteTunnels()
The partial-tunnel deletion API was buggy and redundant:
* e.g. It erased entries from globGtp.te2ue_mapping but never erases
  the corresponding entries from inst->ue2te_mapping[ue].bearers

All current use cases are already covered by:
* newGtpuDeleteOneTunnel() for targeted deletion
* newGtpuDeleteAllTunnels() for full cleanup

Call sites should explicitly loop over newGtpuDeleteOneTunnel()
if multiple tunnels need removal.
2025-11-15 21:04:39 +01:00
Guido Casati
a58cf178ed RRC PDU Session Release: end-to-end DRB and PDU session release
This commit implements proper PDU Session Release handling across
RRC, PDCP, F1AP, E1AP to ensure clean resource cleanup when
a PDU session is terminated.

Key changes:

NGAP:

In `rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND()`:
  * Populates E1AP Bearer Modification for each released session
  * If a CU-UP is connected, triggers `bearer_context_mod()` for PDU teardown

PDCP:
 * Added `nr_pdcp_release_drbs()` to remove all DRBs linked to a given PDU session
 * Called from `e1_bearer_context_modif()` for correct clean-up during session release

F1AP UE Context Modification:

  Replace direct RRC message transfer with F1AP UE Context Modification Request
  to properly handle PDU session release according to 3GPP TS 38.331.

  3GPP TS 38.331 `5.3.5.6.4 DRB release` says: whether or not the RLC and MAC entities associated
  with a PDCP entity are reset or released is determined by the CellGroupConfig. Thus,
  updated CellGroupConfig needs to be received by the UE. This has to be retrieved by CUCP
  from the DU. Therefore:

  After receiving an NGAP_PDUSESSION_RELEASE_COMMAND, the CUCP shall:
  1) forward (store for later) the NAS PDU to the UE, if present as per 3GPP TS 38.413, and
  2) send a UE Context Modification to the DU with the list of DRBs to release
     and the RRC container (RRCReconfiguration with NAS PDU)

  After reception of UE Context Modification Response, the list of drbs to release
  is prepared based on PDU session status PDU_SESSION_STATUS_TORELEASE
  in rrc_gNB_generate_dedicatedRRCReconfiguration and then encoded
  in drb_ToReleaseList for a new RRCReconfiguration with the new cellGroupConfig.

  Key changes:
  * rrc_gNB_generate_dedicatedRRCReconfiguration_release() now uses F1AP UE Context
    Modification Request instead of direct RRC transfer
  * Only DRBs to be released are now added to the list.
  * The ASN.1 memory allocation is entirely done in build_RRCReconfiguration_IEs
  * No longer needed to store ASN1 struct in UE context

GTP-U:
  * Previous implementation had incomplete tunnel cleanup during PDU session release
    - Missing distinction between N3 (PDU session level) and F1-U (DRB level) tunnels
    - Lack of proper DRB identification for F1-U tunnel deletion
  Major Changes:
  * GTP tunnel teardown now handled in `e1_bearer_context_modif()` using the correct
  F1 or N3 GTP instance (`newGtpuDeleteOneTunnel()`)
  * Enhanced Tunnel Deletion Logic (cucp_cuup_handler.c):
   - Separate handling for N3 tunnels (1 per PDU session) and F1-U tunnels (1 per DRB)
   - Added proper DRB identification for F1-U tunnel cleanup
   - Improved error handling with detailed logging for each tunnel deletion
   - Enhanced logging to distinguish between N3 and F1-U tunnel operations
  * New PDCP API Function (nr_pdcp_oai_api.c/h):
   - Added nr_pdcp_get_drb_ids_for_pdusession() function
   - Enables retrieval of all DRB IDs associated with a specific PDU session
   - Supports proper F1-U tunnel cleanup by providing DRB identifiers in CUUP
  * Enhanced GTP Interface (gtp_itf.cpp/h):
   - Modified newGtpuDeleteOneTunnel() to accept tunnel_type parameter
   - Improved logging to distinguish between PDU session and DRB tunnel types
   - Better error messages for tunnel deletion failures
   - Enhanced debugging information for remaining tunnels

Clean-up:
* Ensured xid tracking works consistently between PDU Session Establishment (with NAS PDU)
  and dedicated RRCReconfiguration
* Add function to release GTP-U tunnel in Bearer Context Modification Request handler
* Do not send rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE when no PDU session are to
  be released: it is sent upon completion of the RRCReconfiguration and needs to contain
  released PDU Sessions (mandatory IE), therefore it is no necessary to send it in case
  there is no PDU session to release.

Related to #867

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2025-11-15 21:04:17 +01:00
Guido Casati
a9ad90a26a Add FOR_EACH_SEQ_ARR to .clang-format 2025-11-15 21:04:16 +01:00
Guido Casati
f5239f49b0 PDCP: Increase upper DRB ID limit 2025-11-15 21:04:14 +01:00
Robert Schmidt
b57495b38d Merge remote-tracking branch 'origin/fix_NR_RLC_Config_during_RRCReestablishment' into integration_2025_w46 (!3760)
gNB: modify RLC configuration applied for SRB1 during RRCReestablishment

TS 38.331 clause 5.3.7.4 specifies to apply the configuration defined in
9.2.1 for SRB1 at UE side. This implies that the gNB also has to apply
sn_field_length = 12, but there are no implications on the other RLC
parameters.

As wrong timer values break SRB1 e.g. for long RTT NTN scenarios, this
commit switches to using the RLC timer values provided in the
configuration file. Currently we still set poll_pdu, poll_byte and
max_retx_threshold to the values defined in 9.2.1, but this can be
changed.
2025-11-15 10:54:56 +01:00
Robert Schmidt
946810e39e Merge remote-tracking branch 'origin/refactor-imscope' into integration_2025_w46 (!3748)
Refactor imscope

This MR refactors imscope by introducing changes to the default layout
in the config file imgui.ini. The global settings are moved to a new
menu item. This modified layout is intended as a suggestion subject to
change based on feedback. This MR also adds PDCCH LLR and IQ plots to
the UE scope and set axes to AutoFit by default.

The MR has a screenshot of the new layout.
2025-11-15 10:54:16 +01:00
Robert Schmidt
d3026267b3 Merge remote-tracking branch 'origin/remove-sched-response-doc' into integration_2025_w46 (!3757)
Remove schedule response and update L1 threading documentation

This merge requests removes the somewhat superfluous "schedule response"
mechanism. "schedule response" was run after running the scheduler
itself and copied various FAPI messages into a global msgDataTx
structure from which the various TX/RX jobs were triggered. It is not
necessary, though, given that the scheduler is run inside the tx_func()
(running the TX jobs of the L1), and so the scheduler output FAPI
messages can directly be read into a variable of the existing
NR_Sched_Rsp_t type. This allows to delete a couple of hundred lines of
code (while retaining functionality), and simplifies the msgDataTx type
(which is still there to trigger TX job (including the scheduler) from
the ru thread).

In short, prior, there was this call chain:

- tx_func() calls run_scheduler_monolithic() (through fptr
  NR_slot_indication())
  - get some memory through allocate_sched_response() which has enough
    space for NR_Sched_Rsp_t type variable
  - call the scheduler and fill the variable
  - call nr_schedule_response() (through fptr NR_schedule_response())
    which copies into L1: to msgDataTx for TX, to separate structures
    for RX

this is changed to

- tx_func() runs one message at a time, hence we can use memory in the
  data segment for NR_Sched_Rsp_t. It calls run_scheduler_monolithic()
  through the fptr
  - pointers into NR_Sched_Rsp_t are passed to the scheduler, which
    fills as before
  - we return, memory is in its right place and does not need an extra
    copy.

Additionally, this merge request updates documentation on threading and
cleans up some unused code along the way.
2025-11-14 22:03:01 +01:00
Jaroslava Fiedlerova
d8f5c9f103 Merge remote-tracking branch 'origin/logging-improvements' into integration_2025_w46 (!3751)
Update log header format to align log output

The new format:
- left-aligns the log header name and enforces a minimum width of 6 characters,
  padding shorter names with spaces while allowing longer names to be printed in
  full
- shortens UTC timestamp
- align function names to 32 characters

Example output:

[19:51:34.647930] [NGAP]   I (ngap_gNB_decode_initiat:100)   Handover Resource Allocation initiating message
[19:51:34.648539] [NGAP]   D (decode_ng_handover_requ:267)   AllowedNSSAI.list.count 2
[19:51:34.648586] [NGAP]   I (ngap_gNB_handle_handove:728)   Received NG Handover Request from AMF OAI-AMF (ID=1)
[19:51:34.648627] [NR_RRC] I (rrc_gNB_process_Handove:1199)  Received Handover Request (on NR Cell ID=11111111, PCI=1)
[19:51:34.648647] [NR_RRC] A (rrc_gNB_create_ue_conte:230)   [--] (cellID 0, UE ID 1 RNTI ffff) Create UE context: CU UE ID 1 DU UE ID 4294967295 (rnti: ffff, random ue id ffffffffffffffff)
[19:51:34.648659] [NR_RRC] A (set_UE_security_algos:692)     [--] (cellID 0, UE ID 1 RNTI ffff) Selected security algorithms: ciphering 0, integrity 2
2025-11-14 21:28:31 +01:00
Jaroslava Fiedlerova
517a1403b3 Merge remote-tracking branch 'origin/UE_issues' into integration_2025_w46 (!3750)
Handling newly opened UE issues

Closes #1025 #1024 #1026 #1031 #1030
2025-11-14 21:27:36 +01:00
Robert Schmidt
bd8f088ffa Update documentation FAPI 2025-11-14 18:18:44 +01:00
Robert Schmidt
0713b2f655 Rewrite doc/SW-archi-graph.md 2025-11-14 18:17:30 +01:00
Robert Schmidt
15441c741c Cleanup: move slot_parameters to where they are used 2025-11-14 18:17:30 +01:00
Robert Schmidt
aa3f01b677 Delete dead code 2025-11-14 18:17:30 +01:00
Robert Schmidt
c8fba9964f Remove dead code 2025-11-14 18:17:30 +01:00
Robert Schmidt
5ac381dd59 Remove dead code 2025-11-14 18:17:29 +01:00
Robert Schmidt
eefb9da69a Reimplement nFAPI message exchange after msgDataTx removal
Reimplement nFAPI message exchange between L1 and L2 following the
changes in parent commit removing msgDataTx.

Avoid direct calls and use NR_IF_module fptrs to avoid linking problems.
allowing to remove some function definitions that are not needed.
2025-11-14 18:16:02 +01:00
Robert Schmidt
2bea71a80a Avoid use of FAPI message buffers in msgDataTx
Note: after this commit, monolithic works but nFAPI operation is broken
and fixed in the next commit, to keep the changes small(er). All
simulators work.

This commit removes the use of msgDataTx's intermediate buffers for FAPI
messages and the call of the "Schedule response". The latter incurs an
additional copy of FAPI messages for the TX chain (for the RX chain, it
is and will remain there) which we can avoid.

Instead, it uses an NR_Sched_Rsp_t-typed variable sched_response to
store the results of the scheduler when called from tx_func(). Thus, the
scheduler remains unchanged (it gets a pointer to where to put FAPI
messages), but we don't call nr_schedule_response() to then copy FAPI
messages into the L1, but have them in a local variable sched_response.
sched_response on on the data segment, as it is big and would overflow
the stack; at the same time, this is ok because only one tx_func() runs
at a time.

Since we don't use allocate_sched_response() anymore, we don't need
deref_sched_response().

clear_slot_beamid() is moved to tx_func(), as it was called in
nr_schedule_response().

Since the "intermediate" NR_gNB_DLSCH_t structure groups both the
DL_tti_pdsch and TX_data.req structures, a pointer has been created to
point to pdsch_pdu. This affects a number of simulators, as they have to
put some messages on the stack:

- nr_dlschsim: put the corresponding variable on the stack
- nr_pbchsim: a new array for the SSB PDUs has been introduced

Further, these changes are now necessary:

- nr_dlsim:  there were variables "rel15" and "pdsch_pdu_rel15" that
  point to the same PDSCH PDU. At least "rel15" would not exist, as the
  corresponding pointer is now populated in phy_procedures_gNB_TX(), and
  we therefore refer to the single PDSCH PDU variable with
  "pdsch_pdu_rel15", but at the place where "rel15" used to be
  initialized.
- nr_ulsim: use nr_save_ul_tti_req() to load PDUs into the RX chain
  instead of nr_schedule_response(), which does not exist anymore.
2025-11-14 18:16:00 +01:00
Robert Schmidt
e17c165c9d Move DLSCH/PDSCH variables to gNB
The next commit will remove msgDataTx. We can therefore not use
msgDataTx to retain the PDSCH/DLSCH variables, and move them to the gNB.

Note that the only reason for NR_gNB_DLSCH_t after this commit is to
hold various large buffers (c, b, f). Future work could be done to
remove this, in which case the array inside PHY_VARS_gNB could be
deleted.

On this occasion, clean up the use of init_DLSCH_struct() and
reset_DLSCH_struct() (renamed destroy_DLSCH_struct()) and centralize
their call in phy_init_nr_gNB()/phy_free_nr_gNB(), and correct
simulators accordingly.
2025-11-14 18:14:02 +01:00
Thomas Schlichter
eb7ca9663c gNB: modify RLC configuration applied for SRB1 during RRCReestablishment
TS 38.331 clause 5.3.7.4 specifies to apply the configuration defined in 9.2.1 for SRB1 at UE side.
This implies that the gNB also has to apply sn_field_length = 12, but there are no implications on the other RLC parameters.

As wrong timer values break SRB1 e.g. for long RTT NTN scenarios, this commit switches to using the RLC timer values provided in the configuration file.
Currently we still set poll_pdu, poll_byte and max_retx_threshold to the values defined in 9.2.1, but this can be changed.
2025-11-14 17:49:02 +01:00
Thomas Schlichter
8620f33a58 Provide public helper functions to create NR_RLC_Config from nr_rlc_configuration_t 2025-11-14 17:46:17 +01:00
francescomani
789564fa8e add UE capability container for each element of request list (issue #1025) 2025-11-14 17:40:19 +01:00
francescomani
9c3c65f5c9 check presence of optional nonCriticalExtension before handling (issue #1026) 2025-11-14 17:40:19 +01:00
francescomani
88baba8948 do not handle not decoded cellGroupConfig (issue #1031) 2025-11-14 17:40:19 +01:00
francescomani
566da5317f add a check for cell ID presence in handling reconfigurationWithSync 2025-11-14 17:40:19 +01:00
francescomani
f4ff6c756c add a check for rlc-Config presence (even if it should be mandatory at setup) 2025-11-14 17:40:16 +01:00
Jaroslava Fiedlerova
a451675937 Merge remote-tracking branch 'origin/improve-readability-phy_procedures_gNB_uespec_RX' into integration_2025_w46 (!3707)
Cleanup phy_procedures_gNB_uespec_RX

phy_procedures_gNB_uespec_RX is too long function with too long lines of code,
this commit only shorten lines and improve a bit the readability
2025-11-14 17:28:17 +01:00
Jaroslava Fiedlerova
304c3ef9c4 Merge remote-tracking branch 'origin/mac-e2-ci' into integration_2025_w46 (!3752)
[MAC] Add UL total/used aggregated MAC stats; [E2 agent] Properly calculate
used UE PRBs in KPM; [CI] Simplify and improve the Undeploy_Object() and
implement Stop_Object()

- Create common dlul_mac_stats_t struct for both DL and UL total/used aggregated
  PRBs
- Use correct unit [%] for RRU.PrbTotDl and RRU.PrbTotUl , instead of [PRBs]
- Use correct unit [Mb] for DRB.PdcpSduVolumeDL and DRB.PdcpSduVolumeUL [kb]
- Implement Stop_Object() (docker compose stop = SIGTERM)
- Simplify the Undeploy_Object() function
- Improve the logging for Deploy/Undeploy_Object() functions
- OAI-FlexRIC CI: properly stop all the containers (one by one or a subgroup of
  running containers), and rename oai-flexric to nearRT-RIC container
2025-11-14 17:25:25 +01:00
Jaroslava Fiedlerova
b7d867ead6 Merge remote-tracking branch 'origin/2l-ul-aerial' into integration_2025_w46 (!3755)
CI: Increase tested UL throughput on Aerial pipeline using 2L UL

The goal of this MR is to activate the use of 2-layer uplink by enabling SRS
and to increase the tested UL throughput in CI.
2025-11-14 17:24:39 +01:00
Robert Schmidt
875ec96fce When logging function names, align to 32 characters 2025-11-14 17:09:07 +01:00
Robert Schmidt
ea1aa382c3 Update log header format to improve visual alignment
The new format left-aligns the component name and enforces a minimum width
of 7 (log component) characters, padding shorter names with spaces after
the closing "]".

Example output:

    [14:05:43.395376] [E1AP]   I releasing UE 1
    [14:05:43.395400] [GTPU]   I [91] UE ID 1: Delete all tunnels (1 tunnels)
    [14:05:43.395414] [NR_RRC] A [DL] (cellID bc614e, UE ID 1 RNTI 8e27) Send RRC Release
    [14:05:43.395431] [RRC]    I UE 1: received bearer release complete
    [14:05:43.424551] [RLC]    W Remove UE 36391
    [14:05:43.424597] [NR_RRC] I removed UE CU UE ID 1/RNTI 8e27
    [14:05:43.424773] [NR_RRC] A [--] (cellID bc614e, UE ID 1 RNTI 8e27) Remove UE context
    [14:05:43.425205] [NR_MAC] I Remove NR rnti 0x8e27
    [14:05:43.582158] [HW]     W Lost socket
    ^C
    ** Caught SIGTERM, shutting down
    Returned from ITTI signal handler
    [14:05:43.948721] [GNB_APP] I stopping nr-softmodem
    [14:05:43.948746] [PHY]    I Killing gNB 0 processing threads
    [14:05:44.574818] [PHY]    I Stopping RU 0 processing threads
    [14:05:44.575000] [PHY]    I RU 0 RF device stopped
    [14:05:44.575006] [GNB_APP] I turned off RU rfdevice
2025-11-14 17:05:49 +01:00
Robert Schmidt
7f57019128 log: Only print one space if no level selected
Prior to this change, when no "level" option is given to the logging
module, we see

    [PHY]   RU 0 RF started cpu_meas_enabled 0
    [HW]   No connected device, generating void samples...

with three spaces, which is too much. This change reduces the amount of
spaces to 1 without log level.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-11-14 16:01:07 +01:00
Robert Schmidt
090cf00c76 Simplify logging UTC option to only show time
We probably almost never care about the date, but it takes a lot of
space. Remove it; if somebody needs the full time stamp including the
date, we could still add it with a new option.
2025-11-14 15:26:05 +01:00
Teodora
6a6588e9cb OAI-FLEXRIC-RAN-Integration-Test CI pipeline
1. Rename oai-flexric to nearRT-RIC. FlexRIC is a project combining nearRT-RIC, xApps, and E2 agent emulators.
2. Instead of undeploying all the containers at the same time, and not checking the logs for xApps and nearRT-RIC, do the following:
- Stop containers (docker compose stop) - one or subgroup of running containers in the following order:
   a) xapp-kpm-moni
   b) xapp-kpm-rc
   c) xapp-gtp-mac-rlc-pdcp-moni
   d) oai-nr-ue oai-nr-ue2
   e) oai-gnb
   f) nearRT-RIC
- Undeploy containers (docker compose down), collect and analyze all the logs.
2025-11-14 14:57:12 +01:00
Robert Schmidt
81680e29a9 Implement StopObject()
For some test cases, we might want to stop a service earlier. This
functionality is done by StopObject().

Test log collection is still done by UndeployObject(), which will
collect the logs of all services (at that point, stopped or not).
2025-11-14 14:57:12 +01:00
Robert Schmidt
de8d0991ec Remove services to be undeployed from XML files
In all these cases, the intention is to undeploy all services.
Correspondingly, remove the services from the XML to avoid any
ambiguity.
2025-11-14 14:57:12 +01:00
Robert Schmidt
ddcb216a35 Improve logging in CI Undeploy/DeployObject()
Consistently print requested services (if applicable)
and outcome of the step.
2025-11-14 14:57:12 +01:00
Robert Schmidt
247e908b6e Simplify UndeployObject() and GetDeployedObjects()
GetRunningServices() was returning all services, running or stopped.
Hence, rename to reflect what this function does, and rewrite slightly
to better capture what is actually happening. Also, don't return the
container ID, as we don't use it.

Call stop on all services, as we will down the deployment right after.
The list of services is still used to retrieve logs.

Remove a stray "return False", which would sometimes prevent us from
seeing all error messages.
2025-11-14 14:57:11 +01:00
Jaroslava Fiedlerova
603fc23113 Merge remote-tracking branch 'origin/ue-fixes' into integration_2025_w46 (!3745)
Collection of small fixes

A few fixes needed while testing FHI libraries
- set subcarrier spacing in PUSCH PDU in NRUE
- a set of two LOG_Ds that prints out the PUSCH allocation on gNB & UE
2025-11-14 12:34:59 +01:00
Jaroslava Fiedlerova
3a1d8afd3b Merge remote-tracking branch 'Rakesh_B_B/develop' into integration_2025_w46 (!3722)
[NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure

This PR fixes issue #1012 , a data type issue related to the AMF Set ID used
during UE RRC reestablishment. The AMF Set ID was mistakenly declared as uint8_t
instead of uint16_t, even though it is a 10-bit field as specified in 3GPP TS
23.003 section 2.10.1. As a result, AMF Set IDs greater than 255 were truncated,
leading to failed AMF lookups and the following warning: No matching AMF found
for PLMN (MCC=%03d MNC=%0*d) and AMF SetID=%u.
Verified reestablishment succeeds with AMF Set IDs >255.
2025-11-14 12:29:19 +01:00
Robert Schmidt
8d2a5c6fd6 First slot indication makes no sense: tx thread should trigger 2025-11-14 12:25:05 +01:00
Robert Schmidt
2be5ff361f Don't use msgTx inside nr_dlsch_encoding() and nr_generate_pdsch()
A later commit will remove "msgTx" altogether. Push it out from L1
functions.
2025-11-14 12:25:05 +01:00
Robert Schmidt
751cab3d89 Simplify DLSCH: only one codeword supported 2025-11-14 12:25:05 +01:00
Robert Schmidt
2b2b3cd347 Simplify gNB DLSCH type
DLSCH encoding is not concerned with HARQ processes directly. Instead,
it gets the redundancy version and encodes a specific redundancy version
for a given TB. The rest is up to the MAC, the L1 is stateless in that
regard. Hence, remove the HARQ type and put it into DLSCH, which also
simplifies the code elsewhere.
2025-11-14 12:25:05 +01:00
Robert Schmidt
09e0344b5b Remove unused computation
unav_res is already computed in nr_generate_pdsch(), and then used
inside of nr_dlsch_encoding() right after.
2025-11-14 12:25:05 +01:00
Robert Schmidt
c06033697c Remove unused or write-only variables 2025-11-14 12:25:05 +01:00
Robert Schmidt
62333cd3cf Refactor csi-rs handling
Similarly to the parent commit, simplify the array type to the FAPI PDU
towards further refactoring, and encapsulate the code in a function for
easier reuse in a later refactoring step.

Note on ZP-CSI: after this commit, we continue treating CSI PDUs. The
prior code was returning, which I think is wrong (as this information is
only for the currently treated CSI-RS PDU).
2025-11-14 12:25:05 +01:00
Robert Schmidt
d0f4997aa0 Remove msgTx->ssb and replace with normal array
There is no point in tracking the "active" state: the SSB PDU will be
sent from MAC to L1, encoded, and then "discarded" (by marking the
number of SSB PDUs as 0). Hence, remove this intermediate type.
2025-11-14 12:25:05 +01:00
Robert Schmidt
bae9e0f1e8 Rewrite nr_generate_dci_top() without msgTx and shorter 2025-11-14 12:25:05 +01:00
alexjiao
19301afcb1 Fix bug for SRS generation when freqDomainShift (n_shift) is not 0
According to TS 38.211 section 6.4.1.4.3, the frequency domain shift value n_shift
is from higher-layer parameter freqDomainShift.
The quantity n_RRC is given by higher-layer parameter freqDomainPosition.
Also corrected k_0_overbar_p calculation formula to align with standard.
2025-11-14 19:21:19 +08:00
Guido Casati
228ca89f3e Fix GTP-U TEID logging: prevent negative values and use hexadecimal format
Problem:
- GTP-U logs showed negative TEID values (e.g., -1943516315) due to signed/unsigned
conversion. Due to wrong conversion from uint32_t to int and overflow caused negative values.
- TEID values were inconsistently formatted across different log statements, due to
mixed use of %d, %u, %x formats for TEID logging. Made debugging and troubleshooting difficult

Changes:
1. Fixed signed/unsigned conversion bug: use teid_t. Prevents overflow when TEID values exceed int range.
2. Standardized TEID logging format: all TEID values now use '0x%x' hexadecimal format.
   Consistent 'TEID' capitalization throughout
2025-11-14 11:18:20 +01:00
Guido Casati
c5b21d42a4 OAI UE: set RLC entity status to false when releasing entity in nr_rrc_manage_rlc_bearers
The previously introduced function rrc_release_rlc_entity has been
adopted to deactvate the RLC entities after release.
2025-11-14 11:18:20 +01:00
Guido Casati
3445d3bb12 OAI UE: add reusable function to release RLC entity 2025-11-14 11:18:20 +01:00
Jaroslava Fiedlerova
de744ddf35 Enable 2 layers and increase tested UL throughput in Aerial UL heavy test 2025-11-13 20:46:06 +00:00
Guido Casati
1f313db051 RRC: add only DRBs to add/mod in createDRBlist
Do not add PDU Session with status higher than PDU_SESSION_STATUS_TOMODIFY
which means, do not add "failed" or "to release" PDU Sessions.
2025-11-13 21:40:14 +01:00
Guido Casati
be9e798749 E1AP: Add PDU Session Resource To Remove List to Bearer Context Modification enc/dec
According to TS 38.463 - clause 9.2.2.4 and 9.3.3.12.
Also, fix response message by encoding choice IE only
with presence of modified PDU sessions.

Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
2025-11-13 21:40:09 +01:00
Robert Schmidt
34aa69828a Harmonize UL PDCCH PDU type for further refactoring
Both (DL) PDCCH and UL PDCCH PDU types are fundamentally of the same
type, so correct the array's type to facilitate refactoring later (a
later commit will reuse a single "generate DCI" function for both
cases).
2025-11-13 19:41:11 +01:00
Robert Schmidt
4b91022387 Pass read-only parameters as const 2025-11-13 19:41:11 +01:00
Robert Schmidt
8cf7dd8607 CI: use intermediate variable for YAML file
This harmonizes with DeployObject() (which uses the same variable) and
shortens some lines for readability.
2025-11-13 14:33:35 +01:00
Jaroslava Fiedlerova
122bda995e Merge remote-tracking branch 'origin/fix_mac_ta_with_meas_gaps' into integration_2025_w46 (!3753)
gNB: fix MAC TA command scheduling if measurement gaps are configured

In the current implementation, if UE transmission is interrupted via
nr_mac_interrupt_ue_transmission(), UE_sched_ctrl.ta_frame is modified to be
the previous frame avoiding TA scheduling in the measurement gap. So the next
scheduled TA is shifted to be in 99 frames. As there are other measurement gaps
before that, the scheduled TA is always shifted, but actually never reached,
effectively disabling the MAC TA commands.

To fix this, UE_sched_ctrl.ta_frame is changed to not indicate the last TA
command transmission, but the next one. This allows to check in
nr_mac_interrupt_ue_transmission() if the next TA command transmission is within
the measurement gap and if so shift it to just after that gap.
2025-11-13 14:17:55 +01:00
Jaroslava Fiedlerova
80ff56c6c7 Merge remote-tracking branch 'origin/dci_alt_size_fix' into integration_2025_w46 (!3729)
DCI 00 alt size fix

DCI size for format 00 and 10 should be equal so we need to compute the size of
the alternative format when computing the size of DCIX0. There was a bug where
the alt_size input (0 in that case) was taken into account also when computing
that alternative size, resulting in an alt_size of 0. Possibly easier to
understand by looking at the code then reading this description.
2025-11-13 14:16:40 +01:00
Teodora
b6bda6d974 RIC IP address within fr_args_t struct is not const anymore
Related FlexRIC commit ID: fd26e7474d
2025-11-13 11:58:11 +01:00
Teodora
e96cfbd88a Update the FlexRIC submodule
Needed notably due to https://gitlab.eurecom.fr/mosaic5g/flexric/-/merge_requests/68.
2025-11-13 11:58:11 +01:00
Teodora
f88b93d147 Use the correct unit for PDCP SDU volume: [Mb] instead of [kb] 2025-11-13 11:58:11 +01:00
Teodora
d0a582e73d Implement E2 node level stats
For now, only DL/UL MAC stats.

This commit fixes the "RRU.PrbTotDl" and "RRU.PrbTotUl" measurement calculation
to align with the TS 28.552 specifications.
2025-11-13 11:58:11 +01:00
Robert Schmidt
021b546cf3 Add UL mac stats and create a common struct for both DL and UL
DL stats (aggregated total and used PRBs) previosuly used only for O1 interface,
now finds the purpose for E2 interface as well.

New UL stats (aggregated total and used PRBs) serve for E2 interface only.

Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2025-11-13 11:58:09 +01:00
Robert Schmidt
17ee9db072 MAC: total_prb_aggregate: collect over carrierBandwidth 2025-11-13 11:57:12 +01:00
Jaroslava Fiedlerova
0954c3f6cf Merge remote-tracking branch 'origin/sdap-header-bugfix' into integration_2025_w46 (!3747)
SDAP: guard RX header parsing with enable_sdap and init per-entity

!3519 (merged) refactored the SDAP to use the QFI from the header rather than
pass it to the rx function and got rid of the initialization of QFI to -1.

However, entity roles are stored into the drb2qfi table, and the indexing
implies that the QFI is known.

While in TX it is not an issue since packets are forwarded based on the QFI,
in RX the QFI can only be parsed from the header, therefore if headers are
disabled (--enable_sdap) the QFI is not there and it is wrong to access the
header (buf[0]) and looking for it.

This commit adds enable_sdap to nr_sdap_entity_t and initialize it in
nr_sdap_add_entity() from sdap->role (disabled when NO_SDAP_HEADER).

In nr_sdap_rx_entity(), only parse buf[0] for QFI and derive sdap_ul_rx/
sdap_dl_rx when enable_sdap is true; otherwise, keep offset=0 and forward
payload unchanged.
2025-11-12 21:56:22 +01:00
Jaroslava Fiedlerova
0d106428eb Merge remote-tracking branch 'origin/nr_fix_duplex' into integration_2025_w46 (!3666)
NTN: Fixing variable ULDLduplex issue for NTN bands

- Duplex is assumed to be static but for NTN bands (and also for some non NTN
  bands), it is not static.
- Tx-RX Duplex is defined in section 5.4.4 of 38.101-5 (for NTN) specs v1809
- For example: In NTN-OTA testing, the GEO satellite operator configured in
  band 256 the DL, UL frequencies with duplex of 185Mhz.
2025-11-12 21:54:54 +01:00
Robert Schmidt
383c94311e Pass big struct through pointer 2025-11-12 15:38:22 +01:00
Robert Schmidt
27203c9504 Remove useless function definitions
Unused code
2025-11-12 15:38:20 +01:00
Robert Schmidt
6471d91e2a Correct PNF config: sl_ahead to 2
Using nFAPI introduces additional delays. At the same time, RFsim does
not run in real-time, and we can allow a low sl_ahead, as RFsim will
"wait" for the gNB.

Therefore, reduce sl_ahead to ensure that the response window does not
run out during handling of RA in nFAPI.
2025-11-12 15:16:48 +01:00
Reem Bahsoun
4cc6275a7d Update XML file to increase tested DL and UL throughput for CI. 2025-11-12 14:46:22 +01:00
Jaroslava Fiedlerova
afa55ff951 Merge remote-tracking branch 'origin/fix_nr_ue_ssb_sinr_reporting' into integration_2025_w46 (!3754)
NR UE: correctly provide measured SSB SINR value from PHY to MAC

Fixes: e5ea77f6
2025-11-12 12:40:41 +01:00
Reem Bahsoun
561fbf5636 Modify aerial config file to improve UL throughput when using 2L layer. 2025-11-12 10:29:49 +01:00
Thomas Schlichter
4057cdaa80 NR UE: correctly provide measured SSB SINR value from PHY to MAC
Fixes: e5ea77f629
2025-11-11 15:23:27 +01:00
Thomas Schlichter
8124203481 gNB: fix MAC TA command scheduling if measurement gaps are configured
In the current implementation, if UE transmission is interrupted via nr_mac_interrupt_ue_transmission(),
UE_sched_ctrl.ta_frame is modified to be the previous frame avoiding TA scheduling in the measurement gap.
So the next scheduled TA is shifted to be in 99 frames. As there are other measurement gaps before that,
the scheduled TA is always shifted, but actually never reached, effectively disabling the MAC TA commands.

To fix this, UE_sched_ctrl.ta_frame is changed to not indicate the last TA command transmission, but the
next one. This allows to check in nr_mac_interrupt_ue_transmission() if the next TA command transmission
is within the measurement gap and if so shift it to just after that gap.
2025-11-11 15:20:18 +01:00
Nada Bouknana
1d235ce6fa modify the default imscope docking layout from imgui.ini 2025-11-11 14:38:30 +01:00
Nada Bouknana
05570bb8d8 move global scope settings to a menu item 2025-11-11 14:06:31 +01:00
Nada Bouknana
530812ff38 add ImPlotAxisFlags_AutoFit flag to enable autofitting by default in imscope plots 2025-11-11 14:04:33 +01:00
Nada Bouknana
f9ca8431c0 add PDCCH IQ and LLR plots to the UE scope 2025-11-11 13:58:43 +01:00
francescomani
c47ddc570f add check for CellGroup decoding at RRC UE (issue #1024) 2025-11-08 14:34:41 +01:00
Guido Casati
7274e7c434 SDAP: guard RX header parsing with enable_sdap and init per-entity
!3519 refactored the SDAP to use the QFI from the header rather
than pass it to the rx function and got rid of the initialization
of QFI to -1.
However, entity roles are stored into the drb2qfi table, and the
indexing implies that the QFI is known. While in TX it is not an
issue since packets are forwarded based on the QFI, in RX the QFI
can only be parsed from the heaedr, therefore if headers are
disabled (--enable_sdap) the QFI is not there and it is wrong to
access the header (`buf[0]`) and looking for it.

This commit adds `enable_sdap` to `nr_sdap_entity_t` and initialize
it in `nr_sdap_add_entity()` from `sdap->role`
(disabled when `NO_SDAP_HEADER`). In `nr_sdap_rx_entity()`, only
parse `buf[0]` for QFI and derive `sdap_ul_rx`/`sdap_dl_rx` when
`enable_sdap` is true; otherwise, keep `offset=0` and forward
payload unchanged.
2025-11-06 19:33:46 +01:00
Jaroslava Fiedlerova
8186e840a3 Merge branch 'integration_2025_w45' into 'develop'
Integration `2025.w45`

* !3736 fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding
* !3743 NR UE: fix PDCCH LLR indexing for different search space RB sizes
* !3739 Bugfix: save old tunnel info to remain the user plane connection while rolling back to source DU due to handover failure
* !3742 Simplify node management in CI, handle SIGINT
* !3670 PRS bug fix and CI Integration
* !3746 Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin' threads to CPUs
* !3738 CI: Add new Jenkinsfiles

Closes #984 and #1021

See merge request oai/openairinterface5g!3744
2025-11-06 16:12:28 +00:00
Jaroslava Fiedlerova
4b8889b95c Merge remote-tracking branch 'origin/ci-add-jenkinsfiles' into integration_2025_w45 (!3738)
CI: Add unified Jenkinsfile for all test pipelines

This MR introduces a single Jenkinsfile to cover all current CI test pipelines
Improvements:
- correct reporting of the start timestamp in the HTML report
- harmonize log collection - always collect as test_logs_${env.BUILD_ID}.zip
2025-11-06 15:32:58 +01:00
Jaroslava Fiedlerova
95e9f4a47c Use a single Jenkinsfile
Combine Jenkinsfile and Jenkinsfile-oc from parrent commit into a single
file.
2025-11-06 13:21:08 +01:00
Jaroslava Fiedlerova
7a233de745 Merge remote-tracking branch 'origin/Fix_thread_affinity' into integration_2025_w45 (!3746)
Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin'
threads to CPUs

By default, 'L1_rx_thread_core', 'L1_tx_thread_core', 'ru_thread_core' are set
to '-1' but the values were decoded from config file as unsigned instead of
signed types, thus, it was not allowing to set them with '-1' from config file.
2025-11-06 13:14:03 +01:00
Laurent THOMAS
3f27ae26ae C code cleaning, no change 2025-11-06 12:51:50 +01:00
Jaroslava Fiedlerova
50e32cfea5 Merge remote-tracking branch 'origin/prs_bug_fix_and_integrate_to_ci' into integration_2025_w45 (!3670)
PRS bug fix and CI Integration

- Fix the bug in PRS channel estimation while copying memory to compute the
  impulse response
- Integrate PRS testing to CI
2025-11-06 09:36:03 +01:00
Jaroslava Fiedlerova
654e819d90 Merge remote-tracking branch 'origin/cleanup-ci-node' into integration_2025_w45 (!3742)
Simplify node management in CI, handle SIGINT

- Make a single <node> XML step entry common to all XML steps to harmonize code
- Handle SIGINT to make it possible to more easily stop the CI script.
2025-11-06 09:33:04 +01:00
Jaroslava Fiedlerova
5b2b570dfe Merge remote-tracking branch 'origin/fix-up-ho-fail' into integration_2025_w45 (!3739)
Bugfix: save old tunnel info to remain the user plane connection while rolling
back to source DU due to handover failure

This MR closes issue #984 that UE lost the data plane connection while rolling
back to the source DU due to handover failure.
2025-11-06 09:32:21 +01:00
Jaroslava Fiedlerova
89fbe3c783 Merge remote-tracking branch 'origin/issue-1021' into integration_2025_w45 (!3743)
NR UE: fix PDCCH LLR indexing for different search space RB sizes

After !3603 (merged), when multiple search spaces have different CORESET
configurations (different number of RBs), the LLR buffer stride must be
calculated based on the maximum RB size across all search spaces, not the
current search space's RB size.

The LLR buffer is allocated with size based on get_pdcch_max_rbs(), but the
demapping function was using coreset_nbr_rb (current search space) for symbol
stride calculation, causing incorrect LLR extraction when search spaces have
different RB configurations.

This MR tries to fix it.

Closes #1021
2025-11-06 09:29:54 +01:00
Bartosz Podrygajlo
ac93fe590c Fix NR UE MAC not setting subcarrier_spacing field in PUSCH PDU
Set the subcarrier_spacing field in nfapi_nr_ue_pusch_pdu_t from MAC
to PHY. This has no consequence for the NR UE Softmodem operation as this
field is never read, but prevents a potential future bug in case L1 was
modified to read it.
2025-11-06 07:42:47 +01:00
luis_pereira87
cf507115e4 Fix unsigned to signed decoding parameters to allow for 'no affinity'/'no pin' threads to CPUs
By default, 'L1_rx_thread_core', 'L1_tx_thread_core', 'ru_thread_core' are set to '-1' but the values were decoded from config file as unsigned instead of signed types, thus, it was not allowing to set them with '-1' from config file
2025-11-05 20:51:02 +00:00
Bartosz Podrygajlo
d2c191b0ea Add two LOG_Ds to debug PUSCH allocations 2025-11-05 16:34:21 +01:00
Laurent THOMAS
db09f50ae4 phy_procedures_gNB_uespec_RX is too long function with too long lines of code, this commit only shorten lines and improve a bit the readability 2025-11-05 12:03:17 +01:00
Robert Schmidt
d4aac07ae9 Remove write-only code 2025-11-05 11:13:31 +01:00
Jaroslava Fiedlerova
c625a95042 CI: add rfsim test with PRS
Use the bash script from a parent commit to verify PRS functionality.
2025-11-05 10:42:37 +01:00
Rakesh Mundlamuri
871b813c12 Modify the script with a retry logic for a failed test and print summary
This commit inputs several distances at once and obtain the summary of
successful and failed tests. We look for the number of successful tests
that are geater than 0. We do that here since we sometimes dont receive
a response for a telnet command from the rfsim although the command
is applied. This is related to the queing telnet commands in the rfsim.

The script for the distances 50, 100 and 150 are called as follows,

./set-and-verify-distance-prs.sh 50 100 150

The summary can be viewed as follows,
==================== SUMMARY ====================
Total tests run : 3
Successful tests: 3
Failed tests    : 0
=================================================
2025-11-05 10:42:37 +01:00
Jaroslava Fiedlerova
0d2212ca38 CI: Extend Custom_Script to accept arguments 2025-11-05 10:42:37 +01:00
rakesh mundlamuri
1dca20ba85 Introduce a bash script to test PRS using estimated ToA
Set RFsim (DL) distance and use PRS to estimate the new distance. This
is verified by comparing the distance set in RFsim with the distance
reported through ToA estimation at the UE.

Note that since RFsim telnet output is asynchronous (it uses a queue
internally), we use grep --max-count 1 to wait for the matching line,
together with ncat --idle 0.3 to keep ncat open for some time. The
--max-count option will terminate grep after the first occurrence. For
this to work reliably, we need to use grep <(echo | ncat) as opposod to
simply echo | ncat | grep, as the latter does not seem to reliably
make grep exit after the occurrence.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-11-05 10:42:37 +01:00
Robert Schmidt
34e002a800 Add get_max_dl_toa() for ciUE telnet module 2025-11-05 10:42:37 +01:00
Robert Schmidt
d682b6c512 Add function to read max DL ToA
Protect with mutex to allow reading from another thread.
2025-11-05 10:42:37 +01:00
Robert Schmidt
b95b4c09d6 Write DL ToA into circular buffer
In a future commit, we will look up the maximum ToA over the last
transmissions. Introduce a buffer in which we write the last
16 measurements.
2025-11-05 10:42:34 +01:00
Jaroslava Fiedlerova
c54b20a56d Merge remote-tracking branch 'origin/bug-scope-pdcch' into integration_2025_w45 (!3736)
fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding

fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not
processing useless samples in one symbol
2025-11-05 09:13:52 +01:00
alexjiao
7655604d3c NR UE: fix PDCCH LLR indexing for different search space RB sizes
When multiple search spaces have different CORESET configurations
(different number of RBs), the LLR buffer stride must be calculated
based on the maximum RB size across all search spaces, not the
current search space's RB size.

The LLR buffer is allocated with size based on get_pdcch_max_rbs(),
but the demapping function was using coreset_nbr_rb (current search
space) for symbol stride calculation, causing incorrect LLR extraction
when search spaces have different RB configurations.
2025-11-05 00:46:31 +08:00
Chieh-Chun Chen
579d263a9c Bugfix: save old tunnel info to remain the user plane connection while rolling back to source DU due to F1 handover failure 2025-11-04 16:03:41 +01:00
Robert Schmidt
f7eaafa835 CI test runner: handle SIGINT
Handle SIGINT and mark any subsequent steps as failed. Receiving SIGINT
a second time will abort the script immediately (as is the case before
this commit).

Note that Python seems to relay the signal to the "controlled" process
(e.g., Ping), which would return immediately with an error. So some
steps like Ping will abort immediately, others (e.g., IdleSleep) will
finish their step, and then the present logic will mark subsequent steps
as failed.
2025-11-04 00:14:27 +01:00
Laurent THOMAS
ab14e3ad22 move all antennas comon code of begining of nr_pdcch_channel_estimation to prepare the future move of the antenna loop above the serial call of functions to decode pdcch 2025-11-03 20:33:20 +01:00
Laurent THOMAS
f982d9b5df rename a function to what it does (it generate a reference signal) and minor readability changes 2025-11-03 20:24:37 +01:00
Laurent THOMAS
032fc5e9c2 fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not processing useless samples in one symbol 2025-11-03 20:16:41 +01:00
Robert Schmidt
19c6d20b45 Bugfix: "or None" is useless
"or None" would assign if the first term is false-y. But not specifying
it would already lead to the variable being set to None.
2025-11-03 18:53:00 +01:00
Robert Schmidt
b0106f27b5 Centralize node for all XML steps
All XML steps take a single node. We can thus "centralize" reading this
parameter in the main loop and pass it to ExecuteActionWithParam().
2025-11-03 18:48:55 +01:00
Robert Schmidt
9e0540fbed Simplify node management in CI
Some CI tasks/commands like Iperf(), Ping() get multiple nodes (via XML
parameter "nodes") to potentially run UEs on different nodes (hosts) at
the same time. However, I argue that this is not good:

- we don't actually use this -- where we specify multiple UEs, it's
  always "localhost localhost..."
- it is inconsistent, as we typically have a single "node", not nodes,
  and there is a possibility to harmonize (see also next commit)
- if we needed it, there would be better ways to achieve the same.
  First, for hardware-based UEs, the ci_infra.yaml can specify different
  UEs. For simulated UEs, it would be feasible to have multiple XML
  steps run in parallel, e.g., in the XML <parallel> tag, which would
  clarify that multiple UEs on different hosts run in parallel
- it reduces code.

Hence, make a single <node> for these XML steps.
2025-11-03 18:46:32 +01:00
Robert Schmidt
a5689f5b8c CI: Remove unused code 2025-11-03 18:46:00 +01:00
Jaroslava Fiedlerova
b8e249fc4a CI: Add new Jenkinsfiles
Created Jenkinsfiles:
- Jenkinsfile: for stadard test pipelines
- Jenkinsfile-oc: for deployments with OC

These 2 Jenkinsfiles covers all current test pipelines.
2025-11-03 14:01:44 +01:00
Robert Schmidt
a72abe3cc8 Refactor dl_toa setting to separate function 2025-11-03 16:50:27 +05:30
rakesh mundlamuri
825c6803ad harmonize IQ samples in prs channel estimation to use c16_t 2025-11-03 16:50:27 +05:30
rakesh mundlamuri
5690aa0fe3 first_half index correction in PRS channel estimation while copying memory
Previously, we were using int16_t for the variable ch_tmp which was later harmonized to use c16_t while leaving <<1. This introduced the bug while accessing the address of the element at first_half of the ch_tmp variable.
2025-11-03 16:50:27 +05:30
Jaroslava Fiedlerova
f9b4fe6a94 Merge branch 'integration_2025_w44' into 'develop'
Integration `2025.w44`

* !3721 improvements in formatting and LOGs in DMRS common functions at MAC
* !3725 Handle GTP receiver errors, fix memory leaks, add CU-UP test
* !3726 fix for CSI payload sizes in PUCCH structure at UE
* CI: Adjust attenutation for HO setup
* !3728 Fix for scenario with no CSI report configured for CSI-RS
* !3731 CI: ensure clean iperf3 server startup
* !3592 Refactor PRACH handling at the gNB
* !3682 Refactor DLSCH scheduler
* !3733 Clarify whitespace
* !3706 Change registry name env var content

Closes #1015 and #1014

See merge request oai/openairinterface5g!3727
2025-10-31 15:55:42 +00:00
Jaroslava Fiedlerova
5a6d253863 Merge remote-tracking branch 'origin/changeRegName' into integration_2025_w44 (!3706)
Change registry name env var content

Currently setting REGISTRY="" in a .env file results in docker failing to find
/image-name:tag. This corrects that, so it looks for local images named
image-name:tag.
2025-10-31 16:07:34 +01:00
Jaroslava Fiedlerova
aff3c9872f CI: align REGISTRY env var with updated image path format
Following the change to use:
  image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb}:${TAG:-develop}
the REGISTRY variable must now include the trailing slash.
2025-10-31 15:20:34 +01:00
Nick Hedberg
e4812c3d8e Allow for null-string REGISTRY names 2025-10-31 15:20:20 +01:00
Robert Schmidt
d4045fd87d Merge remote-tracking branch 'origin/clarifiyWhitespace' into integration_2025_w44 (!3727)
Clarify whitespace
2025-10-31 11:33:07 +01:00
Nick Hedberg
330c4fce5d Fix capitalization 2025-10-31 11:31:54 +01:00
Nick Hedberg
e6b307bf6e Indent correctly 2025-10-31 11:31:42 +01:00
Robert Schmidt
a8de9733e6 Merge remote-tracking branch 'origin/refactor-dlsch' into integration_2025_w44 (!3682)
Refactor DLSCH scheduler

Refactor the DLSCH post processor similarly to what has been done in
!3521  with the goal of saving an additional iteration through all UEs,
hopefully making the DLSCH scheduler faster.

It further includes changes to make working with and debugging multi-UE
operation easier:

- add some measurements in L1 (for total TX/RX time)
- a new option MACRLCs.[0].stats_max_ue to limit the number of UEs in
  the periodic output (default: 8, 0=disable)
- avoid stack overflow in the MAC
- fix the writing of stats to nrMAC_stats.log and nrL1_stats.log when
  the written output reduces by truncating the files
- avoid to schedule retransmission with 0 RBs.
2025-10-30 23:14:08 +01:00
Robert Schmidt
9449f777cc Remove TBS table and recompute on demand 2025-10-30 23:13:53 +01:00
Robert Schmidt
916455f027 Move update_dlsch_buffer() into pf_dl()
This slightly speeds up the scheduler (it e.g., does not need to check
for UEs that have retransmissions), and harmonizes with pf_ul(), which
evaluates (UL) BSR at a similar place within the scheduler.
2025-10-30 23:13:53 +01:00
Robert Schmidt
24399eac2d update_dlsch_buffer() for individual UEs 2025-10-30 23:13:53 +01:00
Robert Schmidt
27a022d6f8 Fix: avoid retransmission with 0 RBs
Check and return, if necessary, that we have enough resources to make
retransmissions. Without, we can asserts in L1, such as

    Assertion (NPRB>0 && (NPRB + RBstart <= BWPsize)) failed!
    In PRBalloc_to_locationandbandwidth0() openairinterface5g/common/utils/nr/nr_common.c:506
    Illegal NPRB/RBstart Configuration (0,51) for BWPsize 51

which indicates that the scheduler requested a transmission with 0 PRBs,
which does not make sense.
2025-10-30 23:13:46 +01:00
Robert Schmidt
1fd3c284f1 Merge remote-tracking branch 'origin/rework-gnb-prach-mem-management' into integration_2025_w44 (!3592)
Refactor PRACH handling at the gNB

- Remove race conditions by correctly setting mutexes
- Fix a bug when having multiple RACH occasions
- Reduce memory footprint by removing global memory, which should also
  fix potential memory data races in FHI 7.2
- Additional fixes, see commit messages
2025-10-30 23:12:09 +01:00
Laurent THOMAS
9ce9c16e36 Add documentation on PRACH processing 2025-10-30 23:01:06 +01:00
Laurent THOMAS
d8d1520580 reduce sl_ahead to catch the RACH Msg1 in time in 24PRB test
a bit difficult to understand: sl_ahead=6 => we systematically miss the
rach detection in the scheduler because the scheduler runs more than 6
slots ahead the rx slot processing (here > 11 slots because 6 (DL and UL
slots) + 4 (RU_RX_SLOT_DEPTH, so UL only))

so, reducing sl_ahead works better than large sl_ahead because the idea
behind is: the scheduler of slot+sl_ahead will never create work to do
in a UL slot before slot+sl_ahead+X (as minimum k2 is X, in the 24PRB CI
test: 6)
2025-10-30 23:01:06 +01:00
Laurent THOMAS
0d083d83fc Simplify code through lookup of PDU name, delete commented code 2025-10-30 23:01:06 +01:00
Laurent THOMAS
80223d36d5 Rename nr_fill_prach to nr_schedule_rx_prach() 2025-10-30 23:01:06 +01:00
Laurent THOMAS
1292cd68b7 Remove the usage of global mem for rach rx process
saves about 600MB of memory allocation

Move the definition of PRACH items and the PRACH list to the
defs_nr_commons.h file.

Do not re-write the entire structure in nr_schedule_rx_prach(), as it is
quite large now.
2025-10-30 23:01:06 +01:00
Robert Schmidt
67ba4f6741 evaluate_cqi_report(): Add LOG_D for reported CQI 2025-10-30 19:14:07 +01:00
Robert Schmidt
924f28ed70 Refactor to call post-processor in place
Call the post-processor when the allocation is "fixed" (i.e., nothing
changes anymore), instead of having a final loop across all UEs that
might potentially be costly.

In order to calculate the PF metric, note that the statistics "reset" is
moved into pf_dl() instead of the post-processing loop, as it has to be
done on each slot.

See also: dd98030202 ("Refactor to call post-processor in place")
2025-10-30 19:14:06 +01:00
Robert Schmidt
4eb43f2c45 nr_dlsim_preprocessor(): Refactor NR_sched_pdsch usage
Similarly to parent commit(s), assign sched_pdsch in a single place
instead of relying on sched_ctrl. In a follow-up commit, the
post-processor will be called in a single place.
2025-10-30 19:14:06 +01:00
Robert Schmidt
1900edb56d schedule_control_sib1(): Refactor NR_sched_pdsch usage
Similarly to parent commit(s), refactor the use of NR_sched_pdsch.
Instead of using nr_mac->sched_ctrlCommon, put the NR_sched_pdsch_t on
the stack.

This also refactors update_rb_mcs_tbs() to update the existing
NR_sched_pdsch instead of updating individual fields.

This also reduces the extend to which sched_ctrlCommon is used.
2025-10-30 19:14:06 +01:00
Robert Schmidt
8205503496 nr_preprocessor_phytest(): Refactor NR_sched_pdsch usage
As in parent commit(s).
2025-10-30 19:14:06 +01:00
Robert Schmidt
d4dc044d2d pf_dl(): refactor NR_pdsch_sched usage
As in parent commit.
2025-10-30 19:14:06 +01:00
Robert Schmidt
2daa1dac18 allocate_dl_retransmission(): refactor NR_sched_pdsch usage
Assign NR_sched_pdsch to sched_ctrl->sched_pdsch in one place, where the
post-processing functionality will be called in a follow-up commit. This
should result in no functional change.
2025-10-30 19:14:06 +01:00
Robert Schmidt
761a70d199 Remove use of curInfo in allocate_dl_retransmission()
It seems to be assumed that curInfo actually has the currently active
number of layers/PMI. However, I am not sure this would always be true
(e.g., UE might not have been scheduled for some slots, but number of
layers decreased as reported by CSI).  Instead, recalculate the info
from scratch when necessary.
2025-10-30 19:14:06 +01:00
Robert Schmidt
a6d16a66d2 Reduce scope of NR_sched_pdsch in first DL sched loop
We don't need NR_sched_pdsch here. Remove the use of it.
2025-10-30 19:14:06 +01:00
Robert Schmidt
1622724384 Store selected MCS in UE iterator
PF uses MCS and average throughput to decide which UE to schedule. Thus,
the first loop decides on MCS, whereas the second does the "main UE
allocation" after sorting by the PF metric.

A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t.
Thus, we cannot rely on sched_ctrl to store the MCS in the first loop,
and look it up from there in the second. Instead, store it as part of
the UE iterator data, and take it from there.

See also: f3068caa37 ("Store selected MCS in UE iterator", for UL)
2025-10-30 19:14:06 +01:00
Robert Schmidt
1a752a8433 Remove unused/write-only code 2025-10-30 19:14:06 +01:00
Robert Schmidt
ce744fd24f Refactor DLSCH post processor into post_process_dlsch()
Introduce a struct with information on FAPI structures to save resource
and data allocation into. It's in nr_mac_gNB.h because the next commits
will reuse this for all preprocessors.
2025-10-30 19:14:06 +01:00
Robert Schmidt
2f636037ee Fixup: compute_PDU_length() 2025-10-30 19:14:06 +01:00
Robert Schmidt
09e1e6c6fd Rewrite NR_MAC UE_iterator() to limit variable scope
Especially in pf_dl()/pf_ul(), we use a first loop using
UE_iterator(), then iterate over a subset of UEs. It has happened a
couple of times that I was using variable "UE" (from the iterator), when
it should only be used in the first UE_iterator() loop.

Rewrite UE_iterator() to effectively limit the scope of the iterator
variables to the body of the UE_iterator. This should also make it
possible to reuse multiple UE_iterator()s with the same variables in
sequence.
2025-10-30 19:14:06 +01:00
Jaroslava Fiedlerova
773359851c Merge remote-tracking branch 'origin/ci-iperf3-fix' into integration_2025_w44 (!3731)
CI: ensure clean iperf3 server startup

- Resolves issue with iperf3 test failure in RFSim5G multiue test
- Minor fix of iperf3 test descriptions in RFSim5G pipeline
2025-10-30 17:51:46 +01:00
Jaroslava Fiedlerova
314ddcebdd Merge remote-tracking branch 'origin/nrUE_no_CSI_report' into integration_2025_w44 (!3728)
Fix for scenario with no CSI report configured for CSI-RS

After changes in !3714 (merged), if we select to measure RSRP on SSB and not
CSI-RS (default option) and there is a single antenna port (so no MIMO report
either) we won't schedule any CSI-RS measurements for the UE. In that case
ideally we shouldn't set do_CSIRS = 1  in configuration file but still the
option is possible. So the fix is to not perform any measurements at UE on
that CSI-RS but not asserting.

Closes #1015
2025-10-30 17:50:36 +01:00
Teodora
19bb463049 Properly free the memory
1. Create a free_ru_session_list() function to free the memory allocated for the connected RUs
before closing the nr-softmodem.
2. xmlReadMemory() and xmlNodeGetContent() were causing serious memory leakages,
and now all is properly freed using xmlFreeDoc() and xmlFree().
2025-10-30 17:22:40 +01:00
Teodora
163c8de371 Do not use ru_session_list on the stack
This struct is used in multiple source files.

Previously, when stopping the nr-softmodem, the ru_session_list "disappears"
and the M-plane wasn't terminated properly (num_rus = 0 even though DU connected to at least one RU).
2025-10-30 17:22:40 +01:00
Teodora
96b944e5c9 Update the FHI M-plane doc for v16.01 support 2025-10-30 17:22:40 +01:00
Teodora
0ad393f28e Update yang models to the O-RAN.WG4.MP-YANGs-R004-v16.01
It is backwards compatible with the O-RAN.WG4.MP-YANGs-v04.00, previous supported version.
2025-10-30 17:22:40 +01:00
Teodora
4233b89530 Handle MIMO mode
MIMO mode is defined by setting separate carriers to different antenna ports.

Benetel v1.2.2 does not support MIMO mode to be set via M-plane, and therefore
we only created one Tx and one Rx carrier.

Benetel v1.4.1 supports MIMO mode setting via M-plane.

Therefore, this commit introduces the adaptation based on the number of supported carriers by a DUT RU.
2025-10-30 17:22:40 +01:00
Teodora
d542021f86 Retrieve the hardware states if available
These 3 states: "oper-state", "admin-state", "availability-state" are optional,
but shall be checked in order to activate the carriers. If an O-RU doesn't support it,
we assume the expected values:
- "oper-state" = "enabled"
- "admin-state" = "unlocked"
- "availability-state" = "NORMAL"

Implement retrieval of the hardware states if O-RU supports, i.e. Benetel release v1.4.1.
2025-10-30 17:22:40 +01:00
Teodora
d4b5291c62 Facilitate RU notification initialization
Use X macros for carriers and synchronization states,
by mapping enum with the state values.
2025-10-30 17:22:40 +01:00
Teodora
ad6d7a2220 RHEL compilation
error: implicit declaration of function ‘realloc’
2025-10-30 17:22:40 +01:00
Teodora
a96d2d0118 Properly pass the arguments in ly_ctx_destroy() v1 function 2025-10-30 17:22:40 +01:00
Raghavendra Dinavahi
40fae6136c Added the check for non-NTN bands 2025-10-30 16:53:07 +01:00
Raghavendra Dinavahi
69f391f2b8 Fix for the ULDLduplex issue for NTN bands
Duplex is assumed to be static but for NTN bands, it is not static.
TxRX Duplex is defined in section 5.4.4 of 38.101-5 (for NTN) specs v1809
n256 190 MHz, 165 to 215 MHz
n255 -101.5 MHz, -72.5 to -130.5 MHz
n254 862 - 885 MHz
2025-10-30 15:34:00 +01:00
Jaroslava Fiedlerova
32889870b3 CI: Adjust attenutation for HO setup 2025-10-30 13:37:15 +01:00
Laurent THOMAS
fff95cc075 Refactor rx_nr_prach 2025-10-30 11:54:44 +01:00
Laurent THOMAS
d745e6fcd3 Make the decidated structure the PRACH decoding values contextual
The function rx_nr_prach become autonomous, it doesn't read anymore global variables
So, it can become (later) a threadpool work, that will send a message when it finishes
rx_nr_prach_ru() still use some global variables, but it is executed in sequence, inside the ru main loop, that limits the probability of race conditions
2025-10-30 11:54:43 +01:00
Laurent THOMAS
4f39ba8f51 create a trace group for nr rach 2025-10-30 11:54:41 +01:00
Laurent THOMAS
180f83d196 Refactor L1_nr_prach_procedures 2025-10-30 11:54:40 +01:00
Laurent THOMAS
d24e010367 simplify computation of ru->prach_rxsigF[prachOccasion][aa] 2025-10-30 11:54:36 +01:00
Laurent THOMAS
c48e0b1a32 merge variants of prach_item_t as this is the same in gNB and RU 2025-10-30 11:54:33 +01:00
Laurent THOMAS
d005336cb8 Simplify PRACH beam handling, remove race
Simplify by removing a small malloc and memcpy() the beams. This should
also remove the data race between ru and gNB/CU-DU
2025-10-30 11:54:30 +01:00
Laurent THOMAS
cffb07d798 remove permanent prach rxsigF in gNB and simplify the data structure 2025-10-30 11:54:22 +01:00
Laurent THOMAS
4dd340b6bb merge almost duplicated code for ru prach list and gNB prach list
(gNB is not the proper name, it is CU+DU, gNB is RU+CU+DU)
2025-10-30 11:54:21 +01:00
Laurent THOMAS
88cecd707b regroup similar lists for "ru" and "gNB" in a common definition
Merge the identical sizes. Use correct naming: it is a element of a
list, not a list
2025-10-30 11:54:20 +01:00
Laurent THOMAS
a4d3eb9fad replace fix array index by pointers for prach lists in gNB 2025-10-30 11:54:18 +01:00
Laurent THOMAS
f5c1d18638 Fix bug in "freeing" prach occasions scheduler after decoding first occasion
Release PRACH only after treating the entire PRACH slot/work. Also,
release only once, not on every decoding occasion.
2025-10-30 11:54:14 +01:00
Laurent THOMAS
a07c03e65f MAC: use pointers, rewrite FAPI PDU alloc 2025-10-30 11:54:13 +01:00
Laurent THOMAS
7d90d9b23e log: make input parameters const 2025-10-30 11:54:11 +01:00
Laurent THOMAS
f11361343c add management of nb tx antennas=0 in rfsimulator code
trace the error of 0 antennas, and avoid infinite loop of calls to read
0 bytes
2025-10-30 11:54:09 +01:00
Laurent THOMAS
9ddb8c0b9f Remove prach_ifft from premanent allocation
Allocate on the stack when necessary.
2025-10-30 11:54:01 +01:00
Laurent THOMAS
e54738c7e4 flush command line printf, it is called before log module initialisation 2025-10-30 11:53:57 +01:00
Laurent THOMAS
7157d4bcd1 add trace when the main NR UE thread ends and when NR UE sets oai_exit variable 2025-10-30 11:53:46 +01:00
Jaroslava Fiedlerova
9be94881a3 CI: correct testcase description in RFSim5G tests 2025-10-30 10:32:59 +00:00
Jaroslava Fiedlerova
3e23c796c9 CI: ensure clean iperf3 server startup by killing existing processes on same port
Before starting a new iperf3 server instance in CI tests, explicitly kill any existing
iperf3 processes bound to the same port. This prevents conflicts or failures caused by
leftover iperf3 servers from previous runs that did not terminate properly or on time.
The cleanup is performed using `pkill` before launching the new server.
2025-10-30 10:32:54 +00:00
Jaroslava Fiedlerova
2196fb918a Merge remote-tracking branch 'origin/issue1014' into integration_2025_w44 (!3726)
fix for CSI payload sizes in PUCCH structure at UE

Closes #1014
2025-10-30 10:43:27 +01:00
Jaroslava Fiedlerova
e9723149f4 Merge remote-tracking branch 'origin/gtp-e1-fix-errors-test' into integration_2025_w44 (!3725)
Handle GTP receiver errors, fix memory leaks, add CU-UP test

- Fix use-after-free bugs in GTP by properly stopping the receive thread(s)
- Fix a bug from !3519 (merged): QFI 0 is a valid QFI
- Fix multiple memory leaks in CU-UP, E1, CU-UP load tester, SCTP
- Add a (conservative) functional CU-UP test that verifies that the load tester
  and CU-UP work. Test only a low throughput, as it will run in parallel with
  other tests.
2025-10-30 10:41:47 +01:00
Robert Schmidt
eced5afdf7 Add CU-UP functional test to ctest
Use the CU-UP load tester to test the functionality of the CU-UP and
its loader tester. The requirements on this load test are intentionally
low, as it will be run with other unit tests in parallel, and should
still pass.

It uses an existing configuration file for the CU-UP. The test script
runs the CU-UP, runs the load tester, stops the CU-UP, and returns the
load tester return value as test result (which will be 0=success if all
packets have been received).
2025-10-30 08:04:39 +01:00
Robert Schmidt
e9bf6344b0 SCTP: fix a memory leak
call freeaddrinfo() before return'ing from the function.
2025-10-30 08:04:39 +01:00
Robert Schmidt
a2b127f643 CU-UP: fix direct memory leak
Note that this strdup has been intentioally created for debugging
purposes in core files.

See also: 1ab3b8dd8e ("add version signature in core files...")
2025-10-30 08:04:39 +01:00
Robert Schmidt
155ee5ad42 Fix direct memory leak on E1 message reception
Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x7f7bc7ee68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x0000004abfa6 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x0000004abfa6 in decode_e1ap_cuup_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:219
        #3 0x00000046a9f5 in e1apCUCP_handle_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:187
        #4 0x000000470b35 in e1ap_handle_message /home/richie/oai/openair2/E1AP/e1ap.c:109
        #5 0x000000470b35 in e1_task_handle_sctp_data_ind /home/richie/oai/openair2/E1AP/e1ap.c:120
        #6 0x00000047717b in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:832
        #7 0x7f7bc7e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x7f7bc7ee68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x0000004ac30c in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x0000004ac30c in decode_e1ap_cuup_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:194
        #3 0x00000046a9f5 in e1apCUCP_handle_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:187
        #4 0x000000470b35 in e1ap_handle_message /home/richie/oai/openair2/E1AP/e1ap.c:109
        #5 0x000000470b35 in e1_task_handle_sctp_data_ind /home/richie/oai/openair2/E1AP/e1ap.c:120
        #6 0x00000047717b in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:832
        #7 0x7f7bc7e28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
2025-10-30 08:04:39 +01:00
Robert Schmidt
eee9c4cf33 Fix two direct memory leaks of CU-UP tester
Direct leak of 100 byte(s) in 1 object(s) allocated from:
        #0 0x7f6585ee6f2b in malloc (/lib64/libasan.so.8+0xe6f2b) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000414a0d in malloc_or_fail /home/richie/oai/common/utils/utils.h:86
        #2 0x0000004061c9 in main /home/richie/oai/tests/nr-cuup/nr-cuup-load-test.c:544
        #3 0x7f6585211574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #4 0x7f6585211627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #5 0x000000413034 in _start (/home/richie/oai/build/tests/nr-cuup/nr-cuup-load-test+0x413034) (BuildId: 8af0132792b03fa12ba95b5623865c9a8a5625a3)

    Direct leak of 100 byte(s) in 1 object(s) allocated from:
        #0 0x7f6585ee6f2b in malloc (/lib64/libasan.so.8+0xe6f2b) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000414a0d in malloc_or_fail /home/richie/oai/common/utils/utils.h:86
        #2 0x0000004061ff in main /home/richie/oai/tests/nr-cuup/nr-cuup-load-test.c:546
        #3 0x7f6585211574 in __libc_start_call_main (/lib64/libc.so.6+0x3574) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #4 0x7f6585211627 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3627) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #5 0x000000413034 in _start (/home/richie/oai/build/tests/nr-cuup/nr-cuup-load-test+0x413034) (BuildId: 8af0132792b03fa12ba95b5623865c9a8a5625a3)
2025-10-30 08:04:39 +01:00
Robert Schmidt
459e20fe99 E1AP: correctly free entire PDU
Free memory including the "base pointer". Fix two places in which it was
on the stack to harmonize. The only stack variable is in reception of
new E1 messages (e1ap_handle_message()), which uses
ASN_STRUCT_FREE_CONTENTS_ONLY().

This fixes bugs similar to these logs:

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000049e367 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000049e367 in encode_e1_bearer_context_release_command /home/richie/oai/openair2/E1AP/lib/e1ap_bearer_context_management.c:1235
        #3 0x000000482951 in e1apCUCP_send_BEARER_CONTEXT_RELEASE_COMMAND /home/richie/oai/openair2/E1AP/e1ap.c:546
        #4 0x000000482951 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:856
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000049380a in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000049380a in encode_E1_bearer_context_setup_request /home/richie/oai/openair2/E1AP/lib/e1ap_bearer_context_management.c:578
        #3 0x00000047f6a2 in e1apCUCP_send_BEARER_CONTEXT_SETUP_REQUEST /home/richie/oai/openair2/E1AP/e1ap.c:378
        #4 0x0000004829f8 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:846
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    Direct leak of 40 byte(s) in 1 object(s) allocated from:
        #0 0x7f418f4e68a3 in calloc (/lib64/libasan.so.8+0xe68a3) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x00000046ede7 in calloc_or_fail /home/richie/oai/common/utils/utils.h:74
        #2 0x00000046ede7 in encode_e1ap_cuup_setup_response /home/richie/oai/openair2/E1AP/lib/e1ap_interface_management.c:305
        #3 0x00000047e412 in e1ap_send_SETUP_RESPONSE /home/richie/oai/openair2/E1AP/e1ap.c:167
        #4 0x000000482a68 in E1AP_CUCP_task /home/richie/oai/openair2/E1AP/e1ap.c:836
        #5 0x7f418f428ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
2025-10-30 08:04:39 +01:00
Guido Casati
a416db39ba Pass SDAP config by pointer
sdap_config_t is more than 1kB large. Avoid excessive copying by passing
it by reference.
2025-10-30 08:04:39 +01:00
Robert Schmidt
91b3ca77f6 QFI 0 is a valid QFI
QFI 0 is a valid QFI: don't check for qfi <= 0, as uint8 cannot be
negative. Also, correctly use SDAP_MAP_RULE_EMPTY for a DRB ID (which
need to be larger than 0).
2025-10-30 08:03:17 +01:00
Robert Schmidt
10bda84176 Limit statistics of UE to configurable threshold
The gNB will stop the periodical logging of UEs in MAC Info level after
a configurable number of UEs have been printed, by default 8.

Set it to 17 in some CI tests to ensure we still get all UEs for the
time being, as the CI might depend on this.
2025-10-29 19:15:49 +01:00
francescomani
56b987c1dd bugfix for computation of alt size of DCI00 2025-10-29 14:27:36 +01:00
francescomani
5e32eb67f6 remove unnecessary do_CSIRS from CI config files 2025-10-29 11:02:19 +01:00
francescomani
e57789adb2 prevent assertion in case of no measurements configured for CSI-RS at UE 2025-10-29 10:52:39 +01:00
Robert Schmidt
93cadc9d63 Truncate nrL1_stats.log before writing
Without this, the remainder of the file remains in place, and this can
be confusing if the total file size reduces.
2025-10-29 08:11:50 +01:00
Jaroslava Fiedlerova
4215a12aa9 Merge remote-tracking branch 'origin/dmrs_log_improv' into integration_2025_w44 (!3721)
improvements in formatting and LOGs in DMRS common functions at MAC

DMRS LOGs at MAC were misleading. This MR tried to improve them (and also
adds some formatting fix).
2025-10-28 23:04:02 +01:00
francescomani
6549acdba9 fix for CSI payload sizes in PUCCH structure at UE 2025-10-28 18:06:39 +01:00
Robert Schmidt
48faffc131 dump_mac_stats(): avoid overflow
The call to snprintf() as was used is wrong: we use the return value to
advance output, but the man page says

> The functions snprintf() and vsnprintf() do not write more than size
> bytes (including the terminating null byte ('\0')).  If the output was
> truncated due  to this  limit,  then  the return value is the number of
> characters (excluding the terminating null byte) which would have been
> written to  the  final  string  if enough  space  had  been available.
> Thus, a return value of size or more means that the output was
> truncated.

Thus, output could go beyond end, and we get a stack overflow. Instead,
encapsulate the call to snprintf() checking this condition, and only
advancing output as intended, limiting to 0 if we are at the end of the
buffer.  This avoids this error:

    ==964825==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7be799f51988 at pc 0x7fe7d66b0d39 bp 0x7be79b825ef0 sp 0x7be79b8256c0
    WRITE of size 3 at 0x7be799f51988 thread T24
        #0 0x7fe7d66b0d38 in vsnprintf (/lib64/libasan.so.8+0xb0d38) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x7fe7d66b2d44 in snprintf (/lib64/libasan.so.8+0xb2d44) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #2 0x0000008fe7c6 in dump_mac_stats /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/main.c:183
        #3 0x00000092071a in gNB_dlsch_ulsch_scheduler /home/richie/w/refactor-dlsch/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c:200
        #4 0x0000008f8f78 in run_scheduler_monolithic /home/richie/w/refactor-dlsch/openair2/NR_PHY_INTERFACE/NR_IF_Module.c:399
2025-10-28 14:25:50 +01:00
Robert Schmidt
7df8243a2e Remove NR MAC's UE-specific lock
There is the (global) sched_lock that prevents concurrent access. A
dedicated UE lock does not make sense in that case. Worse, this lock
does not prevent all concurrent UE accesses (e.g., there are many loops
over UEs that are not protected), so it's also wrong.
2025-10-28 14:22:24 +01:00
Robert Schmidt
07f06f8c06 nrMAC_stats.log: handle file errors, add truncate to reset file
truncate resets the file size to 0. Without this, e.g., when
disconnecting a UE, the old UE remains at the end and is not
overwritten, which is confusing.
2025-10-28 14:22:24 +01:00
Robert Schmidt
7e8245c412 nrMAC_stats.log thread: correctly lock scheduler for stats 2025-10-28 14:22:24 +01:00
Robert Schmidt
9b97fd9b62 Measure tx_func()/rx_func() job duration 2025-10-28 14:22:24 +01:00
Rakesh BB
25f3d632f4 [NGAP] Fix incorrect AMF Set ID type (uint8 → uint16) causing AMF lookup failure
- Corrected AMF Set ID data type in ngap_gNB_nnsf_select_amf_by_amf_setid() from uint8_t to uint16_t.

- AMF Set ID is a 10-bit field as per 3GPP TS 38.413 §9.3.3.12.

- The incorrect data type caused truncation for AMF Set IDs >255, leading to lookup failures during RRC reestablishment.

- Verified successful reestablishment with large AMF Set IDs after the fix.

Reason for fix: AMF lookup using AMF Set ID was failing because the 10-bit AMF Set ID was truncated to 8 bits.

Closes #1012
2025-10-28 12:23:14 +05:30
Robert Schmidt
e40ccbb535 Stop GTP receiver thread on exit
Stop the receive thread before closing the socket, which avoids an error
message when stopping the GTP softmodem:

    [GTPU]   [91] Recvfrom failed (Bad file descriptor)
    [GTPU]   exiting thread
2025-10-27 16:50:00 +01:00
Robert Schmidt
b67c639688 Handle GTP receiver errors
On error, exit the GTP thread after printing a diagnostic message. This
avoids also an error flagged by address sanitizer for use-after-free.

    [GTPU]   [91] Recvfrom failed (Bad file descriptor)
    =================================================================
    ==285377==ERROR: AddressSanitizer: heap-use-after-free on address 0x7cd7b7fe5590 at pc 0x0000006a9e18 bp 0x7b97ad4e1d50 sp 0x7b97ad4e1d48
    READ of size 4 at 0x7cd7b7fe5590 thread T8

    =================================================================
    ==285377==ERROR: LeakSanitizer: detected memory leaks

    Direct leak of 160 byte(s) in 1 object(s) allocated from:
        #0 0x0000006a9e17 in gtpv1uReceiver /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:1346
        #1 0x7f97b9a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #2 0x7f97b8e7ff53 in start_thread (/lib64/libc.so.6+0x71f53) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)
        #3 0x7f97b8f0332b in __clone3 (/lib64/libc.so.6+0xf532b) (BuildId: 48c4b9b1efb1df15da8e787f489128bf31893317)

        #0 0x7f97b9ae60cb in memalign (/lib64/libasan.so.8+0xe60cb) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)
        #1 0x000000471039 in newNotifiedFIFO_elt /home/richie/oai/common/utils/threadPool/notified_fifo.h:75
        #2 0x000000471039 in tx_func /home/richie/oai/executables/nr-gnb.c:107
        #3 0x000000471039 in L1_tx_thread /home/richie/oai/executables/nr-gnb.c:167
        #4 0x7f97b9a28ee5 in asan_thread_start(void*) (/lib64/libasan.so.8+0x28ee5) (BuildId: 10b8ccd49f75c21babf1d7abe51bb63589d8471f)

    0x7cd7b7fe5590 is located 336 bytes inside of 400-byte region [0x7cd7b7fe5440,0x7cd7b7fe55d0)
    freed by thread T0 here:
    SUMMARY: AddressSanitizer: 160 byte(s) leaked in 1 allocation(s).
2025-10-27 16:49:16 +01:00
francescomani
f2389987d4 improvements in formatting and LOGs in DMRS common functions at MAC 2025-10-27 14:26:58 +01:00
Robert Schmidt
75a68167ea Merge branch 'integration_2025_w43' into 'develop'
Integration: `2025.w43`

* !3605 Support beam index in OAI 7.2 Fronthaul Interface
* !3709 Fixes for T-Tracer to work with NR-UE
* !3712 Restore UE Capability IE after RRCReestablishment
* !3716 Remove unused ULSCH measurements at gNB
* !3603 UE symbol based PDCCH receiver
* !3708 Add monolithic N2 handover test pipeline with B210 and Quectel
* !3719 Remove Benetel-specific radio drivers
* !3710 [CI] Update the Push to DockerHub Stage
* !3711 CI: Multiple adjustments
* !3717 Initialize NCC=0 on NGAP Initial Context Setup (3GPP TS 33.501 §6.9.2.1.1)
* !3720 fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant
* !3714 Improve handling of selection of RSRP/SINR report via configuration file
* !3519 Refactor SDAP adaptation work for QoS
* !3698 Other CSI measurement fixes
* !3699 Updates for Feature Set

Closes #1008

See merge request oai/openairinterface5g!3713
2025-10-24 15:39:07 +00:00
Robert Schmidt
1251c44ae8 Merge remote-tracking branch 'origin/updates-feature-set' into integration_2025_w43 (!3699)
Updates for Feature Set
2025-10-24 16:48:17 +02:00
Robert Schmidt
41ce595461 Update supported bandwiths 2025-10-24 15:11:36 +02:00
Thomas Schlichter
a898c18ddc Update NTN in Feature Set 2025-10-24 15:11:36 +02:00
Guido Casati
23c115dc74 Update NAS and mobility in Feature Set 2025-10-24 15:11:36 +02:00
Robert Schmidt
57e382ccd1 Retroactively add release notes for v2.3.0
I forgot to add this when making the release. Put it retroactively to
have things "in order".

See also:
https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.3.0
https://gitlab.eurecom.fr/oai/openairinterface5g/-/releases/v2.3.0
2025-10-24 15:11:36 +02:00
francescomani
66d8ada982 Update UE feature set 2025-10-24 15:11:36 +02:00
Robert Schmidt
110f5c7304 Updates for Feature Set 2025-10-24 15:11:36 +02:00
Robert Schmidt
ef4e37d35c Merge remote-tracking branch 'origin/fix_ue_csi_meas' into integration_2025_w43 (!3698)
Other CSI measurement fixes

Errors fixed in this MR:

- UE currently sends empty CSI measurement report resulting in invalid
  cqi_idx 0, default to MCS 9 at gNB because mismanagement of new L1
  measurement structure at MAC UE
- nrofReportedRS not updated after UE capability reception at gNB
- multiple RSRP reports multiplexed / de-multiplexed in wrong order
2025-10-24 14:42:06 +02:00
Robert Schmidt
35a450bd43 Merge remote-tracking branch 'origin/sdap-qos-improvements' into integration_2025_w43 (!3519)
Refactor SDAP adaptation work for QoS

This MR is an adaptation of the code introduced in !2703.

The goal is a cleanup and functional refactor of the SDAP/PDCP
integration, that is:

- centralize SDAP configuration logic
- simplify entity creation
- improve robustness of role-based SDAP handling
- prepare the codebase for clean support of DRB reconfiguration and
  teardown flows

More concretely:

1. New sdap_config_t and get_sdap_Config()

  - Introduced an internal struct sdap_config_t to abstract SDAP config
    input
  - Centralized SDAP config parsing into new get_sdap_Config() function
    that translates ASN.1 NR_SDAP_Config into this internal
    representation. This is called during RRC triggered
    (re)configuration procedures.
  - Enable mapping of number of QoS flows > 1

2. Unified role handling with bitmasks

  - Added a bitmask-based entity_role field to track SDAP directions:
    SDAP_UL_RX, SDAP_UL_TX, SDAP_DL_RX, SDAP_DL_TX: header presence was
    determined by simple direction (UE vs gNB) and individual
    is_sdap_rx/tx() checks, however nr_sdap_rx_entity behaves
    differently depending on the direction of the RX entity (DL/UL),
    therefore this change can help enable a more accurate SDAP header
    handling across directions and node types.
  - Replaces old helpers is_sdap_rx() / is_sdap_tx() with internal
    checks against the role bitfield
  - QFI-to-DRB mapping is now annotated with direction for both data and
    control PDUs

3. Simplified DRB and SDAP setup

  - add_drb() in PDCP API now delegates SDAP config processing cleanly
  - new_nr_sdap_entity() is used consistently to register a fresh SDAP
    context for the UE and PDU session.
    - Also, re-use and reconfigure existing SDAP entity if already
      exists.
  - logging has been added to trace mapped QFIs from RRC and resulting
    table entries

4. Improved QFI-to-DRB management

  - Refactored nr_sdap_qfi2drb_map_update() to register QFIs based on
    parsed config
  - Ensures control PDUs are correctly routed even after reconfiguration
  - Extended nr_sdap_ue_qfi2drb_config: perform UL QoS flow to DRB
    mapping configuration for a SDAP entity has already been established
    according to TS 37.324, 5.3 QoS flow to DRB Mapping, 5.3.1
    Configuration Procedures. Handle both UL QoS Flows mapping rules to
    add and to remove. QFIs will now be properly unmapped if specified
    via mappedQoS_FlowsToRelease, this might prevent stale QFI mappings
    from being used incorrectly.
  - nr_sdap_qfi2drb() and sdap_map_ctrl_pdu() now strictly fallback to
    default_drb only if a QFI mapping is missing. Missing default DRB
    now triggers LOG_E() (previously silent or misrouted to DRB 0).

5. Other cleanup

  - Remove dependencies from legacy rb_id_t
2025-10-24 14:31:00 +02:00
Robert Schmidt
b7ed2583ac Merge remote-tracking branch 'origin/improv_config_report' into integration_2025_w43 (!3714)
Improve handling of selection of RSRP/SINR report via configuration file

In current develop, the selection of SSB or CRI RSRP depends on the
do_CSIRS flag being activated. That's not wanted. CRI report for now it
is never handled, while we need SSB RSRP report for beam switching
regardless of CSI-RS configuration.
2025-10-24 14:30:39 +02:00
Guido Casati
27be4e26a9 refactor: improve SDAP entity add/update flow management
This commit refactors the SDAP entity QoS flow to DRB mapping functionality
to improve code organization and enhance maintainability.

Key changes:
- Split nr_sdap_qfi2drb_map_update into focused functions:
  * nr_sdap_add_qos_flows_to_drb: handles QFI addition to DRB
  * nr_sdap_rm_qos_flows_from_drb: handles QFI removal from DRB
  * nr_sdap_ue_control_pdu_config: handles UE control PDU generation
- Consolidate add/modify logic into reusable nr_sdap_addmod_entity function
- Remove entity existence checking and updating from new_nr_sdap_entity:
  this function should only add SDAP entities
- Improve function separation of concerns: do SDAP entity add or update
  separately and improve modularity by splitting operations in self
  contained functions
- At SDAP creation, do only add of QFI to DRB mapping
- rename new_nr_sdap_entity to nr_sdap_add_entity for function naming consinstency
2025-10-24 11:55:25 +02:00
Guido Casati
04a1acf376 PDCP: rename add_drb to nr_pdcp_add_drb 2025-10-24 11:55:25 +02:00
Guido Casati
0348aa08b9 Remove rb_id parameter from SDAP TX entity - QFI determines DRB mapping
- Remove rb_id parameter from nr_sdap_tx_entity() function signature
- Update tx_entity function pointer
- Remove rb_id parameter from sdap_data_req() function signature
- Remove unused rb_id variable from sdap_tun_read_thread

The rb_id parameter was redundant since SDAP determines DRB ID
from QFI mapping via entity->qfi2drb_map(entity, qfi). This
simplifies the interface.
2025-10-24 11:55:25 +02:00
Guido Casati
d760a16827 SDAP TX: explicit check on qfi2drb_map output
Each QFI should always be mapped to a DRB. If that is not the case, we
have an undefined behavior. This should not occur. This commit prints
an error in tx_entity and returns.
2025-10-24 11:55:25 +02:00
Guido Casati
8207a4c352 SDAP refactoring: replace legacy (LTE) type rb_id_t with int 2025-10-24 11:55:25 +02:00
Guido Casati
823340a2e2 Refactor handling of DL/UL SDAP header in the SDAP entity
The TX/RX entity should have different behavior according to
5.2.1, 5.2.2, 3GPP TS 37.324, depending on whether it is UL and DL.

The gNB can play a role both as UL RX entity and DL TX entity, while
the UE can play a role both as UL TX entity and DL RX entity.

The goal of this commit is to extend the information stored in the
SDAP entity as the current code is just marking the entity as TX/RX.
The commit introduces a bitmap to store the role of the
entity, which can be DL RX, DL TX, UL RX and UL TX. Based on this
the TX SDAP entity knows whether a DL/UL PDU should be build, and
the RX SDAP entity knows whether a DL/UL PDU should be processed.

See also Figure 4.2.2-1.

SDAP headers are present only if enable_sdap option is used.
2025-10-24 11:55:25 +02:00
Guido Casati
3efaafa633 Refactor QFI to DRB mapping logic
nr_sdap_qfi2drb_map_update function pointer should
process QFIs to add and release from the entity mapping, therefore
a new function pointer for QFIs to add was introduced and
the function pointer to release the QFIs was called in the same function.

Now the nr_sdap_qfi2drb_map_update is:
(1) looping through the QFIs to add/update and store in the qfi2drb_table
(2) looping through the QFIs to release and delete from qfi2drb_table

Also:

* Update the function signature to use sdap_config_t and nr_sdap_entity_t
* log error when the update fails
* limit the scope of the function
* clang-formatted
* removed limit on table entries set by AVLBL_DRB, replaced with MAX_DRBS_PER_UE
2025-10-24 11:55:25 +02:00
Guido Casati
bae1de16d6 Refactor SDAP UL: QoS flow to DRB Mapping configuration and end-marker control PDU mapping
The function nr_sdap_ue_qfi2drb_config should do UL QoS flow to DRB mapping configuration
for a SDAP entity has already been established according to TS 37.324, 5.3 QoS flow to
DRB Mapping, 5.3.1 Configuration Procedures. It should handle both mapping rules to add and to remove.

To this purpose:

* Simplify function signature by passing the sdap config.
* Improve readability of the function.
* Move handling of sdap.mappedQFIs2ReleaseCount (in nr_reconfigure_sdap_entity)
  inside the function.
* Simplify end-marker control PDU mapping function by removing unused
  DRB ID input parameter (the function is fetching the DRB ID based on the input
  map type)
* use int instead of legacy rb_id_t
* limit scope of functions whenever necessary
2025-10-24 11:55:25 +02:00
Guido Casati
7376c9545c Refactor nr_sdap_qfi2drb_map
The goal of this function is to return the DRB ID mapped to the input QFI, for both DL and UL.
The function looks up the DRB that is mapped to the QFI, if no mapping rule exists
returns the default DRB. Returns 0 If no mapping and no default DRB exists for that QFI

The function should not update the stored mapping rules, that is done when receiving
a new SDAP configuration. In this function it was removed.

See TS 37.324, 5.2.1 Uplink
> If there is no stored QoS flow to DRB mapping rule for the QoS flow as specified in the subclause 5.3,
> map the SDAP SDU to the default DRB else, map the SDAP SDU to the DRB according to the stored QoS flow to DRB mapping rule.
2025-10-24 11:55:25 +02:00
Guido Casati
7b42a65ac7 Refactor new_nr_sdap_entity to use sdap_config_t and always update mapping rules
* change function signature: pass the sdap_config_t
* update qfi2drb mapping when receiving a configuration for an already existing SDAP entity
* always update mapping rules, not only for default DRB
2025-10-24 11:55:25 +02:00
Guido Casati
68a3a849bc refactor: Use centralized get_sdap_Config in nr_reconfigure_sdap_entity
Replace inline parameter extraction with get_sdap_Config() function call to:
- Eliminate code duplication in SDAP configuration handling
- Streamline QFI release processing with structured config object
- Ensure consistent SDAP configuration extraction across all SDAP operations
2025-10-24 11:55:25 +02:00
Guido Casati
350263460b Refactor processing of sdap_Config in add_drb (PDCP)
* use get_sdap_Config to process sdap_Config
* move SDAP config logic to the scope where it is relevant
* add SDAP entity direcly in RRC, not from PDCP
* replaced nr_pdcp_add_drbs with single add_drb call: it was no longer
  efficient to keep it in the new logic. The addMod list can be looped directly in RRC.
* add specific function to add bearers from addMod list in E1, NSA, and UE
2025-10-24 11:55:25 +02:00
francescomani
747689596a fix SINR report order at UE 2025-10-24 10:58:23 +02:00
francescomani
2d7999cb28 fix order of information when encoding/decoding RSRP meaas report with more than 1 resource 2025-10-24 10:55:54 +02:00
Robert Schmidt
064d2a1ef0 Merge remote-tracking branch 'origin/RU_RX_SLOT_DEPTH-bugs' into integration_2025_w43 (!3720)
fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant

with this commit, the gNB can work if we change RU_RX_SLOT_DEPTH to
another value than 4 but it remain not well designed
2025-10-24 08:20:24 +02:00
Robert Schmidt
e8d36e8af7 Merge remote-tracking branch 'origin/issue-1008' into integration_2025_w43 (!3717)
Initialize NCC=0 on NGAP Initial Context Setup (3GPP TS 33.501 §6.9.2.1.1)

The nhcc should be initialized to 0 upon Initial Context Setup.

Also, remove unused kgnb_ncc: nh_ncc is already there.

Closes #1008
2025-10-24 08:19:55 +02:00
Laurent THOMAS
83fed82bcf fix direct bugs of not used RU_RX_SLOT_DEPTH defined constant
with this commit, the gNB can work if we change RU_RX_SLOT_DEPTH to
another value than 4 but it remain not well designed
2025-10-24 08:11:13 +02:00
Robert Schmidt
574a75472c Merge remote-tracking branch 'origin/ci-test-adjustments' into integration_2025_w43 (!3711)
CI: Multiple adjustments

- Test with DDDSU (mixed: DDDDDDDDDDGGUU) TDD configuration in
  RAN-SA-B200-Module-SABOX-Container - 40 MHz TDD test
  * https://jenkins-oai.eurecom.fr/job/RAN-SA-B200-Module-SABOX-Container/8910/
- Update the node to localhost for RFSim and L2Sim pipelines:
  * https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-4G/3990/
  * https://jenkins-oai.eurecom.fr/job/RAN-L2-Sim-Test-4G/3056/
  * https://jenkins-oai.eurecom.fr/job/RAN-RF-Sim-Test-5G/10273/
- Remove unused eNB_instance and eNB_serverId entries from XML, replace
  by node
- Remove nssai_sd from UE configuration (default value is used instead)
- Update CI configuration files
2025-10-23 19:20:26 +02:00
Robert Schmidt
bca5939640 Merge remote-tracking branch 'origin/ci-fix-dockerhub-push' into integration_2025_w43 (!3710)
[CI] Update the Push to DockerHub Stage

This MR addresses two cases:

1. Error Handling: Ensures subsequent Image Test Processes stages
   continue to run even if the preceding Push to DockerHub stage fails
   (applies when the condition is PUSH event and doBuild is true).

2. Introduces conditional logic to correctly handle multi-architecture
   images: Images built for both AMD64 and Jetson ARMv8 (oai-gnb,
   oai-nr-ue, oai-nr-cuup) use docker buildx imagetools for push to
   DockerHub.

All other AMD64 images are pushed using standard Docker commands.

Related MR !3691
2025-10-23 19:19:48 +02:00
Robert Schmidt
7c18dfd93a Merge remote-tracking branch 'origin/remove-benetel-radio-drivers' into integration_2025_w43 (!3719)
Remove Benetel-specific radio drivers

These drivers are superseded by the O-RAN 7.2 FHI
2025-10-23 19:19:24 +02:00
Robert Schmidt
f7639e059d Merge remote-tracking branch 'origin/CI-ho-attenuator-N2' into integration_2025_w43 (!3708)
Add monolithic N2 handover test pipeline with B210 and Quectel

The goal of this MR is to provide an automated end-to-end N2 HO
validation with real RF (B210) and Quectel UE.

During the testing phase a post-HO assertion failure due to
uninitialized selected_plmn_identity was found: this was also fixed.

CI: Add monolithic N2 handover test pipeline (B210 + Quectel)

- New XML pipeline for N2 HO testing
- Docker Compose for two monolithic gNBs (gNB1/gNB2)
- Handover sequence: gNB1 → gNB2 → gNB1 with 5s controlled attenuation
  (RC4DAT).
- Channel mapping: ch1-2 gNB1, ch3-4 gNB2
- Telnet server enabled for CI commands
- Clean-up/reset of attenuator state included

NGAP

- fix PLMN/cell location for Initial UE and Uplink NAS
- Prevents assertion in ngap_gNB_nas_uplink() due to uninitialized
  selected_plmn_identity
- Initial UE Message: pass UE-selected PLMN and NR cell ID from RRC to
  NGAP
- Uplink NAS Transport: use PLMN, TAC, and cell ID from the message
- Build NR CGI as gNB ID + cell ID
- Store UE-selected PLMN only in RRC UE context (for later NAS); stop
  storing PLMN in NGAP UE context.
- PLMN validation when processing handover requests from the source gNB:
  when PLMN validation fails, the target gNB now properly sends
  NGAP_HANDOVER_FAILURE
- Store serving PLMN for later use in UE context
2025-10-23 19:18:23 +02:00
Robert Schmidt
fba488056c Merge remote-tracking branch 'origin/ue-symbol-based-receiver' into integration_2025_w43 (!3603)
UE symbol based PDCCH receiver

This is a partial rebase/rewrite of !2895

The goal of this MR is to check how we can merge this.

The eventual result is stated in !2895. The way forward is to modify UE
RX procedures to work symbol by symbol by extracting the symbol loop out
of RX procedures. After all channels are modified this way, the main
thread can be modified to work symbol by symbol.

At this point only PDCCH was modified.
2025-10-23 15:47:28 +02:00
Rúben Soares Silva
09d9bb5b6a Fix build for simulators
This change is needed due to the previous addition of the function nfapi_stop_l1() in gnb_config.c which in turn calls 2 functions that do not exist in the simulators, since they're not linked against the nfapi libraries
2025-10-23 14:08:37 +01:00
Rúben Soares Silva
c83bd87459 Fixup WLS documentation and Makefile patch 2025-10-23 14:08:37 +01:00
Rúben Soares Silva
e08d904af0 Implementation of STOP exchange
This implements the STOP.request/indication for all 3 transport mechanisms, the VNF will send the STOP.request to the PNF, indicating it will disconnect, and await a STOP.indication from the PNF

The WLS VNF is reworked to be able to start before the PNF, by calling call rte_eal_init and rte_dev_probe to determine if dpdk has been initialized properly, before calling rte_eal_init in the intended process when it is appropriate to do so
2025-10-23 14:08:37 +01:00
Rúben Soares Silva
3247c2933f Rework WLS VNF to be able to start before the PNF
The WLS VNF is reworked to be able to start before the PNF, by calling call rte_eal_init and rte_dev_probe to determine if dpdk has been initialized properly, before calling rte_eal_init in the intended process when it is appropriate to do so
2025-10-23 14:08:37 +01:00
Shubhika Garg
61b5417817 ci: Update and implement conditional DockerHub push
- Push both AMD64 & ARMv8 Jetson images together for images built on both using `docker buildx imagetools`
  - Use standard 'docker pull and push' for images built only on AMD64.
2025-10-23 10:53:41 +02:00
Robert Schmidt
78f36b64c2 use of config module handling for CSI report type input 2025-10-23 10:52:56 +02:00
francescomani
e06d0c7199 improve handling of selection of RSRP/SINR report via configuration file 2025-10-23 10:52:51 +02:00
Robert Schmidt
ece138134b build_oai: remove non-existing oran_fhlib_4g option 2025-10-23 10:03:28 +02:00
Robert Schmidt
8ecda65d55 Remove Benetel radio drivers
These drivers are superseded by the O-RAN 7.2 FHI.
2025-10-23 10:00:08 +02:00
Rúben Soares Silva
244819c627 Allocate VNF_info directly in config instead of global variable
This allows access to the VNF configuration in the various transport mechanisms straight from config, without this, the transport specific thread would cause a segmentation fault when trying to access the pack/unpack function pointers.
Add 2 functions to access the P5 and P7 VNF structures, to avoid having to always cast user_data and p7_vnfs
2025-10-23 08:45:24 +01:00
Guido Casati
5f261d4f4c Add PLMN validation for handover requests and store serving PLMN
Prevent assertion in ngap_gNB_nas_uplink() due to uninitialized selected_plmn_identity:
the selected_plmn_identity field was not being set during N2 handover,
causing the assertion ((plmn->mnc_digit_length == 3) || (plmn->mnc_digit_length == 2))
to fail when processing subsequent NAS messages. The issue is that the Serving PLMN
is not stored by RRC. During N2 mobility, RRC can get this info from GUAMI.

When receiving the Handover Request the target gNB knows from GUAMI
which serving PLMN is the AMF belonging to. In current design, allowed PLMNs
are stored in rrc.configuration. The incoming PLMN needs to be validate
against the PLMNs in the list, then stored in the UE context as Serving PLMN.

This change adds PLMN validation when processing handover requests from the source gNB.
The validation is needed because:

- Target gNB must verify that the PLMN from the GUAMI in the handover request
  is allowed by its configuration before accepting the handover to prevent handover
  to unsupported PLMNs.
- When PLMN validation fails, the target gNB now properly sends NGAP_HANDOVER_FAILURE
- UE Context must store serving PLMN for later use
2025-10-22 14:48:34 +02:00
Guido Casati
32eae0a0a8 Adopt plmn_id_t in nr_guami_t 2025-10-22 14:48:34 +02:00
Guido Casati
7ec646a8d2 NGAP: fix PLMN/cell location for InitialUE and UplinkNAS
This commit is removing the storage of selected PLMN in NGAP UE context.
We store the Serving PLMN in the RRC UE context instead.

The Selected PLMN is the PLMN that the UE chose (or was directed to) for registration
and it is sent in the RRCSetupComplete. This is different from the selected
PLMN mentioned in the NG INITIAL UE MESSAGE for network sharing.

Selected PLMN: determines which core network and AMF the UE is registered with
GUAMI = Identifies the serving AMF and includes the PLMN of that AMF
Serving PLMN: the PLMN that is currently serving the UE (e.g. contained in GUAMI)

The AMF’s PLMN may match the selected PLMN, or not (especially in network sharing or roaming).
Regardless, the UE always have a Serving PLMN.

Initial UE message does not have a TAI IE per se, but TAI is a mandatory
member of the mandatory UserLocationInformation CHOICE.
NR CGI is also mandatory and carried inside UserLocationInformation:
in network sharing, the PLMN ID in TAI takes on additional
significance: RAN is shared but CN are different, so in this case PLMN in TAI is
needed for the AMF route the message to the correct operator’s core.

If network sharing applies (e.g., shared RAN between PLMN-A and PLMN-B):
the UE or network may select PLMN-B instead, and that PLMN identity
is included in the Initial UE Message’s TAI IE.

Conclusion:
1) UE always sends the selected PLMN during the registration,
   regardless of whether it is shared or not.
2) Selected PLMN Identity is an actual IE sent in the RRCSetupComplete
   while in NGAP there's no Selected PLMN Identity IE, only PLMN Identity
   IEs in both TAI and NR CGI. It is a subtle difference.
3) The serving PLMN of the UE needs to be stored in RRC UE Context for
   later use in NAS procedures. e.g. at initial registration it matches
   the Selected PLMN
4) No need to store PLMN in NGAP UE Context, params are passed by RRC
5) TAI and NR CGI, which contain the PLMN identity, are mandatory in
   UserLocationInformation IE CHOICE, and should reflect current status

Changes
- Initial UE Message: pass UE-selected PLMN and NR cell id from RRC to NGAP
- Uplink NAS Transport: use PLMN, TAC, and cell id provided by the message;
- Build NR CGI from gNB ID + cell id
- Store UE-selected PLMN only in RRC UE context at NAS_FIRST_REQ for later
  Uplink NAS, stop storing PLMN in NGAP UE context
2025-10-22 14:48:34 +02:00
Guido Casati
c3eaef704f Add monolithic N2 handover test pipeline with B210 and Quectel
- Add XML pipeline for N2 handover testing
- Add Docker compose for two monolithic gNBs
- Features:
  * Two monolithic gNBs (gNB1, gNB2) with proper CU+DU parameters
  * Gradual attenuation control using RC4DAT attenuator (5s duration)
  * N2 handover sequence: gNB1 → gNB2 → gNB1
  * Proper channel mapping: ch1-2 for gNB1, ch3-4 for gNB2
  * Telnet server configuration for CI commands
  * Handover-specific neighbor configuration
  * Clean test state management with attenuator reset
2025-10-22 14:48:34 +02:00
Jaroslava Fiedlerova
918802d189 Merge remote-tracking branch 'origin/remove_ulsch_measurements' into integration_2025_w43 (!3716)
Remove unused ULSCH measurements at gNB
2025-10-22 13:30:45 +02:00
francescomani
e3aa91dec8 remove unused ulsch measurements at gNB 2025-10-22 09:24:54 +02:00
Guido Casati
70d23e43df Fetch sdap configuration from sdap-config and store in new struct sdap_config_t
This function is processing the NR_SDAP_Config_t received (from RRC) and
is storing the SDAP configuration in a structure of type sdap_config_t.
2025-10-21 16:50:44 +02:00
Jaroslava Fiedlerova
a0f58d7104 CI: Update CI conf files
Update based on !3645

Note: For some test configurations we still need to provide
ra_ResponseWindow, for more details, check commit message of
41d14b571c
2025-10-21 15:22:10 +02:00
Jaroslava Fiedlerova
5b5b9b3a30 CI: remove nssai_sd UE config when default value is used
The SD value defaults to 0xffffff (16777215 in decimal) when not explicitly
set on the UE.
2025-10-21 15:02:01 +02:00
francescomani
df3a768811 fix updating nrofReportedRS after reconfiguration 2025-10-21 15:01:42 +02:00
francescomani
48773b8517 fix handling of CSI measurement reports at L2 UE 2025-10-21 15:01:38 +02:00
Sakthivel Velumani
7807016ae6 pdcch: return pdcch processing is no ss configured 2025-10-21 12:03:02 +02:00
Bartosz Podrygajlo
ece9d51db3 Symbol based PDCCH processing
1. Refactor PDCCH PHY functions to take rxdataF of one OFDM symbol and
   produce LLR for each search space. The modified functions take
   rxdataF in a different format than that produced by nr_slot_fep(). So
   for now a memcpy is used to change the array structure. Once
   nr_slot_fep() is modified, this memcpy will no longer be needed and
   will be removed.
2. Modify DCI functions to decode DCI in the last PDCCH symbol and
   inidcate to MAC once.
3. Fix PDCCH monitoring for start symbol > 0.
4. Fix multiple PDCCH monitoring within slot.

Co-authored-by: Sakthivel Velumani <mail@sakthi.me>
2025-10-21 12:03:01 +02:00
Bartosz Podrygajlo
07ce1ed145 Fix reading reading out of bounds in nr_pdcch_extract_rbs_single
Fix reading out of bounds of rxdataF in the middle PRB in case of odd
cell bandwidth.
2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
dcb69986eb Fix segfault in nr_pdcch_extract_rbs_single
Fixed an issue where skipping unused PDCCH RBGs would cause the
function to write/read from outside the symbol boundary
2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
22a335b1a8 Fix too large array in UE PDCCH RX 2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
34052bf0ce Split PBCH and PDCCH processing in NR UE 2025-10-21 12:01:34 +02:00
Bartosz Podrygajlo
e1b06d177e Remove unused parameters from nr_pdcch_dmrs_rx 2025-10-21 12:01:34 +02:00
Sakthivel Velumani
ae690217dd Clean-up nr_slot_fep
1.Create new funtion nr_symbol_fep() to do OFDM demod of one symbol on
  all antennas. This is called by nr_slot_fep() for now. In the
  upcoming MR, this function will be called directly after reading
  each OFDM symbol from the radio.

2.Removed redundant memory alignment. DFT function performs memory
  alignment if the input memory is not aligned.
2025-10-21 12:01:34 +02:00
Robert Schmidt
45499290cf Merge remote-tracking branch 'origin/Restore_ue_capability_after_reest' into integration_2025_w43 (!3712)
Restore UE Capability IE after RRCReestablishment
2025-10-21 09:17:41 +02:00
Robert Schmidt
7a3da4b7a4 Merge remote-tracking branch 'origin/fix-ttracer-nrue' into integration_2025_w43 (!3709)
Fixes for T-Tracer to work with NR-UE

Fixes to align NR UE events with their definitions in T_messages.txt and
match the expected format in the tracer GUI parser.

Also fixes DL SNR to work in tracer GUI.
2025-10-21 09:12:02 +02:00
Robert Schmidt
af37aaee00 Merge remote-tracking branch 'origin/oran_beamforming' into integration_2025_w43 (!3605)
Support beam index in OAI 7.2 Fronthaul Interface

This branch supports beam index in OAI 7.2 Fronthaul Interface.

- For CP DL (PDSCH), nBeamIndex of the corresponding prbMapElm is set
  when sending IQ data in oran_fh_if4p5_south_out. nBeamIndex of the
  corresponding prbMapElm is set when sending IQ data in
  oran_fh_if4p5_south_out.
- For CP UL (PUSCH and PRACH), nBeamIndex of the corresponding prbMapElm
  is set in oran_fh_if4p5_south_out.

In addition, it fixes a couple of issues

- XRAN hardcodes nBeamIndex of PRACH to zero. Modify XRAN to support
  setting of nBeamIndex of PRACH and update xran F release patch.
- Fix the bug in calculating fh_config->neAxc where num_beams_period is
  multiplified twice

Testing methodology: Use Benetel O_RU for testing even though it does
not support beamforming. With successful registration and data transfer,
one could check the pcap on the fronthaul interface to see if CP packets
are with the right beam index.

Results:

1. Verified that CP-packets for SSB, DCI, PDSCH, PRACH, PDSCH, PUSCH,
   CSI-RS and SRS are with the right beam index
2. Verified that there is no side-effect on Benetel O_RU. UE could
   register properly.
3. Verified 4 SSB with ssb_PositionsInBurst_Bitmap = 85. Could see SSB
   and PRACH with 4 different indices.
2025-10-21 09:09:03 +02:00
Mario Joa-Ng
ad1b05cd01 need to set beam_id for UPLINK_SLOT when using analog BF 2025-10-20 17:21:12 +02:00
Mario Joa-Ng
65ef3cfa74 Set RX nBeamIndex according to beam allocation
Handle CP UL packet at xran_fx_tx_send_slot() instead of
xran_fh_rx_read_slot(), as the latter would set this information too
late (on reception on samples, but it needs to be filled in the CP
packet prior to reception).
2025-10-20 17:21:12 +02:00
Mario Joa-Ng
2d27e0fc0a Set TX nBeamIndex according to beam allocation
Initialize ru_info structure with beam information, and set beams on TX
direction. Initialize the number of antennas for both RX/TX in both
cases for completeness.
2025-10-20 17:21:12 +02:00
Mario Joa-Ng
c645e8b096 Fix xran: Correctly read PRACH beam index
Upgrade xran patch, bump version number.
2025-10-20 17:21:12 +02:00
luis_pereira87
f231655b31 Restore UE Capability IE after RRCReestablishment 2025-10-20 15:04:26 +01:00
alexjiao
4d372c5f58 Improve T-Tracer GUI for UE
Make PHY measurements diagrams larger for a better view, reduce PHY/MAC/RLC/PDCP/RRC textlog height
2025-10-17 23:59:58 +08:00
Jaroslava Fiedlerova
c8b09f570f CI: RF-Sim-Test-5G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 16:21:12 +02:00
Jaroslava Fiedlerova
2bacf7ba54 CI: RF-Sim-Test-4G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 16:20:01 +02:00
Jaroslava Fiedlerova
149c4dbf6e CI: RFSim-5G update XML files
Use node for Create/Deploy/Undeploy() (as done in !3579)
2025-10-17 12:17:15 +02:00
Jaroslava Fiedlerova
867d476397 CI: L2-Sim-Test-4G replace node name by localhost
By configuring the Jenkins pythonExecutor to match the test machine, we can use
localhost as the node for running individual test cases. This change makes it
easy to move tests across machines, as the only adjustment needed is updating
the pythonExecutor in Jenkins.
2025-10-17 11:36:39 +02:00
alexjiao
5df7d000f9 Fix for DL SNR to work in T-Tracer with NR-UE
Add missing T_UE_PHY_DL_TICK and T_UE_PHY_UL_TICK events
Calculate missing n0_power_avg_dB for noise measurements
2025-10-17 17:07:21 +08:00
alexjiao
8424c8ecb6 Fix crashes for T-Tracer to work with NR-UE
1. Fix UE_PHY_PDSCH_IQ event
2. Fix UE_PHY_PDCCH_ENERGY event
3. Fix UE_PHY_PDSCH_ENERGY event
4. Fix UE_PHY_MEAS event
All fixes align NR UE events with their definitions in T_messages.txt and match the expected format in the tracer GUI parser.
2025-10-17 17:06:36 +08:00
Jaroslava Fiedlerova
d0089369d3 CI: adjust TDD pattern in SA-B200 40 MHz TDD test 2025-10-17 10:59:49 +02:00
Shubhika Garg
b0ab5e8795 ci: Ensure DockerHub push failure doesn't halt pipeline
- catchError will prevent from abruptly aborting the entire pipeline upon failure.
  - Removed redundant `currentBuild.result` in post-failure block
2025-10-17 10:28:36 +02:00
Jaroslava Fiedlerova
7045140845 Merge branch 'integration_2025_w42' into 'develop'
Integration `2025.w42`

* !3623 Optimization of PDSCH precoding operation
* !3691 \[CI\] Ensure multi-arch DockerHub Push after successful image build
* !3696 asn1c doesn't follow c99 variables alias rules, it needs to be compiled this...
* !3685 Assign antenna ports correctly for 1 and 2 layers for aerial.
* !3495 Type0 PDSCH frequency allocation at L1 UE
* !3686 Remove NR L2 simulator code from UE
* !3693 Remove B200-specific clock-rate setting
* !3701 OAI UE: add shared RSRP Table 10.1.6.1-1 mapping function to helpers and adopt it RRC UE
* !3662 RRC UE file cleanup
* update doc/README.md
* !3608 use common scale channel functions for DLSCH and ULSCH
* !3694 fix non initialized DMRS port value in case of DCI00 at UE
* !3702 Extend F1 rfsim CI test
* !3704 remove unused global queues, dead code
* !3673 CI: Aerial: Add an UL-heavy pipeline test
* !3651 CI: Upgrade HO setup to use an attenuator
* !3695 CI: Upgrade Aerial setup to 25-2.1

Closes #940

See merge request oai/openairinterface5g!3700
2025-10-16 15:58:02 +00:00
Guido Casati
e4f7443552 Initialize NCC=0 on NGAP Initial Context Setup per 3GPP TS 33.501 §6.9.2.1.1
Remove unused kgnb_ncc: nh_ncc is already there

Closes #1008
2025-10-16 17:21:01 +02:00
Jaroslava Fiedlerova
1f0e9abe2f Merge remote-tracking branch 'origin/aerial_25-2.1' into integration_2025_w42 (!3695)
CI: Upgrade Aerial setup to 25-2.1

The purpose of this MR is to upgrade the cuBB image in the Aerial setup to
release 25-2.1 and update the doc/Aerial_FAPI_Split_Tutorial.md accordingly.
2025-10-16 15:38:49 +02:00
Reem Bahsoun
9620fd1a6a Update the nvIPC library to the one packaged with the new cuBB image. 2025-10-16 12:06:15 +02:00
Jaroslava Fiedlerova
296ae968b1 Merge remote-tracking branch 'origin/aerial-ul-heavy' into integration_2025_w42 (!3673)
CI: Aerial: Add an UL-heavy pipeline test

Add a new test with DSUUU TDD pattern, and try to reach 220Mbps.
2025-10-16 11:55:16 +02:00
Jaroslava Fiedlerova
10555929b0 Merge remote-tracking branch 'origin/CI-ho-attenuator' into integration_2025_w42 (!3651)
CI: Upgrade HO setup to use an attenuator

The goal of this MR is to upgrade HO CI setup to include a digital attenuator
that will allow us to trigger handover by attenuating the signals on the DUs.
2025-10-16 11:52:02 +02:00
Robert Schmidt
5f162c436e Add documentation for CI Handover Setup 2025-10-16 11:40:25 +02:00
Reem Bahsoun
9803fb29f6 Reorganize XML steps for F1 HO
Number linearly for easier navigation in HTML reports, and start DU1
before connecting the UE. Reset attenuation on all channels to 0.
2025-10-16 11:40:25 +02:00
Reem Bahsoun
e2075b57ca Clean up F1 HO config files
Harmonize gNB names with other files, remove control ports (not used),
put sl_ahead in right place.
2025-10-16 09:30:38 +02:00
Reem Bahsoun
d8e9a30fad Add attenuator commands to the XML file 2025-10-16 09:30:31 +02:00
Reem Bahsoun
c9b704ed64 Rename services in docker-compose for clarity
Harmonize with other files and use dashes.
2025-10-16 09:30:18 +02:00
Reem Bahsoun
464762e52b Fix: PCI on different SSB position 2025-10-15 20:14:48 +02:00
Reem Bahsoun
e375a13aa5 CI infra: rename UE name to reflect PLMN 2025-10-15 20:14:48 +02:00
Robert Schmidt
42a54a01a0 USRP: move time/clock source setting to later
Doing this before using set_master_clock_rate() on the B200 seems to
invalidate synchronization setting.

    [HW]   USRP clock set to 1759836386.000000 sec
    [...]
    [HW]   current pps at 3.286750, starting streaming at 4.286750

In other words, the current time setting was reset. With this change
now, we see

    [HW]   USRP clock set to 1759929873.000000 sec
    [...]
    [HW]   current pps at 1759929873.000000, starting streaming at 1759929874.000000

This is because changing clock sources (I assume setting the master
clock rate impacts the clock) can result in changing the time.  From the
documentation of [1]:

> Note: When changing clock sources, a previously set time will most
> likely be lost. It is recommended to set the time after changing the
> clock source. Otherwise, an unexpected time may line up with future PPS
> edges.

[1] https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a99254abfa5259b70a020e667eee619b9
2025-10-15 20:06:15 +02:00
Robert Schmidt
0ba9a9758b CI: expand %%workspace%% token
- main.py: replace %%workspace%% with CONTAINERS.eNBSourceCodePath in Custom_Command and Custom_Script

Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-10-15 20:06:15 +02:00
Guido Casati
f93a71977f Add band validation in neighbor cell configuration
- Add band mismatch check in valid_du_in_neighbour_configs function
- Ensures neighbor cell band matches serving cell band
- Prevents invalid neighbor configurations for handover
2025-10-15 20:06:15 +02:00
Robert Schmidt
8c85acbba6 Add script to control attenuation of Mini-Circuits RC*DAT 2025-10-15 20:06:15 +02:00
Robert Schmidt
1a472e4c0b Msg3 retx: check that current slot is DL
The code only checked that Msg3 would be scheduled during UL, but in
some combinations, e.g., with DSUUU, the current slot can very well be
UL as well => we would schedule DCI in UL slot.
2025-10-15 19:52:09 +02:00
Robert Schmidt
7ff05a98c2 Print frame/slot on UL failure 2025-10-15 19:52:09 +02:00
Robert
ae63a51ceb Increase PBCH Block power: better UL 2025-10-15 19:52:09 +02:00
Robert Schmidt
3b517dd5d2 Add CI XML fail for Aerial UL heavy pipeline 2025-10-15 19:52:09 +02:00
Robert
2db630e187 Add UL-heavy Aerial config
Update cuBB image to cubb-build:25-2.1_srs-ul-heavy (release 25-2.1 with
changes in the L1 config to test heavy ul)

Co-authored-by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
2025-10-15 19:51:50 +02:00
Jaroslava Fiedlerova
7ef1e79c0d Merge remote-tracking branch 'origin/remove-unused-fifo-queues' into integration_2025_w42 (!3704)
remove unused global queues, dead code
2025-10-15 13:49:08 +02:00
Robert Schmidt
ad878dc7df Merge remote-tracking branch 'origin/issue-940' into integration_2025_w42 (!3702)
Extend F1 rfsim CI test

Add one handover hop.

Closes #940
2025-10-15 08:35:34 +02:00
Robert Schmidt
6ddd2bd2af Merge remote-tracking branch 'origin/dci_00_dmrs_port' into integration_2025_w42 (!3694)
fix non initialized DMRS port value in case of DCI00 at UE

When transmitted PUSCH is neither scheduled by DCI format 0_1 with CRC
scrambled by C-RNTI, CS-RNTI, SP-CSI-RNTI or MCS-C-RNTI, nor
corresponding to a configured grant, the UE shall use [...] DM-RS port
0.

In UE code it was not set in case of DCI00 and that was leading to ULSCH
failures in some scenarios.
2025-10-15 08:35:11 +02:00
Robert Schmidt
2a67719e92 Merge remote-tracking branch 'origin/common_scale_function' into integration_2025_w42 (!3608)
use common scale channel functions for DLSCH and ULSCH

Follow up of !3035
2025-10-15 08:34:37 +02:00
Robert Schmidt
b9043d990a Doc: correctly link to non-indexed files in doc/README.md 2025-10-15 08:29:41 +02:00
francescomani
38c27680eb Merge remote-tracking branch 'origin/rrcUE_cleanup' into integration_2025_w42 (!3662)
RRC UE file cleanup

No functional change, just moving functions around so that these are
defined before their usage
2025-10-15 08:26:18 +02:00
Laurent THOMAS
1dd0194e32 remove unused global queues, dead code 2025-10-14 20:36:48 +02:00
francescomani
2b25b32b16 default dmrs port value in ulsch ue scheduler 2025-10-14 16:01:46 +02:00
francescomani
1cd3950178 fix non initialized DMRS port value in case of DCI00 at UE 2025-10-14 15:43:06 +02:00
Guido Casati
0622fb362f ci: container_5g_f1_rfsim - extend F1 handover with 1 more hop
- Trigger handover
- IdleSleep 2s
- Ping ext-dn from NR-UE
- Verify UE(1) connected to DU-PCI1

Validate absence of heap-use-after-free ASAN error found in !3600.

Closes #940
2025-10-14 14:46:19 +02:00
Guido Casati
520d52963e ci: container_5g_f1_rfsim - remove oai-nr-cuup-asan
Rationale: CU-UP image not required for this F1 rfsim workflow’s local pull stage.
2025-10-14 14:46:19 +02:00
Jaroslava Fiedlerova
aead89e9e7 Merge remote-tracking branch 'origin/oai-ue-fix-rsrp-mapping' into integration_2025_w42 (!3701)
OAI UE: add shared RSRP Table 10.1.6.1-1 mapping function to helpers and adopt
it RRC UE

- Add to common/utils/nr/nr_common remove from NR_MAC_UE/nr_ue_procedures.c
- Adopt in asn1_msg.c for MeasurementReport: this solves the following possible
  assert:

  Assertion (enc_rval.encoded > 0) failed!
  In do_nrMeasurementReport_SA() /oai-ran/openair2/RRC/NR/MESSAGES/asn1_msg.c:898
  ASN1 message encoding failed (MeasResultServMOList, 18446744073709551615)!

Motivation: unify RSRP-to-index mapping across layers and fix NR RRC
MeasurementReport encoding failures due to out-of-range values by reusing the
validated mapping.

Note: NR_RSRP-Range.c constraint: /* (0..127) */

Also refactored MeasurementReport to improve the code.
2025-10-14 13:17:24 +02:00
Mario Joa-Ng
4eb9dd3d38 set beam_id to -1 instead of 0. 2025-10-14 12:05:29 +02:00
Mario Joa-Ng
c36a6bcb47 Fix the bug in calculating fh_config->neAxc where num_beams_period is multiplified twice. 2025-10-14 11:56:03 +02:00
Jaroslava Fiedlerova
455553d129 Merge remote-tracking branch 'origin/remove-b200-specific-clock-rate' into integration_2025_w42 (!3693)
Remove B200-specific clock-rate setting

Avoid this clock-rate setting, as we already do it around usrp_lib.cpp:1121, so
it is superfluous. For instance, we also do not set a master clock rate for N3xx
either. This also enables us to synchronize B200 for handover settings,
e.g., for !3651.

See the commit message for more information about synchronization.
2025-10-13 21:50:29 +02:00
Guido Casati
d7c3968df2 RRC UE: MeasurementReport refactor
- Simplify do_nrMeasurementReport_SA API (encoder allocates local report)
- Adopt asn1cCalloc consistently
- Minor init cleanup for UL_DCCH message struct
2025-10-13 16:52:59 +02:00
Guido Casati
edc53ac9dd OAI UE: add shared RSRP Table 10.1.6.1-1 mapping helper and adopt it RRC UE
- Add to common/utils/nr/nr_common remove from NR_MAC_UE/nr_ue_procedures.c
- Adopt in asn1_msg.c for MeasurementReport: this solves the following assert:

Assertion (enc_rval.encoded > 0) failed!
In do_nrMeasurementReport_SA() /oai-ran/openair2/RRC/NR/MESSAGES/asn1_msg.c:898
ASN1 message encoding failed (MeasResultServMOList, 18446744073709551615)!

Motivation: unify RSRP-to-index mapping across layers and fix NR RRC MeasurementReport
encoding failures due to out-of-range values by reusing the validated mapping.

Note NR_RSRP-Range.c constraint:
	{ APC_CONSTRAINED,	 7,  7,  0,  127 }	/* (0..127) */
2025-10-13 16:52:59 +02:00
Jaroslava Fiedlerova
4efb142f9a Merge remote-tracking branch 'origin/remove_l2_sim' into integration_2025_w42 (!3686)
Remove NR L2 simulator code from UE

This MR removes NR (SA and NSA) L2 simulator from the codebase. The code, at
least at the UE side, was done at a time where there was no clear L2/L1 split
leading to a complex implementation that never worked as expected. The L2
simulator has been broken and removed from testing for long time and, once it
needs to be revived, it would require a complete new implementation.
2025-10-13 14:19:24 +02:00
Jaroslava Fiedlerova
3155bf907c Merge remote-tracking branch 'origin/type0_PDSCH' into integration_2025_w42 (!3495)
Type0 PDSCH frequency allocation at L1 UE
2025-10-13 14:18:51 +02:00
Jaroslava Fiedlerova
f4b93dce53 Merge remote-tracking branch 'origin/nhedberg/antennaPorts' into integration_2025_w42 (!3685)
Assign antenna ports correctly for 1 and 2 layers for aerial.

With this change aerial successfully decodes PUSCH with 2 UL layers.

The code should use sched_pusch->dmrs.num_dmrs_cdm_grps_no_data == 1 rather
than NFAPI_MODE != NFAPI_MODE_AERIAL, but that will make the changes a bit
more extensive.

Prior to this change, sending antenna_ports.val = 2 with rank 2 would tell
the UE to transmit on DMRS ports 2,3 rather than 0,1 causing it to not decode.
2025-10-13 14:16:34 +02:00
Jaroslava Fiedlerova
114b03f310 Merge remote-tracking branch 'origin/bug-alias-c99-asn1c' into integration_2025_w42 (!3696)
asn1c doesn't follow c99 variables alias rules, it needs to be compiled this...

asn1c doesn't follow c99 variables alias rules, it needs to be compiled this way.
Issue 509 (https://github.com/vlm/asn1c/issues/509 ) reported in
https://github.com/vlm/asn1c
2025-10-13 11:47:47 +02:00
Jaroslava Fiedlerova
14b6d0f20f Merge remote-tracking branch 'origin/CI-pushDH' into integration_2025_w42 (!3691)
[CI] Ensure multi-arch DockerHub Push after successful image build

This merge request improves the CI script to ensure that the DockerHub-Push
stage executes whenever:
- All Image Build stages succeed &
- doBuild is true &
- The event is a PUSH

This behavior ensures that Docker images are published whenever the image build
stages succeed, regardless of any failures in the Image Test stages.
Jetson ARM64/V8 and AMD64 images will now be published on DockerHub under the
same tag (develop or WEEK_TAG) to provide multi-architecture images.
2025-10-13 11:40:51 +02:00
Jaroslava Fiedlerova
769885c05a Merge remote-tracking branch 'origin/precoder_optimization' into integration_2025_w42 (!3623)
Optimization of PDSCH precoding operation

x86/aarch64 optimizations for precoding, more complete timing reporting in
nr_dlsim. Timing report in nr_dlsim now shows the total PDSCH generation time
and is broken down into Layer mapping, resource mapping and precoding.
The optimizations for x86 are basically reorganizing loops (for AVX512,AVX2,
NEON but not SSE2) to minimize repetitive instructions when formatting of the
precoder weights, and creation of inline functions for complex multiply-add.
AVX512 optimization was added. requiring AVX512BW. Detection of up to 4 PRBs
with common PMI for efficiency with AVX512 (was 2 in develop for AVX2).
For aarch64, native coding of the precoder to avoid inefficient SIMDe
translations for this operation.
nr_dlsim now uses default precoding indices depending on the scenario instead
of 0 which doesn't do precoding at all.

See merge request description for nr_dlsim test results.
2025-10-13 11:39:57 +02:00
francescomani
a20640accc feature set update 2025-10-13 11:08:51 +02:00
francescomani
d20b1120d4 remove temporary code to process type0 as type1 2025-10-13 10:57:49 +02:00
francescomani
9e43f998d9 further code cleanup 2025-10-13 10:57:49 +02:00
francescomani
d07771c538 formatting improvements 2025-10-13 10:57:49 +02:00
francescomani
7eb65f2adc adapt nr_dlsch_extract_rbs for type0 PDSCH freq allocation 2025-10-13 10:57:49 +02:00
francescomani
7d0bf3be51 include information about number of PRBs in frequency allocation structure 2025-10-13 10:57:49 +02:00
francescomani
99e4f54d61 type0 DLSCH frequency allocation for channel estimation 2025-10-13 10:57:49 +02:00
francescomani
e70a2b3cc1 use ad hoc UE FAPI information for PDSCH DMRS reference point 2025-10-13 10:57:49 +02:00
francescomani
121937ad4c input simplification in nr_pdsch_channel_estimation 2025-10-13 10:57:49 +02:00
Shubhika Garg
677a16a4a9 ci(docker): push ARM64 and AMD64 images to DockerHub
- On PUSH events, if image build stages succeed, trigger DockerHub push stage
 - Build the images, then trigger the Push to DockerHub stage
 - Publish Jetson (ARM64/v8) and AMD64 images under the same tag on DockerHub
2025-10-10 14:07:24 +02:00
Robert Schmidt
ce4e647fd8 USRP: move time/clock source setting to later
Doing this before using set_master_clock_rate() on the B200 seems to
invalidate clock settings:

    [HW]   USRP clock set to 1759836386.000000 sec
    [...]
    [HW]   current pps at 3.286750, starting streaming at 4.286750

In other words, the current time setting was reset. With this change
now, we see

    [HW]   USRP clock set to 1759929873.000000 sec
    [...]
    [HW]   current pps at 1759929873.000000, starting streaming at 1759929874.000000

This is because changing clock sources (I assume setting the master
clock rate impacts the clock) can result in changing the time.  From the
documentation of set_time_next_pps() [1]:

> Note: When changing clock sources, a previously set time will most
> likely be lost. It is recommended to set the time after changing the
> clock source. Otherwise, an unexpected time may line up with future PPS
> edges.

[1] https://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a75b1c5375549e6a446d686ee7d9b4e14
2025-10-10 12:49:29 +02:00
Robert Schmidt
dab8db76d7 CI: Aerial: Split out CN start/stop from main XML
The next commit introduces an "UL-heavy" configuration to be tested with
Aerial. To avoid waiting for the CN, start&stop it once at the beginning
of the CI run.
2025-10-09 19:25:11 +02:00
Robert Schmidt
92bc0aee0e Merge branch 'integration_2025_w41' into 'develop'
Integration `2025.w41`

* !3472 Replace int16 min when obvious
* !3689 Fix OAI UE memory leaks
* !3675 fix RSRP computation at UE
* !3688 Fixes to prevent assertion due to 0 PRB allocation
* !3680 OC PhySim deployment: always undeploy safely
* !3471 SRS noise power
* !3679 CI: Enable Physim threshold check for tests on Caracal and GH
* reduce RFsim F1 throughput after handover

Closes #828

See merge request oai/openairinterface5g!3692
2025-10-09 17:15:02 +00:00
Raymond Knopp
0dcea09e87 bugfix for arm-v8x/v9 2025-10-09 16:04:45 +02:00
Laurent THOMAS
e056acc896 use c16_t type for pm weights, as it is already same type
simplify SIMD version of precoder
2025-10-09 16:04:43 +02:00
Raymond Knopp
fb47748fae fixed precoder_simd after CI run (test for n_layers=1) failed 2025-10-09 16:01:09 +02:00
Raymond Knopp
264f7cb817 aarch64 optimizations for precoding, more complete timing reporting in
nr_dlsim
2025-10-09 16:01:09 +02:00
Raymond Knopp
e44d498cba optimization of DLSCH precoding for AVX2 2025-10-09 16:01:09 +02:00
Raymond Knopp
34ba85f3b1 precoder optimizations for AVX512 2025-10-09 16:01:09 +02:00
Raymond Knopp
8711556d9e Handle larger RB step size in precoding 2025-10-09 16:01:09 +02:00
Raymond Knopp
be236d450e Add measurements for performance analysis 2025-10-09 16:01:09 +02:00
Laurent THOMAS
c537e2cabe move complex numbers types above phy layer, as they are used in fapi for example 2025-10-09 16:01:09 +02:00
Laurent THOMAS
8b9098b7ca remove unused declarations in common/platform_types.h 2025-10-09 16:01:09 +02:00
Reem Bahsoun
1a65abb56c Upgrade cuBB image to 25-2.1 and update doc to match 2025-10-09 15:00:47 +02:00
Laurent THOMAS
00a7890449 asn1c doesn't follow c99 variables alias rules, it needs to be compiled this way. issue #509 reported in https://github.com/vlm/asn1c 2025-10-09 14:04:14 +02:00
Robert Schmidt
ba8b23772e CI RFsim 5G F1: reduce DL iperf throughput
Reduce throughput requirement, as this fails once two DUs are connected
to a UE, which creates more load on the machine and frequently fails
with low throughput.
2025-10-09 08:48:26 +02:00
Robert Schmidt
dd868fd25e Merge remote-tracking branch 'origin/ci-update-physim-threshold' into integration_2025_w41 (!3679)
CI: Enable Physim threshold check for tests on Caracal and GH

This MR adds support for configurable timing threshold files in PhySim
tests.

- Introduces a new CMake cache variable PHYSIM_CHECK_FILES to specify
  one or more timing threshold files (semicolon-separated).
- Enables optional enforcement of timing thresholds check in PhySim
  tests without changing existing test definitions.
- Defines timing thresholds for LDPC encoding/decoding in nr_ulsim,
  nr_dlsim and ldpctest on Caracal and GH machines.
2025-10-09 08:46:46 +02:00
Robert Schmidt
1ffa012014 Merge remote-tracking branch 'origin/SRS-noise-power' into integration_2025_w41 (!3471)
SRS noise power

This MR implements the calculation of the noise power based on SRS in a
different way, and check whether SNR is more accurate or not. This MR is
built on top of the MR: !3460

A graph was added in T_Tracer to observe UL-SNR calculated using SRS.

See merge request description for measurement results.
2025-10-09 08:45:14 +02:00
Jaroslava Fiedlerova
6843625615 Add separate XML file for PhySim with timing check on GH 2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
5ec7bcdcd2 Add timing check for physim tests on GraceHopper
Update Dockerfile to pass -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake".
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
bcc616e654 Increase timeout for physim deployments
Extend the timeout for physim deployments on OC to allow tests to complete
reliably.
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
31af716ccb Update timing thershold for offload tests on Caracal 2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
ec8efe1b7e Unify physim test definition
Replace the previous add_timed_physim_test() macro with add_physim_test()
to use a single, unified function for defining physim tests. This simplifies
the test configuration and removes redundant macro definitions while keeping
all existing functionality.

This change follows up on the earlier addition of support for including
custom timing threshold files (PHYSIM_CHECK_FILES).

Update existing tests accordingly.
2025-10-08 19:45:14 +02:00
Jaroslava Fiedlerova
8910406a9e Add support for including custom timing threshold files in physim tests
Introduce a new CMake variable PHYSIM_CHECK_FILES to specify CMake files
(semicolon-separated) containing timing thresholds for timed physim tests.
2025-10-08 19:44:35 +02:00
francescomani
6289409f15 remove nsa UE option code 2025-10-08 18:21:10 +02:00
francescomani
f4e4ef74ff remove emulate_l1 code 2025-10-08 17:39:29 +02:00
Jaroslava Fiedlerova
78d91db964 Include timing analysis file in physim.rhel9 image
Add missing timinig analysis scripts to RHEL9 physim docker image. These files
are now copied from the build stage to /oai-ran/openair1/SIMULATION/tests/,
where they are expected by ctest.

Resolves following issue when running ctest in docker container:
CMake Error: Error processing file: /oai-ran/openair1/SIMULATION/tests/RunTimedTest.cmake
2025-10-08 10:57:50 +02:00
Robert Schmidt
a3ac1dbdfe analyze-timing.sh: check only last measurement occurrence
For some physical simulators, we have multiple SNR iterations.

The previous version of the script correctly retained only the last
measurement, but if a previous measurement condition set RC=1, the
script would fail although the final "good" run might fulfil the
measurement condition (IOW, it would show SUCCESS, but still fail on the
check).

Instead, check if all measurement lines finish on SUCCESS, which handles
the above case.
2025-10-08 10:57:50 +02:00
Robert Schmidt
b012700fe4 Fix analyze-timing.sh for mawk compatibility
The awk script in analyze-timing.sh used syntax that works with gawk but fails
on systems where mawk is the default implementation, producing errors such as:

awk: /dev/fd/3: line 6: syntax error at or near ,
-- test command finished with SIGPIPE

Concretely, the match(text, pattern, variable) function does not exist
in mawk, as it cannot capture matches in variables. Work around by
substituing strings, and force a numeric comparison.
2025-10-08 10:57:50 +02:00
Jaroslava Fiedlerova
ddf81a175c Merge remote-tracking branch 'origin/physim-deploy-failsafe' into integration_2025_w41 (!3680)
OC PhySim deployment: always undeploy safely

Always undeploy physim safely. See commits for more details
2025-10-08 08:46:03 +02:00
Jaroslava Fiedlerova
98fea81b39 Merge remote-tracking branch 'origin/fix_0_tbs' into integration_2025_w41 (!3688)
Fixes to prevent assertion due to 0 PRB allocation

Assertion (NPRB>0 && (NPRB + RBstart <= BWPsize)) failed!
In PRBalloc_to_locationandbandwidth0() /home/user/openairinterface5g/common/utils/nr/nr_common.c:506
Illegal NPRB/RBstart Configuration (0,51) for BWPsize 51

Probably caused by missing safeguards to prevent computing TBS with 0 PRB
as input.
2025-10-08 08:43:49 +02:00
Nick Hedberg
9949c7e71b Assign antenna ports correctly for 1 and 2 layers for aerial.
Removes Aerial-specific changes and harmonizes with OAI full-stack.
2025-10-07 17:21:35 +02:00
Jaroslava Fiedlerova
7459e73277 Merge remote-tracking branch 'origin/fix-ue-mem-leaks' into integration_2025_w41 (!3689)
Fix OAI UE memory leaks

Fix 1: Replaced asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer to properly
       free nested ASN.1 structures in cell group configuration.
Fix 2: Removed premature nullification of dedicatedNAS_Message->buf in
       dlInformationTransfer processing to allow proper ASN.1 cleanup.
Fix 3: Fixed memory ownership in nr_rrc_process_dedicatedNAS_MessageList by
       copying OCTET_STRING data instead of transferring ownership, preventing
       ASN.1 cleanup from losing track of allocated memory

Closes #828
2025-10-07 14:33:15 +02:00
Jaroslava Fiedlerova
2424c182d6 Merge remote-tracking branch 'origin/fix_rsrp_ue' into integration_2025_w41 (!3675)
fix RSRP computation at UE

Conflicts between !3595 (merged) and !3596 (merged) leading to double conversion
of RSRP into index in L1 and L2. With this fix it is only converted in L2.
2025-10-07 14:32:35 +02:00
Jaroslava Fiedlerova
b3007ce55b Merge remote-tracking branch 'origin/replace-INT16_MIN-when-obvious' into integration_2025_w41 (!3472)
Replace int16 min when obvious

INT16_MIN doesn't have a opposite value on 16 bits, so SIMD abs (absolute()), or
simple C operations doesn't make the expected result.

example:
(gdb) p (short)-(short)-32768
$4 = -32768
(gdb)

This MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where
it used for mathematical operations. This is not perfect, nevertheless reduces
overflow probability.
We saw in some places a dirty case: code do first calls to _mm_adds_epi16
(or subs), so because of the saturated operations, the probability to reach
32767 and -32768 is higher than the other numbers but, _mm_abs_epi16(), or
negate operations (conjugate) can follow, that is making strong error as
abs(-32768)=-32768
2025-10-07 14:27:30 +02:00
Jaroslava Fiedlerova
bd1dadaa79 OC PhySim deployment: log bash script commands
Also, don't use "set -x" debugging for oc login command:
ci-scripts/cls_cmd.py:242 sets BASH_XTRACEFD=1, which makes that all
"set -x" output is in stdout, leading to a redirect to the file into
which we redirect. This would lead to the following error with
unsuccessfull oc login:

  error: You are not a member of project "****-core-for-ci-ran".
  Error from server (Forbidden): imagestreams.image.openshift.io "oai-physim"
  is forbidden: User "system:anonymous" cannot get resource "imagestreams" in
  API group "image.openshift.io" in the namespace "****-ran"
2025-10-07 08:09:20 +02:00
Robert Schmidt
958fe1ed75 OC PhySim deployment: always undeploy safely
This fixes basically two problems. First, remove "set -e", which leads
to the script exiting on error. For instance, there was the sleep which
should account for the time of the pod being in "ContainerCreating", but
might not be enough. In that case, the script would exit, leaving the
pod deployed.

Second, a fixed time is not good, as it can be too short and unduly
prolong waiting time. Replace with a loop.
2025-10-06 16:16:39 +02:00
francescomani
8411a428db prevent faulty behavior of nr_compute_tbs when null input is not producing TBS = 0 2025-10-06 11:10:38 +02:00
Guido Casati
d6047cd83d Fix memory leak in dlInformationTransfer case
- Remove unnecessary NULL assignment for dedicatedNAS_Message->buf
- The original buffer is copied and transfered to NAS, so it can be properly freed by ASN.1 structure cleanup

Root cause: Code was nullifying dedicatedNAS_Message->buf pointer before ASN.1 cleanup could free the original allocation, causing the leak from OCTET_STRING_decode_uper.

AddressSanitizer leak trace (FIXED):
Direct leak of 119 byte(s) in 3 object(s) allocated from:
    /#0 0x7ec2a42b4c38 in __interceptor_realloc
    /#1 0x555fade852e0 in OCTET_STRING_decode_uper
    /#9 0x555fadb48b11 in nr_rrc_ue_decode_dcch.
2025-10-03 12:39:14 +02:00
Guido Casati
9639cbb436 Fix memory leak in nr_rrc_process_dedicatedNAS_MessageList
The leak was caused by improper memory ownership handling in the
dedicatedNAS_MessageList processing. The function was transferring
buffer ownership to NAS messages and then preventing ASN.1 cleanup
from freeing the original allocations by setting
list.count = 0, causing a memory leak.

Leak trace:
Direct leak of 40 byte(s) in 1 object(s) allocated from:
    /#0 0x7f2ce3ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x567907083f0f in OCTET_STRING_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/OCTET_STRING_uper.c:89
    /#2 0x5679070ed5e6 in SET_OF_decode_uper /cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/constr_SET_OF_uper.c:70
    /#3 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#4 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#5 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#6 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#7 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#8 0x56790709a403 in CHOICE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_CHOICE_uper.c:84
    /#9 0x56790707b6dc in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:118
    /#10 0x56790708b5f1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    /#11 0x567906d44b4b in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:2212
    /#12 0x567906d520a3 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:2615
    /#13 0x567906d5f77e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:2501
    /#14 0x7f2ce2494ac2 in start_thread nptl/pthread_create.c:442

Fix:
- Copy OCTET_STRING data instead of transferring ownership
- Allow ASN.1 cleanup to properly free original allocations

This fixes the leak that occurred during rrcReconfiguration
message processing when dedicatedNAS_MessageList was present.

Closes #828
2025-10-03 12:35:12 +02:00
Guido Casati
9086fb63de Fix memory leak in nr_rrc_ue_process_masterCellGroup
- Replace asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer cleanup
- Fixes improper memory management of NR_CellGroupConfig structures

Root cause: asn1cFreeStruc only calls ASN_STRUCT_RESET + free(), which doesn't properly free nested ASN.1 allocations. ASN_STRUCT_FREE frees all nested structures completely.

AddressSanitizer leak trace:
Direct leak of 288 byte(s) in 1 object(s) allocated from:
    /#0 0x7fb72bab4a57 in __interceptor_calloc
    /#1 0x593752b28d0d in SEQUENCE_decode_uper
    /#2 0x593752b9a546 in SET_OF_decode_uper
    /#3 0x593752b2863c in SEQUENCE_decode_uper
    /#4 0x593752b47363 in CHOICE_decode_uper
    /#5 0x593752b2863c in SEQUENCE_decode_uper
    /#6 0x593752b2863c in SEQUENCE_decode_uper
    /#7 0x593752b2863c in SEQUENCE_decode_uper
    /#8 0x593752b2863c in SEQUENCE_decode_uper
    /#9 0x593752b2863c in SEQUENCE_decode_uper
    /#10 0x593752b38551 in uper_decode
    /#11 0x5937527d859f in nr_rrc_ue_process_masterCellGroup
    /#12 0x5937527d9408 in nr_rrc_process_reconfiguration_v1530
    /#13 0x5937527dd5bb in nr_rrc_ue_process_rrcReconfiguration
    /#14 0x5937527f5e6b in nr_rrc_ue_decode_dcch
    /#15 0x5937527ff003 in rrc_nrue
    /#16 0x59375280c6de in rrc_nrue_task
2025-10-03 10:38:38 +02:00
Laurent THOMAS
7355b55ad1 this MR replaces constants INT16_MIN by -INT16_MAX (so -32767) in places where it used for mathematical operations 2025-10-03 10:02:48 +02:00
francescomani
42b6576d81 fix RSRP computation at UE (let the higher layers compute the index) 2025-10-03 08:42:41 +02:00
rmagueta
8ca05e51ac Added graph in T_Tracer to observe UL-SNR calculated using SRS 2025-10-02 11:43:07 +01:00
rmagueta
799934024e SRS-based noise calculation using holes 2025-10-02 11:43:07 +01:00
Jaroslava Fiedlerova
55a56002de Merge branch 'integration_2025_w40' into 'develop'
Integration: `2025.w40`

* !3672 \[ci\] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally
* !3609 BWP with no PRACH occasions
* !3657 do not assert for mismatched TBS in phy-test mode
* !3667 CI: Updates for HO and AW2S pipeline
* !3674 NR UE: remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup
* !3478 NR UE: add UCI (HARQ-ACK/NACK) on PUSCH support at PHY
* !3664 modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable
* !3665 Make all targets compile
* !3554 Handle failures in RRCReconfiguration encoding gracefully
* !3655 Improvements to N2 handover
* !3678 Add OAIUE longrun pipeline
* !3628 Update documentation

Closes #979, #726, #959, #967, and #930

See merge request oai/openairinterface5g!3676
2025-10-02 08:43:12 +00:00
Robert Schmidt
97185a6921 Merge remote-tracking branch 'origin/update_documentation' into integration_2025_w40 (!3628)
Update documentation
2025-10-01 22:28:38 +02:00
Robert Schmidt
5047bacd6d Merge remote-tracking branch 'origin/oaiue_longrun' into integration_2025_w40 (!3678)
Add OAIUE longrun pipeline

Add a new XML file for OAIUE longrun.

- Test description:
  * 40 MHz BW, n78
  * gNB with USRP N310, UE with USRP N310
  * CN deployed on OC
- Test duration: 1 hour
- Test scenario: 3x DL 10 min test (20 Mbps) + 3x UL 10 min test (5
  Mbps)
2025-10-01 22:21:13 +02:00
Robert Schmidt
7eb33a4003 Workaround: give pod deployment more time
pods deployed through helm occasionally take more time, leading to
errors such as

    Error from server (BadRequest): container "physim" in pod "oai-physims-4g-sczvl" is waiting to start: ContainerCreating

Give a bit more time before checking the logs. We cannot wait too much,
as the container will just end on FINISHED in running state, so the logs
will always be there.
2025-10-01 22:13:50 +02:00
Jaroslava Fiedlerova
3e5681abbd Merge remote-tracking branch 'origin/n2-handover-minor-fixes' into integration_2025_w40 (!3655)
The goal of this MR is to resolve memory leaks, prevent crashes, and improve code quality.

Bug Fixes:
- Fix crash in get_du_for_ue when F1 UE data doesn't exist during N2 handover
- Fix memory leaks in handover preparation and UE context cleanup
- Fix duplicate handover request handling with proper UE context validation

Code Quality Improvements:
- Prevent ASN.1 double-free bug in NGAP memory management (caller ownership
  principle)
- Fix hardcoded instance 0 bug in UE context release command
- Refactor e1_send_bearer_updates into three specialized functions with
  extracted common code
- Replace impossible ID mismatch checks with DevAssert statements
- Fix inconsistent equality checking patterns in E1AP bearer context management
- Improve error message consistency across NGAP handover functions
- Optimize PLMN identity assignment using struct copies

Documentation Enhancements:
- Improve RRC neighbor configuration documentation with actual parameter names
- Add same-machine setup guidance for N2 handover with network configuration
  notes
- Fix grammar errors and standardize naming conventions

Follow up to !3334 (merged)
2025-10-01 18:08:28 +02:00
calvin_peyron
8fcea7c314 Update UL_MIMO documentation 2025-10-01 16:22:46 +02:00
calvin_peyron
23e0f50af0 Change D2D emulator documentation format 2025-10-01 16:22:46 +02:00
calvin_peyron
2dd72d40cb Put documentation images in right folder 2025-10-01 16:22:46 +02:00
calvin_peyron
e7a45a304b Remove unused and outdated documentation 2025-10-01 16:22:46 +02:00
calvin_peyron
2d2f61f253 Fix link in rrc-usage.md 2025-10-01 16:22:46 +02:00
calvin_peyron
aa323b02f2 Fix link in mac-usage.md 2025-10-01 16:22:46 +02:00
calvin_peyron
0721c0fad0 Fix image link inside F1AP-lib.md 2025-10-01 16:22:46 +02:00
calvin_peyron
25918898a7 Update F1-design.md 2025-10-01 16:22:46 +02:00
calvin_peyron
acd3634d27 Update E1-design.md 2025-10-01 16:22:46 +02:00
Laurent THOMAS
a0d8baf323 update and rename TESTING_GNB_W_COTS_UE.md to describe actual content 2025-10-01 16:22:46 +02:00
calvin_peyron
2ea4cbbd93 update env variable usage documentation 2025-10-01 16:22:40 +02:00
Jaroslava Fiedlerova
8348f83a1f Merge remote-tracking branch 'origin/issue-979' into integration_2025_w40 (!3554)
Handle failures in RRCReconfiguration encoding gracefully

Closes #979
2025-10-01 14:51:43 +02:00
Jaroslava Fiedlerova
5adfeb80c3 Merge remote-tracking branch 'origin/make-all-targets-compile' into integration_2025_w40 (!3665)
Make all targets compile

This MR enables us to compile all targets, and does that in one CI test. This
closes #726. Now, this should work:

cd ~/openairinterface5g
mkdir build && cd build
cmake .. -GNinja && ninja

To achieve this, I did the following:
- some targets have been fixed (warnings, errors)
- some targets have been removed when they did not seem to serve a good purpose
  (e.g., an almost empty test)
- some targets have been commented (e.g., LTE simulators, some unitary tests)
  which we maybe want to revive in the future
- some targets built when just building with ninja, but not all. For instance,
  telnetsrv_enb would typically build, but it was missing a dependency. Doing
  cmake .. -GNinja && ninja telnetsrv_enb would show this (in develop)

To help with the last bullet point, there is a script compile_targets.sh that
can compile targets independently (and in parallel, to not wait for ages) to
show that targets compile properly compile-targets.patch.

In almost all cases, the problem is that a specific module uses the logging
module, which depends on T, which needs to dynamically create headers. The way
to do this is to have a dependency, and many targets use generate_T or {T_LIB}
({} intentional: T might be absent, so then it evaluates to nothing). However,
not all do this, and those that depend on T actually don't depend on T, but on
the logging module, which in turn depends on T. So in many places, a simple
dependency onto log_headers fixes this problem, and generate_T or {T_LIB}
simplifies the dependency (but not always). The commits should have more info.

Note that at least the targets in FlexRIC do not all compile, at least in the
configuration that we use in docker/Dockerfile.build.ubuntu. So for the latter,
we cannot build with a simple ninja, but FlexRIC seems to be the only one that
does not compile. Since FlexRIC is a separate repository, that needs to be
addressed in the corresponding repository.
2025-10-01 14:48:45 +02:00
Jaroslava Fiedlerova
2dde472cfd Adjust gNB conf file in OAIUE test
Increase prach_dtx_threshold to avoid fake PRACH detection.
2025-10-01 13:36:53 +02:00
Jaroslava Fiedlerova
7935c19d21 Fix in CreateWorkspace
Previously, the script attempted to directly merge ${merge}, which could f
ail if the branch was not already available locally. This update explicitly
fetches the branch from origin and then merges FETCH_HEAD with --ff, ensuring
the merge works even when the branch is missing locally.
2025-10-01 13:36:53 +02:00
Jaroslava Fiedlerova
6193d7c7f4 Create XML for OAIUE longrun pipeline
Test duration: 1 hour
Test scenario: 3x DL 10 min test (20 Mbps) + 3x UL 10 min test (5 Mbps)
2025-10-01 13:36:49 +02:00
Guido Casati
dcb10ffc94 Handover tutorial: fix minor issues and add same-machine setup guidance
- Update opening statement to reflect both F1 (intra-gNB) and N2 (inter-gNB) handover support
- Fix grammar error: 'either by by decision' -> 'either a decision'
- Standardize naming: 'gNB PCI1' -> 'gNB-PCI1'
- Fix typo: 'neighbor call' -> 'neighbor cell'
- Remove --sa flag from N2 handover target gNB command for consistency
- Add network configuration notes for same-machine setups:
  * IP address assignment instructions to avoid network conflicts
  * Target gNB command options for proper network interface configuration
2025-10-01 11:36:22 +02:00
Guido Casati
dcd7ee711b Improve RRC neighbor configuration documentation
- Move 'What is a gNB neighbor?' explanation from rrc-usage.md to handover-tutorial.md where it belongs
- Replace generic parameter names with actual configuration parameter names and specific descriptions (e.g. gNB_ID, nr_cellid)
- Add example configuration structure showing proper syntax
- Add missing 'band' parameter that was not listed before
- Provide concrete examples and exact constraints for each parameter
- Cross-reference between documents for better organization

This addresses documentation issues where generic parameter descriptions were
not useful for developers configuring neighbor cells.
2025-10-01 11:36:22 +02:00
Guido Casati
4aafd1e369 Simplify N2 handover test to focus on N2 handover only
- Remove extensive traffic testing before HO (iperf tests 030001, 030002)
- Do 1 ping test after attachment
- Reduce ping packet count from 100 to 50 packets for remaining connectivity test

Time savings: ~2-3 minutes by removing traffic validation overhead
2025-10-01 11:36:22 +02:00
Guido Casati
9d9f272e74 Refactor: split e1_send_bearer_updates into specialized functions
Split monolithic e1_send_bearer_updates into three focused functions:
- e1_send_bearer_updates(): DRB setup from F1 UE Context Modification Response
- e1_request_pdcp_status(): Request PDCP status during inter-CU handover
- e1_notify_pdcp_status(): Notify CU-UP with PDCP status during handover

Extract common helpers:
- append_e1_drb_mod_req(): Common DRB-to-mod for bearer request logic
- e1_send_bearer_modification_request(): Common sending step

Bug fixes:
- Fix loop bounds (i < n instead of i == n)
- Fix array access bounds checking
- Fix DRB ID consistency

Memory management:
- Add missing free_e1ap_context_mod_request calls
- Improve error handling with early returns

In the process:
- Simplify cuup_notify_reestablishment with FOR_EACH_SEQ_ARR loop
- Adopted all callers to use new consolidated functions

Improves maintainability and eliminates complex conditional logic.
2025-10-01 11:36:22 +02:00
Guido Casati
205bf7c993 Add NULL check for DU lookup in handover notify
Add early return if get_du_by_cell_id returns NULL to prevent
segmentation fault when accessing DU structure members.
2025-10-01 11:36:22 +02:00
Guido Casati
1fc057cb08 Optimize PLMN identity assignment in handover procedures
Replace field-by-field assignment with struct copy for plmn_identity.
Both source and destination use identical plmn_id_t type, making
this change safe and more maintainable.

- Reduces lines of code
- More readable and less error-prone
- Single memory copy operation instead of multiple field assignments
2025-10-01 11:36:22 +02:00
Guido Casati
c6a06dc81f Improve error message consistency in NGAP handover functions
- ngap_gNB_handover_notify: Fix misleading error message from 'Failed to encode'
  to 'Failed to find UE context' for better clarity
- ngap_gNB_handle_ul_ran_status_transfer: Standardize error message format
  from 'Could not find' to 'Failed to find' for consistency across functions

This ensures consistent and accurate error reporting across all NGAP handover functions.
2025-10-01 11:36:22 +02:00
Guido Casati
0cbed89b03 Replace malloc_or_fail with calloc_or_fail for safer memory allocation
- Update encoder functions in ngap_gNB_mobility_management.c to use calloc_or_fail
- Provides zero-initialized memory and consistent error handling
- Prevents uninitialized fields and improves memory safety

Also:

- Update NG Setup Request to use calloc_or_fail
2025-10-01 11:36:22 +02:00
Guido Casati
3e8354727e Remove redundant NULL checks for handover encoder functions
Handoer encoder functions never return NULL - they either return
a valid pointer or terminate the program. Remove dead code paths.
2025-10-01 11:36:22 +02:00
Guido Casati
c2e8743a7b Optimize create_measgap_config to eliminate unnecessary allocation
- Replace inefficient 'allocate, extract, free' pattern with direct value extraction
- Remove unused functions get_gap_config_from_smtc() and get_gap_config()
- Add extract_gap_config_from_smtc() that extracts values directly without allocation
- Eliminates use-after-free risk and improves performance
- No allocation overhead, no memory leaks
2025-10-01 11:36:22 +02:00
Guido Casati
feea066c3f Fix measurement gap config memory leak in create_measgap_config
- Add missing ASN_STRUCT_FREE for NR_MeasGapConfig in create_measgap_config
- Fix 48-byte measurement gap config leak in get_gap_config_from_smtc

AddressSanitizer backtrace:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
    /#0 0x7d32adab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x5751f99cbb79 in calloc_or_fail /home/guido/repo/openairinterface5g/develop/common/utils/utils.h:74
    /#2 0x5751f99cbb79 in get_gap_config_from_smtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4164
    /#3 0x5751f99cbb79 in create_measgap_config /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4310
    /#4 0x5751f9964abe in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:709
    /#5 0x5751f979e568 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
    /#6 0x5751f97a637f in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
    /#7 0x5751f9703608 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2641
    /#8 0x5751f9706b7b in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3020
    /#9 0x7d32ac494ac2 in start_thread nptl/pthread_create.c:442

Root cause: create_measgap_config allocated NR_MeasGapConfig via get_gap_config_from_smtc()
but never freed it after extracting the needed values to populate the measgap_config_t
return structure.
2025-10-01 11:36:22 +02:00
Guido Casati
5e3b4c497c Refactor handover context cleanup and fix memory leak in N2 handover source gNB path
- Add missing handover context cleanup in rrc_CU_process_ue_context_release_complete
- Fix 16-byte handover context leak in N2 handover source gNB trigger path

AddressSanitizer backtrace:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    /#0 0x7fee67cb4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x58059e33454b in calloc_or_fail /home/guido/repo/openairinterface5g/develop/common/utils/utils.h:74
    /#2 0x58059e33454b in alloc_ho_ctx /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:47
    /#3 0x58059e339e4d in nr_rrc_trigger_n2_ho /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:556
    /#4 0x58059e33ae93 in nr_HO_N2_trigger_telnet /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:611

Root cause: Handover context allocated in N2 handover source gNB trigger path (nr_rrc_trigger_n2_ho)
for any successful N2 handover but not properly freed in all handover completion scenarios.
The UE context release complete handler was missing cleanup for handover context.

Solution: refactor handover context cleanup

- Move nr_rrc_finalize_ho() call to rrc_delete_ue_data() for centralized cleanup
- Remove redundant nr_rrc_finalize_ho() calls from handover failure paths:
  * rrc_CU_process_ue_context_release_request() - UE not deleted yet
  * invalidate_du_connections() - UE will be deleted later
- Keep nr_rrc_finalize_ho() calls in handover success paths where UE continues operating
- Ensures handover context is cleaned up exactly once when UE is actually deleted
- Prevents potential double-free and use-after-free issues in handover cleanup

This centralizes all UE data cleanup in rrc_delete_ue_data() and ensures
handover context is properly managed throughout the UE lifecycle and cleaned up
when UE delete happens.
2025-10-01 11:36:22 +02:00
Jaroslava Fiedlerova
7c82312b6d Merge remote-tracking branch 'origin/fix-modulation-luts-size' into integration_2025_w40 (!3664)
modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable
2025-09-30 17:38:09 +02:00
Jaroslava Fiedlerova
3277018fce Merge remote-tracking branch 'origin/uci_on_pusch_phy' into integration_2025_w40 (!3478)
NR UE: add UCI (HARQ-ACK/NACK) on PUSCH support at PHY

Add UCI (HARQ-ACK/NACK) on PUSCH support at nrUE PHY, the multiplexing procedure
can be found in TS 38.212 section 6.2.7.

Verified with 3rd-pary gNB for cases when HARQ payload bits length is 1, 2 or 3.

Closes #959 and #967 .
2025-09-30 17:37:01 +02:00
Jaroslava Fiedlerova
3e79774386 Enable DLSCH performance logging in nr_dlsim 2025-09-30 14:03:20 +02:00
Jaroslava Fiedlerova
ff3245ea90 Enable ULSCH performance logging in nr_ulsim 2025-09-30 14:03:20 +02:00
Guido Casati
915c41c127 Fix MTC sequence memory leak in UE context setup
- Add missing ASN_STRUCT_FREE for NR_MeasurementTimingConfiguration in ue_context_setup_request
- Fix 64-byte MTC sequence leak in get_nr_mtc → SEQUENCE_decode_uper

AddressSanitizer backtrace:
Direct leak of 64 byte(s) in 1 object(s) allocated from:
    /#0 0x7dcfcb8b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    /#1 0x591fcc59b67d in SEQUENCE_decode_uper /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
    /#2 0x591fcc57eaa1 in uper_decode /home/guido/repo/openairinterface5g/develop/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
    /#3 0x591fcbdbedeb in get_nr_mtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4216
    /#4 0x591fcbd58188 in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:635
    /#5 0x591fcbb92568 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
    /#6 0x591fcbb9a37f in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
    /#7 0x591fcbaf7608 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2640
    /#8 0x591fcbafab7b in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3019
    /#9 0x7dcfca294ac2 in start_thread nptl/pthread_create.c:442

Root cause: ue_context_setup_request allocated NR_MeasurementTimingConfiguration via
get_nr_mtc() but never freed it after creating the measurement gap configuration.
The create_measgap_config function only reads from the structure and doesn't take
ownership, so the caller must free it.
2025-09-30 11:48:53 +02:00
Guido Casati
487de67ff8 Fix measurement configuration memory leak with stack allocation
- Replace heap allocation with stack allocation for seq_arr_t structures
- Use proper seq_arr_free() with free functions for ASN.1 structures
- Remove unnecessary malloc/free calls for sequence containers
- Improve memory safety and performance with automatic cleanup

Fixes 128-byte memory leak:

Direct leak of 128 byte(s) in 2 object(s) allocated from:
   /#0 0x7e7f39ab4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
   /#1 0x56df8b07312d in SEQUENCE_decode_uper /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
   /#2 0x56df8b056551 in uper_decode /home/guido/repo/openairinterface5g/develop/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
   /#3 0x56df8a896b1b in get_nr_mtc /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c:4216
   /#4 0x56df8a82feb8 in ue_context_setup_request /home/guido/repo/openairinterface5g/develop/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:635
   /#5 0x56df8a66a298 in nr_initiate_handover /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:218
   /#6 0x56df8a6720af in nr_rrc_trigger_n2_ho_target /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB_mobility.c:526
   /#7 0x56df8a5cf338 in rrc_gNB_process_e1_bearer_context_setup_resp /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:2633
   /#8 0x56df8a5d28ab in rrc_gnb_task /home/guido/repo/openairinterface5g/develop/openair2/RRC/NR/rrc_gNB.c:3012
   /#9 0x7e7f38494ac2 in start_thread nptl/pthread_create.c:442
2025-09-30 11:48:53 +02:00
Guido Casati
59803e221f Fix duplicate handover request handling
- Add early check for existing UE context by AMF UE NGAP ID at beginning of rrc_gNB_process_Handover_Request
- Add dedicated function to get UE context by AMF UE NGAP ID: rrc_gNB_get_ue_context_by_amf_ue_ngap_id()
- Send handover failure with appropriate cause if UE context already exists
- Remove redundant ho_context NULL check that could never be true for newly created UE contexts
- Prevents duplicate handover processing and resource leaks
2025-09-30 11:48:53 +02:00
Guido Casati
1357158722 Fix hardcoded instance 0 bug in UE context release command
Use the instance parameter instead of hardcoded 0 to access the correct
RRC instance. Also clean up redundant variable initialization.
2025-09-30 11:48:53 +02:00
Guido Casati
de07668b0b Fix potential memory leak in ngap_gNB_handover_request_acknowledge
Move UE context creation and storage to after successful PDU encoding
to prevent memory leaks if encoding fails. Also add proper PDU cleanup
when AMF fetch fails and use consistent NULL check style.

This ensures UE context is only stored when the operation is guaranteed
to succeed, improving error handling and memory management.
2025-09-30 11:48:53 +02:00
Guido Casati
235493aa07 Fix ASN.1 memory management ownership in NGAP functions
In the current memory management the caller wasn't responsible for freeing
memory they allocate. The ngap_gNB_encode_pdu function was taking ownership
of PDU contents by calling ASN_STRUCT_FREE_CONTENTS_ONLY, while callers
also expected to manage the same memory. This created unclear ownership semantics and
potential double-free bugs.

- Remove ASN_STRUCT_FREE_CONTENTS_ONLY from ngap_gNB_encode_pdu to prevent double-free
- Remove unnecessary ASN_STRUCT_FREE when encode function returns NULL
- Add proper ASN_STRUCT_FREE cleanup for heap-allocated PDUs in ngap_gNB.c functions
- Add ASN_STRUCT_FREE_CONTENTS_ONLY cleanup for stack-allocated PDUs in NAS and context management functions
- Ensure consistent memory cleanup patterns across all NGAP encoder callers
- Fix potential memory leaks in all ngap_gNB_encode_pdu call sites

This prevents double-free bugs and ensures proper cleanup of ASN.1 structures
in both heap and stack allocation scenarios.
2025-09-30 11:48:53 +02:00
Guido Casati
524a3ddf85 Fix xer_fprint parameter in ngap_handover_required
Fix incorrect xer_fprint parameter - should pass pdu instead of &pdu
to properly print ASN.1 structure for debugging.
2025-09-30 11:48:53 +02:00
Robert Schmidt
12d92bc836 Fix crash in get_du_for_ue when F1 UE data does not exist
Add check for cu_exists_f1_ue_data() before calling cu_get_f1_ue_data()
to prevent assertion failure when telnet command 'ci fetch_du_by_ue_id'
is used for UEs that have been handed over via N2 (and no longer have
F1 UE data).

This fixes the crash:
Assertion (ret == HASH_TABLE_OK && data != ((void *)0)) failed!
In get_hashtable_data() /oai-ran/openair2/F1AP/f1ap_ids.c:36
element for ue_id 1 not found

The function now returns NULL gracefully when F1 UE data is not available.

Co-authored-by: Guido Casati <hello@guidocasati.com>
2025-09-30 11:48:53 +02:00
Guido Casati
a38aa1bab8 Fix memory leaks in fill_removal_lists_from_source_measConfig
- Add proper cleanup of allocated ASN.1 structures in all return paths
- Fix early returns that were leaking NR_HandoverPreparationInformation
- Fix early returns that were leaking NR_RRCReconfiguration
- Add cleanup at end of successful function execution

This prevents memory leaks when processing handover preparation information
during N2 handover procedures.
2025-09-30 11:48:53 +02:00
Guido Casati
b4485ecea2 Fix UE context leak in handover failure
- Add UE context cleanup before sending handover failure message
- Prevents memory/resource leak when PDU session establishment fails during handover
- UE context was created but never cleaned up on failure path

This fixes a bug where UE contexts would accumulate over time
when handovers failed after context creation.
2025-09-30 11:48:41 +02:00
Guido Casati
fd50ff43cc Handle gracefully encoding failure in build_RRCReconfiguration_IEs
closes #979
2025-09-30 11:23:45 +02:00
Sakthivel Velumani
59ff9ae04e ulsim: test UCI on PUSCH with matlab
Since there is no UCI on PUSCH implementation in gNB, it is good to test
UE's implementation with matlab.

This commit allows to test with matlab in two ways:
1. generate OFDM waveform from ulsim and decode it in matlab using
uci_on_pusch_decode.m
2. generate codeword in matlab using uci_on_pusch_encode.m read it in
ulsim and compare the bits. ulsim option -o is used
2025-09-30 00:24:39 +08:00
Sakthivel Velumani
83bf140bc3 Add flag for Tx phase pre compensation
Used in ulsim to verify waveform in MATLAB
2025-09-30 00:24:39 +08:00
Sakthivel Velumani
b2174cb8e1 Add processing stats for UCI mapping on PUSCH 2025-09-30 00:24:36 +08:00
Sakthivel Velumani
8de13fab97 Simplify code 2025-09-30 00:23:00 +08:00
alexjiao
ac76c6e27a Add functions to calculate M_bit for PUCCH format 2/3/4
Add functions to calculate PUCCH format 2/3/4 rate matching output sequence length (M_bit),
according to 3GPP TS 38.212 Table 6.3.1.4-1.
2025-09-30 00:23:00 +08:00
alexjiao
b69b65ba66 Handle UCI on PUSCH scrambling
When the codeword has UCI multiplexed with data, we need to handle UCI scrambling according to 38.211 section 6.3.1.1.
Especially when O_ACK <= 2 there are x and y placeholder bits for UCI.
2025-09-30 00:23:00 +08:00
alexjiao
1c5af6065c Handle UCI on PUSCH procedures at PHY
Get beta offset, alpha scaling and other parameters to calculate rate matching information for UCI on PUSCH,
then use the rate matching info to encode UCI and re-encode PUSCH, call nr_uci_on_pusch to get final multiplexed codeword for scrambling.
2025-09-30 00:22:58 +08:00
calvin_peyron
63397ac592 Remove RFSIMULATOR environment variable 2025-09-29 15:14:39 +02:00
Laurent THOMAS
3f9dcee5fa remove a dead function 2025-09-29 15:14:39 +02:00
calvin_peyron
7d70617a01 Fix documentation broken links 2025-09-29 15:14:39 +02:00
Robert Schmidt
e7c4b9c4cb Merge branch 'registry-cots-ue' into 'develop'
[ci] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally

See merge request oai/openairinterface5g!3672
2025-09-29 11:28:47 +00:00
Jaroslava Fiedlerova
d6f0b5a9d7 Merge remote-tracking branch 'origin/cleanup-ue-get-nr-rsrp' into integration_2025_w40 (!3674)
NR UE: remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup

The function get_nr_RSRP() and get_nr_rx_total_gain_dB() are not used anywhere
in the code, removing for cleanup.
2025-09-29 13:12:36 +02:00
Jaroslava Fiedlerova
afebd033f6 Merge remote-tracking branch 'origin/ci-ho-freq-update' into integration_2025_w40 (!3667)
CI: Updates for HO and AW2S pipeline

This MR introduces several CI updates:

- Change center frequency from 3439 MHz (n78) to 4185 MHz (n77) in HO setup to
  prevent interference with other lab setups.
- Enable attaching multiple AmariUEs simultaneously in the AW2S pipeline - save
  ~25s.
- Update RX gain configuration on AmariUE - improve DL throughput.
2025-09-29 13:11:14 +02:00
Jaroslava Fiedlerova
6e424af56b Merge remote-tracking branch 'origin/issue930' into integration_2025_w40 (!3657)
do not assert for mismatched TBS in phy-test mode

Closes #930
2025-09-29 12:56:24 +02:00
Jaroslava Fiedlerova
1e61c2ccb4 Merge remote-tracking branch 'origin/BWP_with_no_RA' into integration_2025_w40 (!3609)
BWP with no PRACH occasions

This MR includes fixes at gNB and UE in case the current BWP has no PRACH
occasions, i.e. we need to switch to initial BWP.
2025-09-29 12:55:30 +02:00
alexjiao
0fb8a09b86 Remove function get_nr_RSRP() and get_nr_rx_total_gain_dB() for cleanup
The function get_nr_RSRP() and get_nr_rx_total_gain_dB() is not used anywhere in the code.
2025-09-29 17:51:52 +08:00
Shubhika Garg
4b6c18b1dd [ci] Fix MissingPropertyException - COTS-UE by binding OAI_Registry globally
`def` creates a variable local to the script object, not automatically visible inside helper functions.

This fixes the following exception in Jenkins:

    Found unhandled groovy.lang.MissingPropertyException exception:
    No such property: OAI_Registry for class: groovy.lang.Binding
2025-09-29 11:37:23 +02:00
Robert Schmidt
60ab0a89a2 Build all targets in Cluster PhySim build 2025-09-29 09:04:02 +02:00
Robert Schmidt
2ff949a16f Correct dependencies onto logging module
These libraries depend on the logging module, so add the right
dependency log_headers. Indirectly, this will fulfill the condition of
T. I consider the prior usage of generate_T or {T_LIB} incorrect,
because basically none of these libraries actually, actively use T, but
rather only the logging module, which pulls in T.  The dependency of
log_headers will also take care of generating and including T headers,
which is a dependency of the logging module.

For conf2uedata and related, fulfill the dependency
through conf2uedata_lib (on which the rest depends).
2025-09-29 09:04:02 +02:00
Robert Schmidt
4876533e9c F1AP IDs: Remove unnecessary dependency 2025-09-29 09:04:02 +02:00
Robert Schmidt
cdbfaf835e params_yaml has no dependency on UTIL
These libraries have no dependencies on UTIL, so it's better to omit it.
However, then the test is missing symbols for the config (which likely,
indirectly came through UTIL -> LOG -> CONFIG_LIB, so add it now onto
the test.
2025-09-29 09:04:02 +02:00
Robert Schmidt
1e476735ea xforms uses logging 2025-09-29 09:04:02 +02:00
Robert Schmidt
1b81c4b09c RLC only needs headers for logging 2025-09-29 09:04:02 +02:00
Robert Schmidt
5716d95e97 nr_prachsim: remove unused include 2025-09-29 09:04:02 +02:00
Robert Schmidt
eea7be3977 ldpc_segment: avoid T error, use log_headers for logging
As parent.
2025-09-29 09:04:02 +02:00
Robert Schmidt
19813283fb Avoid T error on radio libraries
These libraries have an (indirect) dependency on T, either by using the
logging module (which in turn depends on T), or through other includes.

The easiest is to depend on the logging module, which will fulfil also
the T dependency.

It would equally be feasible to use the utils target (which in turn
depends on log_headers), but this would necessitate to compile, and does
not seem to be necessary.
2025-09-29 09:04:02 +02:00
Robert Schmidt
2a5ed87589 E2 Agent uses CONFIG_LIB for configuration
Since E2 agent uses the config library, include it directly. This also
makes the dependency on T obsolete, because

- it is the logging headers that are needed, and
- the T dependency is fulfilled through the log_headers.
2025-09-29 09:04:02 +02:00
Robert Schmidt
1ecb03f5f8 Make BladeRF compile
Fix variable name.

See also: 7466297568 ("move command line sample offset [...] at top
  level [...]")
2025-09-29 09:04:02 +02:00
Robert Schmidt
2889e55cd8 Remove redundant target_include_directories() from LOG
The same is achieved by including log_headers.
2025-09-29 09:04:02 +02:00
Robert Schmidt
197705f232 Provide T headers via log.h
It seems that many compilation units include T.h through the config
module (as evidenced when taking out T.h from
config_load_configmodule.h). This is strange, because T.h is only used
in the logging headers. Hence, move it to there, where it is used.
2025-09-29 09:04:02 +02:00
Jaroslava Fiedlerova
fd37fba9b7 Cleanup of libraries/executables from T loop
These libraries/executables are not defined in OAI.
2025-09-29 09:04:02 +02:00
Robert Schmidt
66c3b7d192 Break coding_defs.h dependency on logging module
coding_defs.h included defs_common.h, which pulls in many dependencies,
e.g., the logging module, which pulls in T. However, it does not use
anything of this. So remove, and include stdbool.h instead (because bool
is used in coding_defs.h.

nr_polar_defs.h relied on some includes done in coding_defs. Use
includes for pthreads and SIMD to define types that are used in
nr_polar_defs.h.
2025-09-29 09:04:02 +02:00
Robert Schmidt
eef092c318 Omit JER compilation for NRPPA ASN.1
We don't use JER. This avoids compilation problems, such as:

    /usr/bin/ld: openair3/NRPPA/MESSAGES/libasn1_nrppa.a(INTEGER_jer.c.o): in function `INTEGER_decode_jer':
    tmp.MtrwVDhQqY/openair3/NRPPA/MESSAGES/INTEGER_jer.c:186:(.text+0x5b8): undefined reference to `jer_decode_primitive
2025-09-29 09:04:02 +02:00
Robert Schmidt
72371ba10b Remove unnecessary comment 2025-09-29 09:04:02 +02:00
Robert Schmidt
46ed4ac36d Update comment to reference right target 2025-09-29 09:04:02 +02:00
Robert Schmidt
4177c6d182 Include CMakeLists.txt using add_subdirectory(), simplify 2025-09-29 09:04:02 +02:00
Robert Schmidt
cc094ac737 XNAP asn.1 cmake: ber_decoder.h is not created
XNAP is asn1c compiled with -no-gen-BER. Correspondingly, no
ber_decoder.h file is created. However, when running cmake followed by
ninja, it notices the absence of this file:

    ninja explain: output openair2/XNAP/MESSAGES/ber_decoder.h doesn't exist

which triggers a complete rebuild of XNAP ASN.1. Without this file, the
targets are not marked as dirty.
2025-09-29 09:04:02 +02:00
Robert Schmidt
cede449907 Remove NUMBER_OF_UE_MAX_NB_IoT and make NB_IoT compile
This constant seems to be an analogon to NUMBER_OF_UE_MAX; replace with
the latter, as it does the same. (NBIoT does not work, anyway)

Fix dependencies of the NB_IoT target so it compiles.
2025-09-29 09:04:02 +02:00
Robert Schmidt
a68168805b Remove NB-IoT configuration
Remove, because
1) it does not compile (the asn1c generated code should be prepend with
   LTE_ etc, nobody did that)
2) a shared module makes no sense
3) the configuration is trivial to recreate
2025-09-29 09:04:02 +02:00
Robert Schmidt
1a5e2598a3 Move LTTng check to subdirectory where used 2025-09-29 09:04:02 +02:00
Robert Schmidt
d6c29b2d2c Fix E2_AGENT linking w.r.t. simulators
Link E2_AGENT libraries directly into nr-softmodem/lte-softmodem instead
of L2/L2_NR/F1AP. Doing that ensures that simulators, e.g.,
nr_dlsim/nr_ulsim do still compile. It also simplifies the code.

Prior to this, compiling nr_ulsim with E2_AGENT, for instance, resulted
in the following errors, fixed in this commit:

    FAILED: nr_ulsim
    /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_du_cucp_cuup.a(ran_func_rc.c.o): in function `send_aper_ric_ind':
    /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643: (.text+0xee6): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x11ca): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x1485): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x159c): undefined reference to `async_event_agent_api'
    /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x16b1): undefined reference to `async_event_agent_api'
    [...]
2025-09-29 09:04:02 +02:00
Robert Schmidt
a31838acd7 CMakeLists.txt: comment out tests that don't compile 2025-09-29 09:04:02 +02:00
Robert Schmidt
ba3a0d2100 CMakeLists.txt: comment out sims that don't compile 2025-09-29 09:04:02 +02:00
Robert Schmidt
124debc2c7 Fix warnings in rftest executable
warning: ‘genericPowerPerAntena’ defined but not used [-Wunused-function]

    warning: ‘graph.text’ is used uninitialized [-Wuninitialized]

    warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2025-09-29 09:04:02 +02:00
Jaroslava Fiedlerova
03d4ce2e1e CI: Attach multiple UEs at once in AW2S test 2025-09-26 15:07:16 +02:00
Jaroslava Fiedlerova
b43dee1499 CI: adjust Amarisoft UE RX gain
Lower the RX gain used by the Amarisoft UE in CI tests to prevent DL signal
saturation. This resolves an issue with low DL throughput observed in CI.
RX/TX signal levels on the Amarisoft UE can be checked with "t spl" command
in lteue; MAX values should not approach 0.
2025-09-26 14:58:47 +02:00
Sakthivel Velumani
5f3a19cb7d Separate segmentation from ULSCH encoding function
Segmentation have to be called before UCI mapping to get number of
segments and sumKr values.
2025-09-26 11:16:54 +08:00
alexjiao
ceda9c1141 Add functions to implement UCI and data multiplexing on PUSCH
Data and control multiplexing procedure is defined in 38.212 section 6.2.7.
Step 3 (CSI1 and CSI2 mapping) is not implemented, only HARQ-ACK.
PUSCH frequency hopping is not supported.
2025-09-26 11:14:12 +08:00
alexjiao
8222fa27e5 Add functions to calculate rate matching information for UCI on PUSCH
Use betaOffset and alpha scaling etc. to get rate matching information of UCI on PUSCH (e.g. max bit capacity of encoded UCI and encoded ULSCH)
according to TS 38.212 section 6.3.2.4 and 6.2.7.
2025-09-26 11:14:12 +08:00
alexjiao
a64038658f Modify nr_uci_encoding for UCI on PUSCH
38.212 section 5.3.3.1 and 5.3.3.2 describe how to encode 1-bit and 2-bit information.
This is needed when typically HARQ-ACK will be transmitted on PUSCH.
38.212 section 5.4.3 also describes how to do rate matching for channel coding of small block lengths.
2025-09-26 11:14:08 +08:00
Jaroslava Fiedlerova
41b33e9124 CI: Update frequency in HO setup
Move center frequency from 3439 MHz to 4185 MHz to avoid interference
with other lab setups.
2025-09-25 15:43:14 +02:00
Guido Casati
e535fbe6a7 Replace impossible ID mismatch checks with DevAssert in NGAP functions
- Replace error handling for impossible ID mismatches with DevAssert statements
- If ngap_get_ue_context() succeeds, returned context must have matching NGAP gNB UE IDs by definition
- This catches potential bugs in the lookup function immediately
- Affects: handover_required, handover_notify, handover_cancel, ul_ran_status_transfer

These checks were logically impossible since we looked up the context using
the same IDs we were then checking for mismatch.
2025-09-25 14:55:03 +02:00
Guido Casati
50760c04a7 Fix log messages in N2 handover: print both PCI and Cell ID when available
- Fixed incorrect log messages that said 'PCI=%lu' when printing nr_cell_id
- Now prints both NR Cell ID and PCI when DU is found
- Provides better debugging information for handover requests
2025-09-25 14:55:03 +02:00
Guido Casati
8dcd253e60 E1 lib: Adopt _E1_EQ_CHECK_OPTIONAL_PTR macro in E1AP bearer context management
- Add _E1_EQ_CHECK_OPTIONAL_PTR checks for pdcp_config, sdap_config, UP_TL_information, and securityIndication
- Fix bug in eq_pdu_session_to_mod_item where a->UP_TL_information was compared with itself instead of b->UP_TL_information
- Fix eq_security_ind call to properly handle return value with early return pattern
- Improve consistency with existing macro usage patterns in the codebase
- Provide better error reporting for optional pointer field mismatches
2025-09-25 14:55:03 +02:00
Guido Casati
a7257eaff1 E1 lib: fix inconsistent equality checking patterns in E1AP bearer context management
Replace result &= pattern with consistent early return pattern:
- Fix mixing of logical (&&) and binary (&) operators
- Use consistent 'if (!eq_()) return false;' pattern throughout
- Fix bug in eq_bearer_context_mod_response where drbModA was compared with itself
- Remove unused 'bool result = true;' variables
- Always return true at the end of equality functions

This makes the code more consistent with the rest of the codebase
and provides better error reporting through the existing _E1_EQ_CHECK macros.
2025-09-25 14:55:03 +02:00
rmagueta
2bf7c2500e Simplifying bit shift in the nr_scale_channel() function 2025-09-25 14:50:37 +02:00
francescomani
c88b7bac72 process the remaining elements in scale channel 2025-09-25 14:50:37 +02:00
francescomani
89004ef241 use common scale channel functions for DLSCH and ULSCH 2025-09-25 14:50:35 +02:00
Jaroslava Fiedlerova
5e5f79e993 Merge branch 'integration_2025_w39' into 'develop'
Integration `2025.w39`

* !3582 replace bad DCI by specific message for each case and add checks for bad...
* !3595 Implementing the option to have more than 1 RSRP in CSI report
* !3640 Code cleanup (SRS, config files and more)
* !3654 Extend t300 in multi_ue rfsim testcase
* !3650 NR UE improvements for scheduling ACK/NACK for MSG4
* !3652 In ReconfigurationWithSync, make sure epochTime_r17 present if there is a ntn_Config_r17
* !3653 NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not more bytes in buffer
* !3549 Switch to new (internal) registry
* !3513 Improvements to RRC PDU session and DRB handling logic

Closes #995 and #997

See merge request oai/openairinterface5g!3658
2025-09-25 11:08:09 +00:00
Jaroslava Fiedlerova
d10fa9f664 Merge remote-tracking branch 'origin/rrc-pdusession-handling-improvements' into integration_2025_w39 (!3513)
Improvements to RRC PDU session and DRB handling logic

This merge request introduces a major simplification and cleanup of the gNB RRC
PDU Sessions and DRBs handling logic. The core goals of this work are to:

- Replace fixed-size PDU Session, DRBs and QoS arrays with dynamic containers
- Simplify and modularize helper functions for session/DRB management
- Prepare for further refactoring of the PDU Session state machine
- Improve code safety and maintainability through better bounds checking
2025-09-25 10:07:38 +02:00
Laurent THOMAS
912463f752 modulation LUTs size was wrong, and remove inconsistent test of SSE2 enable 2025-09-25 09:29:44 +02:00
Robert Schmidt
252b19cddb Make rftest compile
uniqCfg is in minimal_lib, so not necessary. Remove non-existant struct
members.
2025-09-25 08:51:11 +02:00
Robert Schmidt
b2fce659e8 Fix warning for wrong printf format specifier
common/utils/threadPool/measurement_display.c:55:14 warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
2025-09-25 08:51:11 +02:00
Robert Schmidt
ada7eb8b2a Remove unused/non-compiling test stub 2025-09-25 08:51:11 +02:00
Robert Schmidt
acb6f05a6d Remove include_directories() for non-existing directories 2025-09-25 08:51:11 +02:00
Robert Schmidt
d5bf702f10 Remove CMakeLists.txt author information
Author information can be inferred from git blame.
2025-09-25 08:42:35 +02:00
Robert Schmidt
2d70cec6dd Remove autotools definitions
They do not seem to be used anywhere (I grepped).
2025-09-25 08:42:35 +02:00
Jaroslava Fiedlerova
08812063da Merge remote-tracking branch 'origin/switch-new-registry' into integration_2025_w39 (!3549)
Switch to new (internal) registry

Switch to a bigger registry
2025-09-24 23:31:43 +02:00
Guido Casati
e6d8d6a072 Add tests for RRC radio bearers lib 2025-09-24 16:58:17 +02:00
Guido Casati
c99f836ad4 Refactor DRB release handling to use actual DRB IDs
- Replace simple counter-based DRB ID assignment with actual DRB ID lookup
- Add nested loop to iterate through DRBs for each PDU session to be release
- Improve logic flow with early continue for non-matching PDU sessions

This ensures DRB release list contains correct DRB IDs that correspond to actual DRB entities
2025-09-24 16:58:17 +02:00
Guido Casati
9bf79cd2c9 PDU session release: refactor NGAP PDU Session Release command/response
* There is no IE corresponding to PDU sessions failed to release
  in the PDU SESSION RESOURCE RELEASE RESPONSE message. This was removed
  and the corresponding code was refactored and cleaned up.
* In the Release Command handler, only established PDU Session are set to be
  released. The Response message is filled accordingly.
2025-09-24 16:58:17 +02:00
Guido Casati
6ed08f1527 Refactor DRB and QoS handling: centralize configuration logic
Motivation:
The previous architecture had several issues:
- Duplicate DRB generation logic in generateDRB() and generateDRB_ASN1()
- Embedded SDAP/PDCP configs in drb_t created tight coupling
- No clear separation between RRC internal state and ASN.1 encoding
- Maintenance burden due to duplicated configuration logic

New Architecture:
- drb_t now only stores DRB-specific data (ID, PDU session ID, PDCP config)
- SDAP configuration moved to PDU session level (following PDCP design pattern)
- ASN.1 encoding helpers (nr_rrc_build_*_config_ie()) handle conversion
- Single source of truth for DRB creation in RRC via nr_rrc_add_drb()

Key changes:
- Store nr_sdap_configuration_t per PDU session
- Simplified drb_t structure: removed embedded SDAP/PDCP configs, added pdusession_id
- New helper: nr_rrc_build_sdap_config_ie()
- Updated createDRBlist() to use new helper functions and proper DRB ID lookup
- Refactored trigger_bearer_setup() to use nr_rrc_add_drb() and fill_e1_drb_to_setup()
- Removed generateDRB() and generateDRB_ASN1() functions
- Updated set_bearer_context_pdcp_config() to return config by value
- Added SDAP configuration header file for type definitions

This eliminates code duplication, improves maintainability, and creates
a cleaner separation between RRC state management and ASN.1 encoding.
2025-09-24 16:58:17 +02:00
Guido Casati
50923823c0 Refactor QoS parameter types and consolidate definitions
- Move QoS-related enums and structures from ngap_messages_types.h to 5g_platform_types.h
- Replace ngap_* QoS types with generic qos_* types for better reusability
- Update field names from allocation_retention_priority to arp for consistency
- Update all references across RRC and NGAP modules to use new type names
- Remove duplicate QoS type definitions from NGAP-specific header

This improves code organization by centralizing QoS parameter definitions
in a common platform types header and eliminates NGAP-specific naming
in favor of more generic, reusable type definitions.
2025-09-24 16:58:17 +02:00
Guido Casati
7254e59df9 Introduced MAX_QOS_FLOWS (64) and replaced QOSFLOW_MAX_VALUE
The maximum number of QoS flows is 64.

- Replace QOSFLOW_MAX_VALUE with MAX_QOS_FLOWS constant
- Move MAX_QOS_FLOWS definition to common/platform_constants.h
- Remove duplicate QOSFLOW_MAX_VALUE definition from ngap_messages_types.h

This improves maintainability by centralizing the QoS flow limit constant
and eliminates duplicate definitions across different header files.
2025-09-24 16:57:10 +02:00
Guido Casati
1711b1b4b8 Refactor ASN.1 PDCP configuration building
- Limit scope of get_default_rbconfig function: from asn1_msg.c/.h to rrc_gNB_nsa.c where it's used
- Create new rrc_gNB_asn1.c/h files for ASN.1 utility functions: they can be used in other RRC files
- Add nr_rrc_build_pdcp_config_ie function for building PDCP configuration IEs
- Update get_default_rbconfig to use the new PDCP config builder
- Add rrc_gNB_asn1.c to CMakeLists.txt build configuration
2025-09-24 14:55:52 +02:00
Guido Casati
45d989ec7b Adopt dynamic seq_arr in QoS Flow list (RRC PDU Session) 2025-09-24 14:38:37 +02:00
Guido Casati
7fa0ebb6b9 Adopt dynamic seq_arr in DRB handling (RRC PDU Session)
The previous DRB management relied on a fixed-size array (established_drbs[MAX_DRBS_PER_UE])
and manual status tracking using DRB_ACTIVE/INACTIVE flags. This approach was inefficient,
and made assumptions about DRB ID allocation that do not generalize well
to dynamic procedures like bearer modification or removal.

* Replace fixed-size array established_drbs[] with dynamic
  seq_arr_t *drbs in gNB_RRC_UE_t
* Refactor get_drb() and added nr_rrc_add_drb() with clean abstractions
  using find and seq_arr lib
* Updated all DRB-related logic (e.g., generateDRB,
  F1AP/E1AP tunnel config, reestablishment, mobility) to use seq_arr.
* Removed status field and DRB_ACTIVE/INACTIVE logic: list presence implies active
* DRB ID allocation now tracked via seq_arr size : simplifies DRB management and
  avoids DRB ID–indexed assumptions: code assumed DRB IDs mapped directly to
  array indices: established_drbs[drb_id - 1]. This could break when:
  DRB IDs are not sequential, DRBs are removed and re-added, or there are gaps in IDs
2025-09-24 14:38:37 +02:00
Guido Casati
f15af77297 Cleanup: remove unused cp_pdusession
The function is no longer relevant in the new design.
2025-09-24 14:38:37 +02:00
Guido Casati
5bcc9b9e5e Adopt dynamic seq_arr in PDU Session handling (RRC PDU Session)
The RRC PDU Session struct is converted from a fixed-size array
to a dynamically sized seq_arr. This improves flexibility and
simplifies session management by eliminating arbitrary size limits
and enabling dynamic addition/removal of PDU sessions.

Helper functions and loops have been adapted to use the seq_arr API.
This change is a step toward more robust and maintainable handling
of PDU sessions in the gNB RRC layer.

The "status" state machine remains untouched in this commit and
is refactored in a later commit.

Also:

* add macro to push to seq_arr and return the new element
* move initialization of xid (RRC PDU Session struct) to
  find_pduSession (temporary, will be finalized in a later
  commit) since with the new seq_arr design the initialization
  is no longer possible in the UE context generation (also
  does not belong to it, initialize when adding a new PDU Session)
2025-09-24 14:38:36 +02:00
Guido Casati
e4a910f0bb Refactoring: add utility function to fill NG PDU Session Setup item
* fills from stored setup PDU Session in RRC list
* reduces duplicated code
2025-09-24 14:37:32 +02:00
Guido Casati
bd41e8f883 Refactoring: limit scope of config_pdcp to config module 2025-09-24 14:37:32 +02:00
Guido Casati
ae1de1aeaa Refactoring: fix inconsistency in nr_sdap_delete_entity
The function was printing a "not found" error message even in the case
the return value was set to "true". Return directly true/false.

This is relevant in PDU Session Release procedures.
2025-09-24 14:37:32 +02:00
Guido Casati
42a9f2f08f Enable multiple PDU Sessions in handover request logic
- Process all PDU sessions in handover request instead of only the first one
- Add DevAssert for bounds checking on nb_of_pdusessions
- Fix logic error where multiple PDU sessions were ignored in handover scenarios
2025-09-24 14:37:32 +02:00
Guido Casati
9a4fd1bf76 Cleanup handover required transfer IE
Previously, the RRC layer was incorrectly allocating stack memory for the ho_required_transfer field and passing it to NGAP, however it was not used. The IE is mandatory but contains only 1 optional IE, therefore is encoded in the NG message with empty content.

Changes:
- Remove unnecessary ho_required_transfer field from pdusession_resource_t definition, the IE is encoded anyway with empty content. If Direct Forwarding Path Availability is needed at any stage in the future it can be added to pdusession_resource_t and filled in RRC.
- Add clarifying comment about empty HandoverRequiredTransfer structure
2025-09-24 14:37:29 +02:00
Guido Casati
609700207f Fix handover required: set pdusession_id in pdu_info structure for consistency 2025-09-24 14:07:31 +02:00
francescomani
24ac0b5602 move nr_rrc_ue_process_masterCellGroup before usage 2025-09-24 10:31:40 +02:00
francescomani
faf230612b move nr_rrc_ue_process_ueCapabilityEnquiry before usage 2025-09-24 10:30:08 +02:00
francescomani
a49d496b63 move process_lte_nsa_msg before usage 2025-09-24 10:27:44 +02:00
francescomani
6009b06101 move nr_rrc_ue_process_measConfig (and its functions) before usage 2025-09-24 10:23:37 +02:00
francescomani
fc8854a040 move nr_rrc_ue_generate_rrcReestablishmentComplete before its usage 2025-09-24 10:19:51 +02:00
francescomani
719ae673a3 move nr_rrc_ue_process_RadioBearerConfig before its usage 2025-09-24 10:18:34 +02:00
francescomani
1ee2298a88 remove unnecessary declaration of nr_rrc_manage_rlc_bearers 2025-09-24 10:15:17 +02:00
Jaroslava Fiedlerova
7907b80a35 Merge remote-tracking branch 'origin/fix_wrong_nrue_bsr' into integration_2025_w39 (!3653)
NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not
more bytes in buffer

If the RLC indicates that there is no more data in the buffer, also the
scheduler's LCID_buffer_remain should be set to 0. Else the UE sends BSR
indicating it has data to be transmitted. The gNB would then unnecessarily
schedule UL for this UE, which would not be used, as there is no actual data
to be transmitted.
2025-09-24 09:38:18 +02:00
Jaroslava Fiedlerova
8885d3912a Merge remote-tracking branch 'origin/fix_issue_995' into integration_2025_w39 (!3652)
In ReconfigurationWithSync, make sure epochTime_r17 present if there is a ntn_Config_r17

Fixes #995
2025-09-24 09:35:53 +02:00
Guido Casati
69f0bb2b96 Fix PDU session counter overflow issues: max number of PDU Sessions is 256
- Upgrade PDU session counters from uint8_t to uint16_t in ngap_messages_types.h

Co-authored-by: Assistant <assistant@example.com>
2025-09-23 23:13:24 +02:00
Robert Schmidt
7e1eabe700 Switch to new (internal) registry 2025-09-23 17:43:38 +02:00
francescomani
7e01d5a0e0 Merge remote-tracking branch 'origin/NR_UE_PUCCH_scheduling_improvements' into integration_2025_w39 2025-09-23 14:47:38 +02:00
Thomas Schlichter
ccad50daca NR UE: do not consider suspended logical channels in nr_update_bsr()
While a logical channel is suspended, we should not consider it in the BSR,
as we cannot transmit any data from it.
2025-09-23 11:17:44 +02:00
Jaroslava Fiedlerova
25f2f1fe46 Merge remote-tracking branch 'origin/t300-mutliue' into integration_2025_w39 (!3654)
Extend t300 in multi_ue rfsim testcase

Extend t300 to 1000 to increase the time the gNB has to handle MSG3. Hopefully
this prevents the UEs from timing out after MSG3. Add UE id to timer timeout
LOGs so the UE behavior can be traced through the stack.
2025-09-23 10:48:46 +02:00
francescomani
966bab9cca do not assert for mismatched TBS in phy-test mode 2025-09-23 10:39:37 +02:00
Jaroslava Fiedlerova
e6da57e2b6 Merge remote-tracking branch 'origin/some_cleanup' into integration_2025_w39 (!3640)
Code cleanup (SRS, config files and more)

- Remove deprecated elements from some configuration files (also closes #997)
- Improve SRS code with a better separation between common code and gNB/UE code
- Other minor compilation improvements
2025-09-23 10:00:57 +02:00
Jaroslava Fiedlerova
98948586c2 Merge remote-tracking branch 'origin/more_than_1_rsrp_report' into integration_2025_w39 (!3595)
Implementing the option to have more than 1 RSRP in CSI report

In collaboration with NI/Emerson.

The standard allows up to 4 RSRP measurements in CSI report (1 full and the other
differential). In current OAI, we just configure 1 RSRP report for the strongest
SSB. This MR allows to configure at gNB more than 1 RSRP report (depending on
config file, number of SSBs and UE capabilities) and makes changes at the UE to
send this report.
2025-09-23 09:58:35 +02:00
Jaroslava Fiedlerova
75c8e96142 Merge remote-tracking branch 'origin/fix-lte-ue-bad-dci' into integration_2025_w39 (!3582)
replace bad DCI by specific message for each case and add checks for bad...

Replace bad DCI by specific message for each case and add checks for bad
pointers, or sanitize detected warnings. Then fix several issues in DCI
decoding. With this MR, LTE UE has less bad DCI, and each bad DCI has a
reason better diagnosis.
2025-09-23 09:55:31 +02:00
Guido Casati
7083e08175 Fix variable shadowing in E1 bearer context setup
- Changed inner loop variable from 'i' to 'j' in rrc_gNB_process_e1_bearer_context_setup_resp
- Eliminates variable shadowing between outer PDU session loop and inner DRB loop
- Improves code readability and prevents potential bugs
2025-09-22 22:46:14 +02:00
Laurent THOMAS
06914f3dde improve dci rejection test: system DCIs are tackled only if we expect system DCIs 2025-09-22 19:12:24 +02:00
Laurent THOMAS
311a857cb3 move a bad global var in a better place 2025-09-22 19:12:24 +02:00
Laurent THOMAS
a71a813a7c replace bad DCI by specific message for each case and add checks for bad pointers, or sanitize detected warnings 2025-09-22 19:12:24 +02:00
Bartosz Podrygajlo
d38ce7c1c9 Extend t300 in multi_ue rfsim testcase
Extend t300 to 1000 to increase the time the gNB has to handle MSG3.
Hopefully this prevents the UEs from timing out after MSG3.
2025-09-22 12:04:54 +02:00
Bartosz Podrygajlo
a43fbe1bac NR UE: Add UE id to RRC timer timeout LOGs 2025-09-22 12:04:50 +02:00
Thomas Schlichter
5c16758386 gNB: when creating a ReconfigurationWithSync, make sure epochTime_r17 is present if there is a ntn_Config_r17
Fixes #995
2025-09-22 11:06:16 +02:00
Thomas Schlichter
272be719dd NR UE: in nr_ue_scheduler.c set LCID_buffer_remain to 0 if RLC indicates not more bytes in buffer
If the RLC indicates that there is no more data in the buffer, also the scheduler's
LCID_buffer_remain should be set to 0. Else the UE sends BSR indicating it has data
to be transmitted. The gNB would then unnecessarily schedule UL for this UE, which
would not be used, as there is no actual data to be transmitted.
2025-09-19 12:11:58 +02:00
francescomani
ca7fadfe07 improved logs to evaluate RSRP report 2025-09-19 11:07:28 +02:00
Jan Fromme
df9c41f364 Accumulate SSB indices in the SINR payload instead of overwriting the payload 2025-09-19 09:29:58 +02:00
Jan Fromme
5903806d2e enabled transmission of up to 4 RSRP measurement reports from UE to gNB 2025-09-19 09:29:56 +02:00
Jan Fromme
b462fa45e8 Fix RSRP report unpacking logic in gNB scheduler UCI
Correctly handle unpacking of the first RSRP report and its resource ID before processing additional reports.
Use the initial RSRP value as the reference for differential RSRP calculations in subsequent reports.
2025-09-19 09:18:30 +02:00
francescomani
e5ea77f629 separate UE fapi message for SSB measurements 2025-09-19 09:18:28 +02:00
francescomani
fc4bd2e20c RRC configuration for more than 1 reported RS
option via configuration file to limit the number of reports to be configured
2025-09-19 08:38:47 +02:00
Robert Schmidt
32c81b7b06 Merge branch 'integration_2025_w38' into 'develop'
Integration: `2025.w38`

Closes #954

See merge request oai/openairinterface5g!3646

* !3639 Fix error ind unpack
* !3643 Fix memory allocation issue in KPM RAN function sd parameter handling
* !3568 Fix UE DCI monitoring after RRC setup
* !3642 Check command line for unknown options also at gNB
* !3647 Add nr-cuup to run_locally.sh
* !3596 L3 measurements and measReport A2
* !3648 fix MSG3 with C-RNTI failure
* !3649 CI: build images on Jetson (armv8)
* !3334 N2 Handover
2025-09-18 16:39:39 +00:00
Robert Schmidt
84c51802da CI RFsim test N2: remove RFsim config in CU-CP 2025-09-18 18:12:58 +02:00
francescomani
52af5e5642 preventing UE to schedule SR on PUCCH in the same slot when MSG4 ACK is sent 2025-09-18 17:30:13 +02:00
francescomani
e82bb5cb6d remove unnecessary printf in dlsim 2025-09-18 14:58:03 +02:00
francescomani
614b6a0eef remove unnecessary srs_modulation files and move what's left into UE phy_procedures 2025-09-18 14:57:58 +02:00
francescomani
740e9c5c9c move common SRS functions to common folder 2025-09-18 14:55:19 +02:00
francescomani
607d8a0bc2 simplify compute_n_b and compute_F_b functions by using common structure 2025-09-18 14:55:19 +02:00
francescomani
b03d8abd03 use common structure to store SRS information for common function (also avoid bad cast) 2025-09-18 14:55:16 +02:00
Robert Schmidt
870b25e95d Fix: define_property() needs FULL_DOCS
define_property() has optional FULL_DOCS in cmake 3.23+, but before it's
required. I did not notice when adding this.
2025-09-18 14:54:39 +02:00
francescomani
c9756c26ec move PUCCH common tables to PHY common file 2025-09-18 12:33:49 +02:00
francescomani
8051b5d14a remove a couple of unnecessary include 2025-09-18 12:33:49 +02:00
francescomani
38995aff5d config files further cleanup 2025-09-18 12:33:40 +02:00
francescomani
47554f89ce fix switch to initial UL BWP if no PRACH common configuration in current BWP 2025-09-18 11:57:57 +02:00
francescomani
72bfd1b5c3 switch to initial BWP if current BWP has no PRACH in gNB 2025-09-18 11:57:54 +02:00
Robert Schmidt
7227cfb320 Merge remote-tracking branch 'origin/n2-handover' into integration_2025_w38 (!3334)
N2 handover

This MR introduces full support for N2 handover, covering handover
decision, preparation, execution, and notification between source and
target NG-RAN nodes.

Key features:

1. Handover Decision & Preparation:
  - Implement N2 handover decision based on UE measurement reports.
  - Generate the Handover Preparation Information message, including
    RRCReconfiguration.
  - Send Handover Required message from the source NG-RAN to the AMF.
2. Handover Execution:
  - Decode and handle the Handover Request on the target NG-RAN.
  - Process the Handover Command on the source gNB, triggering
    RRCReconfiguration.
  - Initiate Handover Notify after successful completion.
3 NGAP & RRC Enhancements:
  - Implement NGAP encoding/decoding functions for Handover Required,
    Handover Request, Handover Command, Handover Failure, and Handover
    Notify (3GPP TS 38.413).
  - Adds NG-RAN Status Transfer support (UL/DL) for PDCP COUNT
    preservation during mobility:
    - support for NGAP Uplink and Downlink RAN Status Transfer messages
      (TS 38.413 §9.2.3.13-14) to enable proper PDCP COUNT value
      transfer during handover or recovery: NGAP encoding/decoding for
      RAN Status Transfer, PDCP helpers to extract and apply COUNT (HFN
      + SN) per DRB. This aligns with TS 38.300 §9.2.3.2.1 and TS 23.502
      §4.9.1.3.3, ensuring PDCP status preservation in AM.
4. Testing:
  - Introduce a Telnet command to manually trigger N2 handover using UE
    ID and neighbor PCI.
  - Add configuration file for testing N2 handover with a target gNB.
2025-09-18 11:57:44 +02:00
Guido Casati
f9f6e96d6b Add N2 handover documentation 2025-09-18 11:54:19 +02:00
Robert Schmidt
ef5191b610 Merge remote-tracking branch 'origin/ci-build-jetson' into integration_2025_w38 (!3649)
CI: build images on Jetson (armv8)

Add a new build pipeline for NVIDIA Jetson (armv8). Images have tag
prefix armv8_ to distinguish from gracehopper-built images prefixed arm_
(should have maybe been better with armv9_?)
2025-09-18 11:51:41 +02:00
Robert Schmidt
8927032fd2 Merge remote-tracking branch 'origin/fix_UE_msg3_crnti_fail' into integration_2025_w38 (!3648)
fix MSG3 with C-RNTI failure

When RA procedure with MSG3 carrying C-RNTI fails we shouldn't send an
indication to RRC because it is a L2 procedure
2025-09-18 11:51:12 +02:00
Guido Casati
85f586c76d Add N2 Handover Cancel (8.4.5 of 3GPP TS 38.413)
This commit completes the NGAP Mobility Management procedure for N2 handover.
Upon failure on source gNB the Handover Cancel message is sent to the AMF which
in return responds with an ack.
2025-09-18 11:34:31 +02:00
Guido Casati
4facb4d635 target-CU-CP: Transfer PDCP Count to target-CU-UP
Upon reception of NG RAN Status at the target CU-CP, send PDCP Status
via E1 Bearer Context Modification to the target CU-UP and update PDCP Count
upon reception of the message.

For the sake of simplicity, re-used and extended legacy e1_send_bearer_updates.
Further refactoring is not addressed in this commit.
2025-09-18 11:34:31 +02:00
Guido Casati
a82353f42a target-CU-CP: Add RRC handler NG DL RAN Status Transfer 2025-09-18 11:34:31 +02:00
Guido Casati
badb0c561a source-CU-CP: trigger UL NG RAN Status Transfer upon reception of PDCP Status in E1 Bearer Context Modification Response
Once fetched the PDCP Status from the PDCP entity over E1, the CU-CP triggers
the NG RAN Status Transfer procedure to transfer the PDCP Status to the target
CU.

This commit is also introducing the RRC callback.
2025-09-18 11:34:31 +02:00
Guido Casati
44e4ebc4e2 source-CU-UP: fill PDCP Status in response upon reception of E1 Bearer Context Modification Request
* Check presence of PDCP Status Requested in Bearer Context Modification Request
* Fetch PDCP Status from PDCP entity and fill in the Bearer Context Modification Response
2025-09-18 11:34:31 +02:00
Guido Casati
fc5e3ce61d source-CU-CP: trigger E1 PDCP Status Request in UE Context Modification Response handler
The E1 Bearer Context Modification Request shall send a PDCP Status Request IE
during handover, e.g. the HO context is set to source, and it is not target, i.e.
only in N2 not in F1.

The current function "e1_send_bearer_updates" used to fill the E1 Request has been
refactored only for the sake of this commit and to avoid duplicated and redundant code.
The function itself deeper analysis and eventually a refactoring that will not be addressed
in this commit.
2025-09-18 11:34:31 +02:00
Guido Casati
e96d7f9576 Add PDCP API getter and setter for PDCP count values in PDCP entity
* Introduced nr_pdcp_count_update() to apply COUNT values to the PDCP entity:
  - Computes tx_next, rx_next, and rx_deliv from HFN+SN
  - Handles both 12-bit and 18-bit SN modes with dynamic bitmask
* Introduced nr_pdcp_get_drb_count_values() to extract PDCP COUNT values from entity:
  - Used for building UL RAN Status Transfer on source CU side
2025-09-18 11:34:31 +02:00
Guido Casati
e527b99de1 PDCP Status Information: add enc/dec/cp/eq and test to E1AP lib
Also:
* remove unused oldQosFlows IEs
* adopt new enc/dec functions
* fix missing return in eq_bearer_context_mod_response
2025-09-18 11:34:31 +02:00
Guido Casati
bc9c59f186 Add NGAP RAN Status Transfer enc/dec and handlers (UL and DL)
According to 4.9.1.3.3 of 3GPP TS 23.502:

> 2a. - 2c. The S-RAN sends the Uplink RAN Status Transfer message to the S-AMF,
> as specified in TS 36.300 [46] and TS 38.300 [9]. The S-RAN may omit sending
> this message if none of the radio bearers of the UE shall be treated with PDCP status preservation.

TS 38.300 says:
> For DRBs not configured with DAPS, the source gNB sends the SN STATUS TRANSFER message to the target
> gNB to convey the uplink PDCP SN receiver status and the downlink PDCP SN transmitter status of DRBs for
> which PDCP status preservation applies (i.e. for RLC AM). The uplink PDCP SN receiver status includes at
> least the PDCP SN of the first missing UL PDCP SDU and may include a bit map of the receive status of the out
> of sequence UL PDCP SDUs that the UE needs to retransmit in the target cell, if any. The downlink PDCP SN
> transmitter status indicates the next PDCP SN that the target gNB shall assign to new PDCP SDUs, not having a
> PDCP SN yet.

i.e., for DRBs for which PDCP status preservation applies (i.e. for RLC AM), which is is our case.

This commit introduces full support for NG-RAN Status Transfer message handling
(TS 38.413 §9.2.3.13-14) in CU. It enables correct state transfer of PDCP COUNT
values (SN + HFN) during mobility or recovery scenarios.

Summary of changes - NGAP:
* Added encoding/decoding support for UL/DL RAN Status Transfer message
* Defined structures for: ngap_drb_count_value_t, ngap_drb_status_t,
  ngap_ran_status_container_t, ngap_ran_status_transfer_t
2025-09-18 11:34:31 +02:00
Guido Casati
1015c1f5f0 Add new CI pipeline for N2 Handover
The pipeline is using the already existing conf files
for the source/target gNB CUs/DUs.

For the sake of simplicity, neighbour-config.conf has
been rewritten and simplified in this commit, then
adopted in this pipeline. The file was not used before.
2025-09-18 11:34:31 +02:00
Guido Casati
5227becf89 Add telnet trigger for N2 handover
* the command gets in input the neighbour PCI and the UE ID
* the telnet ci function to retrieve the UE context was extended in the process
* add function to trigger handover on the same gNB for testing purposes

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:31 +02:00
Guido Casati
cb68d817f0 OAI UE: introduce AS security key update procedure (5.3.5.7 3GPP TS 38.331)
* trigger upon reception of MasterKeyUpdate
* derive NH, store NH NCC and valid NH key in RRC
* masterKeyUpdate: derive enc/int keys after master key update
  and set PDCP security for SRB1
* call nr_rrc_process_reconfiguration_v1530 before nr_rrc_ue_process_RadioBearerConfig
  and move dedicatedNAS_MessageList processing at the end of the flow. The sequence
  shall be (1) keys/security update (2) radioBearerConfig processing, with PDCP entity
  creation, PDCP reestablishment, SDAP entity creation (3) NAS PDUs processing, which
  triggers PDU Session Establishment Accept, which sets up the TUN interface.
  SDAP entity is a pre-requisite, therefore the radioBearerConfig has to be processed
  (in nr_rrc_ue_process_RadioBearerConfig, add_drb) early enough, or it may cause a
  race condition in SDAP.
2025-09-18 11:34:31 +02:00
Guido Casati
984c0bff0f Send NG HO failure message upon nr_rrc_n2_ho_acknowledge failure 2025-09-18 11:34:30 +02:00
Guido Casati
28f926607e Add N2 HO trigger on Bearer Context Setup Response (target NG-RAN)
* add trigger function to (1) add the callbacks and (2) initiate
  handover on the target NG-RAN
* add handover failure callback on target NG-RAN: the Handover
  Failure is a procedure that belongs to the target NG-RAN and
  it is different from the Handover Cancel procedure

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
e611d092e9 Add NGAP Handover Notify encoder and trigger on the target NG-RAN
This commit introduces the NG Mobility Management Procedure known as
Handover Notification. The outbound message is sent by the target NG-RAN
and is known as Handover Notify. The procedure is used to indicate to
the AMF that the UE has arrived to the target cell and the NG-based
handover has been successfully completed

* after RRCReconfiguration complete, in the N2 callback for HO success
* add NGAP encoder for the message
* RRC callback to trigger Handover Notify message

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
f66524879d Add NGAP Handover Command decoder and RRC handler on source gNB
* add NG Handover Command message decoder
* process in RRC: encode RRCReconfiguration message
  from the received HandoverCommandMessage
* trigger RRCReconfiguration for handover

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
6fd02ee7e8 Handle N2 handover in UE Context Setup Response on the target NG-RAN
* generate Handover Command for the source NG-RAN
  to be added to the target to source transparent
  container of the Handover Acknowledge message
* add Handover Acknowledge callback for N2
* send NG Handover Acknowledge to AMF

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
fa75484e13 Add NGAP Handover Request Acknowledge encoder and RRC callback
This commit completes the NG Mobility Management Procedure known as
Handover Resource Allocation. The outbound message is sent by the
target NG-RAN and is known as Handover Request Acknowledge.

Major changes:

* add RRC callback to trigger the generation of NG Handover
  Request Acknowledge on the target NG-RAN
* add NG Handover Request Acknowledge encoder

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
461cfb7911 Add NGAP Handover Request decoding and RRC handler
This commit introduces the NG Mobility Management Procedure known as
Handover Resource Allocation. The inbound message is sent by the AMF
and is known as Handover Request.

Major changes:

(0) Add Handover Resource Allocation initiating message decoding
    * add case for NGAP initiating message and unsuccessful message decoding
(1) handle Handover Request on the target NG-RAN
(2) decode NG Handover Request message
(3) process payload, e.g. create UE context,
    store IDs, set UP security and trigger bearer setup

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
92abefb815 Add NGAP Handover Failure message
This message is sent from the Target NG-RAN to the AMF.

The commit introduces:
* NGAP encoding function
* N2 callback for the target gNB
* handle the failure in RRC, inform NGAP
* send NGAP message to AMF via SCTP

Note: UE context in NGAP is fetched from the amf_ue_ngap_id

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
6e4f1b7b31 Add N2 Handover decision and trigger preparation on source CU
(1) add N2 ho decision based on measurements
(2) add trigger for N2 HO on source CU
(3) generate NG Handover Preparation Information message,
    including RRCReconfiguration, to be passed to the
    NG Handover Required message
(4) call RRC callback for Handover Required message

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
20e534d483 Add NGAP Handover Required message NGAP encoder and RRC callback on source NG-RAN
This commit introduces the NG Mobility Management Procedure known as
Handover Preparation. The outbound message is sent by the source NG-RAN
and is known as Handover Required.

* introduce NGAP library for Mobility Management
* introduce NGAP IEs encoder functions for Handover Required and relevant common IEs
* handle RRC trigger in NGAP and Send NGAP Handover Required to the AMF

Co-authored-by: batuhan duyuler <batuhan.duyuler@firecell.io>
2025-09-18 11:34:30 +02:00
Guido Casati
cfb654e77f HO Preparation: add alloc_ho_ctx to rrc_gNB_mobility lib 2025-09-18 11:34:30 +02:00
Guido Casati
ff5b2bc8b2 HO Preparation: print neighbour cell configuration 2025-09-18 11:34:30 +02:00
Guido Casati
2f4f177050 HO Preparation: allocate HO Context in the F1 trigger rather than nr_initiate_handover
During the N2 HO review has been found that the HO context
was not allocated at trigger time but later in the flow. This
might lead to issues in some scenarios (e.g. in N2 HO)
and it was fixed in this commit.
2025-09-18 11:34:30 +02:00
Guido Casati
26698d4f07 HO Preparation: do verify_section_notset of neighbour and measurement config for DU
During the review of N2 HO MR it has been found that there was no
check on the absence of the neighbour and measurement section in the DU config file.
2025-09-18 11:34:30 +02:00
Robert Schmidt
25380e8075 Add transm_timout timer to set UE to UL failure after timeout
Introduce a new timer for the use case where a UE should not be
scheduled anymore after a certain time. This is the case, for instance,
during handover, where the "source DU" forwards the RRCReconfiguration
and should stop scheduling this UE after some time.

Originally, transm_interrupt was introduced in 5c6d90aaff ("Use
NR_timer_t for UE transmission interrupt, e.g., RRC processing") to stop
scheduling a UE.

Commit 004403c84d ("Implement F1 UE Ctxt Modif Transmission Action
Indicator") reused this timer in an attempt to save code with an
"interrupt follow action".

In commit 89ebbb4192 ("Do not trigger ul failure in measgap scheduling
and standardize the verification if MAC is active in other scheduling
functions"), the transm_interrupt timer is used to not schedule a UE
through function nr_mac_ue_is_active(). This led to the UE not being
forwarded the RRCReconfiguration, effectively breaking handover, as the
message never reaches the UE. By using a new timer, the intended
functionality is restored.

Fixes: 89ebbb4192 ("Do not trigger ul failure in measgap scheduling
    and standardize the verification if MAC is active in other
    scheduling functions")
2025-09-18 11:34:30 +02:00
Robert Schmidt
98462c20ba Remove interrupt_action
Remove this flag, as it is not used as of this commit, and introduces
confusion (see next commit: we reused the trans_interrupt timer for
the transmission action indicator stop action, where the UE should stay
active, while it is *not* when transm_interrupt is active).
2025-09-18 11:34:30 +02:00
Robert Schmidt
7a02456883 Merge remote-tracking branch 'origin/meas-report-A2' into integration_2025_w38 (!3596)
L3 measurements and measReport A2

- Implementation of L3 measurements for active cell
- UE sends the measurement report for event A2
2025-09-18 09:38:39 +02:00
Robert Schmidt
8c78ef5b94 Correct Ubuntu version (to generic "Ubuntu") 2025-09-18 09:13:44 +02:00
Robert Schmidt
a1175f7f61 Add documentation for Jetson build pipeline 2025-09-18 09:13:44 +02:00
francescomani
95dfb67e51 fix MSG3 with C-RNTI failure 2025-09-18 08:50:55 +02:00
Robert Schmidt
44729d5765 Add Jetson build pipeline to RAN-Container-Parent 2025-09-17 17:24:41 +02:00
Robert Schmidt
8045dc71e0 XML description for build on Jetson (ARMv8) 2025-09-17 15:26:34 +02:00
Robert Schmidt
1ea90fc987 Rename to native_armv9 image build type
For clarity, rename to native_armv9 for clarity. The check inside Python
checked for native_arm, and if we introduce native_armv8 (for jetson),
it would also match that.
2025-09-17 15:24:12 +02:00
Jaroslava Fiedlerova
f691b7f9e4 Merge remote-tracking branch 'origin/fix-run-local-ci' into integration_2025_w38 (!3647)
Add nr-cuup to run_locally.sh

E1 deploy wasn't enable in the run_locally.sh script to run the CI on a local
machine. This MR is adding it. It was validated locally.
2025-09-17 14:56:45 +02:00
Jaroslava Fiedlerova
e5413dcb2d Merge remote-tracking branch 'origin/issue993' into integration_2025_w38 (!3642)
Check command line for unknown options also at gNB
2025-09-17 10:16:43 +02:00
Jaroslava Fiedlerova
44fa1c2244 Merge remote-tracking branch 'origin/issue-954-fix' into integration_2025_w38 (!3568)
Fix UE DCI monitoring after RRC setup

After the UE is configured with pdcch-Config, it continues to monitor
fallback search spaces in pdcch-ConfigCommon for DCI with C-RNTI.

The rational is that after sending RRC Setup the network won't know if
the UE has received and successfully applied it. Hence the network would
still continue to use the fallback DCI till it receives RRC setup
complete.

Closes #954
2025-09-17 10:14:57 +02:00
Guido Casati
2aa496bae7 Add nr-cuup to run_locally.sh 2025-09-16 15:34:53 +02:00
Jaroslava Fiedlerova
a9a554508d Merge remote-tracking branch 'origin/kpm-ran-func-segfault' into integration_2025_w38 (!3643)
Fix memory allocation issue in KPM RAN function sd parameter handling

This fixes a segmentation fault in the gNB when a KPM xApp sends the sd
parameter in the subscription message.

The segmentation fault seems to occur because *sd is uninitialized when
malloc(**sd) is called. This causes a double dereference of an uninitialized
pointer - **sd reads a random memory value which becomes the size parameter
for malloc(), leading to unpredictable memory allocation and segfaults.

This fix allocates the size using malloc(sizeof(uint32_t)) instead of
dereferencing the uninitialized pointer.
2025-09-16 12:58:55 +02:00
Jaroslava Fiedlerova
2a8b89a451 Merge remote-tracking branch 'origin/fix_error_ind_unpack' into integration_2025_w38 (!3639)
Fix error ind unpack

This MR fixes an issue in which the unpacking is erroneously deemed unsuccessful
even though it succeed in pulling all the bytes, this was due to not properly
handling the return value of pull16 which is either 0 or 2, not 0 or 1.

Additionally, this MR adds the Aerial specific expected error codes, as
described here:
https://docs.nvidia.com/aerial/archive/aerial-sdk/23-3/text/cubb_release_notes/scf_fapi_support.html#additional-aerial-specific-error-codes-reported-in-error-indication-from-l1-to-l2
2025-09-16 12:55:21 +02:00
alexjiao
2c369a8299 Handle reportAmount and reportInterval in reportConfigNR 2025-09-16 10:37:13 +01:00
rmagueta
3e65d75f83 UE sends the measurement report for event A2 2025-09-16 10:35:26 +01:00
rmagueta
8d6bb6bf20 Definition of L1 and implementation of L3 measurements for serving cell 2025-09-16 10:32:33 +01:00
francescomani
a76f7a8c62 remove rfsim option from CU in F1 docker 2025-09-16 11:21:04 +02:00
francescomani
e99cf956e7 remove --sa option from newly created handover test 2025-09-16 10:25:04 +02:00
francescomani
fd791568ff change RUNMODEM documentation to reflect --sa not being optional anymore 2025-09-16 10:22:05 +02:00
francescomani
b8683dd351 check command line for unknown options at gNB 2025-09-16 10:22:05 +02:00
francescomani
93f5f65806 remove --sa command line option from sa_fhi_7.2_metanoia_2x2_gnb docker compose 2025-09-16 10:22:05 +02:00
francescomani
e0b5880db7 cleanup NR_UL_UE_HARQ_t 2025-09-16 09:25:00 +02:00
Sakthivel Velumani
524aa84e96 fix: issue 954 - DCI monitoring after RRC setup
After the UE is configured with pdcch-Config, it continues to monitor
fallback search spaces in pdcch-ConfigCommon for DCI with C-RNTI.

The rational is that after sending RRC Setup the network won't know if
the UE has received and successfully applied it. Hence the network would
still continue to use the fallback DCI till it receives RRC setup
complete.
2025-09-15 15:47:13 -04:00
Rúben Soares Silva
6ff098e0bd Add Aerial-specific ERROR.indication codes
This adds the expectable error codes from Aerial L1, as described in https://docs.nvidia.com/aerial/archive/aerial-sdk/23-3/text/cubb_release_notes/scf_fapi_support.html#additional-aerial-specific-error-codes-reported-in-error-indication-from-l1-to-l2
The errors are added in such a way that they're only visible when compiled with Aerial
2025-09-15 14:54:45 +01:00
Rúben Soares Silva
0a796ebb6c Fix ERROR.indication unpack function
Fix an issue in which the unpacking is erroneously deemed unsuccessful even though it succeed in pulling all the bytes, this was due to not properly handling the return value of pull16 which is either 0 or 2, not 0 or 1.
Check the results of push and pull operation with correct boolean operator.
2025-09-15 14:54:44 +01:00
Guido Casati
956d30f4e1 HO preparation: fix PLMN type in nr_neighbour_cell_t
During the review of the N2 HO MR it has been found that the wrong type
plmn_identity_t (S1AP) was used in RRC. Now updated to the platform type plmn_id_t.
2025-09-15 10:08:49 +02:00
Guido Casati
9f97320cbe HO Preparation: calloc pdcp_config in DRB to Modify Item decoding
The malloced struct is initialized to garbage and when
the IE is absent, the output "PDCP reestablishment"
member (allocated in the stack) is set to a random value.
2025-09-15 10:03:11 +02:00
Robert Schmidt
206c7667e6 Merge branch 'integration_2025_w37' into 'develop'
Integration: `2025.w37`

* !3514 NR UE: add support for PDSCH rate matching with NZP CSI-RS
* !3630 feat(ldpc_aal): Do not try EAL init if FHI 7.2 is enabled
* !3634 reset MSG3 C-RNTI flag in case of failure
* !3566 fix 600 cppcheck notifications
* !3633 Fix PLMN print in select_amf
* !3631 Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"
* !3622 Populate sampled_ue_antennas
* !3601 gNB: adaptive DL/UL MCS based on reported SSB-SINR and measured PUSCH SNR
* !3637 fix bug in computing number of LCG IDs with data at UE
* !3635 Fixes and updates for UL scheduling, notably DSUUU
* !3607 Reworking BWP configuration
* !3531 Refactor measConfig
* !3612 CI: Creation of F1 Handover pipeline
* !3611 CI: Generalize PhySim tests, run PhySims on Gracehopper

Closes #985 and #975

See merge request oai/openairinterface5g!3636
2025-09-12 16:51:15 +00:00
Robert Schmidt
166589c2ef Add bands for neighbour configuration in HO CI pipeline
Since !3531, the band is mandatory in a neighbour configuration.

See also: fd4de3c720 ("Add support for band in neighbourConfiguration")
2025-09-12 18:47:12 +02:00
Leonardo Bonati
40fd22e26a Fix memory allocation issue in KPM RAN function sd parameter handling 2025-09-12 10:43:34 -04:00
Robert Schmidt
e486557f63 Merge remote-tracking branch 'origin/physim-gracehopper' into integration_2025_w37 (!3611)
CI: Generalize PhySim tests, run PhySims on Gracehopper

This changeset generalizes/harmonizes the CI infrastructure for physim
testing, and adds a new pipeline for physim tests on Gracehopper
machines.

Specifically:

- Refactor the existing CI code for running and analyzing physical
  simulators. The existing code assumed those tests are deployed using
  OpenShift. Instead, OpenShift/Helm-specificities (e.g., running a
  "release") have been removed, and instead of hardcoding the deployment
  of the physical simulators using a script for Helm, the function takes
  any script that can deploy using Helm/docker/from source. The overall
  appearance is the same.
- Add a new pipeline RAN-PhySim-GraceHopper-5G that executes physical
  simulators on gracehopper. Reporting is done in the same way as for
  existing physical simulators (e.g., like in the RAN-PhySim-Cluster-5G
  pipeline), but deployed in docker instead of helm.
  -> some tests don't work reliably on ARM yet and are skipped
- the RAN-gNB-N300-Timing-Phytest-LDPC pipeline has been reworked to use
  the same code for testing T2 offload, with ctest, and the same
  reporting.
- the CUDA LDPC test XML has been removed, as these tests don't work
  reliably.
- add a new macro add_timed_physim_test() that allows to define
  thresholds to be checked, so that ctest will check for them. see the
  documentation for more information
2025-09-12 15:57:51 +02:00
Robert Schmidt
230a969be4 Merge remote-tracking branch 'origin/CI-HO-setup' into integration_2025_w37 (!3612)
CI: Creation of F1 Handover pipeline

In this MR we are modifying/adding all the required files (.xml, .conf,
.yml) in order to create a pipeline on Jenkins that allows us to test
OTA F1 handover.
2025-09-12 15:56:34 +02:00
Robert Schmidt
8ca1d0d38d Doc: Add PhySim-Gracehopper and update existing PhySim-Cluster 2025-09-12 15:01:09 +02:00
Robert Schmidt
31aaa4ed3f Add PhySim-GraceHopper-5G to test pipelines 2025-09-12 14:54:49 +02:00
Robert Schmidt
998018db50 Slight restructuring of the physim doc
Move info about pipelines to the introduction instead of somewhere in
the middle. Add some filler text, and fix indentation headings.
2025-09-12 14:54:49 +02:00
Robert Schmidt
5beb8bf314 Print results of physims
Remove the runtime, which is not interesting, and add instead
- test name and if the test failed
- the threshold checks, if any, and
- possible additional information about test failures.
2025-09-12 14:54:49 +02:00
Robert Schmidt
eb9e4ef9ba Pass CTest test description in custom property or environment
Prior to this change, each test would have, as label, it's description.
This leads to many labels, which are normally reserved for grouping
tests. Move the description into a custom property instead.

Since we rely on the JSON output for the generation of HTML reports, we
need to also extract the description from the generated JSON. However,
custom properties are only logged starting from cmake 3.30. For
back-wards compatibility, write an additional, separate environment
variable TEST_DESCRIPTION from which the description can be read as a
fallback.

For the add_timed_physim_test(), this has been already done in a parent
commit.
2025-09-12 14:54:49 +02:00
Robert Schmidt
e5139b6f0f Put physim status info in separate box
A follow-up commit will introduce a change to print timing logs in the
HTML (if present in the test). Prepare for this with separate box.
2025-09-12 14:54:49 +02:00
Robert Schmidt
15befb41e6 Physim deploy(): add deployment timeout 2025-09-12 14:54:49 +02:00
Robert Schmidt
e824a6373d Rename to analyze_physim() 2025-09-12 14:54:49 +02:00
Robert Schmidt
b00dd803d1 Remove existing physim offload tests
After the parent commit, there is no need for these XML files anymore.
The tests are driven by ctest instead.
2025-09-12 14:54:49 +02:00
Robert Schmidt
42dbaaf75c Add new T2 Offload test 2025-09-12 14:54:49 +02:00
Robert Schmidt
adabb6a967 Add script to run PhySims from source
physim

script more
2025-09-12 14:54:49 +02:00
Robert Schmidt
da644bc91d Import existing timing thresholds for offload tests
Imported using commands:

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"DLSCH encoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_enc_nr_dlsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake

    xmlstarlet sel -t \
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('check_physim_threshold(physim.5g-offload.',physim_test,'.testX.Y \"ULSCH total decoding time\" \"< ', physim_time_threshold, '\")')" \
      -n t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/ThresholdsOffload.cmake
2025-09-12 14:54:49 +02:00
Robert Schmidt
9528ccceb9 Clean up output of xmlstarlet command 2025-09-12 14:54:49 +02:00
Robert Schmidt
a7f0a1a20c Import Offload unit tests into CTest
The unit tests have been imported with this command:

    xmlstarlet sel -t
      -m '//testCaseList/testCase[class="Run_Physim"]' \
      -v "concat('add_timed_physim_test(physim.5g-offload.',physim_test,'.testX.Y \"',desc,'\" ',physim_test,' ',physim_run_args,')')" \
      -n t2_offload_enc_nr_dlsim.xml t2_offload_dec_nr_ulsim.xml >> ../../openair1/SIMULATION/tests/CMakeLists.txt

The next commit will further cleanup this output. I commit it like this
for verification purposes.
2025-09-12 14:54:49 +02:00
Robert Schmidt
55cebe6edf Provide add_timed_physim_test() in cmake
Add two new macros that allow to register physim tests for ctest,
including timing thresholds that should be fulfilled.

First, add_timed_physim_test() registers a new test using a helper
script RunTimedTest.cmake. This is because after test execution, we need
to analyze logs, and the recommended way to do multiple steps in one
test is via a helper cmake script:
https://cmake.org/pipermail/cmake-developers/2016-February/027816.html

Second, check_physim_threshold() adds new thresholds. It takes a text to
be parsed, and a condition (e.g., "< 20") to check for the number
following the threshold (which is assumed to be present right after the
threshold). It uses a test property to count the total number of checks
(limiting them to 10), and sets environment variables for the script.  I
initially planned to use a test property for checks, but those are only
valid in the same directory, and RunTimedTest.cmake seems to be assumed
by cmake to be "elsewhere", hence I needed to resort to environment
variables.

RunTimedTest.cmake is called through cmake with the test parameters and
checks. It re-constructs a list of checks [1], runs the test, and pipes
the log into a separate script that is passed all checks (see below).
Afterwards, it verifies that both the test and script passed.

A script analyze-timing.sh builds an awk script from the checks passed.
The script analyzes each line of the test output for the threshold, and
compares against the threshold. analyze-timing.sh returns success if all
checks passed.

[1] I did not manage to pass a "list" of checks in a single environment
variable through the check_physim_threshold(), which would be simpler.
2025-09-12 14:53:09 +02:00
Robert Schmidt
48be94a8c1 Remove LDPC GPU physim tests
Many of these tests do not pass (ldpctest returns non-zero output).
Moving to ctest would make all these tests and hence the pipeline fail.
2025-09-12 14:53:09 +02:00
Robert Schmidt
b7cb74699d add_physim_test(): change signature for full test name
Change signature of the macro to take the full test name, a separate
description (previously called a label?), and the executable and test
invocation. The overall signature becomes easier.

The rational for the full test name is that a later commit will
introduce the possibility to define physim tests that are checked for
specific times, in which case we need to reuse the test name. Thus,
using the full name from the beginning leads to more clarity, even
though they are a bit longer.

Add an additional safety check that the given simulator is actually a
target defined within the project (in other words, it actually exists).

Update the documentation correspondingly.
2025-09-12 14:53:09 +02:00
Robert Schmidt
4809ffc92a Add new Physim test for gracehopper 2025-09-12 14:53:09 +02:00
Robert Schmidt
e6a0a1cac4 Deployment script of physims via docker 2025-09-12 14:53:09 +02:00
Robert Schmidt
89321fe824 Add Dockerfile for physim build in CI 2025-09-12 14:53:09 +02:00
Robert Schmidt
1cfca6ce47 Move PhySim definition to openair1/SIMULATION/tests
Most (but not all) physical simulators are defined under
openair1/SIMULATION/. Defining physical simulators below there seems to
be the more "obvious" directory anyway, as the physical simulators are

    openair1/SIMULATION/tests
    Phy(L1)  Sim        tests => PhySim (tests)
2025-09-12 14:53:09 +02:00
Robert Schmidt
91069fffd1 Query system info 2025-09-12 14:53:09 +02:00
Robert Schmidt
b60572d1fc Merge remote-tracking branch 'origin/refactor-measConfig' into integration_2025_w37 (!3531)
Refactor measConfig

- Refactor and minor improvements in get_MeasConfig function;
- Add support for band in neighbourConfiguration (It is currently
  possible to handover cells with different frequencies, as long as they
  are in the same band, but this MR allows the handover to also be done
  between cells in different bands).
2025-09-12 12:39:44 +02:00
Robert Schmidt
99962b551c Merge remote-tracking branch 'origin/reworking_BWP_configuration' into integration_2025_w37 (!3607)
Reworking BWP configuration

This MR reworks the configuration via fail of additional BWPs. Moreover, it
allows for a single BWP to be configured for a given UE at a given time (BWP
switch possible only via reconfiguration). It also reworks PTRS configuration
for consistency with the BWP one.
2025-09-12 12:38:13 +02:00
Robert Schmidt
743d342ad6 Merge remote-tracking branch 'origin/fixes-ul-sched' into integration_2025_w37 (!3635)
Fixes and updates for UL scheduling, notably DSUUU

Fix a number of problems that stem from !3521, notably regarding Msg3
scheduling, retransmissions in "UL-heavy" TDD scenarios, and BSR
handling. Modify a CI test to run a UL-heavy TDD scenario, and add
documentation for UL-heavy TDD scenarios.
2025-09-11 19:48:48 +02:00
Robert Schmidt
e2b3c1546e Add TDD pattern config asserts
Check that the number of slots in period/symbols in mixed slot conforms
to what is prescribed by the spec.
2025-09-11 19:47:52 +02:00
Robert Schmidt
13e9910e4e Modify CI SA 60MHz 2x2 test to be DSUUU
Update configuration and tweak iperf thresholds accordingly. Tune some
parameters for good UL reception.
2025-09-11 19:47:52 +02:00
Robert Schmidt
bb378620e9 Remove ulsch_max_frame_inactivity from CI configs
The parameter is either set to 10 (the default, so not necessary), or to
0 forcing the gNB to schedule the UE all the time, which is only
necessary in specific scenario, and here simply wrong.
2025-09-11 19:47:52 +02:00
Robert Schmidt
b283960637 Increase periodic BSR to 5ms: increase UL throughput
In high throughput UL scenarios, at least with our configuration, the UE
only sends Short BSR. The maximum is 300000 bytes, which is completely
"scheduled away" after a couple of UL grants. Increase the periodic BSR
to 5ms to get more BSR, which results in higher UL throughput.
2025-09-11 19:47:52 +02:00
Robert Schmidt
7c9a7ab374 Reset sched_ul_bytes on BSR to tend to overestimation
On BSR reception, reset sched_ul_bytes. This change means that we assume
that no data is "in flight" for this UE at time of BSR reception, or,
put differently, that we overestimate the buffer size at UE (in the
worst case).

To illustrate this, consider the following traces before/after this
change.

Before this change: Upon BSR reception, the estimated BSR of the UE is
reset, but the gNB still accounts for data "in flight". It is visible
that the calculated buffer size (estimated - scheduled) quickly goes to
zero, and we don't use all resources, despite the buffer still being
full. The maximum application throughput in this run was ~220Mbps.

    [NR_MAC]   SHORT BSR at  773.19, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774. 9 PRB start  0:162 TDA  2 TBS 32797 est 300000 sched 152704 est BSR 147296 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774. 6 RNTI af8e UL sched  774.11 PRB start  0:162 TDA  4 TBS 7172 est 300000 sched 159876 est BSR 140124 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.12 PRB start  0:162 TDA  0 TBS 32797 est 292845 sched 185501 est BSR 107344 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.10 RNTI af8e UL sched  774.13 PRB start  0:162 TDA  2 TBS 32797 est 292845 sched 218298 est BSR  74547 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.14 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 218298 est BSR  41819 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.11 RNTI af8e UL sched  774.16 PRB start  0:162 TDA  4 TBS 7172 est 260117 sched 225470 est BSR  34647 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.17 PRB start  0: 35 TDA  0 TBS 7172 est 220236 sched 185501 est BSR  34735 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.15 RNTI af8e UL sched  774.18 PRB start  0:162 TDA  2 TBS 32797 est 220236 sched 218298 est BSR   1938 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  774.16 RNTI af8e UL sched  774.19 PRB start  0: 10 TDA  2 TBS 2017 est 187508 sched 187518 est BSR    -10 TPC 1
    [NR_MAC]   SHORT BSR at  774. 9, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 2 PRB start  0:162 TDA  0 TBS 32797 est 260117 sched 147549 est BSR 112568 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 0 RNTI af8e UL sched  775. 3 PRB start  0:162 TDA  2 TBS 32797 est 260117 sched 180346 est BSR  79771 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 4 PRB start  0:162 TDA  2 TBS 32797 est 227389 sched 180346 est BSR  47043 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 1 RNTI af8e UL sched  775. 6 PRB start  0:162 TDA  4 TBS 7172 est 227389 sched 187518 est BSR  39871 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 7 PRB start  0:162 TDA  0 TBS 32797 est 180353 sched 173174 est BSR   7179 TPC 1
    [NR_MAC]   ULSCH/PUSCH:  775. 5 RNTI af8e UL sched  775. 8 PRB start  0: 36 TDA  2 TBS 7298 est 180353 sched 180472 est BSR   -119 TPC 1

After this change: The gNB resets the number of bytes "in flight"
(sched). Thus, the calculated buffer is larger, and does not "run out"
before a new BSR arrives (which still indicates the maximum). The UE is
thus allocated all resources, but we might overestimate some resources.
The maximum application throughput in this run was ~300Mbps, limited by
MCS and not by estimated buffer size as in the previous case.

    [NR_MAC]   SHORT BSR at   43. 3, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.17 PRB start  0:162 TDA  0 TBS 36897 est 263180 sched  36897 est BSR 226283 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.15 RNTI d3ea UL sched   43.18 PRB start  0:162 TDA  2 TBS 36897 est 263180 sched  73794 est BSR 189386 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   43.19 PRB start 12:150 TDA  2 TBS 33822 est 263180 sched 107616 est BSR 155564 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   43.16 RNTI d3ea UL sched   44. 1 PRB start  0:162 TDA  4 TBS 7941 est 263180 sched 115557 est BSR 147623 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 3 PRB start  0:162 TDA  0 TBS 36897 est 173698 sched  25881 est BSR 147817 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 4 PRB start  0:162 TDA  2 TBS 36897 est 173698 sched  62778 est BSR 110920 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 1 RNTI d3ea UL sched   44. 6 PRB start  0:162 TDA  4 TBS 7941 est 173698 sched  70719 est BSR 102979 TPC 1
    [NR_MAC]   SHORT BSR at   43.13, est buf 300000
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 7 PRB start  0:162 TDA  0 TBS 36897 est 292079 sched  36897 est BSR 255182 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 5 RNTI d3ea UL sched   44. 8 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched  73794 est BSR 218285 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44. 9 PRB start  0:162 TDA  2 TBS 36897 est 292079 sched 110691 est BSR 181388 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44. 6 RNTI d3ea UL sched   44.11 PRB start  0:162 TDA  4 TBS 7941 est 292079 sched 118632 est BSR 173447 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.12 PRB start  0:162 TDA  0 TBS 36897 est 213587 sched  39972 est BSR 173615 TPC 1
    [NR_MAC]   ULSCH/PUSCH:   44.10 RNTI d3ea UL sched   44.13 PRB start  0:162 TDA  2 TBS 36897 est 213587 sched  76869 est BSR 136718 TPC 1
2025-09-11 19:47:52 +02:00
Robert Schmidt
443e59a318 Merge remote-tracking branch 'origin/num_lcg_id_with_data_fix' into integration_2025_w37 (!3637)
fix bug in computing number of LCG IDs with data at UE
2025-09-11 15:45:13 +02:00
Robert Schmidt
1e991bb8fe Merge remote-tracking branch 'origin/sinr_based_amc' into integration_2025_w37 (!3601)
gNB: adaptive DL/UL MCS based on reported SSB-SINR and measured PUSCH SNR

Currently this is used esp. if the number of rounds is limited to 1
(e.g. disable_harq).
2025-09-11 15:42:38 +02:00
Robert Schmidt
89ebbb4192 Do not trigger ul failure in measgap scheduling and standardize the verification if MAC is active in other scheduling functions 2025-09-11 11:49:31 +01:00
Robert Schmidt
c54b69e635 Merge remote-tracking branch 'origin/srsSampledAntennas' into integration_2025_w37 (!3622)
Populate sampled_ue_antennas

sampledUeAntennas: Bitmap of UE antenna indices sampled by the SRS waveform corresponding to this PDU’s SRS Resource.

• Codebook: corresponds to antenna ports in SRS Resources;
non-overlapping indices are expected for ports sampled via different
SRIs, for a given UE. [3GPP TS 38.214 [5], section 6.1.1.2]

With this aerial gets 2 UL layers:

    [NR_MAC]   Frame.Slot 0.0
    UE RNTI 63d3 CU-UE-ID 2 in-sync PH 48 dB PCMAX 20 dBm, average RSRP -68 (16 meas)
    UE 63d3: CQI 11, RI 4, PMI (5,0)
    UE 63d3: UL-RI 2, TPMI 0
    UE 63d3: dlsch_rounds 60/1/0/0, dlsch_errors 0, pucch0_DTX 1, BLER 0.01117 MCS (1) 0
    UE 63d3: ulsch_rounds 3813/261/8/5, ulsch_errors 5, ulsch_DTX 21, BLER 0.02966 MCS (1) 22 (Qm 8 deltaMCS 0 dB) NPRB 5  SNR 31.0 dB
    UE 63d3: MAC:    TX           2209 RX        1471874 bytes
    UE 63d3: LCID 1: TX            851 RX           1375 bytes
    UE 63d3: LCID 2: TX              0 RX              0 bytes
    UE 63d3: LCID 4: TX              0 RX              0 bytes
2025-09-11 10:51:43 +02:00
Robert Schmidt
fbaf38959c Merge remote-tracking branch 'origin/revert_fapi_trp_scheme_byte' into integration_2025_w37 (!3631)
Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"

This commit broke compatibility with Aerial when compiled with
-DSCF_FAPI_10_04_SRS=ON. It was decided that this should become the
default.

Modify documentation, and use a dedicated image name to make it clear in
the CI that it has SRS.
2025-09-11 10:51:01 +02:00
Robert Schmidt
197492ae89 Add documentation on UL-heavy TDD patterns 2025-09-11 10:18:19 +02:00
Reem Bahsoun
20a2ff1e49 Add the Handover pipeline to the RAN-Container-Parent 2025-09-10 21:36:03 +02:00
Reem Bahsoun
bb383359e2 Add the required files for Handover CI setup (.conf, .yml, .xml) 2025-09-10 21:35:58 +02:00
Reem Bahsoun
1dac64fa42 Add UE host (raspix) and OC CN for HO CI setup 2025-09-10 21:30:43 +02:00
rmagueta
7e6826ec03 Refactor and minor improvements in get_MeasConfig function 2025-09-10 18:57:04 +01:00
Nick Hedberg
1120d41dd6 Populate sampled_ue_antennas 2025-09-10 17:51:27 +01:00
Robert Schmidt
709d583950 Merge remote-tracking branch 'origin/issue-985' into integration_2025_w37 (!3633)
Fix PLMN print in select_amf and elsewhere

Closes #985
2025-09-10 16:59:05 +02:00
Robert Schmidt
67ec7b7029 Merge remote-tracking branch 'origin/cppcheck-errors' into integration_2025_w37 (!3566)
fix 600 cppcheck notifications

With my fedora 42, using the CI command for cpp check i get 1900 errors.
This change set fixes some of them.
2025-09-10 16:58:25 +02:00
Robert Schmidt
c4a0c3b05e Rename to deploy_physim()
deploy_oc_physim() is not specific to OpenShift anymore, so rename to a
neutral name.
2025-09-10 16:43:16 +02:00
Robert Schmidt
0ff85ff2c0 Rename PhySim deployment task to Deploy_Run_OC_PhySim
A future commit will introduce the possibility to deploy physims using
docker, so rename the current step to reflect that it works via
OpenShift.
2025-09-10 16:43:16 +02:00
Robert Schmidt
deadd5414d CI: Generalizce deploy_oc_physim()
A future commit will enable to deploy physical simulators via docker.
Hence:

- Move the script to run out of deploy_oc_physim(), to make it more
  generic (later commits will introduce other scripts)
- pass the working directory (the function will be moved into
  cls_oaicitest, as it fits neither cls_containerize nor cls_cluster
  when deploying the tests from source)
- not using ci-scripts: don't hardcode a specific path, just use the
  working directory
- avoid helm-specific pods summary, and put it into the general "physim
  logs"
- remove helm-specific "release", and use a generic name for results
- always log pod logs and status to debug, even if deployment was not
  successful or tests did not finish.
2025-09-10 16:43:16 +02:00
Robert Schmidt
876d2b1b69 CI PhySims: archive LastTest.log
LastTest.log has logs of all tests. It is a raw file from which we
generate per-test logs, but it is useful to also archive this in case we
need it.
2025-09-10 16:43:16 +02:00
Robert Schmidt
dd3ecbcf38 CI: Harmonize exec_script() API
Instead of making the function a class member, make it an instance
member because (1) it is more aligned with other functions, notably,
run(), and (2) especially for RemoteCmd() it can be faster, as
successive exec_script() calls do not require a new SSH connection.
2025-09-10 16:43:16 +02:00
Robert Schmidt
582aeac496 Remove superfluous HTML.CreateHtmlTabFooter()
CreateHtmlTabFooter() is already called in main.py, at the end of an
XML. This is enough, the others are "duplicates" that are not necessary.
2025-09-10 16:43:16 +02:00
Robert Schmidt
cfe9bfecce HTML report: Update to 2025 2025-09-10 16:43:16 +02:00
Calvin Peyron
66f0d960d3 Physim doc: mention unmaintained simulators 2025-09-10 16:43:16 +02:00
Reem Bahsoun
a9da4dba35 New cuBB image compiled with -DSCF_FAPI_10_04_SRS=ON flag
This flag will be used to compile the cuBB regardless of the use of SRS
This is due to the RX_Beamforming PDU that's used following 222.10.04
2025-09-10 13:35:33 +02:00
Rúben Soares Silva
f977b6affd Alter Aerial documentation to mention mandatory L1 compilation flag 2025-09-10 13:34:27 +02:00
Florian Kaltenberger
9ba2e7ca5b Revert "Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02)"
This commit broke compatibility with Aerial when compiled with -DSCF_FAPI_10_04_SRS=ON. It was decided that this should become the default.

This reverts commit 8beb382277.
2025-09-10 13:34:27 +02:00
Francesco Mani
67cb3f026d Save PUSCH information for each (re-)transmission
Instead of only saving this information in the first transmission, also
store it on each retransmission. This should ensure that if some
information changes, we always relate to the last transmission. For
instance, power control information might have changed, and should be
considered in subsequent rounds, if necessary. It also simplifies code.

Fixes: 6294ce715e ("Reorder pf_ul to process retransmission")
2025-09-09 20:01:04 +02:00
Robert Schmidt
bd6180e362 UL TDA: ensure we reach Msg3 in all cases
In at least the case of mu=1, min_rxtxtime=2 and DDDSU with no UL
symbols (for ULSCH) in the mixed slot, the current state of code does
not allow a UE to attach.  This is because at mu=1, Msg3 is k2+delta,
where k2=min_rxtxtime and delta(mu)=3.

Prior, this special case was handled because we had a dedicated Msg3
TDA, which in most cases is not necessary (because the mixed slot
allocates the DCI, and the following mixed slot has the UL grant). Add
code that tries to ensure that we only add the Msg3 TDA in cases when we
need it.

Fixes: 961a646dc7 ("Remove dedicated Msg3 TDA")
2025-09-09 20:01:04 +02:00
Laurent THOMAS
c833aee524 refine the LTE prach fix from cppcheck error detection 2025-09-09 18:07:31 +02:00
Laurent THOMAS
af125c39df array test overflow and possible divide by 0 fixes 2025-09-09 18:07:31 +02:00
Laurent THOMAS
10f304d9da return a error case before a SEGV if the pointer is null 2025-09-09 18:07:31 +02:00
Laurent THOMAS
bc238f9b2f fix as i can a error detected by cppcheck, w[lprime] is only 0, 1 or -1 2025-09-09 18:07:31 +02:00
Laurent THOMAS
3190ad47b1 avoid a cppcheck warning 2025-09-09 18:04:26 +02:00
Laurent THOMAS
5d118cf170 fix lack of test for fopen() return value 2025-09-09 18:04:26 +02:00
Laurent THOMAS
82931c8f01 fix printf() format errors 2025-09-09 18:04:26 +02:00
Laurent THOMAS
278d2cbca1 fix several not tested malloc or calloc return value 2025-09-09 18:04:26 +02:00
francescomani
5a7d275546 fix bug in computing number of LCG IDs with data at UE 2025-09-09 13:01:43 +02:00
Robert Schmidt
39bbadf3d1 Merge remote-tracking branch 'origin/fix_msg3_crnti_fail' into integration_2025_w37 (!3634)
reset MSG3 C-RNTI flag in case of failure

If MSG3 with C-RNTI fails, the UE should come back with a
re-establishment (after a given number of RA failures in general). In
that case, the OAI UE wouldn't reset the MSG3 with C-RNTI flag leading
to re-establishment failure.
2025-09-09 12:26:55 +02:00
Robert Schmidt
eb62fa3a1d Merge remote-tracking branch 'origin/aal_cleanup_eal_init' into integration_2025_w37 (!3630)
feat(ldpc_aal): Do not try EAL init if FHI 7.2 is enabled

When FHI 7.2 is enabled, the EAL initialization is done by the FHI and
the attempt to init EAL by ldpc_aal will fail. In that case, it is not
necessary neither to provide a DPDK core list for BBDEV.

This MR offers to skip EAL init in ldpc_aal when FHI 7.2 is enabled in
order to avoid error messages in the log and to allow dropping the
useless DPDK cores argument in that case.

Also add some fixes to the LDPC offload documentation.
2025-09-09 12:26:18 +02:00
Robert Schmidt
6c7e692bd5 Merge remote-tracking branch 'origin/nzp_csi_pdsch_ratematching' into integration_2025_w37 (!3514)
NR UE: add support for PDSCH rate matching with NZP CSI-RS

Currently only ZP CSI-RS is considered in function
configure_ratematching_csi, add support for NZP CSI-RS.

Closes #975
2025-09-09 12:25:56 +02:00
Thomas Schlichter
6b80fbf072 update doc/MAC/mac-usage.md 2025-09-09 11:17:43 +02:00
Thomas Schlichter
b3242490f1 enable SSB-SINR reporting for NTN GEO scenario 2025-09-09 11:17:43 +02:00
Thomas Schlichter
2944775952 nr_ulsim: fix computation of the scrambling errors
The array ul_harq_processes[harq_pid].f contains the data as bits, not bytes.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
4e87ac46a1 nr_dlsim: several fixes for low SNR scenarios
If the DCI in PDCCH is not correctly received, no PDSCH would be decoded but counted as no error.
Also if the DCI was not correctly received, a TBS of 0 would be used in some computations and memory allocations.

Fix these not counting if there is no PDSCH decoding, and by using the known TBS instead of the one received from the DCI.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
1c63d44afd NR UE: make the power averaging IIR filter faster
Especially high initial noise levels would stay too long and negatively impact the accuracy of later S(I)NR computations.
2025-09-09 11:17:43 +02:00
Thomas Schlichter
e70bb45ebd gNB: consider the measured PUSCH SNR when computing the UL MCS if only one round is used 2025-09-09 11:17:43 +02:00
Thomas Schlichter
9346b50eb3 gNB: consider also the min_mcs when computing the DL MCS if only one round is used 2025-09-09 11:17:43 +02:00
Thomas Schlichter
a9a9dfe297 gNB: adjust the dl_max_mcs based on the reported SSB-SINR 2025-09-09 11:17:33 +02:00
Guido Casati
7bb9f60068 Fix AMF related prints in NGAP 2025-09-09 09:12:57 +02:00
Thomas Schlichter
2b2e9563ff gNB: add SSB-SINR measurement values to the MAC statistics output 2025-09-08 13:32:23 +02:00
Thomas Schlichter
afc13c264c gNB: compute and store SSB-SINR in dB instead of just the SINR-index 2025-09-08 13:32:23 +02:00
Guido Casati
4d96f40023 Fix PLMN prints in NGAP/RRC
Also, replace NGAP_X with LOG_X to avoid false-positive format warnings in clang.

Closes #985
2025-09-06 12:38:34 +02:00
Guido Casati
3a734bc5d4 Replace ngap_plmn_identity_t with plmn_id_t and use proper size for TAI List for Paging
Use platform type plmn_id_t to simplify the code.

TAI List for Paging in NGAP PAGING message (9.2.4.1 3GPP TS 38.413)
is limited to 16.
2025-09-06 12:25:17 +02:00
rmagueta
fd4de3c720 Add support for band in neighbourConfiguration 2025-09-05 10:11:04 +01:00
Robert Schmidt
11a561cb7b Ensure that retransmission uses TDA as indicated
Previously, the TDA reuse condition was wrong: for multiple TDAs with
different k2, the symbol allocation might be the same, in which the
previous logic was using the wrong TDA. Fix the condition, and insert an
assert to ensure the allocated TDA is correct.
2025-09-05 09:14:02 +02:00
Robert Schmidt
454f690272 UL TDA for SRS: set correct right k2
We need to set the different k2 values according to the number of UL
slots, not all to the same k2.
2025-09-05 09:13:05 +02:00
Robert Schmidt
4e4f27c79d Fix: only create mixed slot UL TDU for more than 1 symbol
For PUSCH, we need at least 2 symbols, so ensure when creating the TDA.
2025-09-05 09:13:05 +02:00
francescomani
18041e3c41 common function to generate csi_MeasConfig
(also used to get the correct CSI meas structure in case of BWP switch)
2025-09-04 18:43:12 +02:00
francescomani
8d872f2f7d clone cellGroup for BWP switch to avoid removing BWP currently in use from gNB list 2025-09-04 18:43:12 +02:00
francescomani
ce1ddb260b bugfix in BWP release at UE 2025-09-04 18:43:12 +02:00
francescomani
45792da029 include missing harq information in phy-sim nr_mac_config_t initialization 2025-09-04 18:43:12 +02:00
francescomani
7300a7daf3 option to trigger reconfiguration with BWP switching 2025-09-04 18:43:12 +02:00
francescomani
22cd4e9312 configure only 1 BWP at a given time (1st active BWP) 2025-09-04 18:43:12 +02:00
francescomani
db93bc022f separate functions to configure initial BWPs 2025-09-04 18:43:12 +02:00
francescomani
3ea02249d6 rework BWP configuration via file 2025-09-04 18:43:12 +02:00
francescomani
9ab0715a5a formatting and refactoring with intermediate variable names to avoid too long lines 2025-09-04 18:43:12 +02:00
francescomani
e8f53fd5ac function to determine max UL MIMO layers 2025-09-04 18:43:12 +02:00
francescomani
a73dd19381 rework PTRS configuration via file 2025-09-04 18:43:12 +02:00
Jaroslava Fiedlerova
d372aa1b50 Merge branch 'integration_2025_w36' into 'develop'
Integration: `2025.w36`

* !3613 Speedup complex rotate for aarch64
* !3614 Ldpc encoder zc384 optimization
* !3625 gNB scheduler small fixes
* !3629 Fix for gNB max feedback time parameter
* !3619 Fix RA 2-Step MgsB Ack at UE
* !3626 Upgrade CI to Aerial 25-2

See merge request oai/openairinterface5g!3627
2025-09-04 16:36:42 +00:00
francescomani
8bae60c938 reset MSG3 C-RNTI flag in case of MAC reset 2025-09-04 17:30:21 +02:00
Romain Beurdouche
79c1133736 fix(ldpc_aal): Documentation
The tuning of the BLER is necessary for Intel ACC, not for the T2.
2025-09-04 08:31:10 +00:00
Romain Beurdouche
6647af4116 fix(ldpc_aal): Update documentation
Update the documentation to reflect that the DPDK core list is not
anymore necessary when using FHI 7.2.
2025-09-04 08:28:30 +00:00
Romain Beurdouche
705f04f58e feat(ldpc_aal): Do not initialize EAL if it is already initialized
When FHI 7.2 is enabled, the EAL initialization is done by the FHI and
the attempt to init EAL by ldpc_aal will fail.
In that case, it is not necessary neither to provide a DPDK core list
for BBDEV.

This commit offers to skip EAL initialization if it is already initialized
in order to allow dropping the useless DPDK cores argument in that case.
The change relies on `rte_dev_probe` to detect if EAL was already
initialized.
2025-09-04 06:56:59 +00:00
Jaroslava Fiedlerova
8e32225711 Merge remote-tracking branch 'origin/aerial_25-2' into integration_2025_w36 (!3626)
Upgrade CI to Aerial 25-2

The goal of this MR is to upgrade the Aerial setup to use release 25-2.
2025-09-03 17:00:43 +02:00
Reem Bahsoun
206e44ae54 Replace old nvIPC library with the new one 2025-09-03 13:30:49 +02:00
Jaroslava Fiedlerova
38ed261638 Merge remote-tracking branch 'origin/Fix_MsgB_Ack' into integration_2025_w36 (!3619)
Fix RA 2-Step MgsB Ack at UE

Update condition to prepare MsgB Ack the same way as Msg4 Ack
2025-09-03 12:57:00 +02:00
Jaroslava Fiedlerova
515eb988ab Merge remote-tracking branch 'origin/fix_set_max_fb_time' into integration_2025_w36 (!3629)
Fix for gNB max feedback time parameter

This bug is causing assertions like the following

Assertion (curr_pucch->active == 0) failed!
In nr_csi_meas_reporting() /oai-ran/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c:282
CSI structure is scheduled in advance. It should be free!

because the PUCCH structure would be smaller than it should be causing
overlapping.
2025-09-03 08:43:06 +02:00
Jaroslava Fiedlerova
1271d91676 Merge remote-tracking branch 'origin/minor_sched_fixes' into integration_2025_w36 (!3625)
gNB scheduler small fixes

A couple of fixes in gNB scheduling function. Removing a superfluous input from
CCE function and adding a missing call to reset beam allocation.
2025-09-02 20:51:09 +02:00
francescomani
225e640ca4 fix max feedback time parameter (needs to be computed every time we have that information) 2025-09-02 16:02:17 +02:00
Jaroslava Fiedlerova
774c390bbe Merge remote-tracking branch 'origin/ldpc_encoder_ZC384_optimization' into integration_2025_w36 (!3614)
Ldpc encoder zc384 optimization

This is a modification for the ldpc encoder which improves performance for
high-throughput cases. It contains a newly-generated file for innermost part of
the parity bit generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in the
computation corresponding to each non-zero bit of the H matrix. This allows for
removing a very large memcpy and reduces the memory demand for the parity matrix
computation. For the moment this is limited to largest case in BG1, namely
Zc=384. This is the only format used when the number of segments after codeblock
segmentation is large (>8). This improves the timing required for ldpc parity
bits generation by more than a factor 2 with AVX512. This significantly reduces
the total time to generate the DLSCH/PDSCH.

See the merge request description for numbers.
2025-09-02 11:06:20 +02:00
Jaroslava Fiedlerova
9d2960eab8 Merge remote-tracking branch 'origin/cpx_rotate_aarch64' into integration_2025_w36 (!3613)
Speedup complex rotate for aarch64

This is a simple optimization for aarch64 for the "rotate_cpx_vector" used for
the phase_rotation in 5G NR. It provides a speedup of around 1.5 on high-end
aarch64 targets compared to the SIMDe translated version. It is implemented with
native NEON intrinsics and was largely inspired by suggestions from ChatGPT 5 :-)
2025-09-02 11:04:44 +02:00
Robert Schmidt
e69ef1d8cc UL scheduler log: print TDA, it has more info 2025-09-02 09:57:32 +02:00
Reem Bahsoun
69de8cbc24 Change cuBB tag to release 25-2 in YAML and documentation 2025-09-02 09:52:23 +02:00
Raymond Knopp
0e09c7c347 Add changes for avx512/aarch64 ldpc encoder optimizations
newly-generated files for innermost part of the parity bit
generation which, for AVX512, uses the mm512_permutex2var_epi8
instruction and for 128-bit (aarch64) the mm_alignr_epi8 (vextq_s8) in
the computation corresponding to each non-zero bit of the H matrix.

It is generated with ldpctest -n0 -g1. the changes for this are in a
future MR.  I did these changes to compare with the GPU version
(ldpc_encoder_cuda), so that the CPU version is as fast as possible. The
generator will come when we merge the GPU encoder/decoder which also has
a generator for the CUDA version. it was difficult to extract the
changes in ldpctest/ldpc_encoder.c so I just took the generated file.

This allows for removing a very large memcpy and reduces the memory
demand for the parity matrix computation. For the moment this is limited
to largest case in BG1, namely Zc=384. This is the only format used when
the number of segments after codeblock segmentation is large (>8).  This
improves the timing required for ldpc parity bits generation by more
than a factor 2 with AVX512. This significantly reduces the total time
to generate the DLSCH/PDSCH
2025-09-02 08:55:08 +02:00
Raymond Knopp
48d19e8a91 Add reset of dlsch_precoding timing counter in nr_dlsim 2025-09-02 08:48:32 +02:00
Raymond Knopp
5e3e8a70ff addition of aarch64 native implementation for rotate_cpx_vector for the case output_shift=15 2025-09-02 08:28:13 +02:00
Raymond Knopp
53813f522c Change target architecture in arm container build to armv8.2-a
This enables some additional instructions needed in the follow-up
commit.
2025-09-02 08:22:34 +02:00
Robert Schmidt
741e9ffae9 Simplify cross-compilation Dockerfile
Redirect to files and manual analysis as done in this Dockerfile is not
necessary since we just output all relevant build files to stdout.
Simplify to do the same here.

See: 35361db76b ("build_oai: don't redirect compilations to a file")
2025-09-02 08:19:40 +02:00
francescomani
2e15430731 adding other missing beam reaset in RA functions 2025-09-01 18:46:22 +02:00
francescomani
15bb046f9c adding a missing beam reaset in pf_dl 2025-09-01 17:25:01 +02:00
francescomani
169de8cdca remove unnecessary input in get_cce_index 2025-09-01 17:17:06 +02:00
Robert Schmidt
f155ad7202 Merge branch 'fix-oaiue-ota' into 'develop'
Fix OAIUE-OTA pipeline and increase tested traffic

I tried to "fix" the OAIUE pipeline in !3610 (merged) for making it more reliable, but inadvertently introduced many ULSCH DTX for UL traffic. Fix this, and increase DL traffic.

See merge request oai/openairinterface5g!3621
2025-08-29 16:22:17 +00:00
Robert Schmidt
2b75e09151 Increase DL UDP traffic for OAIUE OTA pipeline 2025-08-29 14:53:36 +02:00
Robert Schmidt
47d2ba1793 Fix RX gain for OAIUE-OTA pipeline
Adjust to avoid increased ULSCH DTX, probably because of saturation.

Fixes: 69cb71eddc ("Adjust configuration for OAI OTA test")
2025-08-29 14:53:31 +02:00
Robert Schmidt
fbb78ad825 Merge branch 'integration_2025_w35' into 'develop'
Integration: `2025.w35`

* !3604 Consider PDSCH EPRE to DMRS EPRE in NR UE
* !3606 Fix SRS TLV unpack
* !3602 Update RFsim CN
* !3516 [FHI72 M-plane] CM improvements and PM implementation
* !3538 add a new graphical T tracer to see gNB MAC scheduling decisions
* !3425 RFSim test for 10 UEs/process

Closes #950

See merge request oai/openairinterface5g!3610
2025-08-28 21:10:14 +00:00
ndomingues
0942927308 Fix RA 2-Step MgsB Ack at UE
Update condition to prepare MsgB Ack the same way as Msg4 Ack
2025-08-28 16:49:52 +01:00
Robert Schmidt
69cb71eddc Adjust configuration for OAI OTA test 2025-08-28 09:13:02 +02:00
Robert Schmidt
c2eadcbddb Merge remote-tracking branch 'origin/multi-ue-test' into integration_2025_w35 (!3425)
RFSim test for 10 UEs/process

This MR adds a testcase and changes required to run 10 UEs in a single
process with RFSim

- Added deregistration for all connected UEs
- Refactored MAC/RRC instance handling
- made map_current_symbol thread safe
- made opeanir0_cfg thread safe and local
- Added 10UE/process testcase
2025-08-28 08:59:05 +02:00
Robert Schmidt
b11354126f Merge remote-tracking branch 'origin/t-gnb-mac' into integration_2025_w35 (!3538)
add a new graphical T tracer to see gNB MAC scheduling decisions

May be useful for debugging
2025-08-27 15:14:55 +02:00
Cedric Roux
c8aea1b970 T: replace 'subframe' by 'tick'
Some code in T tracers is used by both LTE and NR.

In LTE, we expect 10 subframes per frame, and the logging is done with
this assumption. We have one tick per subframe.

In NR, we deal with slots, not subframes. And we have n ticks per frame
(depending on mu). As of today, only n=20 is tested (corresponding to
mu=1).

A previous commit introduced 'subframes_per_frame' which had the correct
meaning for LTE but was truly 'slots per frame' for NR. This creates
confusion.

Let's replace 'subframe' by 'tick' to reduce confusion.
2025-08-27 15:13:59 +02:00
Cedric Roux
fcd0013981 T: add a tracer 'gnb_mac'
To see MAC scheduling decisions. May be useful for debugging.
2025-08-27 15:13:59 +02:00
Robert Schmidt
08a3f98ef0 Merge remote-tracking branch 'origin/oai-ci-update-cn-mbim' into integration_2025_w35 (!3602)
Update RFsim CN

- Update RFsim CNs to latest version
- update the MBIM stop script to remove IP addresses (we don't use this
  script directly, so it does not have an impact)
2025-08-27 13:52:00 +02:00
Robert Schmidt
78b14302be Merge remote-tracking branch 'origin/mplane-improv' into integration_2025_w35 (!3516)
[FHI72 M-plane] CM improvements and PM implementation

Configuration Management:

- addition of the RU username in the fhi_72 section of the config file;
  previously hardcoded to oranbenetel
- modification of the frequency offset, frame structure, fft size,
  cyclic prefix, and Tx gain;
- addition of the managed delay node;

for Tx/Rx endpoints.

Performance Management implementation where OAI gNB
activates/deactivates available RU performance measurements.
2025-08-27 13:50:43 +02:00
Jaroslava Fiedlerova
433d5c1099 CI: update XML and yaml files for 10 UEs/process RFSim test 2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
cd67c33ba2 Fix NR UE mislabeling MSG2 as DLSCH PDU 2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
acb2ae93bd Add RFSim 10 UEs/process RFSim test
Add an RFSim test for 10 UEs in a single process.
2025-08-27 13:15:40 +02:00
Bartosz Podrygajlo
d72ee11b32 Make openair0_cfg thread safe
Move openair0_cfg to PHY_VARS_NR_UE making it UE instance specific
and thread safe.
2025-08-27 13:15:37 +02:00
alexjiao
86937cd8b1 Fix for function compute_csi_rm_unav_res 2025-08-27 16:11:57 +08:00
Bartosz Podrygajlo
62bcd822c5 Make map_current_symbol thread safe
Use local function pointers instead of static global variables.
2025-08-26 15:56:32 +02:00
Bartosz Podrygajlo
318d901ef6 Refactor RRC->MAC Communication: Replace ITTI with notifiedFIFO for Multi-UE Support
- Replaced ITTI message queues with notifiedFIFO for RRC to MAC communication in UE.
- Enables correct message delivery to multiple MAC instances running in parallel threads.
- Introduced `nr_mac_rrc_message_t` union for MAC-RRC messages.
- Updated all relevant message handling and initialization code to use notifiedFIFO.
2025-08-26 15:56:20 +02:00
Teodora
995cccc760 Update the FHI M-plane doc
Performance Management support explanation.

Example run modified according to:
- modification of the frequency offset, frame structure, fft size, cyclic prefix, and Tx gain;
- addition of the managed delay node;
for Tx/Rx endpoints.
2025-08-26 15:17:38 +02:00
Teodora
0367881ba9 Performance Management implementation
Introduced a parameter start_up_timing which indicates if PM activation is supported during the start-up
procedure. We initialize this parameter, based on the vendor.

Notification interval is set to 10s.
2025-08-26 15:17:38 +02:00
Teodora
625b4b0cde Add support for RU username parameter for connection to a RU via M-plane
The "sudo" access group is required by OAI gNB.
2025-08-26 15:17:38 +02:00
Teodora
e7db367c9d Rearrange <edit-config>, <validate>, and <commit> RPCs
Refactor these RPCs to facilitate their use in other Management functionalities,
not only Configuration Management.
2025-08-26 15:17:38 +02:00
Teodora
5291afe165 Add a comment for Rx gain correction
Definition in o-ran-uplane-conf.yang model:
"Gain correction of RF path linked with array element or array layers.
 Common part of overall gain_correction.
 gain_correction = common array-carrier gain-correction + eAxC gain correction."
2025-08-26 15:17:38 +02:00
Teodora
eee7d976ec Correct the Tx gain 2025-08-26 15:17:38 +02:00
Teodora
2e9101f833 Add managed delay node in Rx endpoint creation 2025-08-26 15:17:38 +02:00
Teodora
9bb15f15b8 Correctly fill the cyclic prefix for Tx/Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
8bd6e16ad1 Correctly fill the frame structure for Tx/Rx endpoints and fft size for Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
0b0e804f73 Properly pass the frequency offset to Tx/Rx endpoints 2025-08-26 15:17:38 +02:00
Teodora
10d60f71ce Separate Tx/Rx endpoint creation
As per o-ran-uplane-conf model, some nodes exist in Rx but not in Tx
(e.g. "ul-fft-sampling-offsets"), and vice versa.
2025-08-26 15:17:38 +02:00
Teodora
4e9e2b39e9 Set the correct yang node name for MTU retrieval 2025-08-26 15:17:38 +02:00
Robert Schmidt
89603f0649 Merge remote-tracking branch 'origin/fix_srs_tlv_unpack' into integration_2025_w35 (!3606)
Fix SRS TLV unpack

This MR changes the type of a variable to get the last index in which we
unpack the full 32 bits in a SRS TLV to int16 instead of uint16, in
order to be -1 when the TLV length is 0, thus skipping unpacking. This
only affects the SRS.indications sent by Aerial L1, which don't have
padding in the TLV, in case of OAI L1, we unpack in "full" 32 bit blocks
until the end of the TLV, if the length is 0, the unpacking loop exits
immediately. Furthermore, it also adds a check for the Report Type
parameter value in handle_nr_srs_measurements. If this value is zero,
according to SCF 222.10.04 Table 3-129 means a null report, so we can
skip processing it.
2025-08-26 14:54:42 +02:00
Robert Schmidt
417913dfaa Merge remote-tracking branch 'origin/fix-ue-pdsch-epre-ratio' into integration_2025_w35 (!3604)
Consider PDSCH EPRE to DMRS EPRE in NR UE

Fix UE PDSCH to DMRS EPRE ratio.

closes #950
2025-08-26 14:54:17 +02:00
Robert Schmidt
0ebb97c4ae nfapi.md: fix link to current document 2025-08-26 08:45:57 +02:00
Thomas Schlichter
e5b68fb6ee NR UE: modify shift value in nr_dlsch_mmse() for improved performance 2025-08-25 09:29:38 +02:00
Rúben Soares Silva
f1fbf4aa29 Skip unpacking SRS.indication TLV when report type is 0
Move the check for timing advance offset being 0xffff to before locking the scheduler
2025-08-22 15:33:35 +01:00
Bartosz Podrygajlo
0d651bf3a9 Add MAX_NUM_NR_UE_INST to NR UE MAC
- Use MAX_NUM_NR_UE_INST in NR UE MAC to control number of MAC instances.
 - Modify the MAC interface slightly so that nr_l2_init_ue only initializes one instance
2025-08-22 16:25:35 +02:00
Bartosz Podrygajlo
014be5326e Use MAX_NUM_NR_UE_INST in RRC
Use MAX_NUM_NR_UE_INST for number of NR UE RRC instances. Change the RRC
interface slightly so nr_rrc_init_ue initializes only one RRC instance pointed
to by the id given to the function
2025-08-22 16:21:46 +02:00
Rúben Soares Silva
c957e11682 Change last_idx type to int16 to properly avoid unpacking if the tlv length is 0 2025-08-22 15:17:47 +01:00
Bartosz Podrygajlo
32f8f258fa NR UE NAS: Use global define MAX_NUM_NR_UE_INST
Use NR UE global MAX_NUM_NR_UE_INST define instead of local define MAX_NAS_UE
2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
e58c52829d Introduce MAX_NUM_NR_UE_INST
Add a new define for maximum number of NR UE per process
2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
ba585cd96d Add deregistration for all UE instances. 2025-08-22 16:13:32 +02:00
Bartosz Podrygajlo
598fbb5a24 Consider PDSCH EPRE to DMRS EPRE in NR UE 2025-08-22 15:59:52 +02:00
Robert Schmidt
207aac94d1 Merge branch 'integration_2025_w34' into 'develop'
Integration: `2025.w34`

* !3555 Remove dead code and variables, simplify code
* !3591 separate computation of size and value for DCI precoding information
* !3550 some work for better interoperability with srsRAN DU
* !3562 cleaning syntax of nr-ru.c
* !3598 Align add_boolean_option as per CMake documentation use only ON/OFF for uniformity
* !3407 Taps client for vrtsim
* !3035 NR L1 common channel level functions
* !3589 RF emulator and improvements of the timers
* !3577 Fix for UECAP file handling in dora/phytest mode
* !3600 Fix for UE TCI state ID configuration
* !3599 DLSCH scheduler: fix bugs in UE sorting

See merge request oai/openairinterface5g!3597
2025-08-22 08:07:59 +00:00
Robert Schmidt
792a7faf09 MBIM stop script: remove IP address
The CI detects whether a UE connected (and has a PDU session) by trying
to read the IP address. It therefore assumes that as long as the UE is
not connected, no IP would be present.

With the existing stop_quectel_mbim.sh script, this was not the case; it
would simply leave the IP address.  Modify this script to flush all IP
addresses on disconnect to remedy this.
2025-08-21 18:19:06 +02:00
Robert Schmidt
2de3d1f525 CI: Upgrade RFsim CNs to v2.1.10 2025-08-21 18:18:13 +02:00
Robert Schmidt
6758d14a93 Merge remote-tracking branch 'origin/fixes-dlsch-sched' into integration_2025_w34 (!3599)
DLSCH scheduler: fix bugs in UE sorting

Fix two issues/bugs when sorting UEs in the DLSCH scheduler following
the PF metric, which should improve fairness.
2025-08-21 18:10:23 +02:00
Robert Schmidt
406e36919f Merge remote-tracking branch 'origin/config_UE_TCI_fix' into integration_2025_w34 (!3600)
Fix for UE TCI state ID configuration
2025-08-21 17:30:49 +02:00
Robert Schmidt
8695a8dbba Merge remote-tracking branch 'origin/dora_phytest_uecap_fix' into integration_2025_w34 (!3577)
Fix for UECAP file handling in dora/phytest mode
2025-08-21 17:30:15 +02:00
Robert Schmidt
8ccd944db2 Merge remote-tracking branch 'origin/rf_emulator_and_timers_fix' into integration_2025_w34 (!3589)
RF emulator and improvements of the timers

RF emulator:
Add an RF library emulating a real device without the need of a real
device.  This is thought to enable using phy-test without requiring a
radio device or channel simulation.  The library synchronizes on the
real time clock, drops TX and generate noise on RX.  Noise generation
can be disabled and the noise level configured.

Timers improvements:
- Fix standard deviation for merged timers
- Add display of ULSCH decoding timers
- Add decoding timer in AAL
2025-08-21 15:22:44 +02:00
Romain Beurdouche
42ad189bf3 feat(rf_emulator): documentation 2025-08-21 10:53:03 +02:00
Robert Schmidt
946939e8cc CI: integrate RFemulator phytest in timing-phytest pipeline 2025-08-21 10:53:03 +02:00
Robert Schmidt
89e6e53f8c Remove --emulate-rf option and corresponding code
With the RFemulator, there is no need for a dedicated --emulate-rf
option anymore. For all uses of --emulate-rf, RFemulator should be used
instead.
2025-08-21 10:53:03 +02:00
Romain Beurdouche
1cebf02b1e feat(rf_emulator): Add parameters
Add two parameters:
* `enable_noise` to enable noise injection at TX
* `noise_level_dBFS` to set noise level
2025-08-21 10:53:03 +02:00
Robert Schmidt
a30bee2fab DLSCH sched: Fix coefficients for UE list ordering
Update the comparator() to properly sort UEs based on their coefficient
by appliey a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger.  The previous logic was only sorting based on 0/1
(equal/larger), which would result in some UEs with a high coefficient
not necessarily advancing to the start of the list, which could reduce
the likelihood of them being scheduled when they actually should (in
other words, this should improve fairness).

See also: 62e4025bc8 ("Integrate inactivity scheduling into main
    allocation loop")
2025-08-21 10:33:59 +02:00
Robert Schmidt
8a091a0b84 DLSCH sched: only sort relevant part of list
This reduces the amount of elements to compare.

See also: 7ee8e8eaba ("Fix bug: only sort relevant part of list")
2025-08-21 10:32:23 +02:00
francescomani
dd0188dfdc fix for config UE TCI state ID 2025-08-21 09:41:14 +02:00
Robert Schmidt
5ad35f6bfe Merge remote-tracking branch 'origin/vrtsim-taps-client' into integration_2025_w34 (!3407)
Taps client for vrtsim

The MR allows vrtsim to connect to the Raytracing Channel Emulator (CE later).
https://gitlab.eurecom.fr/oai/raytracing-channel-emulator

Additional Ubuntu packages required:

- libnanomsg-dev
- flatbuffers-compiler
- libflatbuffers-dev

Everything was tested on the same host. Follow the steps below to
successfully replicate:

1. Build nr-softmodem dependencies
2. Build nr-softmodem for (gNB, nrUE) with OAI_VRTSIM_TAPS_CLIENTset to ON.
3. Start the core network (Optional) follow this tutorial
4. Start the gNB

       sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --device.name vrtsim --vrtsim.role server --vrtsim.timescale 0.5 --vrtsim.taps-socket ipc:///tmp/ru_socket_0

5. Start the nrUE

       sudo ./nr-uesoftmodem -C 3619200000 -r 106 --numerology 1 --ssb 516  --band 78 --device.name vrtsim --vrtsim.taps-socket ipc:///tmp/ue_socket_0

6. Start the CE Server, once the UE and gNB are running properly, so the
   server can connect to IPC sockets
7. Start CE client; the binaries can be downloaded from a pipeline run
   or from this link
8. Move the UE in the CE client to generate a new taps array and
   populate the taps in softmodems
2025-08-21 09:35:41 +02:00
Robert Schmidt
0a65bd27c1 Merge remote-tracking branch 'origin/NR_common_L1' into integration_2025_w34 (!3035)
NR L1 common channel level functions

Common L1 functions shared between gNB and UE for DLSCH/ULSCH/PDCCH/PBCH
channel level
2025-08-21 09:34:31 +02:00
Robert Schmidt
c61ef34a38 Merge remote-tracking branch 'origin/cmake-boolean-correction' into integration_2025_w34 (!3598)
Align add_boolean_option as per CMake documentation use only ON/OFF for uniformity

The add_boolean_option of CMake is not uniform everywhere. We were using
either True/False or ON/OFF. It is better to be uniform to avoid
confusion.

As an example, see here CMake documentation for an example:
https://cmake.org/cmake/help/latest/module/CMakeDependentOption.html#example-basic-usage

There are also some minor spelling corrections.
2025-08-21 09:33:03 +02:00
Robert Schmidt
2eb9a36e21 Merge remote-tracking branch 'origin/cleaning-syntax-nr-ru.c' into integration_2025_w34 (!3562)
cleaning syntax of nr-ru.c
2025-08-21 09:32:31 +02:00
Robert Schmidt
d0f6c63314 Merge remote-tracking branch 'origin/interop-srsran-du' into integration_2025_w34 (!3550)
some work for better interoperability with srsRAN DU

Just add the minimum to get some user plane traffic going on.

When doing user plane traffic, in the CU logs we have a lot of:

    [GTPU]   NR-RAN container type: 1 not supported

That will be fixed in another MR, not here.
2025-08-21 09:31:32 +02:00
Cedric Roux
653ad775ea hack: ignore empty Cell Group Config returned by DU
Interoperability testing with srsRAN DU shows than when receiving
RRCReconfigurationCompleteIndicator in a UEContextModificationRequest
the DU replies in the UEContextModificationResponse with an empty
CellGroupConfig.

This CellGroupConfig is encoded as 2 zero bytes. Let's ignore this
message when we receive it, don't forward it to the UE in a
RRC Reconfiguration, as it should per standard (38.473 8.3.4.2):

    If the CellGroupConfig IE is included in the DU to CU RRC Information
    IE contained in the UE CONTEXT MODIFICATION RESPONSE message, the
    gNB-CU shall perform RRC Reconfiguration as described in TS 38.331 [8].
    The CellGroupConfig IE shall transparently be signaled to the UE as
    specified in TS 38.331 [8].

To be removed/reworked in the future if the interoperability
situation improves.
2025-08-21 09:30:41 +02:00
Cedric Roux
807b38ddae GTPU: CU has to send NR-U Sequence Number
This is in 3GPP TS 38.425.

Because it was not done, there was a problem of interoperability
between openair CU and srsran DU. No DL traffic was reaching the UE.

A new GTPU API function is introduced: gtpv1uSendDirectWithNRUSeqNum().
It is only used in the gNB CU, in PDCP. So it was decided to not add a
new parameter to gtpv1uSendDirect() but instead add a new API function.
2025-08-21 09:30:41 +02:00
Cedric Roux
84ce708f96 GTPU: basic support of DL USER DATA
See 3GPP TS 38.425 5.5.2.1.

Only sending part, only dealing with NR-U Sequence Number.
2025-08-21 09:30:41 +02:00
Cedric Roux
c35f07b0b9 GTPU: add an API to better deal with extension headers
And adapt existing code to use it.

Only for transmission for the moment.
2025-08-21 09:30:41 +02:00
Bartosz Podrygajlo
513173ae0d Rename VRTSIM cmake option to OAI_VRTSIM 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
171b3f206f VRTsim: Add a timeout in taps client
Add a timeout in nanomsg receive code to allow the client
thread to exit cleanly.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
74fc56813f Update vrtsim documentation 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
ea3a4b991c VRTSIM: allow client reconnection via a connection descriptor file
Replace the unwieldy unix socket implementation of peer information
exchange with an authorative connection descriptor file that
informs the client of the connection method an number of antennas
on the server.

This allows the server to run without the client and allows the
client to reconnect as long as the server is running, as many times
as needed.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
54fdd3547b Clean exit of vrtsim client if server is stopped first
Force exit in case current sample is not modified by the server with 2s.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
fc28e2d3fc Make vrtsim output to stdout more readable. 2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
acba82b874 Simplify shm td iq channel implementation
Move the channel state management outside the channel implementation.
This simplifies the channel implementation but forces users of the
channel to manage it's state manually.
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
fcea07ca71 Detect disconnecton & handle error states in vrtsim
Add handling for error states in vrtsim which allows to close the
softmodems with CTRL+C without hanging, improving user experience
 - Client detection of stale timer.
 - Abort state for client and server
2025-08-20 15:57:34 +02:00
Bartosz Podrygajlo
16f5299203 Taps client client for vrtsim
Added a libary that can connect to a channel emulator and provide taps
as they are generated.

 - Enable connection from vrtsim to channel emulation server
 - Depends on flatbuffers definition file from raytracing-channel-emulator
 - Depends on libanomsg-dev and flatbuffers-compiler (Ubuntu) or equivalent
 - Added a compile time option ENABLE_TAPS_CLIENT to prevent other users
   from being affected by additional dependencies
2025-08-20 15:57:30 +02:00
Sagar Arora
fc1c8a9be0 Align add_boolean_option as per cmake documentation use only ON/OFF for uniformity
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2025-08-20 13:17:45 +02:00
Robert Schmidt
8a05dcdfee Merge remote-tracking branch 'origin/NR_fix_tpmi_ctnd' into integration_2025_w34 (!3591)
separate computation of size and value for DCI precoding information

This removes stuff that is only relevant for the gNB from the common
functions and moves it to the gNB scheduler functions (related to UL
precoding). In principle no functional change.
2025-08-20 13:11:47 +02:00
Robert Schmidt
60bb39570b Merge remote-tracking branch 'origin/compile-improvements' into integration_2025_w34 (!3555)
Remove dead code and variables, simplify code
2025-08-20 13:11:28 +02:00
Laurent THOMAS
13f5c258ca remove unused global 2025-08-20 09:36:48 +02:00
Laurent THOMAS
2bda52b054 rename a global "ru" in root_unit and include correctly the .h file, that leads to mistakes fixes 2025-08-20 09:36:48 +02:00
Laurent THOMAS
4b47d26ea2 remove dirty and unused functions with global vars (not working anyway) 2025-08-20 09:36:48 +02:00
Laurent THOMAS
c2d9f17242 remove a dependancy of gNB to LTE that is not used and adds global vars to gNB 2025-08-20 09:36:48 +02:00
Laurent THOMAS
4a3ebb3033 remove dead code and replace unmanaged asn1_xer_print global variable by the appropriate existing debug flag 2025-08-20 09:36:48 +02:00
Laurent THOMAS
2dae7b0db4 Limit visibilty of roundKeys 2025-08-20 09:36:48 +02:00
Laurent THOMAS
7cc35cf7e0 remove dead function 2025-08-20 09:36:48 +02:00
Laurent THOMAS
c4f4f8d919 Remove threequarter_fs, log_level; make functions static
2 functions with same name as static to make it clearer they are separate.

remove unused copy of log_level global var.

remove threequarter sampling variable from the radio board general
configuration. The decision of sampling rate is made above. A better
behavior can be done later, like ask to the radio board what sampling
rate it can do,then use it to decide the appropiate sampling rate from
the gNB configuration. In UE case, it is another issue, as the sampling
rate would change after we decode SIB1, but also it is not developped
yet.
2025-08-20 09:36:23 +02:00
Laurent THOMAS
78f12dbc03 Change tracy version to latest release 2025-08-20 09:32:23 +02:00
francescomani
b4796b4dda remove unused deinterleaving function from dlsch ue 2025-08-19 16:25:47 +02:00
francescomani
6af8f5619a use common channel level for PDSCH 2025-08-19 16:25:44 +02:00
francescomani
8d904dbf23 use common channel level for PUSCH 2025-08-19 16:24:17 +02:00
francescomani
65d0fb152e use common channel level for DCI reception 2025-08-19 16:19:48 +02:00
francescomani
a95a32c2f6 use common channel level for PBCH 2025-08-19 16:18:41 +02:00
francescomani
92dc641e98 common channel level function 2025-08-19 16:11:50 +02:00
Cedric Roux
c4562df2e7 T: add some traces
To be used by next commit.
2025-08-18 15:26:10 +02:00
Cedric Roux
cc87c72ac3 T: fix a typo 2025-08-18 11:53:54 +02:00
Cedric Roux
c4acec706d T: make number of subframes per frame a configurable item
Think: NR with different number of slots per frame depending on mu.

The name 'subframes_per_frame' is a bit ambiguous. It is valid for LTE,
but for NR it should be 'slots_per_frame'.

For example, for sub-carrier spacing of 30KHz, we have 20 slots per
frame, so in this case subframes_per_frame = 20. In reality whatever
the numerology, there is always 10 subframes per frame in NR.

But how to name this variable which is used both for LTE and NR cases?
'subframes_or_slots_per_frame'? It's a bit long and also ambiguous.

Conclusion: no big deal I think. 'subframes_per_frame' and so be it.
2025-08-18 11:53:54 +02:00
Cedric Roux
138886ad5e T: tti view: add automax ability
Also, update a cmake file because compilation of the tracer 'ue' fails
otherwise.
2025-08-18 11:53:54 +02:00
Cedric Roux
595e650f9f T: scrolltti: handle tick discontinuities
For TDD.
2025-08-18 11:53:54 +02:00
Cedric Roux
645393f464 T: throughputlog: handle tick discontinuities
Think: TDD.
2025-08-18 11:53:54 +02:00
Cedric Roux
ee2668b7c3 T GUI: add a get_range() API function for xy_plot 2025-08-18 11:53:54 +02:00
Cedric Roux
c8d64f0dd1 nr rlc: add an API function to retrieve the occupancy of TX list 2025-08-18 11:53:54 +02:00
Bartosz Podrygajlo
096ea7bd87 Fixes for vrtsim
- Allow client to exit cleanly if server is down
 - Ensure timing_thread is joined only once avoiding exit_function loop
 - Free noise_device
 - Save previously sent samples for channel modelling
2025-08-18 08:07:51 +02:00
Laurent THOMAS
29108a0974 cleaning syntax of nr-ru.c 2025-08-16 21:38:18 +02:00
Romain Beurdouche
dfa77647b1 feat(rf_emulator): Add late writes counter 2025-08-16 08:35:13 +00:00
Romain Beurdouche
5e03748835 feat(rf_emulator): Add noise generation 2025-08-16 08:35:08 +00:00
Cedric Roux
33cbbafddb ds: add a new type "byte array producer"
Introduced to write bytes to a byte array with size checking.
2025-08-14 23:37:11 +02:00
Robert Schmidt
9e37a2cf94 Merge branch 'integration_2025_w33' into 'develop'
Integration: `2025.w33`

* !3563 UE fixes: pucch format 2 and CSI IM
* !3567 Workaround for handling 2 SS0 occasions per slot
* !3578 fix a T trace
* !3395 RFsim variable size H_awgn_mimo
* !3581 NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant
* !3580 NR UE: fix pdcch llr_size calculation in nr_rx_pdcch()
* !3576 Cleanup documentation and interface of the LDPC segment coding libraries
* !3573 Make Amarisoft UE sim a RedCap UE
* !3586 Print UE command line parameters at gNB MAC for split architecture without L1
* !3584 add gtpu error packet parsing and display
* !3556 Introduce support for Cat-B RU using Predefined-Beam BF with Aerial L1
* !3492 Upgrade CI images to Ubuntu 24
* !3521 Refactor ULSCH scheduler towards more TDD pattern flexibility
* !3590 Improve MAC docs for MCS and docker for BuildKit usage
* !3579 CI: speed up and simplify build, remove unnecessary Python code, remove --eNB\* parameter list

Closes #927 and #973

See merge request oai/openairinterface5g!3583
2025-08-14 16:18:58 +00:00
Romain Beurdouche
bf83b78758 feat(rf_emulator): Count late reads
Count late reads and print every second instead of printing each.
2025-08-14 15:33:36 +00:00
Romain Beurdouche
5212bd7a85 feat(rf_emulator): Add a dummy RF library
Add a simple RF emulator library with no real RF.
It only synchronizes the gNB with the real time clock.
It is to be used for stress test or benchmarking in phy-test mode.
2025-08-14 15:33:32 +00:00
Robert Schmidt
2c351c94d0 Merge remote-tracking branch 'origin/doc-updates' into integration_2025_w33 (!3590)
Improve MAC docs for MCS and docker for BuildKit usage

See commits for details. The first one is for fixing an omission in
!3281, the second to clarify docker build usage.

Closes: #973
2025-08-14 16:46:44 +02:00
Robert Schmidt
9f5ea8beba Merge remote-tracking branch 'origin/cleanup-build-oai-speedup-cluster' into integration_2025_w33 (!3579)
CI: speed up and simplify build, remove unnecessary Python code, remove --eNB* parameter list

This cleans up the CI framework for running end-to-end tests, and
improves the integration with OAI code. Specifically

- cleanup build_oai and helpers to output all text, which is captured
  better by the CI
- build some images in the Cluster-Build in parallel to increase speed
- remove all --eNB{,1,2}{IPAddress,UserName,Password} variables. Those
  were indexed through "instance" and "server ID" and are replaced with
  the actual node name. I consider further cleanup to introduce a
  "global" XML file node name so we don't need this in each step and
  instead define this once.
- individual cleanup
2025-08-14 16:45:52 +02:00
Robert Schmidt
5b8d66bbac Write simple CI documentation and add sample script 2025-08-14 14:55:23 +02:00
Robert Schmidt
b075c733f3 CI: correct log analysis filename interpolation
A previous commit changed to use archiveArtifact() to recover CI logs,
and then attempted to "guess" the L1/MAC stats file name through a
regex. However, the format "enb-[0-9]+" is not correct, as
archiveArtifact() puts the task ID ("[0-9]+") BEFORE the file name
(here, "enb"). So, make it more generic and match the final "-enb.log"
("$" means "end of string").

Fixes: 244ea8fc22 ("Use archiveArtifact() for TerminateeNB()")
2025-08-14 14:55:23 +02:00
Robert Schmidt
f82063c252 CI: Sleep: print time to wait 2025-08-14 14:55:23 +02:00
Robert Schmidt
c5624661eb Remove HTML 'no analysis function'
For some network functions, we don't match an analysis function. In the
console logs we print an info message. In the HTML, it's just noise.
2025-08-14 14:55:23 +02:00
Robert Schmidt
852e98d385 Run_Physim(): avoid large console logs, rewrite file
Many of these tests exit with an exit code != 0. Thus, the CI
automatically logs the result. Rather, write everything including stderr
to the file for analysis.

Also, rewrite the file with ">" instead of appending through ">>". While
appending works because the CI removes files after archiving, it seems
"cleaner" to remove files.
2025-08-14 14:55:23 +02:00
Robert Schmidt
3c54daf4e2 Remove "forcedWorkspaceCleanup" option
It is superseded by the CreateWorkspace() function and task step (which
removes and recreates a workspace), and this option was not actually
used in any function except for the build of unit tests, but no XML
step actually specified this option.
2025-08-14 14:55:23 +02:00
Robert Schmidt
35f080e426 Fix: new Iperf test need to get ctx 2025-08-14 14:55:23 +02:00
Robert Schmidt
9e1cbb1035 Ignore eNB{,1,2}{UserName,IPAddress,Password} parameters
After having transitioned to direct node names in the XML, these
parameters are not relevant anymore.

The best way to view this patch is with

    git show <SHA> --ignore-all-space
2025-08-14 14:55:04 +02:00
Robert Schmidt
0e60be785c Remove SSH connection
Remove this class. It is not safe to use (no return codes, can get out
of sync), hardcodes the use of passwords, and it's API is cumbersone.

More explanations can also be found in !1867. It is superseded by
cls_cmd.py
2025-08-14 14:55:04 +02:00
Robert Schmidt
dc27690c86 LogCollecteNB() not used anymore
Since 28ce0dc444 ("Main: pass in ctx"), the CI always collects logs
into cmake_targets/log/. Hence, LogCollecteNB() is never called. We can
remove it.

Further, change the cmake_targets/log/ to ci-log/, which is shorter, and
append a / on the zip path to make sure that only contents is zipped.
2025-08-14 14:55:04 +02:00
Robert Schmidt
45da9face4 Reimplement Initialize_eNB()/Terminate_eNB()
Reimplement these functions by

- using cls_cmd
- retain only the necessary steps from the timing-phytest function
- pass in ctx and node information, instead of server ID
- remove all superfluous variables that don't seem to be used
- make some lists (corresponding indices are "server ID") into normal
  variables.
2025-08-14 14:55:04 +02:00
Robert Schmidt
c4efe9feed cls_containerize: yamlPath/services as normal string
These variables were set as lists, to be indexed by the "server ID".
Since this has been removed from all XMLs, it is not necessary anymore.
2025-08-14 14:55:04 +02:00
Robert Schmidt
3f4df04875 Run_Physim(): pass node 2025-08-14 14:55:04 +02:00
Robert Schmidt
190dc55d9f Pass node to various Build*() functions
Pass node directly from XML to these functions

- BuildClusterImage()
- BuildImage()
- BuildProxy()
- BuildRunTests()

instead of reading the "server ID" and looking up from
eNB_IPAddress/eNB1_IPAddress/eNB2_IPAddress.

Improve the proxy build unit test by properly passing ctx information.
2025-08-14 14:55:04 +02:00
Robert Schmidt
293c7afd0b File not used by CI 2025-08-14 14:55:04 +02:00
Robert Schmidt
074092af17 Remove unused variables 2025-08-14 14:55:04 +02:00
Robert Schmidt
d3837cd3b0 Deploy_Run_PhySim(): pass node name
harmonize with other code that takes a "node" parameter.
2025-08-14 14:55:04 +02:00
Robert Schmidt
af58cf2441 CppCheckAnalysis()/LicenceFormattingCheck(): use node
- ubuntu18 eNB_IPAddress obelix => obelix
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
2025-08-14 14:55:04 +02:00
Robert Schmidt
6233667de9 Push_Local_Registry(): pass node 2025-08-14 14:55:04 +02:00
Robert Schmidt
7839d06601 Create/Deploy/Undeploy(): use node
Pass the node name for a host on which to create a workspace or
deploy/undeploy.

Add a new test for the creation of workspaces.

To help myself and the reviewer, here is a list of
"eNB_IPAddress"/"eNB1_IPAddress" parameters I copied from the various
pipelines:
- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
- cluster image eNB_IPAddress poseidon
- ubuntu18 eNB_IPAddress obelix => obelix
- ubuntu-arm eNB_IPAddress gracehopper3-oai => gracehopper3-oai
- arm-cross eNB_IPAddress alambix => alambix
- lte-tdd eNB_IPAddress 172.21.18.45 => starsky
- lte-fdd eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB_IPAddress 172.21.18.46 => hutch
- lte-oaiue eNB1_IPAddress 172.21.18.47 => carabe
- lte-tdd-2x2 eNB_IPAddress 172.21.16.128 => obelix
- nsa eNB_IPAddress 172.21.16.137 => nepes
- nsa eNB1_IPAddress 172.21.16.109 => ofqot
- sa-aerial eNB_IPAddress gracehopper1-oai => gracehopper1-oai
- aw2s eNB_IPAddress 172.21.16.124 => avra
- sabox eNB_IPAddress 172.21.16.109 => ofqot
- sa-oaiue eNB_IPAddress avra => avra
- sa-oaiue eNB1_IPAddress caracal => caracal
- cppcheck eNB_IPAddress 172.21.18.47 => carabe
- timing-phytest eNB_IPAddress caracal => caracal
- physim 4g eNB_IPAddress avra => avra
- physim 5g eNB_IPAddress avra => avra
2025-08-14 14:55:04 +02:00
Robert Schmidt
d95e6bca6b Pull_Image_from_Registry()/Clean_Test_Server_Images(): pass node
Pass the node name for a host onto/from which to pull/clean the images.
For doing this, I used:

- rfsim 4G eNB_IPAddress none => localhost
- rfsim 5g eNB_IPAddress none => localhost
- flexric eNB_IPAddress none => localhost
- l2sim 4g eNB_IPAddress none => localhost
- l2sim 4G eNB1_IPAddress 172.21.16.128 => obelix => localhost
2025-08-14 14:55:04 +02:00
Robert Schmidt
e25075134c Integrate all SA-OAIUE pipeline related files into one 2025-08-14 14:55:04 +02:00
Robert Schmidt
881f753f3f Integrate all NSA-related XML files into one
Is simpler to test manually and view the results.
2025-08-14 14:55:04 +02:00
Robert Schmidt
7defffe97a Remove unused file 2025-08-14 14:55:04 +02:00
Robert Schmidt
ae3799d4ed Remove unused parameters 2025-08-14 14:55:04 +02:00
Robert Schmidt
c8c6aa50f3 Cluster: build FHI7.2 in parallel 2025-08-14 14:55:04 +02:00
Robert Schmidt
2f43b09651 Remove unnecessary HTML printing, simplify code 2025-08-14 14:55:04 +02:00
Robert Schmidt
81a79980dd AnalyzeBuildLogs(): only analyze one file at a time
Will be used in a follow-up commit to simplify analysis of log files and
HTML file printing.
2025-08-14 14:55:04 +02:00
Robert Schmidt
089059e10a Remove unused variables 2025-08-14 14:55:04 +02:00
Bartosz Podrygajlo
3febc50f47 Make run_locally.sh script take the full path to the xml file
Use full path to xml file in run_locally.sh to allow usage of system
command line completion feature.
2025-08-14 14:55:04 +02:00
Robert Schmidt
cf967d3314 Complete run_locally.sh to produce valid HTML 2025-08-14 14:55:04 +02:00
Robert Schmidt
e7ea9ba747 CI: Clarify HTML message if a (ctest-executed) test fails 2025-08-14 14:55:04 +02:00
Robert Schmidt
47b658baf5 Disable various UHD features
build_oai primarily builds UHD for OAI. Thus, a number of targets (B100,
USRP1/2, ...) can be omitted, as OAI does not run on them. Further,
disable documentation and man pages, which is typically not necessary
for the averages user, and does not need to be installed for containers.
2025-08-14 14:55:04 +02:00
Robert Schmidt
599a1a8c74 UHD installation: remove multiple packages at once
Removing packages individually is slow, because apt starts to (re-)read
it's database over and over again. Do it at once to speed up.
2025-08-14 14:55:04 +02:00
Robert Schmidt
2086de2a98 Do not collect log files that don't exist
Since one of the parent commits, build_oai does not redirect files to a
log folder. Hence, there is no need to collect those.
2025-08-14 14:55:04 +02:00
Robert Schmidt
334251c4ff Remove unused build_helper function 2025-08-14 14:55:04 +02:00
Robert Schmidt
6c4e5dccea Don't redirect installation log files to a file
Similarly to the parent, don't redirect log files to a file. It makes
the CI more complicated, and also raises user awareness of what is being
installed.
2025-08-14 14:55:04 +02:00
Robert Schmidt
47a961d876 Merge remote-tracking branch 'origin/refactor-ulsch' into integration_2025_w33 (!3521)
Refactor ULSCH scheduler towards more TDD pattern flexibility

Refactors ULSCH scheduler, notably to support "UL-heavy" TDD patterns,
e.g., DSUUU. Also allows to run TDD pattern2 with UL slots, which was a
limitation in the previous code.
2025-08-14 14:30:58 +02:00
Robert Schmidt
f08710a524 Merge remote-tracking branch 'origin/ubuntu24-docker-images' into integration_2025_w33 (!3492)
Upgrade CI images to Ubuntu 24

The MR upgrade the docker files from Jammy(22.04) to Noble(24.04).
2025-08-14 14:30:21 +02:00
Robert Schmidt
e0c1f8d920 Increase AL candidates count on AW2S pipeline
Increase the number of aggregration level candidates. Since we have many
UEs with concurrent traffic in that pipeline, we should ensure that we
can allocate many DCIs to not waste resources (e.g., not all RBs used
because could not find DCIs for specific UEs).
2025-08-14 13:00:13 +02:00
Robert Schmidt
ba6bad5eb3 Fix AL candidate documentation to right default
The default aggregation level candidate numbers in gnb_config.c (search
"uess_num_agg_level_candidates") is 0,2,0,0,0, so write that instead.
2025-08-14 12:55:53 +02:00
Robert Schmidt
c24673798a Handle TDD pattern 2 in UL TDA allocation
Add the possibility to use UL slots in TDD pattern 2. For simplicity, we
require the mixed slot to be of the same symbols in pattern 1 & 2. For
UL slots, simply use the right amount of UL TDAs, depending on which
number of UL slots among pattern 1 & 2 is bigger.

One complication is the TDA for the mixed slot. The current code assumes
that k2 has to be equal or larger than (number of DL slots +1) (because
the spec says min k2=2, but we might want to schedule DSUUU). Then,
there could be for instance the following cases:

- only pattern 1: DSUUU DSUUU ...: the mixed slot has to be reached an
  entire period in advance
- pattern 1 & 2: DSUUU DDDDD: normal mixed slot k2, e.g., like for 7DS2U
- pattern 1 & 2: DSUUU DDDSU: the mixed slot has to be reached
  N_ul2+N_dl1+1 slots in advance

I can't think of more cases right now. To avoid unscheduled slots, I put
an assertion (which could also trivially be taken out).
2025-08-14 12:50:03 +02:00
Rúben Soares Silva
135525c17a P5 Config: Pack/Unpack TDD table with 10.02 and 10.04 formats
Adds the capability to pack/unpack the TDD table in CONFIG.request
following both SCF222.10.02 (Tag 0x1027) and SCF222.10.04 (Tag 0x1035)
formats In the case of Aerial, the TDD table is packed following the
10.04 format, but with the 10.02 tag Prevent the packing of Digital
Beamforming table and Precoding Matrix table for Aerial
2025-08-14 12:50:03 +02:00
Robert Schmidt
6981783ee1 Select best out of multiple TDAs
A new function get_best_ul_tda() allows to select the "best" TDA out of
a number of TDA. Specifically, get_best_ul_tda() considers in how many
RBs a given TDA might be allocated, and multiplies this number of RBs
with the number of symbols in the TDA to form a "score". The TDA with
the best "score" is selected, considering it maximizes resource usage.

In phytest scheduler, we use this function to verify that the given TDA
can be really allocated in all selected slots.
2025-08-14 12:50:03 +02:00
Robert Schmidt
71e01bbaa9 Correctly interpret SRS numberOfSymbols
A length of 0 is to be interpreted as 1 symbol, a length of 1 is 2, etc.
2025-08-14 12:50:03 +02:00
Robert Schmidt
98cc36430b Schedule SRS longer in advance, cleanup
Schedule SRS longer in advance, so that it would also be enough even
with big k2 for UL TDA.

Remove useless types: we do not use the information on sched_srs
anymore, so remove it.

Check that the VRB map is free before making allocations.
2025-08-14 12:50:03 +02:00
Robert Schmidt
6ef8dadd88 Only add SRS TDA if SRS is activated
Since the parent commit, the TDA for UL scheduling is dynamically
selected, instead of being hardcoded to specific indices. We can thus
also omit the SRS TDA if no SRS is configured.

Also add SRS-specific TDAs if we schedule further into the future.
2025-08-14 12:50:03 +02:00
Robert Schmidt
cf8099fab1 Refactor TDA allocation: scheduler can take advantage of multiple k2
Add multiple TDAs with k2 larger than the min_rxtxtime, to potentially
allow to allocate all available slots. For this, nr_rrc_config_ul_tda()
inspects the TDD pattern, and allocates as many TDAs as necessary. It
also sorts the TDA list, with smaller k2 and larger symbol lengths
first.

This in turn is now used by get_num_ul_tda() to use a k2 and the slot
configuration to find a suitable TDA, assuming a list as sorted in
nr_rrc_config_ul_tda().

Note that since get_num_ul_tda() does only inspect the available UL
slots, there might be overlap (e.g., when scheduling SRS), which will be
fixed in a follow-up commit.

Also, TDD pattern 2 is not handled here yet, and a follow-up commit will
fix it.
2025-08-14 12:50:03 +02:00
Robert Schmidt
3102068e71 Add ULSCH preprocessor slot logic for scheduling multiple slots
Add a loop to advance slots as determined by current ("DL") slot, and
advance further into the future (for "UL" slots) if TDAs allow. Ensure
to schedule all TDAs if it's the last DL slot, to guarantee a previously
scheduled TDA will also reoccur (i.e., for guaranteeing that
retransmissions can be made).

Note that the check for number of UE being zero is removed, as this
allows to keep "ul_next" close to the "min_next" slot. This way, we can
use fs_get_max(); otherwise, if we did not always execute this loop,
they might diverge far from each other, making the logic inside the loop
more complicated.

This commit introduces a new type "fsn_t" (frame-slot number) that
encapsulates a single frame-slot combination in a single struct. The
helper functions (in gNB_scheduler_ulsch.c) should be moved to a new
file under common/, but we don't do this here to limit the amount of
code changes.
2025-08-14 12:50:03 +02:00
Robert Schmidt
4aea866b6a Use k2 to decide which TDA to use
For scheduling multiple ULSCH ahead, we will have to use different k2.
Hence, we will need to check for k2 in the TDA selection as well. The
function get_ul_tda() is renamed to get_num_ul_tda() to reflect that it
might return multiple TDAs (not done in this commit, but in a follow-up
MR). get_num_ul_tda() also returns a pointer to the first suitable TDA.

In the phy-test scheduler, simplify the selection of the TDA to use: do
not hardcode a specific K2, but rather, use the first one (with any k2).
2025-08-14 12:50:03 +02:00
Robert Schmidt
9059c0290e Provide selected TDA to pf_ul() 2025-08-14 12:50:03 +02:00
Robert Schmidt
90406c101e Introduce dedicated ul_tda array 2025-08-14 12:50:03 +02:00
Robert Schmidt
948c0d5d2c Count and print failed CCE allocations for UL/DL 2025-08-14 12:50:03 +02:00
Robert Schmidt
5e734238c1 pf_ul(): report if UEs scheduled
For the multi-UL slot scheduling functionality in a follow-up commit, it
would be important to know if the scheduler allocated any UEs. If
pf_ul() allocated for some UEs, we might run it again on a different
slot. If on the other hand, no UEs were allocated, there is no point in
running it again.
2025-08-14 12:50:03 +02:00
francescomani
c94db4adec separate computation of size and value for DCI precoding information 2025-08-14 10:56:33 +02:00
Robert Schmidt
d90c432f10 Merge remote-tracking branch 'origin/aerial_pbbf' into integration_2025_w33 (!3556)
Introduce support for Cat-B RU using Predefined-Beam BF with Aerial L1

This merge introduces the support for BeamID based Beamforming in OAI L2 using FAPI and leveraging Aerial L1. Support for OAI L1 is not in the scope of this MR.

Main changes:

- Introduced a third state for the analog_beamforming parameter.
  0=disabled,1=analog_bf,2=oran_bf
- Correctly populated the FAPI BF PDUs (prg_size, num_prgs,
  dig_bf_interfaces)
2025-08-14 10:37:57 +02:00
Robert Schmidt
3ee41c3fec Explain steps to build Dockerfiles without BuildKit
The Dockerfiles are reused for building on different architectures
(amd64/arm64). They differ, though, on some steps for downloading or
installing platform-specific utilities.

This is handled automatically when using BuildKit, which is the default
in docker versions v23.0+. Older docker versions require some special
settings. Explain this in the README.

Closes: #973
2025-08-14 09:49:43 +02:00
Robert Schmidt
ff9a6d97ea gNB MAC doc: add dl/ul_min_mcs
Previous commits removed min_grant_mcs and instead introduced
dl/ul_min_mcs as a more generic replacement.

Fixes: 96b0cae63e ("Drop 'min_grant_mcs' configuration parameter ")
Fixes: 699afafc6f ("Add support for 'dl_min_mcs' and 'ul_min_mcs'
    configuration parameters")
2025-08-14 08:43:38 +02:00
francescomani
1719375cea minor refactoring in nfapi_nr_interface_scf 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
61a7b6b80e compute prgsize from number of RA RB 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
8beb382277 Removed TRP-scheme byte from UL BF PDU to Interop with Aerial 25-1 (FAPI 10.02) 2025-08-13 19:31:49 +02:00
Gabriele Gemmi
9e34a8ebed Compute DCI prgsize from Coreset 2025-08-13 19:31:46 +02:00
Gabriele Gemmi
ce06099a99 Configuration of FAPI Beamforming PDU for Aerial PBBF 2025-08-13 19:07:53 +02:00
Robert Schmidt
ebb544601c Merge remote-tracking branch 'origin/improve-gtpu-error-handling' into integration_2025_w33 (!3584)
add gtpu error packet parsing and display
2025-08-13 18:36:19 +02:00
Robert Schmidt
569cbe24fa Merge remote-tracking branch 'origin/print_UE_cmd_MAC' into integration_2025_w33 (!3586)
Print UE command line parameters at gNB MAC for split architecture without L1
2025-08-13 18:31:32 +02:00
Laurent THOMAS
efccad956a add gtpu error packet parsing and display 2025-08-13 18:00:31 +02:00
Robert Schmidt
843b12db7f Merge branch 'ci-update-uhd' into 'develop'
CI: Update UHD version to 4.8

See merge request oai/openairinterface5g!3587
2025-08-13 10:20:38 +00:00
Romain Beurdouche
e2c89f36ea feat(ldpc_aal): add decoding timer 2025-08-13 09:55:42 +00:00
Romain Beurdouche
ad8b76a8ef feat(nr-gnb): Log decoding timers in the gNB
Log the LDPC reversed interleaving, reversed rate matching and decoding
time stats in nrL1_stats.log for the gNB.
2025-08-13 09:55:42 +00:00
Romain Beurdouche
e79221b05b feat(nr_ulsim): detailed ULSCH decoding timers
Add timers to provide ULSCH decoding time split between decoding,
rate recovery and deinterleaving.
2025-08-13 09:55:42 +00:00
Romain Beurdouche
748684df05 feat(time_meas): Standard deviation & merge
`diff_square` was not merged in `merge_meas` so that calculation of the
standard deviation was not working with merged timers.
2025-08-13 09:55:42 +00:00
francescomani
071d28b3c9 print UE command line parameters also at MAC 2025-08-13 11:05:44 +02:00
Robert Schmidt
3a241fe587 Merge remote-tracking branch 'origin/amarisoft-ue-redcap' into integration_2025_w33 (!3573)
Make Amarisoft UE sim a RedCap UE

Change Amarisoft UE configuration and gNB of the AW2S pipeline to
be/handle RedCap UEs.

The UE should only connect if the gNB handles RedCap UEs. In the logs,
we should see

    [MAC]   UE with RNTI 3725 is RedCap

which we check for the first two UEs (one normal UE/absence of this
message, one RedCap UE/presence of this message).
2025-08-13 08:10:32 +02:00
Robert Schmidt
96c2c143f3 Merge remote-tracking branch 'origin/ldpc_clean_outdated_logs_and_interfaces' into integration_2025_w33 (!3576)
Cleanup documentation and interface of the LDPC segment coding libraries

Fix interface: The LDPC segment decoder interface had variables
'harq_pid', 'ulsch_id' and 'C' that are not useful to the segment
decoder. This MR removes these variables from the interface.

Fix documentation: libconfig log do not display anymore by default so we
may better not show them in the documentation to avoid any
misunderstanding.

Remove ldpc_cl library since the library does not work.
2025-08-13 07:41:31 +02:00
Jaroslava Fiedlerova
8f79abed2e CI: Update UHD version to 4.8 2025-08-12 22:27:29 +02:00
francescomani
4b85f35369 add option to directly send the beam index to L1 via FAPI without look-up table (for 7.2 split) 2025-08-12 18:51:16 +02:00
Robert Schmidt
3b57379887 CI AW2S-Amarisoft: verify RedCap'edness of a UE
Since the parent commit, UE 1 is normal (no RedCap), UE 2 is RedCap.
Verify that the gNB agrees with that and detects the second UE as RedCap
by analyzing some logs.

The first check is a bit elaborate, but basically is

    [ $(docker logs | grep XYZ | wc -l) -eq 0 ]
    ^   ^             ^          ^      ^
    1   2             3          4      5

(1) is the if statement, that compares
  (4) the number of occurrences
  (3) of "RedCap" in the
  (2) docker logs
(5) to being equal to

Note for all UEs which number, and whether it is RedCap (so this need to
be kept in sync with the Amarisoft UE sim configuration file in use!).
2025-08-12 17:33:14 +02:00
Robert Schmidt
4a41df2788 Make some Amarisoft UEs RedCap UEs
Change the parameters to be redcap (release: 17, redcap: "redcap") on
some UEs, and modify the path to the updated configuration.
Specifically, make UE 1 normal (no RedCap), UE 2 RedCap, UEs 3&4 normal,
UEs 5&6 RedCap, etc.

RedCap UEs should now only be able to connect if the gNB is handling Redcap
UEs, which is done in the parent commit.
2025-08-12 17:25:44 +02:00
Robert Schmidt
08428381d6 CI AW2S: modify configuration to have RedCap UEs connect 2025-08-12 17:25:44 +02:00
Robert Schmidt
c3e7fe47e6 Remove unused Amarisoft CI XML file 2025-08-12 17:25:44 +02:00
Robert Schmidt
21dd03ee73 Merge remote-tracking branch 'origin/fix_nr_ue_pdcch_llr_size' into integration_2025_w33 (!3580)
NR UE: fix pdcch llr_size calculation in nr_rx_pdcch()
2025-08-12 12:46:46 +02:00
Robert Schmidt
3681ef33a9 Merge remote-tracking branch 'origin/nr_ue_improve_ntn_ta' into integration_2025_w33 (!3581)
NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant

The ntn-Config ephemerisInfo contains the SAT position and velocity
vector but not the acceleration vector.

But the acceleration magnitude on the orbital path can be calculated as:

    t = 2 * pi * r / v
    omega = 2 * pi / t = v / r
    acceleration = omega² * r = v² / r

Where t is the orbital period, r is the orbital radius, v is the orbital
velocity, omega is the angular velocity. The acceleration direction is
from the SAT position towards the earth center. To calculate the
acceleration towards the UE, this is projected on the direction from the
SAT to the UE.

This is used to calculate the variable N_UE_TA_drift_variant and improve
the TA accuracy.
2025-08-12 12:46:14 +02:00
Robert Schmidt
5f674f5b68 Merge remote-tracking branch 'origin/issue_927' into integration_2025_w33 (!3395)
RFsim variable size H_awgn_mimo

Closes #927
2025-08-12 12:45:53 +02:00
Robert Schmidt
98cfbf0203 Merge remote-tracking branch 'origin/hotfix-bad-t-trace' into integration_2025_w33 (!3578)
fix a 4G T trace
2025-08-12 09:42:26 +02:00
Robert Schmidt
345fd992d9 Merge remote-tracking branch 'origin/searchspace0_with_2_occasion_per_slot' into integration_2025_w33 (!3567)
Workaround for handling 2 SS0 occasions per slot

Search Space 0 monitoring might depend on SSB. In !3332 this dependence
was removed by moving the configuration of SS0 earlier in a workaround
to avoid a segfault in handover. Now, a new workaround is needed to
handle 2 search space occasions per slot.
2025-08-12 09:41:50 +02:00
Robert Schmidt
b0ba247a9e Merge remote-tracking branch 'origin/ue_pucch2_bugfix' into integration_2025_w33 (!3563)
UE fixes: pucch format 2 and CSI IM

- DMRS bugfix for PUCCH format 2 with odd start PRB
- CSI IM noise power estimation omits DC subcarrier
2025-08-12 09:41:19 +02:00
Laurent THOMAS
e2c4033b57 When a client connects, we need to start the send/receive loop but the first reception is void data 2025-08-12 09:22:03 +02:00
francescomani
c137020ca2 remove fixed size H_awgn_mimo that may cause segfault in simulator in case of more than 4 antennas 2025-08-12 09:22:03 +02:00
calvin_peyron
12cf015525 "as" should be in capital letters 2025-08-11 17:11:21 +02:00
Calvin Peyron
3a1be4895f Rename ubuntuXX to ubuntu 2025-08-11 17:11:21 +02:00
Calvin Peyron
5210750883 Fix warning tmp may be uninitialized leads to error 2025-08-11 17:11:21 +02:00
calvin_peyron
bc9ae55723 Remove redundancy
As DEBIAN_FRONTEND has been set as environment variable, there is no need to use DEBIAN_FRONTEND=noninteractive inside RUN lines, it is redundant, hence it has been removed.
2025-08-11 17:11:21 +02:00
calvin_peyron
b3675be33a Upgrade CI images to Ubuntu 24
Libboost went from 1.74.0 to 1.83.0 alongside Ubuntu update.
GCC version is set as default to be more practical.
In Ubuntu22, apt sources were in .list files, in Ubuntu24 they are in .sources files.
Add --break-system-packages for pip installation to use same logic as before, see the pip update 23.0.1 (2023-02-17).
With Ubuntu24 liboai_device requires libpython3.12
2025-08-11 17:11:21 +02:00
Robert Schmidt
35361db76b build_oai: don't redirect compilations to a file
Redirecting to a file has the problem that it is difficult in the CI to
recover these files. Furthermore, at least with ninja, when running
build_oai interactively, the build output will only take some lines
(because ninja rewrites lines), so the change should not be that big to
users.

One CI function would print the entire output from build_oai to the
console. Since that output might be long now, do not do this. The file
is archived, anyway.
2025-08-11 16:11:35 +02:00
Romain Beurdouche
b9bed5838e feat(ldpc_cl): Remove ldpc_cl 2025-08-11 08:38:06 +00:00
alexjiao
0f61fac4a6 NR UE: add support for PDSCH rate matching with NZP CSI-RS
Currently only ZP CSI-RS is considered in function configure_ratematching_csi,
add support for NZP CSI-RS.
2025-08-09 23:40:53 +08:00
Thomas Schlichter
eb6c195c9b NR UE NTN: consider acceleration on orbital path to calculate N_UE_TA_drift_variant
The acceleration magnitude on the orbital path can be calculated as:

t = 2 * pi * r / v
omega = 2 * pi / t = v / r
acceleration = omega² * r = v² / r

Where t is the orbital period, r is the orbital radius, v is the orbital velocity, omega is the angular velocity.
The acceleration direction is from the SAT position towards the earth center.
To calculate the acceleration towards the UE, this is projected on the direction from the SAT to the UE.
2025-08-09 07:37:35 +02:00
Thomas Schlichter
4de0e54a3a NR UE: further simplify and optimize the usage of the PDCCH LLR array
The initial version of this patch was provided by "Laurent THOMAS <laurent.thomas@open-cells.com>"
2025-08-08 17:41:15 +02:00
Romain Beurdouche
a2c03f26e9 fix(nrLDPC_decoder_CL): Apply clang-format 2025-08-08 14:48:41 +00:00
Romain Beurdouche
37bf1deb7d fix(nrLDPC_decoder_LYC): apply clang-format 2025-08-08 14:48:41 +00:00
Romain Beurdouche
8d2df31d7b feat(LDPCImplementation.md): Add short introduction and TOC 2025-08-08 14:48:41 +00:00
Romain Beurdouche
d702bcd657 fix(LDPCdecoder): Cleanup segment decoder interface
Variables 'harq_pid', 'ulsch_id' and 'C' of the segment decoder
interface were not used any more by the implementations and set to zero
by all the callers.
Then it is more relevant and compliant to remove them.
2025-08-08 14:48:41 +00:00
Romain Beurdouche
eb3bd33fd4 feat(LDPCImplementation.md): Remove ldpc_cl logs
Recommended: Remove logs of a library that is not working as far as we
know.

Pop this commit if this seems not necessary.
2025-08-08 14:48:41 +00:00
Romain Beurdouche
cb5de9afbb fix(LDPCImplementation.md): Remove libconfig logs
libconfig log do not display anymore by default so we may better not
show them in the documentation to avoid any misunderstanding.
2025-08-08 14:48:40 +00:00
Thomas Schlichter
a6ccdd1340 NR UE: fix pdcch llr_size calculation in nr_rx_pdcch() 2025-08-08 14:58:14 +02:00
Cedric Roux
a42d8183ca fix a T trace 2025-08-08 12:32:36 +02:00
Robert Schmidt
f3dab10de6 Remove UE_AUTOTEST_TRACE CMake option
This only triggers the build of some dedicated logs that contain
information that is logged already, anyways.
2025-08-08 12:07:48 +02:00
Robert Schmidt
20f938d5ae Remove useless Doxygen variable 2025-08-08 12:07:48 +02:00
Robert Schmidt
f23b654132 Remove auto-test options in build_oai 2025-08-08 12:07:48 +02:00
Jaroslava Fiedlerova
05f9c975ee Merge branch 'integration_2025_w32' into 'develop'
Integration: `2025.w32`

* !3548 NR UE: fix reliable SIB19 reception when ntn-UlSyncValidityDuration-r17 expires
* !3559 numelt in place of config_isparamset
* !3487 T hacks: add new tracer ant0 and a tool to plot ofdm data from usrp or rfsim (output or input)
* !3541 simplify and make more local variables in nr_rx_pdcch() and fix small bugs
* !3547 Add a CU-UP load tester and improve GTP performance
* !3552 CI: refactor iperf3 UDP analysis function
* !3557 Fix PDSCH rate-matching for periodic CSI in UE
* !3571 fix time manager tests in the CI
* !3344 LDPC BBDEV/AAL rework
* !3560 CI: Refactor log collection, collect also (COTS) UE logs

See merge request oai/openairinterface5g!3565
2025-08-08 10:04:17 +00:00
francescomani
4b8359f11c fix for UECAP F1 handling in dora/phytest mode 2025-08-08 09:07:10 +02:00
Jaroslava Fiedlerova
3491a044ff Merge remote-tracking branch 'origin/ci-collect-ue-logs' into integration_2025_w32 (!3560)
CI: Refactor log collection, collect also (COTS) UE logs

Refactor log handling in CI: collect according to currently used XML files. This
makes it homogeneous in the pipelines, and avoids accidental overwriting (as
happens in phytest-timing), as well as harmonizing the log placement
(e.g., no YAML lookup in Ping/Iperf).

Allow to trace and archive UE logs (e.g., Quectel via QLog, Amarisoft UE logs).
By default, no logs will be collected as of this MR, as many files are big.

Various cleanup in Jenkinsfiles, some bugfixes, add unit tests.
2025-08-07 21:40:35 +02:00
Robert Schmidt
667bcf920c Trace analysis results 2025-08-07 15:39:59 +02:00
Robert Schmidt
43e2fd57d4 Use Ninja for FHI72 builds 2025-08-07 15:39:59 +02:00
Robert Schmidt
40efa2a545 Remove LogCollectBuild step: not used by any pipeline 2025-08-07 15:39:59 +02:00
Robert Schmidt
cc0d0ae0ab gNB caracal USRP build: don't stop if we can't reboot
Sometimes the connection fails because of the reboot. Without may_fail,
it would stop the build, which will then run the wrong code, possibly.
Instead, continue; if there is a problem with USRP, it will be visible
when starting nr-softmodem.
2025-08-07 15:39:59 +02:00
Robert Schmidt
244ea8fc22 Use archiveArtifact() for TerminateeNB() 2025-08-07 15:39:59 +02:00
Robert Schmidt
5090ce6f0a Ignore main.py TerminateeNB mode
No pipeline uses it. With the changes in the next commit, pipelines
would start to fail. Remove it for simplicity.
2025-08-07 15:39:59 +02:00
Robert Schmidt
8c2b356c1d Remove unused function 2025-08-07 15:39:59 +02:00
Robert Schmidt
14389235df Use archiveArtifact() for SCA.CppCheckAnalysis() 2025-08-07 15:39:59 +02:00
Robert Schmidt
03a4772189 Remove cppcheck reference file: nobody knows about it, nobody checks 2025-08-07 15:39:59 +02:00
Robert Schmidt
27e37a4181 Use archiveArtifact() for LicenceAndFormattingCheck() 2025-08-07 15:39:59 +02:00
Robert Schmidt
025a6dbd1d Remove unused testCase_Id 2025-08-07 15:39:59 +02:00
Robert Schmidt
65ec00c5fd No need for all the useless docker image rm 2025-08-07 15:39:59 +02:00
Robert Schmidt
810dad97ae Collect the ninja logs for various ran-build images 2025-08-07 15:39:59 +02:00
Robert Schmidt
5ffa431514 Use archiveArtifact() for Build()/BuildCluster()
I have to make both together, since they both depend on
AnalyzeBuildLogs().

- remove mkdir for legacy sub-logfiles in build_oai, that does not exist
  anymore; also, remove corresponding log analysis, I think we don't use
  it and it is overkill (either build works or not)
- manually try to copy "all.txt"
- explicitly list log files to copy, then analyze
- AnalyzeBuildLogs(): pass log files to inspect explicitly
2025-08-07 15:39:59 +02:00
Jaroslava Fiedlerova
5ca59d0f48 Merge remote-tracking branch 'origin/ldpc-aal' into integration_2025_w32 (!3344)
LDPC BBDEV/AAL rework

This branch aims to generalize the existing LDPC T2 implementation to support
other DPDK BBDEV accelerators, e.g., Intel ACC100/200.

Differences from the current T2 implementation include:
  1. relax CMakeLists.txt checking for custom dpdk-t2 implementation,
     technically, any DPDK BBDEV should work
  2. BBDEV capability checks during init
  3. llr_scaling to scale the input llr accordingly for better decoding
     performance on the Intel ACC100/200
  4. self-managed harq buffers for the ACC200, as internal harq memory is not
     available

Tested BBDEV devices:
  1. Intel ACC100
  2. Intel ACC200/VRB1
2025-08-07 12:17:11 +02:00
Jaroslava Fiedlerova
5555a465fc Merge remote-tracking branch 'origin/fix-time-manager-ci' into integration_2025_w32 (!3571)
fix time manager tests in the CI

Attempt to have less errors in the CI for the time manager module.
2025-08-06 22:54:07 +02:00
Robert Schmidt
63f6368ca7 use archiveArtifact() for BuildProxy() 2025-08-06 12:24:30 +02:00
Robert Schmidt
1ffbba525d Use archiveArtifact() for BuildRunTests()
Collect also unit test logs, so that developers could see the reason for
failed logs.
2025-08-06 12:24:30 +02:00
Robert Schmidt
83d037057b Use archiveArtifact() for cls_native.run_physim() 2025-08-06 12:24:30 +02:00
Robert Schmidt
7ef8829167 Use archiveArtifact() for cls_native.Build() 2025-08-06 12:24:30 +02:00
Robert Schmidt
1d3e795c0c Use archiveArtifact() for deploy_oc_physim() 2025-08-06 12:24:30 +02:00
Robert Schmidt
da9cec0bff Use archiveArtifact() for Ping+IPerf 2025-08-06 12:24:30 +02:00
Robert Schmidt
62ae72925b Use archiveArtifact() for module_UE 2025-08-06 12:24:30 +02:00
Robert Schmidt
fa5c91e03f Use archiveArtifact() for (Un-)DeployObject() 2025-08-06 12:24:30 +02:00
Robert Schmidt
2b4e0e5244 Use archiveArtifact() for CN undeploy 2025-08-06 12:24:30 +02:00
Robert Schmidt
dcbb3369e1 Simplify ShowTestID()
make it a non-class function, stateless, more information on the current
CI step (the number).
2025-08-06 12:23:59 +02:00
Robert Schmidt
28ce0dc444 Main: pass in ctx
Set the context for each task step. Set the artifact result path based
on the XML, so it is harmonized; currently, most pipelines use the "YAML
path" of docker-compose, but that does not always make sense. For
instance, Ping/Iperf() needs to look up this path, but does not
inherently belong to one specific YAML path (there might even be more).
2025-08-06 12:22:28 +02:00
Robert Schmidt
f766b21b57 Add CI helper class
This class provides a generic "context" for individual tasks about the
current task step, and where to log results. It's used by
archiveArtifact() that would automatically log files in the right
directory, based on a directory in the context, and in a way that order
of files is preserved for long-running pipelines.
2025-08-06 12:21:11 +02:00
Robert Schmidt
5c16fc6189 Fix Python "invalid escape sequence" warnings
cls_containerize.py:139: SyntaxWarning: invalid escape sequence '\.'
      lineHasCommit = re.search(f'COMMIT [a-zA-Z0-9\.:/\-]*{image}', str(line)) is not None
    cls_containerize.py:441: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:493: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', cmd.getBefore())
    cls_containerize.py:616: SyntaxWarning: invalid escape sequence '\-'
      result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', ret.stdout)
2025-08-06 12:20:13 +02:00
Robert Schmidt
5492de0e0b Example tracing for QLog
Note: this does not actually work. In the pipelines, we see that for
some reason, quectel-CM cannot establish a connection. Manually, it
works though(?)
2025-08-06 12:20:13 +02:00
Robert Schmidt
af580f3a2f Add example tracing for Amarisoft UE sim
Commented, as the resulting files are very big.
2025-08-06 12:20:13 +02:00
Robert Schmidt
fe2cda1309 CI: log UE files in artifacts 2025-08-06 12:20:13 +02:00
Robert Schmidt
ce9f2c9a45 Add possibility to trace UEs 2025-08-06 12:20:13 +02:00
Robert Schmidt
a3d46ed0e6 5g rfsim NTN LEO/GEO: remove leading undeploy step
It is not necessary (the final undeploys at the end are "always_exec"),
and makes the CI potentially fail since there is nothing to copy at this
point.
2025-08-06 12:20:13 +02:00
Robert Schmidt
de2d32be09 CI UE Attach: add more frequent checks, improve output
check for IP once before sleeping in case UE IP address exists, which
should speed up the CI. With this, Only print the actual attach command
once. Print errors only at the beginning. This should simplify attach
command output logs.
2025-08-06 12:19:35 +02:00
Robert Schmidt
cc1b2315af CI: add simple unit test for UE handling 2025-08-06 12:19:35 +02:00
Robert Schmidt
a1c354bd6e CI: Remove old tracing information
It will be replaced with a new mechanism in a later commit.
2025-08-06 12:19:24 +02:00
Cedric Roux
eaffaf4058 time manager tests: increase some sleep
The CI fails sometimes, because some processes/threads are created in
unpredictable order and if the client connects before the server is
ready some tests fail, as seen in the following log:

[UTIL]   client/server iq-samples: launch sub-processes
[UTIL]   threadCreate() for time client: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s
[UTIL]   threadCreate() for time source iq samples: creating thread (no affinity, default priority)
[UTIL]   threadCreate() for time server: creating thread (no affinity, default priority)
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]
[UTIL]   client/server: rlc ticks: 1000 pdcp ticks: 1000 x2ap ticks: 1000
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "server" "--time_management.time_source" "iq_samples"
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0
CMDLINE: "/oai-ran/build/common/utils/time_manager/tests/test_time_manager_auto" "--time_management.mode" "client"
[UTIL]   client-server iq-samples: ERROR

The client/server iq-samples test is started.
Then we see this log:
[UTIL]   time manager configuration: [time source: server] [mode: client] [server IP: 127.0.0.1} [server port: 7374]
Which means that the client is running.

It tries to connect to the server (not running yet), but fails, so sleeps
for 1 second before attempting another connection to the server:
[UTIL]   time client: connection to 127.0.0.1:7374 failed, try again in 1s

The sleep is done by the time_client thread, the main thread of the test
program continues and does a sleep(1).

Then the server arrives:
[UTIL]   time manager configuration: [time source: iq_samples] [mode: server] [server IP: 127.0.0.1} [server port: 7374]

It sends all the ticks (to no client, since the client is still sleeping).

Then the test is over, the sleep(1) of the client finishes and the program
exits. The client never connected to the server.
We have this log:
[UTIL]   client/server: rlc ticks: 0 pdcp ticks: 0 x2ap ticks: 0

And the test fails.

It's complicated to write an automatic test involving several uncoordinated
programs. The operating system may create processes in any order. We use
some sleeping to wait, but it may be too short or too long, leading to test
failure.

Let's see with more sleep if the CI fails less.
2025-08-06 11:47:10 +02:00
Jaroslava Fiedlerova
555e609a86 Merge remote-tracking branch 'origin/ue-fix-csi-sched' into integration_2025_w32 (!3557)
Fix PDSCH rate-matching for periodic CSI in UE

Changed the search structure to have periodic resoruce id in the outer
loop and configured resource set as inner loop to prevent configuring
resource that is not needed.

Use const for input pointers.
2025-08-06 11:37:00 +02:00
Jaroslava Fiedlerova
b421bdd276 Merge remote-tracking branch 'origin/ci-iperf3-log-fix' into integration_2025_w32 (!3552)
CI: refactor iperf3 UDP analysis function

- add helper function to covert reported bitrate values to Mbps for calculations
- clean up the UDP analysis function, improve test report formatting
- fix an issue where Gbps values were incorrectly reported
  (example: https://jenkins-oai.eurecom.fr/job/RAN-SA-AERIAL-CN5G/4802/)
- update CI unit test report checks to match the new formatting
2025-08-06 11:36:02 +02:00
Xin Zhe Khooi
f6aeb21d97 ldpc_aal: handle T2 case in runtime 2025-08-05 18:38:17 +02:00
Robert Schmidt
0d4246e354 Rename nrLDPC_coding_t2 options to nrLDPC_coding_aal 2025-08-05 18:38:17 +02:00
Robert Schmidt
c0d797ec0e Rename libldpc_t2 to libldpc_aal
Rename the library to reflect that it's more a generic AAL driver than
specifically for AAL. To this end, rename some documentation.

As of this commit, the options are still called nrLDPC_coding_t2. The
next commit will correct this.

Co-authored-by: Xin Zhe Khooi <khooixz@comp.nus.edu.sg>
2025-08-05 18:38:16 +02:00
Xin Zhe Khooi
61ea0a9e81 ldpc_t2: generalize for broader BBDEV support (ACC100/200)
- Generalized LDPC T2 implementation to support other DPDK BBDEV
  accelerators (e.g., Intel ACC100/200)
- Added BBDEV capability checks during initialization
- Introduced LLR scaling to improve decoding performance on Intel ACC
  cards
- Implemented self-managed HARQ buffers for ACC200 (no internal HARQ
  memory)
- Library usage documentation update, and added developer documentation

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
2025-08-05 18:37:58 +02:00
Sakthivel Velumani
1becaf0671 Fix periodic CSI scheduling in UE
Changed the search structure to have periodic resoruce id in the outer
loop and configured resource set as inner loop to prevent configuring
resource that is not needed.

Use const for input pointers.
2025-08-05 10:01:05 -04:00
Jaroslava Fiedlerova
d630fb2965 Merge remote-tracking branch 'origin/cuup-load-tester' into integration_2025_w32 (!3547)
Add a CU-UP load tester and improve GTP performance

This adds a simple tester program for the CU-UP. It sets up a number of
UEs/bearers in the CU-UP via the E1 interface, then streams data in
downlink/uplink (as seen by the CU-UP). More information is available in
tests/nr-cuup/README.md.

Includes some fixes to properly verify that SCTP is installed, and use
"the right cmake way" to use it in cmake code (see commit for details).
2025-08-04 23:59:05 +02:00
Jaroslava Fiedlerova
de91ab6eb9 Merge remote-tracking branch 'origin/enhance-ssb-dci-processing' into integration_2025_w32 (!3541)
simplify and make more local variables in nr_rx_pdcch() and fix small bugs...

simplify and make more local variables in nr_rx_pdcch() and fix small bugs
(size 9 RE instaed of 12 RE)
2025-08-04 23:57:40 +02:00
Jaroslava Fiedlerova
da2cbea5e4 Merge remote-tracking branch 'origin/record-iq' into integration_2025_w32 (!3487)
T hacks: add new tracer ant0 and a tool to plot ofdm data from usrp or rfsim
(output or input)

The tool ant0 dumps IQ data to a file (or stdout) as float complex or short.
It is needed for a student's project. (Well, we could use record/extract, but
it's simpler.) The tool ofdm-plot is used to plot output or input signal from
gnb in the frequency domain. May be useful to debug, why not.
2025-08-04 23:55:32 +02:00
Jaroslava Fiedlerova
611971c3c7 Merge remote-tracking branch 'origin/use_numet_not_config_isparamset' into integration_2025_w32 (!3559)
numelt in place of config_isparamset

config_isparamset doesn't seem to work for array types, a temporary solution is
using numelt to verify if the parameter is set in config file
2025-08-04 16:19:35 +02:00
Jaroslava Fiedlerova
c29a56fd17 Merge remote-tracking branch 'origin/fix_sib19_reception' into integration_2025_w32 (!3548)
NR UE: fix reliable SIB19 reception when ntn-UlSyncValidityDuration-r17 expires

Fixes:
- gNB: fix scheduling of Rel-17 SIBs
- gNB: fix case in update_SIB1_NR_SI() when multiple Rel-17 SIBs would be defined
- NR UE: fix calculation of SI window expiry

Updating LEO scenario to test this
- set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
- NTN config: setting sib1_tda is not required anymore
2025-08-04 16:18:08 +02:00
Robert Schmidt
6bf88bd3d9 Remove F1 interface names from configuration files
These options are not taken into account, they are not even defined in
the configuration module.
2025-08-04 12:34:23 +02:00
Robert Schmidt
faef56e432 Remove old 4G F1 configuration files
4G F1 has been removed from the code base, so these configs are now
useless.

See also commit 9dc2282249 ("Remove 4G F1")
2025-08-04 12:34:23 +02:00
Robert Schmidt
0a5130cf10 Remove unused control port number from F1
Remove these F1-C port numbers. The configuration is not actually
applied, and the default F1-C port number 38472 (see F1AP_PORT_NUMBER)
is hardcoded in the F1 module.

For the moment, I leave the configuration option, in case we want to
allow to configure the port numbers later).
2025-08-04 12:34:23 +02:00
Robert Schmidt
8d5501edc2 Harmonize GTP log messages
Make a common pattern, which makes it simpler to find them in gNB logs,
and, maybe more importantly, link tunnel creation and update (the update
message was missing the "incoming" TEID, so it is not easy to link to
creation apart from the UE ID, but even then the UE might have multiple
tunnels).
2025-08-04 12:34:23 +02:00
Robert Schmidt
9140b36a2d Refactor gtpv1u_bearer_t and use internally
Reuse the gtpv1u_bearer_t for internal functions. Hopefully this will
also simplify implementation of IPv6, as it encapsulates IP address
handling within gtpv1u_bearer_t.
2025-08-04 12:34:23 +02:00
Robert Schmidt
38ac898672 Refactor GTP: pass addr structure directly
This should simplify future transition to IPv6, as we can pass the right
address directly.
2025-08-04 12:34:23 +02:00
Robert Schmidt
5d9db1688a Refactor port number out of newGtpuCreateTunnel()
The (remote) port number of the GTP module is configured during
initialization. It is therefore not required when calling
newGtpuCreateTunnel(), and could even lead to bugs (if another port
number is used than specified during GTP init).
2025-08-04 12:34:23 +02:00
Robert Schmidt
7c34825dae Receiver thread: independent of ITTI
This also seems to reduce the packet loss on my machine.
Especially in uplink there are no losses anymore.
2025-08-04 12:34:23 +02:00
Robert Schmidt
483d610a9b Reduce receiver mutex scope
This seems to reduce packet loss on my machine.
2025-08-04 12:34:23 +02:00
Robert Schmidt
510814a79a Remove unused struct member 2025-08-04 12:34:23 +02:00
Robert Schmidt
d1a03c993c Reformat gtp_itf.cpp 2025-08-04 12:34:23 +02:00
Robert Schmidt
905fe3fb71 DU Buffer Report/DL Delivery Status: remove unused code 2025-08-04 12:34:23 +02:00
Robert Schmidt
07629e29d6 Add CU-UP load tester and documentation
This is a simple CU-UP load tester. It sets up a configurable number of UEs in the
CU-UP, then sends GTP traffic in downlink/uplink in the N3-F1/F1-N3
direction at the CU-UP. It then compares the sent and received data.

Additional parameters, such as amount of traffic, test length, packet
size, and IP addresses/ports are configurable.

To run:

    mkdir build && cd build && cmake .. -GNinja && ninja nr-cuup nr-cuup-load-test params_libconfig
    ./tests/nr-cuup/nr-cuup-load-test
    ./nr-cuup -O ../tests/nr-cuup/load-test.conf

The tester should be able to detect lost and reordered packets.

Example lost: Receive order 2,3,5,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 3, expected 3, next=expected+1=4
=> on packet 5, expected 4, diff=5-4=1 (lost 1), next=payload+1=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,6 (lost packet 4)
=> on packet 2, expected 2, next=expected+1=3
=> on packet 5, expected 3, diff=5-3=2 (lost 2), next=payload+1=6
=> on packet 3, expected 6, (reduce lost by 1 to 1), next=expected=6
=> on packet 6, expected 6
=> 1 lost

Example reordered: Receiver order 2,5,3,4,6 (no losses)
2025-08-04 12:31:05 +02:00
Thomas Schlichter
506dc7da52 NR UE: invalidate SI window on successful SI reception to avoid wrongly reusing this old SI window for new SI reception
This fix was suggested by Francesco Mani
2025-08-04 10:52:08 +02:00
Thomas Schlichter
16fd1bb67c gNB: fix case when multiple Rel-17 SIBs would be defined
The boolean value v17_sib was not set to true when allocating si_schedulingInfo_v17 and schedulingInfo2_r17.
So multiple Rel-17 SIBs would lead to multiple allocations and only the last SIB being actually configured.

Fix this by removing the redundant v17_sib variable and directly check if the memory was already allocated.
Also move the definition and allocation of si_schedulingInfo_v17 closer to its actual usage.
2025-08-04 10:52:08 +02:00
Thomas Schlichter
7827a40f19 NTN config: setting sib1_tda is not required anymore 2025-08-04 10:52:08 +02:00
Thomas Schlichter
d4f4cefd6b set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
Now that we reliably receive SIB19, we can set the ntn-UlSyncValidityDuration-r17 to a sane value
and thus make sure that the UE always has up-to-date SIB19 information.
2025-08-04 10:52:08 +02:00
Thomas Schlichter
53208bd163 NR UE: fix calculation of SI window expiry 2025-08-04 10:52:08 +02:00
Robert Schmidt
626fce4f44 config_frame_structure(): make const 2025-08-04 09:53:14 +02:00
Robert Schmidt
66023f6a8d Refactor get_feasible_msg3_tda()
Simplify the code. Consider any slot for Msg3, and check that the TDA
fits in a given slot (as before).
2025-08-04 09:53:14 +02:00
Robert Schmidt
961a646dc7 Remove dedicated Msg3 TDA
A dedicated Msg3 TDA is simply not necessary: get_feasible_msg3_tda()
already iterates through all TDAs to find a suitable one for Msg3, and
takes things such as parameter Δ already into account.

The only prerequisite is that the ra_ResponseWindow is long enough. In
some configurations, Msg3 TDA ensured that Msg2 still happened during
ra_ResponseWindow, while Msg3 was outside of it. This is not necessarily
the case anymore, unless ra_ResponseWindow is long enough.

For the normal user, removing ra_ResponseWindow from the config will be
enough.
2025-08-04 09:53:14 +02:00
Robert Schmidt
41d14b571c Remove most ra_ResponseWindow config options
Since the parent commit, the ra_ResponseWindow will be chosen
automatically. Correspondingly, remove most ra_ResponseWindow options
from configuration files in the repository.

One problem in some mu=1 configs is that the ra_ResponseWindow=4 (10
slots), which might be overly restrictive if the L1 slot ahead is
somewhat close to 10 (e.g., 6), in which case we might not be always
able to allocate Msg2 in time.

A notable exception here is gnb-vnf.sa.band66.u0.25prb.nfapi.conf, in
which we still provide it (1) since it uses a non-standard configuration
of a ra_ResponseWindow longer than 10ms (see also issue #916 for more
information) and (2) as an example.
2025-08-04 09:53:14 +02:00
Robert Schmidt
ac3451c6f7 Select ra_ResponseWindow automatically if not configured
If the config file does not specify ra_ResponseWindow, select it to be
10 slots in mu=0, or 20 slots for all others.

This should give us enough flexibility to allocate Msg2 without running
out of the response window. The next commit will remove most
ra_ResponseWindow options in configs.
2025-08-04 09:53:14 +02:00
Robert Schmidt
7cae3c2871 Comments on func 2025-08-04 09:53:14 +02:00
Robert Schmidt
8cded62df0 Refactor TDA allocation
Make it simpler to see, in function nr_rrc_config_ul_tda(), which UL
TDAs we allocate for a UE.
2025-08-04 09:53:14 +02:00
Robert Schmidt
62e4025bc8 Integrate inactivity scheduling into main allocation loop
Scheduling for inactivity only deviates in details from the main
scheduling logic: we simply allocate a fixed number of RBs instead of
making it dependent of data.

In this commit, add an additional flag to sort UEs that are scheduled
for inactivity in front of "normal" UEs (with traffic). Then, schedule
those UEs by limiting/fixing the amount of RBs to schedule to
min_grant_prb.

Update the comparator() to properly sort UEs based on this flag and the
coefficient by applying a consistent logic of -1/0/1 (see man qsort) for
smaller/equal/larger. The inactivity flag, if set, will always have
higher priority over the coefficient to schedule these UEs first, as was
the case prior to this commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
7ee8e8eaba Fix bug: only sort relevant part of list
This reduces the amount of elements to compare.
2025-08-04 09:53:14 +02:00
Robert Schmidt
dd98030202 Refactor to call post-processor in place
Remove sched_ctrl->sched_ulsch, and call the post-processing function
post_process_ulsch() in the places where sched_ctrl->sched_ulsch has
been assigned. This will have two effects:

- it is not necessary to have the final loop over all UEs, which might
  be costly especially towards many UEs.
- till now, there is only a single sched_ulsch; however, a later commit
  will allow to schedule multiple PUSCH transmissions from a single (DL)
  slot. This would require to make sched_ctrl->sched_ulsch, and
  also iterate through all sched_ulsch. In this new scheme, we can
  simply call post_process_ulsch() multiple times, which is simpler (and
  therefore, implicitly handleded as of this commit).
2025-08-04 09:53:14 +02:00
Robert Schmidt
d71cec7958 Refactor ULSCH phy-test scheduler
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch later, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
4772dd889e Refactor ULSCH main allocation procedure
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
a469f42085 Refactor retransmission's NR_sched_pusch_t usage
Avoid to overwrite the existing retInfo. Instead, create a new
NR_sched_pusch_t and assign to sched_ctrl->sched_pusch in one place. A
follow-up commit will directly trigger the post processor here.
2025-08-04 09:53:14 +02:00
Robert Schmidt
5b39baacc3 Refactor inactivity-based PUSCH allocation
Write a single NR_sched_pusch_t structure in a single statement (where
possible). Assign to sched_ctrl->sched_pusch in one place, where the
post-processing functionality will be called in a follow-up commit.
2025-08-04 09:53:14 +02:00
Robert Schmidt
81b66fae5e UL harq PID: similar to parent, reduce scope of sched_pusch 2025-08-04 09:53:14 +02:00
Robert Schmidt
f3068caa37 Store selected MCS in UE iterator
PF uses MCS and average throughput to decide which UE to schedule. Thus,
the first loop selects the MCS, and the second does the main UE
allocation after sorting by priority, depending on the MCS.

A follow-up commit will remove sched_pusch from NR_UE_sched_ctrl_t.
Thus, we cannot rely on sched_ctrl to store the MCS in the first loop,
and look it up from there in the second. Instead, store it as part of
the UE iterator data, and take it from there.
2025-08-04 09:53:13 +02:00
Robert Schmidt
243e956ee9 Remove unused parameter from sched_pusch 2025-08-04 09:53:13 +02:00
Robert Schmidt
fcebec09ad Read TX power from HARQ.sched_pusch
A later commit will remove sched_ctrl->sched_pusch. Instead, the TX
power is also stored for each HARQ process (as they contain
sched_pusch). Read it from there, which should have the same effect.
2025-08-04 09:53:13 +02:00
Robert Schmidt
acf6b957b3 Refactor post processor into post_process_ulsch()
Introduce an array with information on FAPI structures to save resource
allocation into. It's in nr_mac_gNB.h because the next commit reuses
this for all preprocessors.
2025-08-04 09:53:13 +02:00
Sakthivel Velumani
39c6cb203c Not include DC for CSI IM measurement
DC subcarrier has a significantly higher energy compared to other CSI IM
resource elements. This causes the average interference + noise
estimation to be higher than CSI-RS signal power making the CQI 0. With
a third-party gnb that schedules PDSCH based on CQI, the UE never
receives DL DCI once it starts sending CSI reports.
2025-08-03 16:53:52 -04:00
Sakthivel Velumani
350cf8d6ef Fix PUCCH 2 DMRS in UE
for start RB not multiple of 4
2025-08-03 16:52:43 -04:00
francescomani
88ec5fb239 highlighting UE LOG with sync SSC printed 2025-08-03 10:41:16 +02:00
francescomani
7f4397a091 workaround to take into account SS0 1st symbol depending on SSB 2025-08-03 10:35:46 +02:00
francescomani
aff31d45b4 formatting 2025-08-03 10:25:00 +02:00
Thomas Schlichter
bbf4cd4a90 gNB: fix scheduling of rel-17 SIBs 2025-08-01 16:00:12 +02:00
Robert Schmidt
442c29cfcd CI: use getConnection() to simplify code 2025-08-01 13:00:50 +02:00
Robert Schmidt
be60dbd38c CI: shorten UE names (IP might not be available) 2025-08-01 13:00:50 +02:00
Robert Schmidt
af3302d2d6 Remove unused statement 2025-08-01 13:00:50 +02:00
Jaroslava Fiedlerova
a9f10bd794 Add CI unit test for highrate iperf test 2025-08-01 12:45:33 +02:00
Jaroslava Fiedlerova
73cfaba2dc CI: refactor iperf3 UDP analysis function
- Add helper function to normalize bitrate values to Mbps for calculations.
- Add helper function to extract data from iperf test report.
- Clean up the UDP analysis function, improve test report formatting.
- Fix an issue where Gbps values were incorrectly reported due to inconsistent
  unit parsing.
- Update CI unit test report checks to match the new formatting.
2025-08-01 12:45:29 +02:00
Robert Schmidt
b763692792 Merge branch 'integration_2025_w31' into 'develop'
Integration: `2025.w31`

* !3324 Use complex data type for channel magnitude
* !3462 Synchronized Real-Time Data Recording Application Addition
* !3536 Remove --usim-test command line option
* !3537 Another fix for CSI PDSCH overlap
* !3546 Fix for tun_if.c warning "specified bound 16 equals destination size"
* !3523 Fix UE PDSCH LLR
* !3544 Fix sib1 reception flag
* !3534 CI: Adjust frequency configuration
* !3530 remove specific directory for LTE SIM management tools
* !3545 Fix overflow when negating minimum int16_t value in precoding
* !3461 Fix Dedicated BWPs
* !3558 feat(LDPCImplementation.md): Fix documentation

Closes #948 and #955

See merge request oai/openairinterface5g!3551
2025-08-01 04:40:24 +00:00
Robert Schmidt
755246545e Merge remote-tracking branch 'origin/fix_LDPCImplementation' into integration_2025_w31 (!3558)
feat(LDPCImplementation.md): Fix documentation

Few ambiguities and outdated names were found in the LDPC documentation
by Vlademir Brusse (see in the devel mailing list).

- Outdated names of the functions of the segment coding interface.
- Ambiguity about loading of the segment coding libraries.
2025-07-31 18:43:52 +02:00
Robert Schmidt
c15accf106 Merge remote-tracking branch 'origin/Fix_DedicatedBWPs' into integration_2025_w31 (!3461)
Fix Dedicated BWPs

- Improve SearchSpace selection
- Improve CORESET selection
- Fix fill 'initialDownlinkBWP->pdsch_Config' when there are
  DedicatedBWPs
  * This fixes the reported 'RSRP = 0' issue when the UE is in the
    InitialBWP and we have DedicatedBWPs configured
- Add a 'common' type SearchSpace in the NR_BWP_DownlinkDedicated IE for
  DedicatedBWPs
- Fix hardcoded 'controlResourceSetId' by making it dynamic
- Remove 'searchspaceid' from 'verify_agg_levels' function because it
  was used only for LOG
- CI: Add DedicatedBWP to '40 MHz TDD F1+E1 SA' in
  'RAN-SA-B200-Module-SABOX-Container'
2025-07-31 15:53:31 +02:00
francescomani
228f642755 config_isparamset doesn't work for array types, using numelt instead 2025-07-31 15:30:09 +02:00
Robert Schmidt
cbdcd2d015 Merge remote-tracking branch 'origin/issue-955' into integration_2025_w31 (!3545)
Fix overflow when negating minimum int16_t value in precoding

This closes #955

It prevents undefined behavior caused by the minimum int16_t value
(-32768) in two's complement representation. Because possible negation
by multiplying with -1 during precoding cause an overflows since +32768
cannot be represented in 16-bit signed integers and end up again in
-32768 because of overflow, here reveald by using the SIMD functions.

Workaround we use a slightly smaller number than 1 in Q15 Format to
prevent this error. Q15 representation of (integer value -32767) -1 +
2^-15 = -0.999969482421875
2025-07-31 15:26:21 +02:00
Robert Schmidt
b77be2ae28 Telnet CI: Handle error of no RNTI 2025-07-31 15:20:09 +02:00
Robert Schmidt
93196e630b Bugfix: when no UE found, return -1 2025-07-31 15:20:09 +02:00
Robert Schmidt
128a6f3945 Add XML step to check UE is on dedicated BWP 2025-07-31 15:20:09 +02:00
Robert Schmidt
aa4c2df593 Remove non-existing XML steps 2025-07-31 15:20:09 +02:00
Robert Schmidt
ea8e5d85be Add telnet command to get UE's BWP 2025-07-31 15:20:09 +02:00
Romain Beurdouche
eabb811513 feat(LDPCImplementation.md): Fix documentation
* Outdated names of the functions of the segment coding interface.
* Ambiguity about loading of the segment coding libraries.
2025-07-31 15:04:41 +02:00
Robert Schmidt
da70ea75ae Merge remote-tracking branch 'origin/ci-change-phytest-frequency' into integration_2025_w31 (!3534)
CI: Adjust frequency configuration

Change frequency used by OTA CI pipelines to avoid overlap with
commercial deployments.
2025-07-31 09:51:31 +02:00
Robert Schmidt
71e20bf290 Merge remote-tracking branch 'origin/lte-sim-tools' into integration_2025_w31 (!3530)
remove specific directory for LTE SIM management tools

This is very old code has never been integrated with the "main" OAI
cmake infrastructure and more recent libraries.

This MR integrates the three binaries for LTE virtual sim management in
the regular build process and log system
2025-07-31 09:50:11 +02:00
Robert Schmidt
44933f18c6 Code does nothing: gtpv1u_data_g never populated, always HASH_TABLE_KEY_NOT_EXISTS 2025-07-31 08:35:10 +02:00
Robert Schmidt
dbe9e8684b OAI hashtable not used in GTP 2025-07-31 08:35:10 +02:00
Robert Schmidt
1e39f20d87 Make GTP compile on its own, without LTE
Avoid the include gtpv1_u_messages_types.h, as this pulls in e.g., LTE
RRC definitions. The CU-UP load tester integrated in one of the
following commits should be able to build without LTE RRC, if it was for
GTP. Unfortunately, ITTI also pulls in LTE RRC, so it's also somewhat
useless...

Put some forward declarations instead. That also shows that the API is
unnecessarily complex, and would need some cleanup.
2025-07-31 08:35:10 +02:00
Robert Schmidt
aa82d83228 Correctly link sctp into SCTP_CLIENT
Remove sctp from all other targets, since we use sctp::sctp on
SCTP_CLIENT (would fail if it does not exist), and SCTP_CLIENT already
fulfils the SCTP dependency.
2025-07-31 08:35:10 +02:00
Robert Schmidt
83bb8017cf Correct Findsctp.cmake
- Provide some documentation
- Make cmake keywards and sctp lib name lowercase
- Use standard form of find_package_handle_standard_args()
- Make an imported target sctp::sctp that will fail if being used in
  cmake unless defined, which will avoid that "sctp" appears in the
  cmake code but is silently discarded

See also:
https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#a-sample-find-module
2025-07-31 08:35:10 +02:00
Jaroslava Fiedlerova
ac6561335c CI: adjust gNB conf file in OAIUE pipeline
Following frequency change in the pipeline, we observed degraded UL channel
conditions resulting in low UL throughput. Increasing attenuation on the gNB
side was found to mitigate this issue by improving UL channel quality
and reducing UL noise power.

Increase tested UL and DL bitrates in OAIUE pipeline.
2025-07-30 18:11:09 +02:00
Laurent THOMAS
02ce4aaf82 Fix a 4G UE bug 2025-07-30 17:41:28 +02:00
Laurent THOMAS
426e3453cd trace to try to debug old 4G bug 2025-07-30 17:41:28 +02:00
Robert Schmidt
ff52194857 Remove unused parameter from build_oai 2025-07-30 17:41:28 +02:00
Laurent THOMAS
990fc9c55a Fix potential out-of-bound write
Tell strncpy() the size including the NULL byte to make sure we copy all
data.

This just fixes these warnings:

    openair3/NAS/TOOLS/conf_usim.c: In function ‘gen_usim_data’:
    openair3/NAS/TOOLS/conf_usim.c:191:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:190:53: note: length computed here
    openair3/NAS/TOOLS/conf_usim.c:195:17: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
    openair3/NAS/TOOLS/conf_usim.c:194:54: note: length computed here

add copy with limited size and truncate properly with null C string termination.

As clang-format doesn't handle tab indented files and as it is not the
OAI coding rule, the entire file is re-indented with present OAI coding
rule.
2025-07-30 17:40:50 +02:00
Laurent THOMAS
b65b5dd40e Remove specific directory for LTE SIM management tools
Move into openair3/NAS/TOOLS/CMakeLists.txt, and simplify the
CMakeLists.txt.

Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-07-30 17:39:12 +02:00
Jaroslava Fiedlerova
6c8fc09525 CI: change frequency for AW2S pipeline 2025-07-30 10:59:47 +02:00
Robert Schmidt
9a7d80ef7d CMake module path to beginning
Move the path to the beginning, so that we can use it early.
Specifically, it was after the SCTP module, and the next commit will use
the Findsctp.cmake module to find SCTP. Use the cmake-proper variable.
2025-07-30 09:39:05 +02:00
Matthias Mehlhose
5b0b40c102 mod: use random numbers in unit test function 2025-07-29 15:40:01 +00:00
Mario Joa-Ng
905a8a495e mod: unit test code to compare CM and SIMD results on both antennas 2025-07-29 15:38:23 +00:00
Matthias Mehlhose
7d27592b4f Initial unit test to refactor and fix nr_layer_precoder_simd function (See #955) 2025-07-29 15:35:24 +00:00
Robert Schmidt
05f6a0660b Merge remote-tracking branch 'origin/fix-ue-cset0-search' into integration_2025_w31 (!3544)
Fix sib1 reception flag

TS 38.213 4.1 says coreset 0 is present only if kssb < 24 for FR1 and <
12 for FR2. So we set get_sib1 flag accordingly.
2025-07-29 09:39:33 +02:00
Robert Schmidt
10ab7c2278 Merge remote-tracking branch 'origin/issue-948-fix' into integration_2025_w31 (!3523)
Fix UE PDSCH LLR

Closes #948
2025-07-29 09:38:59 +02:00
Jaroslava Fiedlerova
62dd459959 CI: change frequency for OAIUE pipeline 2025-07-29 09:30:23 +02:00
Robert Schmidt
8a9d551f42 Merge remote-tracking branch 'origin/fix_warnings' into integration_2025_w31 (!3546)
Fix for tun_if.c warning "specified bound 16 equals destination size"
2025-07-28 10:31:55 +02:00
Robert Schmidt
6d6814044a Merge remote-tracking branch 'origin/fix_csi_pdsch_overlap_fix' into integration_2025_w31 (!3537)
Another fix for CSI PDSCH overlap

This follows up !3510 and takes into account starting PRB to determine
even/odd RB
2025-07-28 10:31:32 +02:00
Robert Schmidt
432dbda010 Merge remote-tracking branch 'origin/remove-usim-test' into integration_2025_w31 (!3536)
Remove --usim-test command line option

Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which
does not seem to be correct (the PDCP is in the CU, so it does not make
sense to call it from the MAC which is in the DU).
2025-07-28 10:31:07 +02:00
Robert Schmidt
4b0b0c4f21 Merge remote-tracking branch 'origin/data_recording_app' into integration_2025_w31 (!3462)
Synchronized Real-Time Data Recording Application Addition

The main Features of Synchronized Real-Time Data Recording Application:

- The Data Recording Application runs in parallel to the gNB or UE
  server or in another server as Data Recording or Data Lake Server
- It makes use of (an extended version) of OAI’s T-tracer framework
- It communicates with base station, and user terminal
- It synchronizes and combines data traces and control information
  (meta-data) from Base station and User terminal into consistent SigMF
  data sets

Details on implementation addition:

- T_tracer Extension to Support up to 35 Parameters in the T() macro
- Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation, and Rx Payload bits:

  1. The required memories have been created and initialized in:
     openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
  2. Those memories: memory for DMRS signals, memory for channel
     estimates based on DMRS positions, memory to store slot grid with
     channel coefficients based on DMRS positions after interpolation,
     and memory to store extracted data including PUSCH + DMRS.
  3. The input parameters to nr_pusch_channel_estimation() has been
     updated to get the pointer to the added memories of
     pusch_dmrs_slot_mem and pusch_ch_est_dmrs_pos_slot_mem
     (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h)
  4. The DMRS grid of NR slot and the estimated channel coefficients at
     DMRS locations are logged to created memories in:
     openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
  5. The function inner_rx in
     openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log
     the extracted ULSCH PRBs and the interpolated channel coefficients.
  6. The T-macro() has been called in
     (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added
     traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
     T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL

- Add traces on UE PHY UL and related requirement: Tx Scrambled bits and Tx payload bits

  1. Update input parameters to nr_ulsch_encoding () in
     nr_transport_proto_ue.h to get number_dmrs_symbols to be added to
     meta-data.
  2. In nr_ulsch_coding.c: Trace UE PHY UL Payload TX bits (T_message:
     T_UE_PHY_UL_PAYLOAD_TX_BITS) including related meta-data and UTC
     time.
  3. In nr_ulsch_ue.c: Trace UE PHY UL Scrambled TX bits (T_message:
     T_UE_PHY_UL_SCRAMBLED_TX_BITS) including related meta-data and UTC
     time.
  4. Fix the input prameters in nr_ulsch_encoding () called in
     (openair1/SIMULATION/NR_PHY/ulschsim.c) since a new input parameter
     has been added.

- Add Data Collection Services (T-Tracers for gNB and UE)

  1. Add _tracer_app_gnb and t_tracer_app_ue apps to common/utils/T/tracer/Makefile
  2. Add Data collection Service for gNB: common/utils/T/tracer/t_tracer_app_gnb.c
  3. Add Data Collection Service for UE: common/utils/T/tracer/t_tracer_app_ue.c

- Add Shared memory configuration
  (common/utils/T/tracer/shared_memory_config.h), since we will have too
  much memory consumption on the stack if the T-tracer is not fast
  enough to process the traces or if we have too much traces. As a
  result, tracers start to capture data, write data in shared memory,
  then close the T-Tracer after getting the recording of N slots. The
  Data recording App will read data from the shared memory.

- Add Main app of Data Recording Application v1.0 including: Config
  files, SigMF Interface, Config Interface, Sync Service, and def
  messages: The data recording App includes mainly the following files:

  1. The main app: data_recording_app_v1.0.py that has the data control
     service, interact with tracers, data sync and conversion service.
  2. The configuration file:
     common/utils/data_recording/config/config_data_recording.json
  3. The wireless dictionary file:
     common/utils/data_recording/config/wireless_link_parameter_map.yaml
  4. Config Interface
     (common/utils/data_recording/lib/config_interface.py) that reads
     the configuration for both gNB and UE.
  5. Sync interface (common/utils/data_recording/lib/sync_service.py)
     that sync captured data for gNB and UE before saving them in SigMF
     format
  6. The SigMF Interface
     (common/utils/data_recording/lib/sigmf_interface.py) to store
     recorded data and meta-data in SigMF format
  7. A simple script
     (common/utils/data_recording/sync_validation_demo.py) to validate
     that the recorded bits from gNB and UE are in Sync

- For more info look to doc/data_recording.md
2025-07-28 10:28:07 +02:00
Robert Schmidt
5acf5af574 Merge remote-tracking branch 'origin/fix-ch_mag-vars-type' into integration_2025_w31 (!3324)
Use complex data type for channel magnitude

bad type multi casts with wrong meaning like cast to ** a array of 2D
(wrong in C)
2025-07-28 10:27:35 +02:00
Laurent THOMAS
f835705dd1 fix array sizes and aligment issues in 5G UE dci decoder 2025-07-25 15:49:35 +02:00
francescomani
8f16b02b24 fix tun_if.c warning: specified bound 16 equals destination size 2025-07-25 13:45:34 +02:00
Laurent THOMAS
343b983aa9 fix SIMD tail length in nr_pdcch_detection_mrc() and replace >> operator by / 2025-07-25 10:04:13 +02:00
Laurent THOMAS
b41c9e2e85 move static some functions that are used only in one file 2025-07-25 10:04:13 +02:00
Laurent THOMAS
19d783f6d9 generalize constant nb re per rn in dci_nr.c 2025-07-25 10:04:04 +02:00
Laurent THOMAS
e8f6d14c47 simplify and make more local variables in nr_rx_pdcch() and fix small bugs (size 9 RE instaed of 12 RE) 2025-07-25 10:02:26 +02:00
Laurent THOMAS
b30da5c0b2 reduce size and make local rxdataF_comp in nr_rx_pdcch() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
2c22f49a45 simplify nr_pdcch_channel_compensation() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
3ca12f78e5 simplify function nr_pdcch_extract_rbs_single() 2025-07-25 10:02:26 +02:00
Laurent THOMAS
fffe9531c3 add assert in a case of wrong gNB configuration file 2025-07-25 10:02:26 +02:00
francescomani
c65db568f5 take into account starting PRB when deciding even/odd PRB for CSI PDSCH rate-matching 2025-07-24 19:51:44 +02:00
Sakthivel Velumani
e9d95e8962 Add new physim test cases for nr_dlsim
Following tests are added:
  1. 256QAM with TDL-A channel model
  2. 256QAM with 2 layers
2025-07-24 13:20:07 -04:00
Sakthivel Velumani
dad6cf8dc3 Fix bug in LLR threshold buffer
The LLR threshold buffers hold only for one symbol but the LLRs are
computed for all symbols together. So only the threshold of last symbol
was used for computing LLR for all other symbols.

This commit calls nr_dlsch_llr for each symbol togther with rest of
nr_rx_pdsch() and calls nr_dlsch_layer_demapping at the last symbol.

Fixes issue 948.
2025-07-24 13:20:07 -04:00
Sakthivel Velumani
eb44d715ca Dlsim dump processing buffers
Write extracted rxF buffer to output bin file.
Fix offset in writing rxF buffer.
2025-07-24 13:20:04 -04:00
Sakthivel Velumani
b37cd04134 Set sib1 reception flag as per spec
TS 38.213 4.1 says coreset 0 is present only if kssb < 24 for FR1 and <
12 for FR2. This commit sets get_sib1 flag based on kssb.

Also, setting of mac state is taken out of function nr_ue_decode_mib().
2025-07-24 13:18:04 -04:00
Laurent THOMAS
8dd2119d4e bad type multi casts with wrong meaning like cast to ** a array of 2D (wrong in C) 2025-07-24 13:48:36 +02:00
Laurent THOMAS
3264eca6db enhance llr unitary tests 2025-07-24 13:48:36 +02:00
Laurent THOMAS
f57f6a8d4e factorize code that initialize all 0xff simd vectors 2025-07-24 13:48:36 +02:00
francescomani
d914541838 use CSET0 for common search space in dedicated BWP 2025-07-24 10:47:39 +01:00
luis_pereira87
0aa19da568 CI: Add DedicatedBWP to '40 MHz TDD F1+E1 SA' in 'RAN-SA-B200-Module-SABOX-Container' 2025-07-24 10:47:39 +01:00
luis_pereira87
72d9761698 Remove 'searchspaceid' from 'verify_agg_levels' function because it was used only for LOG 2025-07-24 10:47:39 +01:00
luis_pereira87
7a5d1e55f0 Add a 'common' type SearchSpace in the NR_BWP_DownlinkDedicated IE for DedicatedBWPs to get DCIs decoded in common searchspace of a DedicatedBWP
After RRCSetup, until RRCReconfigurationComplete, gNB continues to schedule ULSCH using DCIs in a common searchspace.
In theory, the UE should decode DCIs in:

            <downlinkBWP-ToAddModList>
                <BWP-Downlink>
                    <bwp-Common>
                        <pdcch-ConfigCommon>
                            <setup>
                                <commonSearchSpaceList>
                                    ...
                                </commonSearchSpaceList>

However, due to the limited amount of time to investigate this issue, the easy way I found to get DCIs decoded in common searchspace of a DedicatedBWP was by adding a common searchspace in the bwp-Dedicated:

                    <bwp-Dedicated>
                        <pdcch-Config>
                            <setup>
                                <searchSpacesToAddModList>
                                    <SearchSpace>
                                        ...
                                    </SearchSpace>
                                </searchSpacesToAddModList>

This way, let's call it a workaround.
2025-07-24 10:47:39 +01:00
luis_pereira87
8c58abf85a Fix fill 'initialDownlinkBWP->pdsch_Config' when there are DedicatedBWPs
This fixes the reported 'RSRP = 0' issue when the UE is in the InitialBWP and we have DedicatedBWPs configured
2025-07-24 10:39:01 +01:00
luis_pereira87
641cf84c0c Improve CORESET selection 2025-07-24 10:39:01 +01:00
luis_pereira87
0ccf1879ae Improve SearchSpace selection
There is a removal of the NR_SearchSpace__searchSpaceType_PR because, at this point, the gNB already selected the searchspace and it calls this function only to find the coreset with controlResourceSetId based on the previously searchspace id selected;
There is no need to send a pointer to the entire searchspace structure because we only need the controlResourceSetId: NR_ControlResourceSetId_t coreset_id = *ss->controlResourceSetId;

It also prevents a segmentation fault, in develop when NR_SearchSpace__searchSpaceType_PR_common because gNB calls sched_ctrl->coreset = get_coreset(nr_mac, scc, bwpd, sched_ctrl->search_space, target_ss); the bwpd is NR_BWP_DownlinkDedicated_t *bwpd = NULL; and is it incompatible with the cast to NR_BWP_Downlink_t in coreset = ((NR_BWP_Downlink_t*)bwp)->bwp_Common->pdcch_ConfigCommon->choice.setup->commonControlResourceSet; this was never noticed until now because gNB barely used NR_SearchSpace__searchSpaceType_PR_common
2025-07-24 10:39:00 +01:00
Jaroslava Fiedlerova
61c769f8b5 Merge branch 'integration_2025_w30' into 'develop'
Integration: `2025.w30`

* !3529 Add CI RFsim5G test for second PDU session
* !3532 Count bits in variable with mask
* !3533 CI: test T2 with DPDK 22.11
* !3535 RAN-Container-Parent: Auto-generate artifact in failure case
* !3542 bugfix: avoid segmentation fault when Redcap tries to connect to gNB
* !3543 rfsimulator: fix model name for channel
* !3540 CI: migrate RFSim4G to acamas machine

See merge request oai/openairinterface5g!3539
2025-07-23 15:13:27 +00:00
Jaroslava Fiedlerova
300060c26e Merge remote-tracking branch 'origin/ci-move-rfsim4g-to-acamas' into integration_2025_w30 (!3540)
CI: migrate RFSim4G to acamas machine
2025-07-23 16:46:21 +02:00
Robert Schmidt
db22e23446 Avoid uninitialized variable btilde
Pre-initialize this variable. It should be set in pucch2x_scrambling(),
but the compiler warns with

    In function ‘pucch2x_modulation’,
        inlined from ‘generate_pucch2x’ at oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:425:3:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:361:18: warning: ‘btilde’ may be used uninitialized [-Wmaybe-uninitialized]
      361 |     d[i] = btilde[i] == 1 ? -amp : amp;
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c: In function ‘generate_pucch2x’:
    oai/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c:387:11: note: ‘btilde’ declared here
      387 |   uint8_t btilde[20];
2025-07-23 12:12:59 +02:00
Robert Schmidt
465d7de5a9 Remove --usim-test command line option
Remove the --usim-test option: to my knowledge, it's not used by users,
and is misleadingly placed in various places where there should not be a
difference w.r.t. USIM configuration.

When making the changes, I assumed that --usim-test would be 0 (the
default), which is the case in all executables when not specified in
options except for the nr_dlsim, nr_pbchsmi, nr_ulsim simulators.

The only exception is the initialization of PDCP from the MAC, which is
not correct (the PDCP is in the CU, so it does not make sense to call it
from the MAC which is in the DU). Instead, always initialize from main,
even in the NSA case (NSA was covered by the incorrect initialization
from MAC).

This in turn let to some more cleanup around function du_rlc_data_req().
After receiving GTP packets at the DU, they were given to the PDCP to
enqueue the packet at RLC. This does not work anymore, since the PDCP is
not initialized; it also does not seem necessary, as this enqueue
functionality is necessary to decouple PDCP and RLC to avoid deadlocks
in monolithic, but in split-mode, this cannot happen. Instead, call
directly into the RLC when receiving GTP packets.
2025-07-23 12:12:59 +02:00
Abdo-Gaber
d619a4e003 Add Readme for the Data Recording Application
It provides and overview about the Architecture, Requirement Packages,
Configuration Files, How to run Data Recording Application, and an
Overview on Collected Data Set.
2025-07-23 11:18:37 +02:00
Abdo-Gaber
8c3e14ead9 Add Data Recording Application v1.0 (main app, SigMF Interface, Config files, Sync validation)
The data recording App includes the following files:
- The main app: data_recording_app_v1.0.py that has the data control service, interact with tracers, and data sync and conversion service
- The configuration file: common/utils/data_recording/config/config_data_recording.json
- The wireless dictionary file: common/utils/data_recording/config/wireless_link_parameter_map.yaml
- The SigMF Interface (common/utils/data_recording/lib/sigmf_interface.py) to store recorded data and meta-data in SigMF format
- A simple script (common/utils/data_recording/sync_validation_demo.py) to validate that the recorded bits from gNB and UE are in Sync
- For more info look to doc/data_recording.md

A squashed commit further updates:
- Enhance Data Recording App structure
- Support the new state machine of T-Tracers
- Add new files for Config Interface, sync Service, def of data recording messages, and common utilties
- Make part of logging on Terminal configurable
2025-07-23 11:18:37 +02:00
Abdo-Gaber
9a9c5c97ef Add Data Collection Services (T-Tracer for gNB and UE)
- Add _tracer_app_gnb and t_tracer_app_ue apps to common/utils/T/tracer/Makefile
- Add Data collection Service for gNB: common/utils/T/tracer/t_tracer_app_gnb.c
- Add Data Collection Service for UE: common/utils/T/tracer/t_tracer_app_ue.c
- Add Shared memory configuration (common/utils/T/tracer/shared_memory_config.h),
  since We will have too much memory consumption on the stack if the
  T-tracer is not fast enough to process the traces or if we have too
  much traces. As a result, tracers start to capture data, write data in
  shared memory, then close the T-Tracer after getting the recording of
  N slots
- Support the operation of : COnfig, Record, and Stop
- Poll from Socket and not use get_events to mitigate long-time waiting
  if there is no data in buffer or the UE is already released or crashed
- Add extra offset to improve data sync
2025-07-23 11:18:37 +02:00
Abdo-Gaber
1a8a100444 Add Trace RX Payload on gNB (msg: GNB_PHY_UL_PAYLOAD_RX_BITS) including UTC time
Log gNB RX Payload for both CRC valid and invalid cases
2025-07-23 11:18:37 +02:00
Abdo-Gaber
e0c5621d60 Add traces on UE PHY UL and related requirement: Tx Scrambled bits and Tx payload bits
- Update input parameters to nr_ulsch_encoding () in
  nr_transport_proto_ue.h to get number_dmrs_symbols to be added to
  meta-data.
- In nr_ulsch_coding.c: Trace UE PHY UL Payload TX bits (T_message:
  T_UE_PHY_UL_PAYLOAD_TX_BITS) including related meta-data and UTC time.
- In nr_ulsch_ue.c: Trace UE PHY UL Scrambled TX bits (T_message:
  T_UE_PHY_UL_SCRAMBLED_TX_BITS) including related meta-data and UTC
  time.
- Fix the input prameters in nr_ulsch_encoding () called in
  (openair1/SIMULATION/NR_PHY/ulschsim.c) since a new input parameter
  has been added.
2025-07-23 11:18:37 +02:00
Abdo-Gaber
8caf326134 Add traces on gNB PHY UL and related requirement: FD PUSH IQ, FD DMRS, and UL Channel estimates wi/wo interpolation
- The required memories have been created and initialized in:
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
- Those memories: memory for DMRS signals, memory for channel estimates
  based on DMRS positions, memory to store slot grid with channel
  coefficients based on DMRS positions after interpolation, and memory
  to store extracted data including PUSCH + DMRS.
- The input parameters to nr_pusch_channel_estimation() has been updated
  to get the pointer to the added memories of pusch_dmrs_slot_mem and
  pusch_ch_est_dmrs_pos_slot_mem
  (openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h)
- The DMRS grid of NR slot and the estimated channel coefficients at
  DMRS locations are logged to created memories in:
  openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
- The function inner_rx in
  openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c is updated to log
  the extracted ULSCH PRBs and the interpolated channel coefficients.
- The T-macro() has been called in
  (openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c) to trace added
  traces: T_GNB_PHY_UL_FD_DMRS, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
  T_GNB_PHY_UL_FD_PUSCH_IQ, T_GNB_PHY_UL_FD_CHAN_EST_DMRS_INTERPL
2025-07-23 11:18:33 +02:00
Jaroslava Fiedlerova
fa9feda58f Merge remote-tracking branch 'origin/rfsim-test-fix' into integration_2025_w30 (!3543)
rfsimulator: fix model name for channel
2025-07-23 11:10:58 +02:00
Jaroslava Fiedlerova
dcdf0d3bb5 Merge remote-tracking branch 'origin/bugfix-RA-Redcap' into integration_2025_w30 (!3542)
bugfix: avoid segmentation fault when Redcap tries to connect to gNB

bugfix: avoid segmentation fault when Redcap tries to connect to gNB
as NR_ServingCellConfig_t scd is NULL when Redcap does RA
2025-07-23 11:10:17 +02:00
Jaroslava Fiedlerova
9f5c58f358 Merge remote-tracking branch 'origin/ci-handle-no-artifact' into integration_2025_w30 (!3535)
RAN-Container-Parent: Auto-generate artifact in failure case

RAN-Container-Parent uses Jenkinsfile-GitLab-Container, which only
triggers sub pipelines, then collects their results. However, if a sub
pipeline did not generate an artifact, the result was skipped. It would
also not show it in the automatically generated result page, when it
should.

Remedy this by automatically generating a file with a link to the
pipeline if the artifact could not be retrieved, which
1. Will give a link, which is easier for developers to follow to the
   pipeline than manually clicking through Jenkins,
2. Makes the failed pipeline appear in the list of failed pipelines.
2025-07-23 11:09:32 +02:00
Jaroslava Fiedlerova
c3cb3c8e91 Merge remote-tracking branch 'origin/ci-t2-dpdk-22.11' into integration_2025_w30 (!3533)
CI: test T2 with DPDK 22.11

Following the upgrade of T2 to the latest firmware, DPDK 22.11 is now required.
This MR updates the testing pipeline to ensure compatibility and deployment of
T2 physims with DPDK 22.11.
2025-07-23 11:08:53 +02:00
Jaroslava Fiedlerova
2ca61b02f1 Merge remote-tracking branch 'origin/count_bits_with_mask' into integration_2025_w30 (!3532)
Count bits in variable with mask

Adding a function to count bit using a mask to set starting and ending point
in the variable
2025-07-23 11:07:49 +02:00
Jaroslava Fiedlerova
b710b7fd8c Merge remote-tracking branch 'origin/test-ci-extra-pdu-session' into integration_2025_w30 (!3529)
Add CI RFsim5G test for second PDU session

after !3486 (merged), check that a second PDU session works with OAi UE by
pinging through it.
2025-07-23 11:06:53 +02:00
Jaroslava Fiedlerova
c5bc949a96 rfsimulator: fix model name for channel
bridge->nb_cnx++ is done before calling snprintf(modelname,... in the function,
so we take the model name of the next channel. This commit corrects the issue by
using bridge->nb_cnx - 1, ensuring that the model name corresponds to the currently
connected client.
This bug was introduced by MR !3455.

Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
Co-authored-by: Laurent THOMAS <laurent.thomas@open-cells.com>
2025-07-22 18:21:03 +02:00
Jaroslava Fiedlerova
3c03e18c23 CI: move RFSim 4G to acamas 2025-07-22 18:17:58 +02:00
Marius Tillner
693dfb9374 bugfix: avoid segmentation fault when Redcap tries to connect to gNB as NR_ServingCellConfig_t scd is NULL when Redcap does RA 2025-07-22 15:51:01 +02:00
Abdo-Gaber
a942e7e5ab Add log tools to get and process UTC Time during data tracing 2025-07-21 14:25:06 +02:00
Abdo-Gaber
e85b38c5c5 Add new trace messages on UE and gNB
GNB_PHY_UL_FD_PUSCH_IQ,
GNB_PHY_UL_FD_DMRS,
GNB_PHY_UL_FD_CHAN_EST_DMRS_POS,
GNB_PHY_UL_PAYLOAD_RX_BITS,
UE_PHY_UL_SCRAMBLED_TX_BITS,
UE_PHY_UL_PAYLOAD_TX_BITS
2025-07-21 14:22:36 +02:00
Abdo-Gaber
b732c6082f T_tracer Extension to Support up to 35 Parameters in the T() macro 2025-07-21 14:22:29 +02:00
Robert Schmidt
b0a099cc15 RAN-Container-Parent: Auto-generate artifact in failure case
RAN-Container-Parent uses Jenkinsfile-GitLab-Container, which only
triggers sub pipelines, then collects their results. However, if a sub
pipeline did not generate an artifact, the result was skipped. It would
also not show it in the automatically generated result page, when it
should.

Remedy this by automatically generating a file with a link to the
pipeline if the artifact could not be retrieved, which

1. Will give a link, which is easier for developers to follow to the
   pipeline than manually clicking through Jenkins,
2. Makes the failed pipeline appear in the list of failed pipelines.
2025-07-21 12:18:07 +02:00
francescomani
f33e5cbf13 use function to count number of dmrs symbols 2025-07-21 09:50:44 +02:00
francescomani
1a2a8bb04f replace get_dmrs_symbols_in_slot with new function (does exactly the same) 2025-07-21 09:50:44 +02:00
francescomani
10112332cc function to count bits with a mask for start and stop 2025-07-21 09:50:40 +02:00
Jaroslava Fiedlerova
0079c4613e CI: change frequency for phytests with USRP N310 2025-07-18 17:04:51 +02:00
Robert Schmidt
c9aa985e23 Verify 2nd PDU session is up 2025-07-18 15:52:45 +02:00
Jaroslava Fiedlerova
47d857c919 CI: test T2 with DPDK 22.11
Build and run OAI physims with DPDK version 22.11 for testing with the latest
T2 firmware release. Environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH
are set to point to the custom installation path of DPDK v22.11.
2025-07-18 13:49:30 +02:00
Robert Schmidt
4490571e03 CI 5G RFsim nFAPI u0/25PRB: Add Ping test on second PDU session 2025-07-17 12:24:12 +02:00
Cedric Roux
c607413eac rfsim: add a T trace to dump RX IQ data
Only for one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
a10420e015 T hacks: add ofdm-plot
Used to... surprise... plot OFDM data as output (or input) by gnb!

Limitation: only one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
17b5941367 T: dump logs to stderr, not stdout
This is a problem with the new tool ant0 when we dump IQ to stdout.
The logs will mess up the recording.
2025-07-11 10:51:59 +02:00
Cedric Roux
4a0d8ce637 rfsim: add a T trace to dump IQ data
Only for one antenna.
2025-07-11 10:51:59 +02:00
Cedric Roux
6a2997ec9b T hacks: add ant0 utility to dump IQ data as float complex
Or as int16.
2025-07-11 10:51:59 +02:00
Sakthivel Velumani
7feaea00c2 Fix counting error bits in nr_dlsim
Recently f buffer was changed to hold packed bits and the correspoinding
change in dlsim was not done so the number of error bits before decoding
was incorrectly reported. This commit fixes it.
2025-07-10 20:44:23 -04:00
Sakthivel Velumani
abe25a52b3 Fix alignment of LLR buffer in UE 2025-07-10 17:36:02 -04:00
3707 changed files with 194259 additions and 138049 deletions

View File

@@ -62,6 +62,7 @@ ForEachMacros:
- BOOST_FOREACH
- RB_FOREACH
- UE_iterator
- FOR_EACH_SEQ_ARR
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'

112
.github/workflows/jenkins-dispatch.yml vendored Normal file
View File

@@ -0,0 +1,112 @@
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:
detect-changes:
runs-on: ubuntu-24.04
if: |
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: 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:
- 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
- name: Remove retrigger-ci label
if: always() && github.event.action == 'labeled' && github.event.label.name == vars.RETRIGGER_CI_LABEL
run: gh pr edit ${{ github.event.pull_request.number }} --remove-label "${{ vars.RETRIGGER_CI_LABEL }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

10
.gitignore vendored
View File

@@ -5,9 +5,9 @@
cmake_targets/log/
cmake_targets/*/build/
cmake_targets/ran_build/
cmake_targets/nas_sim_tools/build/
log/
lte_build_oai/
build*
# IDE files
.vscode
@@ -21,6 +21,14 @@ GRTAGS
GTAGS
tags
# Package conffiles
tools/packages/oai-lte/conffiles
tools/packages/oai-nr/conffiles
tools/packages/liboai-common/conffiles
tools/packages/liboai-usrp/conffiles
# others
nfapi_nr_interface_scf
*.log

View File

@@ -1,6 +1,120 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# RELEASE NOTES: #
## [v2.2.0](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tags/v2.2.0) -> November 2024. ##
## [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
(VRB) 1 accelerators
- Add a taps client for vrtsim real-time simulator (check: vrtsim release?)
- Add new RFemulator virtual radio driver to emulate radio (including noise
generation) for gNB/UE standalone operation
- RLC AM reception improvements for high-throughput scenarios (!3512)
- Small NTN fixes (!3659, !3666, !3581, !3652)
- Improvements to imScope
Stability and bug fixes:
- RFsimulator: fix concurrency problems during multi-client connection
- USRP driver: support synchronization of USRP B200
- MAC scheduler improvements
- General L1 improvements for efficiency and stability
- Correct PRS bug and test in CI
- Upgrade Ubuntu container images to Ubuntu 24.04
- All build system targets compile (`make/ninja all`)
- Minor cleanup, harmonization, and performance improvements all over the stack
- Simplify CI code
RAN changes (gNB/CU/CU-CP/CU-UP/DU/DU-high/DU-low):
- Support of N2 handover
- Support of "UL-heavy" TDD patterns, e.g., DSUUU
- Open Fronthaul M-plane: CM improvements, PM implementation, and additional
v16.01 support
- Improve interoperability with Nvidia Aerial L1 to support 2 layer UL
- Add O-RAN OSC WLS library as FAPI transport and enable L1/L2 shared memory
split
- Implement FAPI Stop exchange
- Improve interoperability with srsRAN_Project DU
- Add new synchronized real-time data recording application (!3462)
- Support for measurement gaps and general handover fixes
- Support of RRC PDU session release procedure
- Add CU-UP load tester
- Correct BWP scheduling and support multiple BWPs per UE
nrUE changes:
- Support one additional PDU session (see !3486)
- L3 measurements for A2 measurement reports
- Support for type0 PDSCH frequency allocation
- UE symbol based PDCCH receiver
Regression or removals:
- No known regressions
- Unused L2 simulator code has been removed
- Unused Benetel radio driver code (not FHI 7.2!) has been removed
Configuration file changes:
- `gNBs.[0].servingCellConfigCommon.[0].ra_ResponseWindow` is automatically
computed and can be removed
- `gNBs.[0].bwp_list` has been added (moved from entries in
`gNBs.[0].servingCellConfigDedicated`)
- `gNBs.[0].phaseTrackingRS` has been added (moved from entries in
`gNBs.[0].servingCellConfigDedicated`)
- `gNBs.[0].local_s_portc` and `gNBs.[0].remote_s_portc` have no effect and
should be removed
- `gNBs.[0].CSI_report_type` has been added
- `MACRLCs.[0].ulsch_max_frame_inactivity` is automatically computed and can be
removed
- `MACRLCs.[0].local_n_portc` and `MACRLCs.[0].remote_n_portc` have no effect and
should be removed
- `MACRLCs.[0].stats_max_ue` has been added
## [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
- Support for NTN LEO scenarios including SIB19 and channel emulation (see
doc/RUNMODEM.md)
- VRTSIM: new shared memory realtime radio (see develop/radio/vrtsim/README.md)
- Support for TDD pattern 2
- Support for long PRACH
- Support for SIB2
- Add unit tests using ctest (see doc/UnitTests.md)
Stability and bug fixes:
- Improve various procedures (e.g., RRC reestablishment, RRC Reject, ...)
- Add improvements for ImScope
- Bugfixes in the entire stack (e.g., #803, #805, #810, #812, #818, #852, #878,
#884, #890, #895, #901, #907, #932, #939 ...)
- Documentation updates
- And many other small fixes, like memory leaks, crashes, ...
RAN changes (gNB/CU/CU-CP/CU-UP/DU/DU-high/DU-low):
- Stability and performance improvements when running with 4-layer DL MIMO
- Stability and performance improvements when running with 2-layer UL MIMO
- Interoperability testing with Metanoia Jura and Foxconn RUs
- Support of O-RAN 7.2 M-plane (Start-up procedure including configuration
management, see also doc/ORAN_FHI7.2_Tutorial.md)
- Upgrade OSC FHI (xran) from E to F release
- Refactoring of LDPC interface and performance improvements
- Support for nFAPI in all scenarios for FR1 (see doc/nfapi.md)
- Support at least 32 UEs concurrently
- Improve robustness when running in split modes (F1, E1)
- Add basic support for beam management in FR2
- Add support for O1 on DU (see also https://gitlab.eurecom.fr/oai/o1-adapter)
- E2 agent: Support for multiple E2SM-RC report service styles
nrUE changes:
- Refactoring of threading towards better code and performance
- Add or rework various procedures (e.g., RA with C-RNTI, Going to Idle, RA, ...)
- Refactor and extend NAS implementation (e.g., Service Request, Registration
Request, Service Acept, Service Reject, ...)
- Support for continuous frequency offset compensation
- Reduce minimum RX-to-TX time to 3
Regression:
- Multiple BWPs do not work reliably on gNB; use tag 2025.w17
## [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))
@@ -56,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.
@@ -83,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
@@ -112,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:
@@ -132,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:
@@ -168,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.

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +1,65 @@
# Contributing to OpenAirInterface #
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Contributing to OpenAirInterface
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
### Signing Commits
To sign commits:
You can also get the verified label on your commits via using [SSH keys or GPG
keys](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
```
# Edit .git/config in the git repository you are working on
# Add the user section
[user]
name = YOUR NAME
email = YOUR EMAIL ADDRESS
# If you use a signing key, use the below configuration instead
[user]
name = YOUR NAME
email = YOUR EMAIL ADDRESS
signingkey = LOCATION OF SSH KEYS or GPG KEY
[gpg]
format = ssh
[commit]
gpgsign = true
```
> **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 OpenAirInterface, you agree that your contributions will be
licensed under the license described in the file [`LICENSE`](./LICENSE) in the
root directory of this source tree.
licensed under
1. [CSSL v1.0 license](LICENSES/preferred/CSSL-v1.0.txt): for RAN and UE
related source code and test scripts
2. [CC-BY-4.0](LICENSES/preferred/CC-BY-4.0.txt): All the documentation
3. [MIT](LICENSES/preferred/MIT.txt): Orchestration (helm-charts, docker
compose)
Certain files are using different licenses; you can read about them in
[NOTICE](NOTICE).

335
LICENSE Executable file → Normal file
View File

@@ -1,200 +1,223 @@
The OpenAirInterface Software Alliance (OSA)
OAI Public License (Version 1.1)
Collaborative Standards Software License v1.0 (CSSL)
LICENSE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION OF OPENAIR 5G SOFTWARE.
LICENSE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION OF
OPENAIRINTERFACE. The pdf version of this document can be downloaded from
https://openairinterface.org/oai-cssl/.
1. Definitions.
1. Definitions.
“License” shall mean the terms and conditions for use, reproduction, and distribution set forth
in this document.
“License” shall mean the terms and conditions for use, reproduction, and
distribution set forth in this document.
“Licensor” shall mean the OpenAirInterface Software Alliance.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union, at the time an acting entity joins the Alliance, of the
acting entity and all other entities that control, are controlled by, or are under common control
with that entity. For the purposes of this definition, “control” means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii)
beneficial ownership of such entity.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by
this License.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including but not
limited to software source code, documentation source, and configuration files.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or translation of
a Source form, including but not limited to compiled object code, generated documentation,
and conversions to other media types.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
OpenAirInterface Software Alliance” shall mean the endowment fund established at the
initiative of Eurecom, an educational and research establishment located at Campus Sophia
Tech, 450 Route des Chappes, 06410 Biot, France, which statutes were signed on 18
November 2014.
Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Work” shall mean the work of authorship, whether in Source or Object form, made available
under the License, as indicated by a copyright notice that is included in or attached to the
work (an example is provided in the Appendix below).
Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
Derivative Works” shall mean any work, whether in Source or Object form, that is based on
(or derived from) the Work and for which the editorial revisions, annotations, elaborations, or
other modifications represent, as a whole, an original work of authorship. For the purposes of
this License, Derivative Works shall not include works that remain separable from, or merely
link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
Contribution” shall mean any work of authorship that is intentionally submitted
to Licensor for inclusion in the Work by the copyright owner or by an individual
or Legal Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, “submitted” means any form of electronic, or
written communication sent to the Licensor or its representatives, including but
not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work but excluding
communication that is conspicuously marked or otherwise designated in writing by
the copyright owner or entity authorized by the copyright owner as "Not a
Contribution."
“Contribution” shall mean any work of authorship that is intentionally submitted to Licensor
for inclusion in the Work by the copyright owner or by an individual or Legal Entity
authorized to submit on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, , or written communication sent to the Licensor or
its representatives, including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by, or on behalf of,
the Licensor for the purpose of discussing and improving the Work
“Contributor License Agreement” shall mean the agreement signed by any
Contributor setting forth the terms and conditions applicable to its
Contribution.
“Contributor License Agreement” shall mean the agreement signed by any Contributor setting
forth the terms and conditions applicable to its Contribution.
“Contributor” shall mean any individual or Legal Entity on behalf of whom a
Contribution has been received by Licensor and subsequently incorporated within
the Work.
“Contributor” shall mean any individual or Legal Entity on behalf of whom a Contribution
has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, publicly display, publicly
perform, and distribute the Work and such Derivative Works in Source or Object form
Subject to the terms and conditions of this License, Licensor and each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, and distribute the Work
and such Derivative Works in Source or Object form.
3. Grant of Patent License.
3. Grant of Patent License.
3.1 Grant of Patent License for study, testing and research purposes:
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made, use, and otherwise
transfer (excluding selling) the Work, solely for study, testing and research purposes, where
such license applies only to those patent claims licensable by Licensor or such Contributor
that are necessarily infringed respectively by the Work and/or the said Contributor
Contribution(s) alone or by combination of their Contribution(s) with the Work to which
such Contribution(s) was submitted (“Essential Patents”).
3.2 Grant of Patent License for purposes other than study and research:
For purposes other than study, testing and research, and subject to the terms and conditions of
this License, You commit to be prepared to negotiate a non-exclusive, non-transferable, non-
assignable license of Essential Patents with each Contributor and/or the Licensor on Fair,
Reasonable and Non-Discriminatory (“FRAND”) terms and conditions for the use of the
Work or Contribution(s) incorporated within the Work.
Licensor and/or each Contributor, by submitting a Contribution, will identify any of its known
Essential Patent it owns related to the Work and/or its Contribution.
Subject to the terms and conditions of this License, Licensor and each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, and otherwise transfer (excluding selling) the
Work, solely for study, testing and research purposes, where such license
applies only to those patent claims licensable by Licensor or such Contributor
that are necessarily infringed respectively by the Work and/or the said
Contributor Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted (“Essential Patents”).
3.2 Grant of Patent License for purposes other than study, testing and research:
For purposes other than study, testing and research, and subject to the terms
and conditions of this License, You commit to be prepared to negotiate, in good
faith, a non-exclusive, nontransferable, non-assignable license of Essential
Patents with each Contributor and/or the Licensor on Fair, Reasonable and
Non-Discriminatory (“FRAND”) terms and conditions for the use of the Work or
Contribution(s) incorporated within the Work.
3.3 Patent Litigation
If You institute patent litigation against any entity making use of the Work solely for study,
testing and research purposes (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct or
contributory patent infringement, then the patent licenses granted to You under section 3.1 of
this License for that Work shall terminate as of the date such litigation is filed.
If You institute patent litigation against any entity making use of the Work
solely for study, testing and research purposes (including a cross-claim or
counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated
within the Work constitutes direct or contributory patent infringement, then the
patent licenses granted to You under section 3.1 of this License for that Work
shall terminate as of the date such litigation is filed.
4. Sublicensing
You may grant sublicenses under the licenses granted under sections 2 and 3.1 provided that
the sublicense is subject to and inclusive of all the terms of and rights under this License to
which the Work is or was distributed by the OpenAirInterface Software Alliance.
You may grant sublicenses under the licenses granted under sections 2 and 3.1
provided that the sublicense is subject to and inclusive of all the terms of and
rights under this License to which the Work is or was distributed.
5. Redistribution
Subject to terms and conditions set forth in sections 2 and 3, You may reproduce and
distribute copies of the Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You meet the following
conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of this
License; and
Subject to terms and conditions set forth in sections 2 and 3, You may reproduce
and distribute copies of the Work or Derivative Works thereof in any medium,
with or without modifications, and in Source or Object form, provided that You
meet the following conditions:
2. You must cause any modified files by You to carry prominent notices stating that You
changed the files; and
1. You must give any other recipients of the Work or Derivative Works a copy of
this License; and
3. You must retain, in the Source form of any Derivative Works that You distribute, all
copyright, patent, trademark, and attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of the Derivative Works; and
2. You must cause any modified files by You to carry prominent notices stating
that You changed the files; and
4. If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative
Works that You distribute must include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not pertain to any part of the
Derivative Works, in at least one of the following places: within a NOTICE text file
distributed as part of the Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of the
NOTICE file are for informational purposes only and do not modify the License. You may
add Your own attribution notices within Derivative Works that You distribute, alongside or as
an addendum to the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or distribution of
Your modifications, or for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with the conditions stated in
this License.
3. You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from the
Source form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
6. Submission of Contributions.
Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be
under the terms and conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of any
separate license agreement such as the Contributor License Agreement You may have
executed with Licensor regarding such Contributions.
4. If the Work includes a “NOTICE” text file as part of its distribution, then
any Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
7. Trademarks.
This License does not grant permission to use the trade names, trademarks, service marks, or
product names of the Licensor, except as required for reasonable and customary use in
describing the origin of the Work and reproducing the content of the NOTICE file.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
8. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and
each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
responsible for determining the appropriateness of using or redistributing the Work and
assume any risks associated with your exercise of permissions under this License.
6. Submission of Contributions.
9. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
agreed to in writing, shall Licensor and any Contributor, as such, be liable to You for
damages, including any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of Your use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage, computer failure or
malfunction, or any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
Any contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above, nothing herein shall
supersede or modify the terms of any separate license agreement such as the
Contributor License Agreement You may have executed with Licensor regarding such
Contributions.
10. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to offer, and
charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations, You may
act only on Your own behalf and on Your sole responsibility, not on behalf of any other
Contributor and/or the Licensor, and only if You agree to indemnify, defend, and hold each
Contributor and/or the Licensor harmless for any liability incurred by, or claims asserted
against, such Contributor and/or Licensor by reason of Your accepting any such warranty or
additional liability.
7. Trademarks.
11. Applicable law.
The present license shall be governed by the laws of France.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
8. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with your exercise of
permissions under this License.
9. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall Licensor and any
Contributor, as such, be liable to You for damages, including any direct,
indirect, special, incidental, or consequential damages of any character arising
as a result of this License or out of Your use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage,
computer failure or malfunction, or any and all other commercial damages or
losses), even if such Contributor has been advised of the possibility of such
damages.
10. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor and/or the Licensor,
and only if You agree to indemnify, defend, and hold each Contributor and/or the
Licensor harmless for any liability incurred by, or claims asserted against,
such Contributor and/or Licensor by reason of Your accepting any such warranty
or additional liability obligations.
END OF TERMS AND CONDITIONS
1. APPENDIX: How to apply the PRESENT OPENAIR 5G License to your work
To apply the present License to your work, attach the following boilerplate notice, with the
fields enclosed by brackets “[]” replaced with your own identifying information. (Dont
include the brackets!) The text should be enclosed in the appropriate comment syntax for the
file format. We also recommend that a file or class name and description of purpose be
included on the same “printed page” as the copyright notice for easier identification within
1. APPENDIX: How to apply the PRESENT License to your work
To apply the present License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets “[]” replaced with your own
identifying information. (Dont include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the License terms and conditions for use, reproduction, and distribution of
OPENAIR 5G software (the “License”);
Licensed under the Standards Software License, version 1.0, terms and conditions
(the “License”); you may not use this file except in compliance with the
License. You may obtain a copy of the License at [URL link]
you may not use this file except in compliance with the License. You may obtain a copy of
the License at
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the
License.
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations
under the License.

View File

@@ -0,0 +1,201 @@
Valid-License-Identifier: OAI-PL-v1.1
URL: https://openairinterface.org/oai-public-license-v1-1/
Usage-Guide:
To use the OAI-PL-v1.1 License put the following text in the header
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this
file except in compliance with the License. You may obtain a copy of the
License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-------------------------------------------------------------------------------
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
License-Text:
OAI Public License (Version 1.1)
LICENSE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION OF OPENAIR 5G SOFTWARE.
1. Definitions.
“License” shall mean the terms and conditions for use, reproduction, and distribution set forth
in this document.
“Licensor” shall mean the OpenAirInterface Software Alliance.
“Legal Entity” shall mean the union, at the time an acting entity joins the Alliance, of the
acting entity and all other entities that control, are controlled by, or are under common control
with that entity. For the purposes of this definition, “control” means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii)
beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by
this License.
“Source” form shall mean the preferred form for making modifications, including but not
limited to software source code, documentation source, and configuration files.
“Object” form shall mean any form resulting from mechanical transformation or translation of
a Source form, including but not limited to compiled object code, generated documentation,
and conversions to other media types.
“OpenAirInterface Software Alliance” shall mean the endowment fund established at the
initiative of Eurecom, an educational and research establishment located at Campus Sophia
Tech, 450 Route des Chappes, 06410 Biot, France, which statutes were signed on 18
November 2014.
“Work” shall mean the work of authorship, whether in Source or Object form, made available
under the License, as indicated by a copyright notice that is included in or attached to the
work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that is based on
(or derived from) the Work and for which the editorial revisions, annotations, elaborations, or
other modifications represent, as a whole, an original work of authorship. For the purposes of
this License, Derivative Works shall not include works that remain separable from, or merely
link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship that is intentionally submitted to Licensor
for inclusion in the Work by the copyright owner or by an individual or Legal Entity
authorized to submit on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, , or written communication sent to the Licensor or
its representatives, including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by, or on behalf of,
the Licensor for the purpose of discussing and improving the Work
“Contributor License Agreement” shall mean the agreement signed by any Contributor setting
forth the terms and conditions applicable to its Contribution.
“Contributor” shall mean any individual or Legal Entity on behalf of whom a Contribution
has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, publicly display, publicly
perform, and distribute the Work and such Derivative Works in Source or Object form
3. Grant of Patent License.
3.1 Grant of Patent License for study, testing and research purposes:
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made, use, and otherwise
transfer (excluding selling) the Work, solely for study, testing and research purposes, where
such license applies only to those patent claims licensable by Licensor or such Contributor
that are necessarily infringed respectively by the Work and/or the said Contributor
Contribution(s) alone or by combination of their Contribution(s) with the Work to which
such Contribution(s) was submitted (“Essential Patents”).
3.2 Grant of Patent License for purposes other than study and research:
For purposes other than study, testing and research, and subject to the terms and conditions of
this License, You commit to be prepared to negotiate a non-exclusive, non-transferable, non-
assignable license of Essential Patents with each Contributor and/or the Licensor on Fair,
Reasonable and Non-Discriminatory (“FRAND”) terms and conditions for the use of the
Work or Contribution(s) incorporated within the Work.
Licensor and/or each Contributor, by submitting a Contribution, will identify any of its known
Essential Patent it owns related to the Work and/or its Contribution.
3.3 Patent Litigation
If You institute patent litigation against any entity making use of the Work solely for study,
testing and research purposes (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct or
contributory patent infringement, then the patent licenses granted to You under section 3.1 of
this License for that Work shall terminate as of the date such litigation is filed.
4. Sublicensing
You may grant sublicenses under the licenses granted under sections 2 and 3.1 provided that
the sublicense is subject to and inclusive of all the terms of and rights under this License to
which the Work is or was distributed by the OpenAirInterface Software Alliance.
5. Redistribution
Subject to terms and conditions set forth in sections 2 and 3, You may reproduce and
distribute copies of the Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You meet the following
conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of this
License; and
2. You must cause any modified files by You to carry prominent notices stating that You
changed the files; and
3. You must retain, in the Source form of any Derivative Works that You distribute, all
copyright, patent, trademark, and attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of the Derivative Works; and
4. If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative
Works that You distribute must include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not pertain to any part of the
Derivative Works, in at least one of the following places: within a NOTICE text file
distributed as part of the Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of the
NOTICE file are for informational purposes only and do not modify the License. You may
add Your own attribution notices within Derivative Works that You distribute, alongside or as
an addendum to the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or distribution of
Your modifications, or for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with the conditions stated in
this License.
6. Submission of Contributions.
Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be
under the terms and conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of any
separate license agreement such as the Contributor License Agreement You may have
executed with Licensor regarding such Contributions.
7. Trademarks.
This License does not grant permission to use the trade names, trademarks, service marks, or
product names of the Licensor, except as required for reasonable and customary use in
describing the origin of the Work and reproducing the content of the NOTICE file.
8. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and
each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
responsible for determining the appropriateness of using or redistributing the Work and
assume any risks associated with your exercise of permissions under this License.
9. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
agreed to in writing, shall Licensor and any Contributor, as such, be liable to You for
damages, including any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of Your use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage, computer failure or
malfunction, or any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
10. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to offer, and
charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations, You may
act only on Your own behalf and on Your sole responsibility, not on behalf of any other
Contributor and/or the Licensor, and only if You agree to indemnify, defend, and hold each
Contributor and/or the Licensor harmless for any liability incurred by, or claims asserted
against, such Contributor and/or Licensor by reason of Your accepting any such warranty or
additional liability.
11. Applicable law.
The present license shall be governed by the laws of France.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,183 @@
Valid-License-Identifier: Apache-2.0
SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
Usage-Guide:
To use the Apache License version 2.0 put the following SPDX tag/value
pair into a comment according to the placement guidelines in the
licensing rules documentation:
SPDX-License-Identifier: Apache-2.0
License-Text:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source,
and configuration files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the
Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as
a whole, an original work of authorship. For the purposes of this License,
Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative
Works thereof.
"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal
Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic,
verbal, or written communication sent to the Licensor or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that
are managed by, or on behalf of, the Licensor for the purpose of discussing
and improving the Work, but excluding communication that is conspicuously
marked or otherwise designated in writing by the copyright owner as "Not a
Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
reproduce, prepare Derivative Works of, publicly display, publicly
perform, sublicense, and distribute the Work and such Derivative Works
in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
this section) patent license to make, have made, use, offer to sell,
sell, import, and otherwise transfer the Work, where such license
applies only to those patent claims licensable by such Contributor that
are necessarily infringed by their Contribution(s) alone or by
combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation
against any entity (including a cross-claim or counterclaim in a
lawsuit) alleging that the Work or a Contribution incorporated within
the Work constitutes direct or contributory patent infringement, then
any patent licenses granted to You under this License for that Work
shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications,
and in Source or Object form, provided that You meet the following
conditions:
a. You must give any other recipients of the Work or Derivative Works a
copy of this License; and
b. You must cause any modified files to carry prominent notices stating
that You changed the files; and
c. You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices
from the Source form of the Work, excluding those notices that do not
pertain to any part of the Derivative Works; and
d. If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained within
such NOTICE file, excluding those notices that do not pertain to any
part of the Derivative Works, in at least one of the following
places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display
generated by the Derivative Works, if and wherever such third-party
notices normally appear. The contents of the NOTICE file are for
informational purposes only and do not modify the License. You may
add Your own attribution notices within Derivative Works that You
distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be
construed as modifying the License.
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated
in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to
the Licensor shall be under the terms and conditions of this License,
without any additional terms or conditions. Notwithstanding the above,
nothing herein shall supersede or modify the terms of any separate
license agreement you may have executed with Licensor regarding such
Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
in writing, Licensor provides the Work (and each Contributor provides
its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied, including, without limitation,
any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your
exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether
in tort (including negligence), contract, or otherwise, unless required
by applicable law (such as deliberate and grossly negligent acts) or
agreed to in writing, shall any Contributor be liable to You for
damages, including any direct, indirect, special, incidental, or
consequential damages of any character arising as a result of this
License or out of the use or inability to use the Work (including but
not limited to damages for loss of goodwill, work stoppage, computer
failure or malfunction, or any and all other commercial damages or
losses), even if such Contributor has been advised of the possibility of
such damages.
9. Accepting Warranty or Additional Liability. While redistributing the
Work or Derivative Works thereof, You may choose to offer, and charge a
fee for, acceptance of support, warranty, indemnity, or other liability
obligations and/or rights consistent with this License. However, in
accepting such obligations, You may act only on Your own behalf and on
Your sole responsibility, not on behalf of any other Contributor, and
only if You agree to indemnify, defend, and hold each Contributor
harmless for any liability incurred by, or claims asserted against, such
Contributor by reason of your accepting any such warranty or additional
liability.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,30 @@
Valid-License-Identifier: BSD-2-Clause
SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html
Usage-Guide:
To use the BSD 2-clause "Simplified" License put the following SPDX
tag/value pair into a comment according to the placement guidelines in
the licensing rules documentation:
SPDX-License-Identifier: BSD-2-Clause
License-Text:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,33 @@
Valid-License-Identifier: BSD-3-Clause
SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html
Usage-Guide:
To use the BSD 3-clause "New" or "Revised" License put the following SPDX
tag/value pair into a comment according to the placement guidelines in
the licensing rules documentation:
SPDX-License-Identifier: BSD-3-Clause
License-Text:
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,404 @@
Valid-License-Identifier: CC-BY-4.0
SPDX-URL: https://spdx.org/licenses/CC-BY-4.0.html
Usage-Guide:
To use the CC-BY-4.0 License put the following SPDX tag/value pair into a
comment according to the placement guidelines in the licensing rules
documentation:
SPDX-License-Identifier: CC-BY-4.0
License-Text:
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@@ -0,0 +1,223 @@
Collaborative Standards Software License v1.0 (CSSL)
LICENSE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION OF
OPENAIRINTERFACE. The pdf version of this document can be downloaded from
https://openairinterface.org/oai-cssl/.
1. Definitions.
“License” shall mean the terms and conditions for use, reproduction, and
distribution set forth in this document.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship that is intentionally submitted
to Licensor for inclusion in the Work by the copyright owner or by an individual
or Legal Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, “submitted” means any form of electronic, or
written communication sent to the Licensor or its representatives, including but
not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work but excluding
communication that is conspicuously marked or otherwise designated in writing by
the copyright owner or entity authorized by the copyright owner as "Not a
Contribution."
“Contributor License Agreement” shall mean the agreement signed by any
Contributor setting forth the terms and conditions applicable to its
Contribution.
“Contributor” shall mean any individual or Legal Entity on behalf of whom a
Contribution has been received by Licensor and subsequently incorporated within
the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, Licensor and each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, and distribute the Work
and such Derivative Works in Source or Object form.
3. Grant of Patent License.
3.1 Grant of Patent License for study, testing and research purposes:
Subject to the terms and conditions of this License, Licensor and each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, and otherwise transfer (excluding selling) the
Work, solely for study, testing and research purposes, where such license
applies only to those patent claims licensable by Licensor or such Contributor
that are necessarily infringed respectively by the Work and/or the said
Contributor Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted (“Essential Patents”).
3.2 Grant of Patent License for purposes other than study, testing and research:
For purposes other than study, testing and research, and subject to the terms
and conditions of this License, You commit to be prepared to negotiate, in good
faith, a non-exclusive, nontransferable, non-assignable license of Essential
Patents with each Contributor and/or the Licensor on Fair, Reasonable and
Non-Discriminatory (“FRAND”) terms and conditions for the use of the Work or
Contribution(s) incorporated within the Work.
3.3 Patent Litigation
If You institute patent litigation against any entity making use of the Work
solely for study, testing and research purposes (including a cross-claim or
counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated
within the Work constitutes direct or contributory patent infringement, then the
patent licenses granted to You under section 3.1 of this License for that Work
shall terminate as of the date such litigation is filed.
4. Sublicensing
You may grant sublicenses under the licenses granted under sections 2 and 3.1
provided that the sublicense is subject to and inclusive of all the terms of and
rights under this License to which the Work is or was distributed.
5. Redistribution
Subject to terms and conditions set forth in sections 2 and 3, You may reproduce
and distribute copies of the Work or Derivative Works thereof in any medium,
with or without modifications, and in Source or Object form, provided that You
meet the following conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of
this License; and
2. You must cause any modified files by You to carry prominent notices stating
that You changed the files; and
3. You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from the
Source form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
4. If the Work includes a “NOTICE” text file as part of its distribution, then
any Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
6. Submission of Contributions.
Any contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above, nothing herein shall
supersede or modify the terms of any separate license agreement such as the
Contributor License Agreement You may have executed with Licensor regarding such
Contributions.
7. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
8. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with your exercise of
permissions under this License.
9. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall Licensor and any
Contributor, as such, be liable to You for damages, including any direct,
indirect, special, incidental, or consequential damages of any character arising
as a result of this License or out of Your use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage,
computer failure or malfunction, or any and all other commercial damages or
losses), even if such Contributor has been advised of the possibility of such
damages.
10. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor and/or the Licensor,
and only if You agree to indemnify, defend, and hold each Contributor and/or the
Licensor harmless for any liability incurred by, or claims asserted against,
such Contributor and/or Licensor by reason of Your accepting any such warranty
or additional liability obligations.
END OF TERMS AND CONDITIONS
1. APPENDIX: How to apply the PRESENT License to your work
To apply the present License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets “[]” replaced with your own
identifying information. (Dont include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Standards Software License, version 1.0, terms and conditions
(the “License”); you may not use this file except in compliance with the
License. You may obtain a copy of the License at [URL link]
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations
under the License.

View File

@@ -0,0 +1,28 @@
Valid-License-Identifier: MIT
SPDX-URL: https://spdx.org/licenses/MIT.html
Usage-Guide:
To use the MIT License put the following SPDX tag/value pair into a
comment according to the placement guidelines in the licensing rules
documentation:
SPDX-License-Identifier: MIT
License-Text:
MIT License
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

94
NOTICE Normal file
View File

@@ -0,0 +1,94 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
The source code is distributed under Collaborative Standards Software License
(CSSL) v1.0. Some files, such as for orchestration, are distributed under MIT
license. Documentation is distributed under Creative Commons Attribution 4.0
International license. All the files without an explicit copyright header have
an implicit "Copyright of OpenAirInterface Authors".
For more details of the license, refer to the `LICENSES` directory for a list
of preferred and exceptionally-applied licenses.
However, the source code also contains third party software that is
acknowledged here for reference.
Credits for source code https://github.com/mouse07410/asn1c:
Github ID mouse07410: BSD-2-Clause License
Credits for https://github.com/simd-everywhere/simde-no-tests.git:
Github ID simd-everywhere: MIT License
Credits for source code common/utils/collection/queue.h:
The Regents of the University of California: BSD 3-Clause Licence
Credits for source code common/utils/collection/tree.h:
Niels Provos provos@citi.umich.edu: BSD 2-Clause Licence
Credits for openair2/UTIL/OPT/packet-rohc.h:
Anders Broman <anders.broman@ericsson.com>: GPL-2.0-or-later
Credits for openair3/NAS/COMMON/milenage.h
Jouni Malinen <j@w1.fi>: BSD 2-Clause License
Credits for source code at:
- openair1/PHY/CODING/crc.h
- openair1/PHY/CODING/crcext.h
- openair1/PHY/CODING/types.h
- openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.c
- openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/nrLDPC_coding_aal.h
Intel Corporation SPDX-License-Identifier: BSD-3-Clause Licence
Credits for source code nFAPI/open-nFAPI:
- Most of the files are from CISCO: Apache 2.0 License
- FAPI/*: CSSL v1.0
- utils/nfapi_hex_parser.c: CSSL v1.0
- nfapi/public_inc/nfapi_common_interface.h: CSSL v1.0
- nfapi/public_inc/nr_nfapi_p7.h: CSSL v1.0
- nfapi/public_inc/fapi_nr_ue_interface.h: CSSL v1.0
Optional software downloaded on demand/if requested by user:
Credits for Yang model radio/fhi_72/mplane/yang/models:
O-RAN Alliance: BSD 3-Clause License
IETF Trust and the persons identified as authors of the code: BSD 2-Clause Licence
Credits for https://github.com/CESNET/libyang:
Czech Educational and Research Network: BSD-3-Clause License
Credits for https://github.com/CESNET/libnetconf2:
Czech Educational and Research Network: BSD-3-Clause License
Credits for https://github.com/google/googletest used for unit test:
Google: BSD 3-Clause License
Credits for https://github.com/google/benchmark used for unit test:
Google: Apache 2.0 License
Credits for https://github.com/google/sanitizers used for the address sanitizer:
Google: Apache 2.0 License
Credits for https://github.com/krallin/tini used for init in containers:
Github ID krallin: MIT License
Credits for https://github.com/EttusResearch/uhd.git:
EttusResearch: GPLv3 License
Credits for https://github.com/mikefarah/yq used for parsing YAML in Docker images:
Github ID mikefarah: MIT License
Credits for https://github.com/intel/pf-bb-config:
Intel: Apache 2.0 License
Credits for https://github.com/Nuand/bladeRF:
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,17 +0,0 @@
The source code of openairinterface5g is distributed under **OAI Public License V1.1**.
For more details of the license, refer to [LICENSE](LICENSE) file in the same directory.
However, the source code also contains third party software that is acknowledged here for reference.
## Credits for source code common/utils/collection/queue.h: ##
The Regents of the University of California: BSD 3-Clause Licence.
## Credits for source code common/utils/collection/tree.h: ##
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
## Credits for source code openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c and nrLDPC_offload.h: ##
Intel Corporation SPDX-License-Identifier: BSD-3-Clause Licence

View File

@@ -1,22 +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-OAI--Public--V1.1-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 41"></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>
@@ -28,18 +27,39 @@
<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)
* [OAI License v1.1 on our website](http://www.openairinterface.org/?page_id=698)
* [CSSL v1.0](http://www.openairinterface.org/?page_id=698)
It is distributed under **OAI Public License V1.1**.
The source code is distributed under [**CSSL v1.0**](LICENSE).
Some files, such as for orchestration, are 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).
The license information is distributed under [LICENSE](LICENSE) file in the same directory.
All the files without an explicit copyright header have an implicit "Copyright
of OpenAirInterface Authors".
Please see [NOTICE](NOTICE.md) file for third party software that is included in the sources.
Please see [NOTICE](NOTICE) for other licenses which are used in the software.
# Where to Start #
In the past OAI source code has been re-licensed sometimes, here is the
history:
1. CSSL v1.0 starting tag 2026.w14
2. OAI Public License v1.1 starting tag v1.0 till af4b0d53
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
* [General overview of documentation](./doc/README.md)
* [The implemented features](./doc/FEATURE_SET.md)
@@ -55,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:
@@ -80,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:
@@ -93,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

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
name: oai-physim
description: A Helm chart for physical simulators network function
@@ -12,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.
@@ -29,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

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
name: oai-physims-4g
description: A Helm subchart for 4G physims network function
@@ -12,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.
@@ -28,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

@@ -1,4 +1,5 @@
{{/* vim: set filetype=mustache: */}}
{{/* SPDX-License-Identifier: MIT */}}
{{/*
Expand the name of the chart.
*/}}

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: batch/v1
kind: Job
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
# Default values for oai-physims-4g
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
kind: ServiceAccount
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
name: oai-physim
description: A Helm chart for physical simulators network function
@@ -12,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.
@@ -29,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

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
name: oai-physims-5g
description: A Helm subchart for 5G physims network function
@@ -12,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.
@@ -28,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

@@ -1,4 +1,5 @@
{{/* vim: set filetype=mustache: */}}
{{/* SPDX-License-Identifier: MIT */}}
{{/*
Expand the name of the chart.
*/}}

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: batch/v1
kind: Job
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
# Default values for oai-physims-5g
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
apiVersion: v1
kind: ServiceAccount
metadata:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: MIT
# Default values for oai-physim.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

203
ci-scripts/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,203 @@
#!/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 ?: 'develop'
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)
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.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}"
}
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: 60, 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: 60, 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}"
}
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,847 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Location of the executor node
def nodeExecutor = params.nodeExecutor
// Tags to shorten pipeline duration
def doBuild = true
def do4Gtest = false
def do5Gtest = false
def do5GUeTest = false
//
def gitCommitAuthorEmailAddr
// list of failing stages
def failingStages = ""
pipeline {
agent {
label nodeExecutor
}
options {
timestamps()
gitLabConnection('OAI GitLab')
ansiColor('xterm')
}
stages {
stage ("Verify Parameters") {
steps {
script {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.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') {
do4Gtest = true
do5Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == "SHORTEN-4G") {
do4Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G') {
do5Gtest = true
} else if (LABEL_CHECK == 'SHORTEN-5G-UE') {
do5GUeTest = true
} else if (LABEL_CHECK == 'SHORTEN-4G-5G-UE') {
do4Gtest = true
do5GUeTest = true
} else if (LABEL_CHECK == 'documentation') {
doBuild = false
} else {
// is "BUILD-ONLY", will only build
}
} else {
do4Gtest = true
do5Gtest = true
}
}
}
}
stage ("Verify Guidelines") {
steps {
echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}"
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}"
} 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'
}
}
}
}
// Build Stages are Mandatory
stage ("Image Building Processes") {
when { expression {doBuild} }
parallel {
stage ("Ubuntu-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu18-Image-Builder', 'Ubuntu-Image-Builder')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += ubuntuBuildStatus
}
}
}
}
stage ("Ubuntu-ARM-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-Ubuntu-ARM-Image-Builder', 'Ubuntu-ARM-Image-Builder')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += ubuntuArmBuildStatus
}
}
}
}
stage ("RHEL-Cluster-Image-Builder") {
steps {
script {
triggerSlaveJob ('RAN-RHEL8-Cluster-Image-Builder', 'RHEL-Cluster-Image-Builder')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += rhelBuildStatus
}
}
}
}
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')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += armBuildStatus
}
}
}
}
}
}
stage ("Image Test Processes") {
when { expression {doBuild} }
parallel {
stage ("PhySim-Cluster-5G") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-Cluster-5G', 'PhySim-Cluster-5G')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += physim5GStatus
}
}
}
}
stage ("PhySim-Cluster-4G") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-PhySim-Cluster-4G', 'PhySim-Cluster-4G')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += physim4GStatus
}
}
}
}
stage ("RF-Sim-Test-4G") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test-4G', 'RF-Sim-Test-4G')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += rfSim4GStatus
}
}
}
}
stage ("RF-Sim-Test-5G") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-RF-Sim-Test-5G', 'RF-Sim-Test-5G')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += rfSim5GStatus
}
}
}
}
stage ("OAI-FLEXRIC-RAN-Integration-Test") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-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
flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += flexricRAN5GStatus
}
}
}
}
stage ("L2-Sim-Test-4G") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-L2-Sim-Test-4G', 'L2-Sim-Test-4G')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += l2Sim4GStatus
}
}
}
}
stage ("LTE-B200-FDD-LTEBOX-Container") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-FDD-LTEBOX-Container', 'LTE-FDD-LTEBOX-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteTDDB200Status
}
}
}
}
// Pipeline to test OAI LTE-UE
stage ("LTE-B200-FDD-OAIUE-OAICN4G-Container") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-FDD-OAIUE-OAICN4G-Container', 'LTE-FDD-OAIUE-OAICN4G-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteFDDB200OAIUEStatus
}
}
}
}
stage ("LTE-B200-TDD-LTEBOX-Container") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-TDD-LTEBOX-Container', 'LTE-TDD-LTEBOX-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteFDDB200Status
}
}
}
}
stage ("NSA-B200-Module-LTEBOX-Container") {
when { expression {do4Gtest || do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-NSA-B200-Module-LTEBOX-Container', 'NSA-B200-Module-LTEBOX-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += nsaTDDB200Status
}
}
}
}
stage ("SA-B200-Module-SABOX-Container") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-B200-Module-SABOX-Container', 'SA-B200-Module-SABOX-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saTDDB200Status
}
}
}
}
stage ("gNB-N300-Timing-Phytest-LDPC") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-gNB-N300-Timing-Phytest-LDPC', 'gNB-N300-Timing-Phytest-LDPC')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += phytestLDPCoffloadStatus
}
}
}
}
stage ("LTE-TDD-2x2-Container") {
when { expression {do4Gtest} }
steps {
script {
triggerSlaveJob ('RAN-LTE-TDD-2x2-Container', 'LTE-TDD-2x2-Container')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += lteTDD2x2N3xxStatus
}
}
}
}
stage ("SA-AW2S-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-AW2S-CN5G', 'SA-AW2S-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
saAW2SStatus = finalizeSlaveJob('RAN-SA-AW2S-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saAW2SStatus
}
}
}
}
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')
}
}
post {
always {
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')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saAERIALStatus
}
}
}
}
stage ("SA-2x2-Module-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-2x2-Module-CN5G', 'SA-2x2-Module-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
saTDD2x2Status = finalizeSlaveJob('RAN-SA-2x2-Module-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saTDD2x2Status
}
}
}
}
stage ("SA-FHI72-CN5G") {
when { expression {do5Gtest} }
steps {
script {
triggerSlaveJob ('RAN-SA-FHI72-CN5G', 'SA-FHI72-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
saFHI72Status = finalizeSlaveJob('RAN-SA-FHI72-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saFHI72Status
}
}
}
}
stage ("SA-OAIUE-CN5G") {
when { expression {do5Gtest || do5GUeTest} }
steps {
script {
triggerSlaveJob ('RAN-SA-OAIUE-CN5G', 'SA-OAIUE-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
saOAIUEStatus = finalizeSlaveJob('RAN-SA-OAIUE-CN5G')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
failingStages += saOAIUEStatus
}
}
}
}
}
}
stage ("DockerHub-Push") {
when { expression {doBuild && "PUSH".equals(env.gitlabActionType)} }
steps {
script {
triggerSlaveJob ('RAN-DockerHub-Push', 'DockerHub-Push')
}
}
post {
failure {
script {
echo "Push to Docker-Hub KO"
currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-DockerHub-Push'
}
}
}
}
}
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 + ")"
}
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 + ")"
}
echo "Pipeline FAILED"
}
}
}
}
// ---- Slave Job functions
def triggerSlaveJob (jobName, gitlabStatusName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave 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
localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
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))
], propagate: false
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"
}
}
}
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 = 'porcepix.sboai.cs.eurecom.fr/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 = 'porcepix.sboai.cs.eurecom.fr/oai-gnb:develop-' + shortenShaOne
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave 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
localStatus = build job: jobName,
parameters: [
string(name: 'FULL_RAN_TAG', value: String.valueOf(fullRanTag))
], propagate: false
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"
}
}
}
def triggerSlaveJobNoGitLab (jobName) {
if ("MERGE".equals(env.gitlabActionType)) {
MR_NUMBER = env.gitlabMergeRequestIid
} else {
MR_NUMBER = 'develop'
}
// Workaround for the "cancelled" GitLab pipeline notification
// The slave 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
localStatus = build job: jobName,
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
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))
], propagate: false
localResult = localStatus.getResult()
echo "${jobName} Slave Job status is ${localResult}"
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "${jobName} Slave Job is OK"
} else {
error "${jobName} Slave Job is KO"
}
}
def finalizeSlaveJob(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
if (jobName == 'OAI-CN5G-COTS-UE-Test') {
fileName = "test_results_oai_cn5g_cots_ue.html"
} else {
fileName = "test_results-${jobName}.html"
}
artifactUrl = BUILD_URL
if (!fileExists(fileName)) {
copyArtifacts(projectName: jobName,
filter: 'test_results*.html',
selector: lastCompleted())
if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
archiveArtifacts artifacts: fileName
// BUILD_URL is like http://server:port/jenkins/job/foo/15/
// no need to add a prefixed '/'
artifactUrl += 'artifact/' + fileName
}
}
artifactUrl = "\n * [${jobName}](${artifactUrl})"
return artifactUrl
}
}

View File

@@ -1,237 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Location of the executor node
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
// 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 eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def directoryExistsGlob(fileNameWithGlob) {
/* if multiple directories match, will join their names and call fileExists() on that */
def dir = sh returnStdout: true, script: 'find . -name \'' + fileNameWithGlob + '\' -type d'
dir = dir.replaceAll("\n", "").trim()
echo "matching '" + fileNameWithGlob + "' found: '" + dir + "'"
if (dir == "")
return false
return fileExists(dir)
}
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
agent {
label pythonExecutor
}
options {
timestamps()
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ('Verify Parameters') {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_IPAddress == null) {
echo "no eNB_IPAddress given"
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
echo "no eNB_SourceCodePath given"
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
echo "no eNB_Credentials given"
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
} else {
echo "no eNB_mergeRequest given - not merging develop"
}
if (params.OC_Credentials == null) {
echo "no OC_Credentials given"
allParametersPresent = false
}
if (params.OC_ProjectName == null) {
echo "no OC_ProjectName given"
allParametersPresent = false
}
if (params.pythonTestXmlFile == null) {
echo "no pythonTestXmlFile given"
allParametersPresent = false
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Deploy and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${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"
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Log Collection") {
steps {
script {
dir ('ci-scripts') {
if (directoryExistsGlob("build_log_*")) {
sh "zip -r -qq build_log_${env.BUILD_ID}.zip build_log_*/*"
sh "rm -rf build_log_*/"
archiveArtifacts artifacts: "build_log_${env.BUILD_ID}.zip"
}
if (directoryExistsGlob("test_log_*")) {
sh "zip -r -qq test_log_${env.BUILD_ID}.zip test_log_*/*"
sh "rm -rf test_log_*/"
archiveArtifacts artifacts: "test_log_${env.BUILD_ID}.zip"
}
if (fileExists("test_results.html")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html"
}
}
}
}
}
}
}

View File

@@ -1,23 +1,6 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
def node = "${params.JenkinsNode}"

View File

@@ -1,240 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Location of the executor node
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
// 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 eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
// Flags
def scmEvent = false
def upstreamEvent = false
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
agent {
label pythonExecutor
}
options {
timestamps()
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ('Verify Parameters') {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
if (params.eNB1_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB1_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB1_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (params.OC_Credentials == null) {
allParametersPresent = false
}
if (params.OC_ProjectName == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Deploy and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Log Collection") {
steps {
script {
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")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html"
}
}
}
}
}
}
}

View File

@@ -1,231 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Location of the executor node
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
// 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 eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
// Flags
def scmEvent = false
def upstreamEvent = false
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
agent {
label pythonExecutor
}
options {
timestamps()
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ('Verify Parameters') {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (params.OC_Credentials == null) {
allParametersPresent = false
}
if (params.OC_ProjectName == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Deploy and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Log Collection") {
steps {
script {
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")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html"
}
}
}
}
}
}
}

View File

@@ -0,0 +1,122 @@
#!/bin/groovy
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
// Location of the python executor node shall be in the same subnet as the others servers
def nodeExecutor = params.nodeExecutor
// SSH URL of the internal git repository
def internalRepoURL = params.internalRepoURL
// Name of the resource
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
pipeline {
agent {
label nodeExecutor
}
options {
ansiColor('xterm')
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.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 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 "oaicicdteam@openairinterface.org"
git config user.name "Duranta Jenkins"
git remote remove internal-repo || true
"""
}
}
stage('Create testing branch for CI') {
steps {
sh """
# Checkout source commit
git checkout -B ${params.branch}
"""
}
}
stage('Push merged branch to internal repository') {
steps {
sh """
git remote add internal-repo ${params.repository} || true
echo "Pushing ${params.branch} to internal repo"
git push --force internal-repo ${params.branch}
"""
}
}
}
}

View File

@@ -1,23 +1,6 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
// Location of the python executor node shall be in the same subnet as the others servers
@@ -31,6 +14,9 @@ if (params.LockResources != null && params.LockResources.trim().length() > 0)
// Docker Hub account to push to
def DH_Account = "oaisoftwarealliance"
// internal registry to use
def OAI_Registry = "gracehopper3-oai.sboai.cs.eurecom.fr"
pipeline {
agent {
label nodeExecutor
@@ -60,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) {
@@ -70,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([
@@ -79,23 +65,25 @@ pipeline {
def listOfImages = ["oai-enb", "oai-gnb", "oai-lte-ue", "oai-nr-ue", "oai-nr-cuup", "oai-gnb-fhi72"]
// Logging in on both registries
sh "docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh "docker login -u oaicicd -p oaicicd ${OAI_Registry} > /dev/null 2>&1"
listOfImages.eachWithIndex { item, iindex ->
sh "docker pull --quiet porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA}"
sh "docker image tag porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:develop"
sh "docker image tag porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/${item}:develop"
sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA}"
if (["oai-gnb", "oai-nr-ue", "oai-nr-cuup"].contains(item)) {
// For images built on AMD64 and ARMv8 Jetson
echo "Pushing image '${item}' for both AMD64 and ARM64 architectures with tags: ${WEEK_TAG} and develop"
sh "docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop || true"
sh "docker buildx imagetools create --tag ${DH_Account}/${item}:${WEEK_TAG} ${OAI_Registry}/${item}:armv8_develop-${WEEK_SHA} ${OAI_Registry}/${item}:develop-${WEEK_SHA}"
sh "docker buildx imagetools create --tag ${DH_Account}/${item}:develop ${OAI_Registry}/${item}:armv8_develop-${WEEK_SHA} ${OAI_Registry}/${item}:develop-${WEEK_SHA}"
} else {
sh "docker pull --quiet ${OAI_Registry}/${item}:develop-${WEEK_SHA}"
sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:develop"
sh "docker image tag ${OAI_Registry}/${item}:develop-${WEEK_SHA} ${DH_Account}/${item}:${WEEK_TAG}"
sh "docker push --quiet ${DH_Account}/${item}:develop"
sh "docker push --quiet ${DH_Account}/${item}:${WEEK_TAG}"
}
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 porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh "docker logout ${OAI_Registry} > /dev/null 2>&1"
sh "docker logout > /dev/null 2>&1"
}
}
@@ -105,7 +93,7 @@ pipeline {
post {
always {
script {
sh "docker logout porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh "docker logout ${OAI_Registry} > /dev/null 2>&1"
sh "docker logout > /dev/null 2>&1"
echo "End of Registry Push"
}

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,292 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Terminate Status
def termENB = 0
def termStatusArray = new Boolean[termENB + 1]
termStatusArray[termENB] = false
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def doEpcLogCollection = true
pipeline {
agent {
label pythonExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
currentBuild.result = 'ABORTED'
error('Stopping early because some parameters are missing')
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Terminate") {
parallel {
stage('Terminate eNB') {
steps {
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
post {
success {
script {
termStatusArray[termENB] = true
}
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
// Making sure that we really shutdown every thing before leaving
failure {
script {
if (!termStatusArray[termENB]) {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
}

View File

@@ -1,286 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
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 eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
pipeline {
agent {
label pythonExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// 2nd eNB parameters
if (params.eNB1_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB1_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB1_Credentials == null) {
allParametersPresent = false
}
// 3rd eNB parameters
if (params.eNB2_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB2_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB2_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Terminate") {
parallel {
stage('Terminate eNB') {
steps {
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}

View File

@@ -1,274 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
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 eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess
def eNB_TargetBranch
//Status fed to the database
def StatusForDb = ""
pipeline {
agent {label pythonExecutor}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// 2nd eNB parameters
if (params.eNB1_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB1_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB1_Credentials == null) {
allParametersPresent = false
}
// 3rd eNB parameters
if (params.eNB2_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB2_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB2_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest!= null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}
post {
always {
script {
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}

View File

@@ -1,303 +0,0 @@
#!/bin/groovy
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
def pythonExecutor = params.pythonExecutor
// Location of the test XML file to be run
def testXMLFile = params.pythonTestXmlFile
def mainPythonAllXmlFiles = ""
def buildStageStatus = true
// Name of the test stage
def testStageName = params.pipelineTestStageName
def lockResources = []
if (params.LockResources != null && params.LockResources.trim().length() > 0)
params.LockResources.trim().split(",").each{lockResources += [resource: it.trim()]}
// Terminate Status
def termUE = 0
def termENB = 1
def termSPGW = 2
def termMME = 3
def termHSS = 4
def termStatusArray = new Boolean[termHSS + 1]
termStatusArray[termUE] = false
termStatusArray[termENB] = false
termStatusArray[termSPGW] = false
termStatusArray[termMME] = false
termStatusArray[termHSS] = false
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
def flexricOption = ""
pipeline {
agent {
label pythonExecutor
}
options {
ansiColor('xterm')
lock(extra: lockResources)
}
stages {
stage("Build Init") {
steps {
// update the build name and description
buildName "${params.eNB_MR}"
buildDescription "Branch : ${params.eNB_Branch}"
}
}
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.LockResources == null) {
echo "no LockResources given"
allParametersPresent = false
}
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) {
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch
} else {
eNB_TargetBranch = 'develop'
}
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
}
}
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 (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else if (eNB_CommitID != 'develop') {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
error "Some parameters are missing"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
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"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
timeout (time: 60, unit: 'MINUTES') {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage ("Terminate") {
parallel {
stage('Terminate eNB') {
steps {
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
post {
success {
script {
termStatusArray[termENB] = true
}
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
sh "sed -i -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}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
// Making sure that we really shutdown every thing before leaving
failure {
script {
if (!termStatusArray[termENB]) {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
}

62
ci-scripts/README.md Normal file
View File

@@ -0,0 +1,62 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
This document outlines how to use the OAI CI framework and gives a quickstart.
[[_TOC_]]
# Quickstart
There is a script `main.py` that
- reads scenario files from XML
- executes the steps (e.g., deployment of CN/gNB/UE, attach, ping, ...)
To simplify, a script `run_locally.sh` can be used to run a single scenario
locally. First, download images for gNB&UE (we assume you already downloaded
the CN) and tag them "latest", which is expected by `run_locally.sh`:
docker pull oaisoftwarealliance/oai-gnb:develop
docker tag oaisoftwarealliance/oai-gnb:develop oai-gnb
docker pull oaisoftwarealliance/oai-nr-ue:develop
docker tag oaisoftwarealliance/oai-nr-ue:develop oai-nr-ue
Now, run the scenario:
cd ~/openairinterface5g/ci-scripts/
./run_locally.sh xml_files/container_5g_rfsim_simple.xml
Output should look like
```
[2025-08-07 18:07:49,631] INFO: ----------------------------------------
[2025-08-07 18:07:49,631] INFO: Creating HTML header
[2025-08-07 18:07:49,631] INFO: ----------------------------------------
[2025-08-07 18:07:49,766] INFO: ----------------------------------------
[2025-08-07 18:07:49,767] INFO: Starting Scenario: xml_files/container_5g_rfsim_simple.xml
[2025-08-07 18:07:49,767] INFO: ----------------------------------------
[2025-08-07 18:07:49,767] INFO: placing all artifacts for this run in /home/richie/oai/cmake_targets/log/container_5g_rfsim_simple.xml.d/
[...]
[2025-08-07 18:07:49,771] INFO: ----------------------------------------
[2025-08-07 18:07:49,771] INFO: Test ID: 1 (#1)
[2025-08-07 18:07:49,771] INFO: Deploy OAI 5G CoreNetwork
[2025-08-07 18:07:49,771] INFO: ----------------------------------------
```
it will run an end-to-end test, connecting one UE to the gNB, and ping, before
undeploying. As shown, logs will be under
`/home/richie/oai/cmake_targets/log/container_5g_rfsim_simple.xml.d/`. The
python code also produces an HTML report in `ci-scripts/test_results.html`.
# Running with local changes
In order to run the tests as above, with local changes, please [build images
locally](../docker/README.md).
It is not yet possible to override an existing image with changes made locally
to a source file and run it directly through the CI framework. However, it is
possible to override an existing image with local changes, and run the scenario
manually following the console logs steps provided above. This is described in
the [5G RFsimulator
README](yaml_files/5g_rfsimulator/README.md#6-running-with-local-changes).

View File

@@ -1,25 +1,7 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
# Python for CI testing
#
# Required Python Version
# Python 3.x
@@ -33,7 +15,6 @@
#-----------------------------------------------------------
import sys # arg
import re # reg
import yaml
import constants as CONST
#-----------------------------------------------------------
@@ -41,13 +22,10 @@ import constants as CONST
#-----------------------------------------------------------
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
py_param_file_present = False
py_params={}
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,CLUSTER):
force_local = False
date_fmt = None
while len(argvs) > 1:
myArgv = argvs.pop(1) # 0th is this file's name
@@ -59,151 +37,52 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
force_local = True
#--apply=<filename> as parameters file, to replace inline parameters
elif re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-Apply=(.+)$', myArgv, re.IGNORECASE)
py_params_file = matchReg.group(1)
with open(py_params_file,'r') as file:
# The FullLoader parameter handles the conversion from YAML
# scalar values to Python dictionary format
py_params = yaml.load(file,Loader=yaml.FullLoader)
py_param_file_present = True #to be removed once validated
#AssignParams(py_params) #to be uncommented once validated
#consider inline parameters
elif re.match(r'^\-\-datefmt=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-datefmt=(.+)$', myArgv, re.IGNORECASE)
date_fmt = matchReg.group(1)
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):
if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBIPAddress=matchReg.group(1)
CONTAINERS.eNBIPAddress=matchReg.group(1)
SCA.eNBIPAddress=matchReg.group(1)
CLUSTER.eNBIPAddress=matchReg.group(1)
elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1IPAddress=matchReg.group(1)
CONTAINERS.eNB1IPAddress=matchReg.group(1)
elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2IPAddress=matchReg.group(1)
CONTAINERS.eNB2IPAddress=matchReg.group(1)
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBUserName=matchReg.group(1)
CONTAINERS.eNBUserName=matchReg.group(1)
SCA.eNBUserName=matchReg.group(1)
CLUSTER.eNBUserName=matchReg.group(1)
elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1UserName=matchReg.group(1)
CONTAINERS.eNB1UserName=matchReg.group(1)
elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2UserName=matchReg.group(1)
CONTAINERS.eNB2UserName=matchReg.group(1)
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
RAN.eNBPassword=matchReg.group(1)
CONTAINERS.eNBPassword=matchReg.group(1)
SCA.eNBPassword=matchReg.group(1)
CLUSTER.eNBPassword=matchReg.group(1)
elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1Password=matchReg.group(1)
CONTAINERS.eNB1Password=matchReg.group(1)
elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2Password=matchReg.group(1)
CONTAINERS.eNB2Password=matchReg.group(1)
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):
matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB1SourceCodePath=matchReg.group(1)
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
RAN.eNB2SourceCodePath=matchReg.group(1)
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
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))
HTML.testXMLfiles.append(matchReg.group(1))
HTML.nbTestXMLfiles=HTML.nbTestXMLfiles+1
elif re.match(r'^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE): # cleanup
print("parameter --UEIPAddress ignored")
elif re.match(r'^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
print("parameter --UEUserName ignored")
elif re.match(r'^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
print("parameter --UEPassword ignored")
elif re.match(r'^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
print("parameter --UESourceCodePath ignored")
elif re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
finalStatus = matchReg.group(1)
@@ -224,9 +103,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
elif re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-OCRegistry=(.+)$', myArgv, re.IGNORECASE)
CLUSTER.OCRegistry = matchReg.group(1)
elif re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
RAN.BuildId = matchReg.group(1)
elif re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match(r'^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
CONTAINERS.flexricTag = matchReg.group(1)
@@ -234,4 +110,4 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
HELP.GenericHelp(CONST.Version)
sys.exit('Invalid Parameter: ' + myArgv)
return py_param_file_present, py_params, mode, force_local
return mode, force_local, date_fmt

View File

@@ -5,7 +5,7 @@
{
#define N_ANTENNA_DL 1
#define N_ANTENNA_UL 1
#define DL_ARFCN 631296
#define DL_ARFCN 627360
#define TDD 1
log_options: "all.level=debug,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",
@@ -46,7 +46,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -61,8 +61,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -76,7 +77,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -91,7 +92,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -106,8 +107,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -121,8 +123,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -136,7 +139,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -151,7 +154,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -166,7 +169,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -181,8 +184,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -196,8 +200,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -211,8 +216,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -226,7 +232,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -241,7 +247,7 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
apn:"oai",
attach_pdn_type:"ipv4",
@@ -256,8 +262,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],
@@ -271,8 +278,9 @@ allow dynamic UE creation from remote API */
"sim_algo":"milenage",
"op": "1006020f0a478bf6b699f15c062e42b3",
as_release: 15,
as_release: 17,
ue_category: "nr",
redcap: "redcap",
apn:"oai",
attach_pdn_type:"ipv4",
default_nssai: [ { sst: 1, }, ],

View File

@@ -44,4 +44,4 @@ rf_driver: {
#endif
tx_gain: 75.0, /* TX gain (in dB) */
rx_gain: 55.0, /* RX gain (in dB) */
rx_gain: 52.0, /* RX gain (in dB) */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +0,0 @@
#!/bin/bash
ue_id="$1" # UE id
duration="$2" # Sim duration
shift
shift
function end
{
exit 0
}
trap end INT TERM
echo "ip netns exec $ue_id $@ > /tmp/test_${ue_id}.log"
ip netns exec $ue_id $@ > /tmp/test_$ue_id.log

177
ci-scripts/attenuatorctl.py Normal file
View File

@@ -0,0 +1,177 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#!/usr/bin/env python3
import argparse
import logging
import itertools
import usb.core
import usb.util
import sys
import time
logging.basicConfig(
level=logging.DEBUG,
stream=sys.stdout,
format="%(message)s"
)
# helper class parsing command line options for channels and attenuators
class ValidateChAtt(argparse.Action):
def _parse_channels(s):
if len(s.split("-")) == 2:
s, e = [int(x) for x in s.split("-")]
chs = [x for x in range(s, e+1)]
if len(chs) == 0:
raise Exception(f"empty range")
elif len(s.split(",")) > 1:
chs = [int(x) for x in s.split(",")]
elif s.isdigit():
chs = [int(s)]
else:
raise Exception(f"could not parse channel expression")
for c in chs:
if not 1 <= c <= 4:
raise Exception(f"channel number must be within [1,4], but have {c}")
return chs
def __call__(self, parse, args, values, option_string=None):
ch, att = values
try:
chs = ValidateChAtt._parse_channels(ch)
except Exception as e:
parse.exit(1, f"while parsing channel expression {ch}: {e}\n")
if not att.isdigit():
parse.exit(1, f'expected number for attenuation, but got {att}\n')
if not 0 <= int(att) <= 63:
parse.exit(1, f'attenuation must be within [0,63], but is {att}\n')
opts = getattr(args, self.dest) or {}
for c in chs:
opts[c] = int(att)
setattr(args, self.dest, opts)
def _parse_args() -> argparse.Namespace:
epilog = '''
[CHs] can have the following forms:
(1) single channel number w (within [1-4])
(2) a range of channels in the form x-y (x <= y)
(3) a list of channels in the form a,b,c
[ATT] must be within [0,63] (dB)
--set and --reach are mutually exclusive
Examples:
- reset all channels to 0: -s 1-4 0
- set channels 3 and 4 to attenuation 60: -s 3,4 60
- perform attenuation sweep during 10s, reaching ch. 1+2 to 60: -r 1,2 60 -d 10
'''
parser = argparse.ArgumentParser(description='Mini-Circuit RC*DAT attenuator controller',
epilog=epilog,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--info', '-i', action='store_true', default=False,
help='Get Infos for all connected Mini-Circuits RC*DAT',)
parser.add_argument('--set', '-s', nargs=2, metavar=("[CHs]","[ATT]"),
action=ValidateChAtt, help="Set a fixed attenuation ATT on channels CHs")
parser.add_argument('--reach', '-r', nargs=2, metavar=("[CHs]","[ATT]"),
action=ValidateChAtt, help="Perform an \"attenuation sweep\": reach attenuation ATT on channels CHs")
parser.add_argument('--duration', '-d', action='store', type=float, default=5.0,
help='DURATION for attenuation sweep to --reach given attenuation (Default: 5)',)
parser.add_argument('--progress', '-p', action='store_true', default=False,
help='If provided, will show progress during attenuation sweep',)
return parser.parse_args()
def _exec(dev, cmd):
dev.write(1, cmd)
ans = dev.read(0x81,64)
# take from ans(wer) while valid bytes
sn = itertools.takewhile(lambda x: x < 255 and x > 0, ans)
# turn bytes into characters and accumulate into string
return "".join(map(chr, sn))
def devId(dev):
return f"{dev.idVendor:04x}:{dev.idProduct:04x}"
def _info(dev):
ident = devId(dev)
SerialN = _exec(dev, "*:SN?")
ModelN = _exec(dev, "*:MN?")
Fw = _exec(dev, "*:FIRMWARE?")
logging.info(f'{ident}: model is {ModelN}')
logging.info(f'{ident}: serial number is {SerialN}')
logging.info(f'{ident}: FW version is {Fw}')
def _get_attenuation(dev):
ident = devId(dev)
att = _exec(dev, "*:ATT?")
# remove leading "*" and split by channels
return [float(n) for n in att[1:].split(" ")]
def _set_attenuation(dev, ch_att):
ident = devId(dev)
for ch, att in ch_att:
#logging.debug(f"{ident}: Set attenuation channel {ch}: {att} dB")
att = round(4 * att) / 4 # round to closest 0.25dB
resp = _exec(dev, f"*:CHAN:{ch}:SETATT:{att};" )
def _continuous_set_attenuation(dev, ch_att_end, duration, show_progress=False, step_duration=0.25):
ident = devId(dev)
current = _get_attenuation(dev)
steps = duration / step_duration
ch_att_step = [(ch, (att_end - current[ch - 1]) / steps) for ch, att_end in ch_att_end]
logging.info(f"{ident}: sweep attenuation during {duration} s in {steps} steps: increments {ch_att_step}")
for i in range(1, int(steps)+1):
next_att = [(ch, current[ch - 1] + i * att_step) for ch, att_step in ch_att_step]
_set_attenuation(dev, next_att)
if show_progress:
logging.debug(f"{ident}: attenuation for channel(s): {next_att}")
time.sleep(step_duration)
_set_attenuation(dev, ch_att_end)
def _get_usb_devs(idVendor, idProduct):
devs = []
for dev in usb.core.find(idVendor=idVendor, idProduct=idProduct, find_all=True):
for configuration in dev:
for interface in configuration:
ifnum = interface.bInterfaceNumber
if not dev.is_kernel_driver_active(ifnum):
continue
try:
dev.detach_kernel_driver(ifnum)
except e:
pass
devs.append(dev)
return devs
if __name__ == '__main__':
# Parse the arguments
args = _parse_args()
if args.set and args.reach:
logging.error("--set and --reach are mutually exclusive")
sys.exit(1)
# 20ce:0023 is Mini-Circuit RC*DAT device
devs = _get_usb_devs(idVendor=0x20ce, idProduct=0x0023)
if len(devs) == 0:
logging.error('no Mini-Circuits RC*DAT device detected')
sys.exit(-1)
if len(devs) > 1:
logging.error('more than one Mini-Circuits RC*DAT device detected')
sys.exit(-1)
dev = devs[0]
if args.info:
_info(dev)
if args.set:
_set_attenuation(dev, [(k,v) for k,v in args.set.items()])
if args.reach:
_continuous_set_attenuation(dev, [(k,v) for k,v in args.reach.items()], args.duration, args.progress)
ident = devId(dev)
for i, a in enumerate(_get_attenuation(dev)):
logging.info(f"{ident}: Attenuation channel {i+1}: {a} dB")
sys.exit(0)

View File

@@ -1,28 +1,8 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
function usage {
echo "OAI Warning Check script"
echo " Original Author: Raphael Defosseux"
echo ""
echo "Usage:"
echo "------"

View File

@@ -1,28 +1,8 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
function usage {
echo "OAI Coding / Formatting Guideline Check script"
echo " Original Author: Raphael Defosseux"
echo ""
echo " By default (no options) the complete repository will be checked"
echo " In case of merge request, provided source and target branch,"
@@ -72,11 +52,12 @@ then
for FILE in $LIST_OF_FILES_W_BANNER
do
IS_NFAPI=`echo $FILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FILE || true`
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 "MIT License" $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
@@ -183,11 +164,12 @@ do
if [ $IS_BANNER -ne 0 ]
then
IS_NFAPI=`echo $FULLFILE | grep -E -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true`
IS_OAI_LICENCE_PRESENT=`grep -E -c "OAI Public License" $FULLFILE || true`
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 "MIT License" $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,135 +0,0 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
function usage {
echo "OAI GitLab merge request applying script"
echo " Original Author: Raphael Defosseux"
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

@@ -1,4 +1,5 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
usage() {
echo "usage: $0 <command> <id>"

View File

@@ -1,22 +1,5 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Required Python Version

View File

@@ -5,10 +5,20 @@ idefix:
AttachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 wup
DetachScript: sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 detach
NetworkScript: ip a show dev wwan0
#Tracing:
# Start: 'sudo rm -f ci_qlog/*; nohup sudo -b QLog/QLog -s ci_qlog -f NR5G.cfg &'
# Stop: 'sudo killall QLog'
# Collect: 'sudo mv ci_qlog/* %%log_dir%%/'
IF: wwan0
MTU: 1500
raspix:
Host: raspix
AttachScript: sudo /opt/mbim_scripts/start_quectel_mbim.sh
DetachScript: sudo /opt/mbim_scripts/stop_quectel_mbim.sh
NetworkScript: ip a show dev wwan0
IF: wwan0
MTU: 1500
Trace: True
LogStore: /media/usb-drive/ci_qlogs
up2:
Host: up2
@@ -34,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
@@ -46,7 +64,6 @@ adb_ue_1:
NetworkScript: adb -s R3CM40LZPHT shell "ip address show | grep rmnet_data0"
CmdPrefix: adb -s R3CM40LZPHT shell
MTU: 1500
LogStore: /media/usb-drive/ci_adb_1-logs
adb_ue_2:
Host: nano
InitScript: /home/oaicicd/ci_ctl_adb.sh initialize 5200c00db4413517
@@ -59,7 +76,6 @@ adb_ue_2:
NetworkScript: adb -s 5200c00db4413517 shell "ip address show | grep rmnet"
CmdPrefix: adb -s 5200c00db4413517 shell
MTU: 1500
LogStore: /media/usb-drive/ci_adb_2-logs
oc-cn5g:
Host: avra
@@ -71,11 +87,27 @@ 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
NetworkScript: echo "inet 172.21.6.111"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ho"
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ho"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-ho %%log_dir%%"
oc-cn5g-20897-aerial:
Host: gracehopper1-oai
@@ -85,6 +117,27 @@ oc-cn5g-20897-aerial:
Undeploy: "! scripts/oc-cn5g-undeploy.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial"
LogCollect: "! scripts/oc-cn5g-logcollect.sh /opt/oai-cn5g-fed-develop-2025-jan oaicicd-core-for-nvidia-aerial %%log_dir%%"
oc-cn5g-00104:
Host: gracehopper1-oai
NetworkScript: echo "inet 172.21.6.105"
RunIperf3Server: False
Deploy: "! scripts/oc-cn5g-deploy.sh /opt/oai-cn5g-fed-develop-00104 oaicicd-core-for-nvidia-aerial"
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
@@ -119,7 +172,7 @@ ltebox-nano:
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
- "sleep 1"
- "sleep 2"
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
@@ -130,7 +183,7 @@ sabox-nepes:
- "sudo su -c 'screen -dm -S simulated_5g_hss /opt/hss_sim0609/start_5g_hss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_sabox < /dev/null &> /dev/null"
- "sleep 1"
- "sleep 2"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{amfLog.0,ngapcLog.0,ngapcommonLog.0,ngapsLog.0,xGwLog.0,upfLog.0} %%log_dir%%"
Undeploy: "sudo /opt/ltebox/tools/stop_sabox; sudo killall screen"
@@ -141,24 +194,34 @@ ltebox-nepes:
- "sudo su -c 'screen -dm -S simulated_hss /opt/hss_sim0609/starthss'"
- "sleep 1"
- "sudo /opt/ltebox/tools/start_mme && sudo /opt/ltebox/tools/start_xGw &"
- "sleep 1"
- "sleep 2"
Undeploy: "sudo /opt/ltebox/tools/stop_xGw; sudo /opt/ltebox/tools/stop_mme; sudo killall screen"
LogCollect: "cp /opt/hss_sim0609/hss.log /opt/ltebox/var/log/{mmeLog.0,s1apcLog.0,s1apsLog.0,s11cLog.0,libLog.0,xGwLog.0} %%log_dir%%"
amarisoft_ue:
Host: amariue
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue/aw2s-multi-00102-20.cfg &
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_20MHz_redcap/aw2s-multi-00102-20.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_2x2:
Host: amariue
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_aw2s_asue_2x2/aw2s-multi-00102-2x2-v2.cfg &
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_ue_fhi72:
amarisoft_00105_40MHz:
Host: amariue
InitScript: /root/lteue-linux-2025-03-15/lteue /root/oaicicd/ran_sa_fhi72_asue_2x2_benetel550/fhi72-multi-20897-2x2.cfg &
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
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
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}'
@@ -280,6 +343,14 @@ oai_ue_caracal:
IF: oaitun_ue1
MTU: 1500
oai_ue_jetson2:
Host: jetson2-oai
AttachScript: 'docker start oai-nr-ue'
DetachScript: 'docker stop oai-nr-ue'
NetworkScript: ip a show dev oaitun_ue1
IF: oaitun_ue1
MTU: 1500
lte_oai_ue_carabe:
Host: carabe
NetworkScript: docker exec lte-b200-ue-fdd-10Mhz-tm1 ip a show dev oaitun_ue1
@@ -301,6 +372,15 @@ rfsim5g_ue:
AttachScript: docker start rfsim5g-oai-nr-ue
DetachScript: docker stop rfsim5g-oai-nr-ue
MTU: 1500
# for tests with second PDU session ID 2, needs to match requested PDU session name
rfsim5g_ue_pdu_2:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1p2
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue1p2
AttachScript: docker start rfsim5g-oai-nr-ue
DetachScript: docker stop rfsim5g-oai-nr-ue
MTU: 1500
rfsim5g_ue2:
Host: "%%current_host%%"
@@ -442,3 +522,93 @@ l2sim4g_ext_dn:
Host: "%%current_host%%"
NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0
CmdPrefix: docker exec l2sim4g-trf-gen
rfsim5g_multiue1:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue1
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue1
AttachScript: docker start rfsim5g-oai-nr-ue
DetachScript: docker stop rfsim5g-oai-nr-ue
MTU: 1500
rfsim5g_multiue2:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue2
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue2
AttachScript: true
DetachScript: true
MTU: 1500
rfsim5g_multiue3:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue3
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue3
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue4:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue4
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue4
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue5:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue5
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue5
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue6:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue6
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue6
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue7:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue7
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue7
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue8:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue8
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue8
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue9:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue9
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue9
AttachScript: "true"
DetachScript: "true"
MTU: 1500
rfsim5g_multiue10:
Host: "%%current_host%%"
NetworkScript: docker exec rfsim5g-oai-nr-ue ip a show dev oaitun_ue10
CmdPrefix: docker exec rfsim5g-oai-nr-ue
IF: oaitun_ue10
AttachScript: "true"
DetachScript: "true"
MTU: 1500

View File

@@ -1,90 +1,36 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
import re
import os
import logging
import yaml
import signal
import xml.etree.ElementTree as ET
import json
# Define the mapping of physim_test values to search patterns
PHYSIM_PATTERN_MAPPING = {
'nr_ulsim': [
r'(Total PHY proc rx)\s+(\d+\.\d+)\s+us', # Pattern for RX PHY processing time
r'(ULSCH total decoding time)\s+(\d+\.\d+)\s+us', # Pattern for ULSCH decoding time
],
'nr_dlsim': [
r'(PHY proc tx)\s+(\d+\.\d+)\s+us', # Pattern for TX PHY processing time
r'(DLSCH encoding time)\s+(\d+\.\d+)\s+us', # Pattern for DLSCH encoding time
],
'ldpctest': [
r'(Encoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for encoding time mean
r'(Decoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for decoding time mean
],
}
# Define test conditions based on the simulation type
PHYSIM_TEST_CONDITION = {
'nr_ulsim': 'test OK', # For nr_ulsim, check if 'test OK' is present
'nr_dlsim': 'test OK', # For nr_dlsim, check if 'test OK' is present
'ldpctest': None, # No condition for ldpctest, just process the patterns
}
import importlib, inspect
class Analysis():
def analyze_physim(log, physim_test, options, threshold):
search_patterns = PHYSIM_PATTERN_MAPPING.get(physim_test)
test_condition = PHYSIM_TEST_CONDITION.get(physim_test)
success = False
msg = ''
def _get_test_description(properties):
env_vars = None
for p in properties:
if p["name"] == "ENVIRONMENT":
env_vars = p["value"] # save for later if no custom property
if p["name"] == "TEST_DESCRIPTION":
return p["value"]
# if we came till here, it means there is no custom test property
# saved in JSON. See if we have a description in environment variables
if not env_vars:
return "<none>"
for ev in env_vars:
name, value = ev.split("=", 1)
if name == "TEST_DESCRIPTION":
return value
return "<none>"
try:
with open(log, 'r') as f:
log_content = f.read()
except FileNotFoundError as e:
msg = f'{log} file not found, exception: {e}'
return False, msg
except Exception as e:
msg = f'Error while parsing log file {log}: exception: {e}'
return False, msg
if test_condition and test_condition not in log_content:
msg = f"Test did not succeed, '{test_condition}' not found in log file {log}."
return False, msg
time1_match = re.search(search_patterns[0], log_content)
time2_match = re.search(search_patterns[1], log_content)
if not(time1_match and time2_match):
msg = f"Processing time not found in log file {log}."
return False, msg
success = float(time2_match.group(2)) < float(threshold)
if success:
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us'
else:
msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us exceeds a limit of {threshold} us'
return success,msg
def analyze_oc_physim(result_junit, details_json):
def analyze_physim(result_junit, details_json, logPath):
try:
tree = ET.parse(result_junit)
root = tree.getroot()
@@ -116,7 +62,7 @@ class Analysis():
for test in root: # for each test
test_name = test.attrib["name"]
test_exec = json_test_desc[test_name]["properties"][1]["value"][0]
desc = json_test_desc[test_name]["properties"][1]["value"][1]
desc = Analysis._get_test_description(json_test_desc[test_name]["properties"])
# get runtime and checks
test_check = test.attrib["status"] == "run"
time = round(float(test.attrib["time"]), 1)
@@ -124,18 +70,21 @@ class Analysis():
output = test.findtext("system-out")
output_check = "exceeds the threshold" not in output
# collect logs
log_dir = f'../cmake_targets/log/{test_exec}'
log_dir = f'{logPath}/{test_exec}'
os.makedirs(log_dir, exist_ok=True)
with open(f'{log_dir}/{test_name}.log', 'w') as f:
f.write(output)
# prepare result and info
info = f"Runtime: {f'{time:.3f}'[:5]} s"
resultstr = 'PASS' if (test_check and time_check and output_check) else 'FAIL'
info = f"{test_name}.log: test {resultstr}"
for l in output.splitlines():
if l.startswith("CHECK "):
info += f"\n{l}"
if test_check:
if not output_check:
info += " Test log exceeds maximal allowed length 100 kB"
info += "\nTest log exceeds maximal allowed length 100 kB"
if not time_check:
info += " Test exceeds 150s"
info += "\nTest exceeds 150s"
if not (time_check and output_check):
nb_failed += 1 # time threshold/output length error, not counted for by ctest as of now
test_result[test_name] = [desc, info, resultstr]
@@ -145,3 +94,134 @@ class Analysis():
test_summary['Nbpass'] = nb_tests - nb_failed
test_summary['Nbfail'] = nb_failed
return nb_failed == 0, test_summary, test_result
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 stat_files:
with open(sf, 'r') as f:
for line in f.readlines():
for k in rt_keys:
result = re.search(k, line)
if result is not None:
tmp = re.match(rf'^.*?(\b{k}\b.*)', line.rstrip())
if tmp is not None:
real_time_stats[k] = tmp.group(1)
# datalog_rt_stats format must align with HTML.CreateHtmlDataLogTable()
datalog_rt_stats['Data']={}
for k in real_time_stats:
tmp = re.match(r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+(?P<count>\d+);\s+(?P<max>\d+\.\d+) us;', real_time_stats[k])
if tmp is not None:
metric = tmp.group('metric')
avg = float(tmp.group('avg'))
max = float(tmp.group('max'))
count = int(tmp.group('count'))
datalog_rt_stats['Data'][metric] = ["{:.0f}".format(avg),"{:.0f}".format(max),"{:d}".format(count),"{:.2f}".format(avg / datalog_rt_stats['Ref'][metric])]
success = True
for k in datalog_rt_stats['Data']:
valnorm = float(datalog_rt_stats['Data'][k][3])
dev = datalog_rt_stats['DeviationThreshold'][k]
if valnorm > 1.0 + dev or valnorm < 1.0 - dev: # condition for fail: avg/ref deviates by more than "deviation threshold"
logging.debug(f'\u001B[1;30;43m normalized metric {k}={valnorm} deviates by more than {dev}\u001B[0m')
success = False
return success, datalog_rt_stats
# returns tuple of (service, analyzer, option string)
def _lookupServiceAnalyzerOpt(s, analyzers):
res = s.split("=", 2)
name = res[0]
if len(res) == 1:
return res[0], analyzers["Default"], None
opt = res[2] if len(res) > 2 else None
func = res[1]
a = analyzers[func] if func in analyzers else None
return name, a, opt
# groups requested service analysis (service=func[=option]) on per service
# basis and looks up analyzer func. If log analysis is requested, will always
# run Default log analysis
def _groupServices(to_analyze):
req_analysis = {}
# get content of cls_loganalysis module, then get all analyzers (classes) in this module
mod = importlib.import_module("cls_loganalysis")
analyzers = {name:cl for name, cl in inspect.getmembers(mod, inspect.isclass)}
for req in to_analyze:
s, func, opt = _lookupServiceAnalyzerOpt(req, analyzers)
logging.debug(f"requested check '{req}' => service {s}, function {func.__name__}, options '{opt}'")
# always put default analyzer first
l = req_analysis[s] if s in req_analysis else [(analyzers["Default"], None, "default")]
if func is not analyzers["Default"]:
l.append((func, opt, req))
req_analysis[s] = l
return req_analysis
def _describe_exit_code(code):
if code > 128:
sig = code - 128
try:
return f"terminated by signal {sig} ({signal.Signals(sig).name})"
except ValueError:
return f"terminated by unknown signal {sig}"
else:
return f"custom exit code"
def AnalyzeServices(HTML, service_desc, to_analyze):
success = True
# hack: we want to give as a description "log analysis", but the description
# is set outside, so retain what was set before
orig_html_desc = HTML.desc
# group analysis on a per-service basis, then iterate
for serv, list_analysis in _groupServices(to_analyze).items():
HTML.desc = f"Log analysis for service {serv}"
if serv not in service_desc:
success = False
logging.error(f"requested service {serv} not in list of services")
HTML.CreateHtmlTestRowQueue("N/A", 'KO', ["service not detected"])
continue
# pre-initialize with return code
rc = service_desc[serv]["returncode"]
logging.info(f"analyze service {serv}: return code {rc}")
service_success = True # TODO rc == 0: too many functions (eNB, lteUE, RIC, nrUE) fail non-zero
logs = []
if rc != 0:
logs.append(f"=> return code {rc}, likely " + _describe_exit_code(rc) + " [ignored by CI]")
# skip if the file is too big
logfile = service_desc[serv]["logfile"]
filename = os.path.basename(logfile)
b = os.path.getsize(logfile)
logging.debug(f"using logfile {logfile} of size {b} bytes")
if b > 10 * 1024 * 1024:
success = False
logs.append(f"logfile too big (>10MB)")
logging.error(logs)
HTML.CreateHtmlTestRowQueue(filename, 'KO', ["\n".join(logs)])
continue
# run each analyzer with its options on the logfile
for (func, opt, desc) in list_analysis:
if func is None:
service_success = False
logging.error(f"request analysis function for desc {desc} not found")
HTML.CreateHtmlTestRowQueue(serv, 'KO', [f"no analysis function for {desc}"])
continue
result, l = func.run(logfile, opt)
logging.info(f"service {serv}: analysis with func {func}, result {result}, logs '{l}'")
service_success = service_success and result
if not result:
logs.append(f"=> {func.__name__} check (options '{opt}') FAILED")
logs.append(l)
logs = '\n'.join(logs)
if not service_success:
logging.error(l)
else:
logging.info(l)
all_funcs = ", ".join([f.__name__ for (f, _, _) in list_analysis])
HTML.CreateHtmlTestRowQueue(f"Check {all_funcs} on {filename}", 'OK' if service_success else 'KO', [logs])
success = success and service_success
HTML.desc = orig_html_desc
return success

View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
import os
from typing import NamedTuple
import logging
class TestCaseCtx(NamedTuple):
test_idx: int
logPath: str
def Default(logPath):
return TestCaseCtx(112233, logPath)
def baseFilename(self):
# typically, the test ID is of form 001234 (6 digits)
return f"{self.logPath}/{self.test_idx:06d}"
def archiveArtifact(cmd, ctx, remote_path):
base = os.path.basename(remote_path)
local = f"{ctx.baseFilename()}-{base}"
logging.info(f"Archive artifact '{local}'")
success = cmd.copyin(remote_path, local)
if success:
cmd.run(f'rm {remote_path}', silent=True)
return local if success else None

View File

@@ -1,23 +1,5 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Required Python Version
@@ -34,11 +16,11 @@ import time
import os
import cls_oai_html
import cls_analysis
import constants as CONST
import helpreadme as HELP
import cls_containerize
import cls_cmd
from cls_ci_helper import archiveArtifact
IMAGE_REGISTRY_SERVICE_NAME = "image-registry.openshift-image-registry.svc"
NAMESPACE = "oaicicd-ran"
@@ -68,19 +50,16 @@ def OC_logout(cmd):
class Cluster:
def __init__(self):
self.eNBIPAddress = ""
self.eNBSourceCodePath = ""
self.forcedWorkspaceCleanup = False
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):
@@ -121,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}")
@@ -164,27 +143,8 @@ class Cluster:
return -1
return int(result.group("size"))
def _deploy_pod(self, filename, timeout = 120):
ret = self.cmd.run(f'oc create -f {filename}')
result = re.search(r'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
if result is None:
logging.error(f'could not deploy pod: {ret.stdout}')
return None
pod = result.group("pod")
logging.debug(f'checking if pod {pod} is in Running state')
ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True)
if ret.returncode == 0:
return pod
logging.error(f'pod {pod} did not reach Running state')
self._undeploy_pod(filename)
return None
def _undeploy_pod(self, filename):
self.cmd.run(f'oc delete -f {filename}')
def PullClusterImage(self, HTML, node, images, tag_prefix):
logging.debug(f'Pull OC image {images} to server {node}')
self.testCase_id = HTML.testCase_id
with cls_cmd.getConnection(node) as cmd:
succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
if not succeeded:
@@ -196,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)
@@ -207,14 +167,18 @@ class Cluster:
HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
return success
def BuildClusterImage(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
def _retrieveOCLog(self, ctx, job, lSourcePath, image):
fn = f'{lSourcePath}/cmake_targets/log/{image}.log'
self.cmd.run(f'oc logs {job} &> {fn}')
return (image, archiveArtifact(self.cmd, ctx, fn))
def BuildClusterImage(self, ctx, node, HTML):
if self.repository == '' or self.branch == '':
HELP.GenericHelp(CONST.Version)
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {ranBranch} ranCommitID {self.ranCommitID}')
lIpAddr = self.eNBIPAddress
lSourcePath = self.eNBSourceCodePath
if lIpAddr == '' or lSourcePath == '':
raise ValueError('Insufficient Parameter: eNBSourceCodePath missing')
raise ValueError(f'Insufficient Parameter: repository {self.repository} branch {self.branch}')
lSourcePath = self.workspace
if node == '' or lSourcePath == '':
raise ValueError('Insufficient Parameter: workspace missing')
ocUserName = self.OCUserName
ocPassword = self.OCPassword
ocProjectName = self.OCProjectName
@@ -224,10 +188,8 @@ class Cluster:
if self.OCRegistry.startswith("http") or self.OCRegistry.endswith("/"):
raise ValueError(f'ocRegistry {self.OCRegistry} should not start with http:// or https:// and not end on a slash /')
logging.debug(f'Building on cluster triggered from server: {lIpAddr}')
self.cmd = cls_cmd.RemoteCmd(lIpAddr)
self.testCase_id = HTML.testCase_id
logging.debug(f'Building on cluster triggered from server: {node}')
self.cmd = cls_cmd.RemoteCmd(node)
# Workaround for some servers, we need to erase completely the workspace
self.cmd.cd(lSourcePath)
@@ -237,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
@@ -280,124 +242,45 @@ class Cluster:
self._recreate_entitlements()
status = True # flag to abandon compiling if any image fails
attemptedImages = []
log_files = []
build_metrics = f"{lSourcePath}/cmake_targets/log/build-metrics.log"
if forceBaseImageBuild:
self._recreate_is_tag('ran-base', baseTag, 'openshift/ran-base-is.yaml')
self._recreate_bc('ran-base', baseTag, 'openshift/ran-base-bc.yaml')
ranbase_job = self._start_build('ran-base')
attemptedImages += ['ran-base']
status = ranbase_job is not None and self._wait_build_end([ranbase_job], 1000)
if not status: logging.error('failure during build of ran-base')
self.cmd.run(f'oc logs {ranbase_job} &> cmake_targets/log/ran-base.log') # cannot use cmd.run because of redirect
# recover logs by mounting image
self._retag_image_statement('ran-base', 'ran-base', baseTag, 'openshift/ran-base-log-retrieval.yaml')
pod = self._deploy_pod('openshift/ran-base-log-retrieval.yaml')
if pod is not None:
self.cmd.run(f'mkdir -p cmake_targets/log/ran-base')
self.cmd.run(f'oc rsync {pod}:/oai-ran/cmake_targets/log/ cmake_targets/log/ran-base')
self._undeploy_pod('openshift/ran-base-log-retrieval.yaml')
else:
status = False
if status:
self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml')
self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.phySim.rhel9')
physim_job = self._start_build('oai-physim')
attemptedImages += ['oai-physim']
self._recreate_is_tag('ran-build', imageTag, 'openshift/ran-build-is.yaml')
self._recreate_bc('ran-build', imageTag, 'openshift/ran-build-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.rhel9')
ranbuild_job = self._start_build('ran-build')
attemptedImages += ['ran-build']
self._recreate_is_tag('oai-clang', imageTag, 'openshift/oai-clang-is.yaml')
self._recreate_bc('oai-clang', imageTag, 'openshift/oai-clang-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.clang.rhel9')
clang_job = self._start_build('oai-clang')
attemptedImages += ['oai-clang']
wait = ranbuild_job is not None and physim_job is not None and clang_job is not None and self._wait_build_end([ranbuild_job, physim_job, clang_job], 1200)
if not wait: logging.error('error during build of ranbuild_job or physim_job or clang_job')
status = status and wait
self.cmd.run(f'oc logs {ranbuild_job} &> cmake_targets/log/ran-build.log')
self.cmd.run(f'oc logs {physim_job} &> cmake_targets/log/oai-physim.log')
self.cmd.run(f'oc logs {clang_job} &> cmake_targets/log/oai-clang.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
if status:
self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml')
self._recreate_bc('oai-enb', imageTag, 'openshift/oai-enb-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.eNB.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.eNB.rhel9')
enb_job = self._start_build('oai-enb')
attemptedImages += ['oai-enb']
self._recreate_is_tag('oai-gnb', imageTag, 'openshift/oai-gnb-is.yaml')
self._recreate_bc('oai-gnb', imageTag, 'openshift/oai-gnb-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.rhel9')
gnb_job = self._start_build('oai-gnb')
attemptedImages += ['oai-gnb']
self._recreate_is_tag('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-is.yaml')
self._recreate_bc('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
gnb_aw2s_job = self._start_build('oai-gnb-aw2s')
attemptedImages += ['oai-gnb-aw2s']
wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([enb_job, gnb_job, gnb_aw2s_job], 800)
if not wait: logging.error('error during build of eNB/gNB')
status = status and wait
# recover logs
self.cmd.run(f'oc logs {enb_job} &> cmake_targets/log/oai-enb.log')
self.cmd.run(f'oc logs {gnb_job} &> cmake_targets/log/oai-gnb.log')
self.cmd.run(f'oc logs {gnb_aw2s_job} &> cmake_targets/log/oai-gnb-aw2s.log')
self._recreate_is_tag('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-is.yaml')
self._recreate_bc('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nr-cuup.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nr-cuup.rhel9')
nr_cuup_job = self._start_build('oai-nr-cuup')
attemptedImages += ['oai-nr-cuup']
self._recreate_is_tag('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-is.yaml')
self._recreate_bc('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.lteUE.rhel9')
lteue_job = self._start_build('oai-lte-ue')
attemptedImages += ['oai-lte-ue']
self._recreate_is_tag('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-is.yaml')
self._recreate_bc('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nrUE.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nrUE.rhel9')
nrue_job = self._start_build('oai-nr-ue')
attemptedImages += ['oai-nr-ue']
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 800)
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
status = status and wait
# recover logs
self.cmd.run(f'oc logs {nr_cuup_job} &> cmake_targets/log/oai-nr-cuup.log')
self.cmd.run(f'oc logs {lteue_job} &> cmake_targets/log/oai-lte-ue.log')
self.cmd.run(f'oc logs {nrue_job} &> cmake_targets/log/oai-nr-ue.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
log_files.append(self._retrieveOCLog(ctx, ranbase_job, lSourcePath, 'ran-base'))
if status:
self._recreate_is_tag('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-is.yaml')
self._recreate_bc('ran-build-fhi72', imageTag, 'openshift/ran-build-fhi72-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.fhi72.rhel9')
ranbuildfhi72_job = self._start_build('ran-build-fhi72')
attemptedImages += ['ran-build-fhi72']
wait = ranbuildfhi72_job is not None and self._wait_build_end([ranbuildfhi72_job], 1200)
if not wait: logging.error('error during build of ranbuildfhi72_job')
self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml')
self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.phySim.rhel9')
physim_job = self._start_build('oai-physim')
self._recreate_is_tag('ran-build', imageTag, 'openshift/ran-build-is.yaml')
self._recreate_bc('ran-build', imageTag, 'openshift/ran-build-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.build.rhel9')
ranbuild_job = self._start_build('ran-build')
self._recreate_is_tag('oai-clang', imageTag, 'openshift/oai-clang-is.yaml')
self._recreate_bc('oai-clang', imageTag, 'openshift/oai-clang-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.clang.rhel9')
clang_job = self._start_build('oai-clang')
wait = ranbuildfhi72_job is not None and ranbuild_job is not None and physim_job is not None and clang_job is not None and self._wait_build_end([ranbuildfhi72_job, ranbuild_job, physim_job, clang_job], 1200)
if not wait: logging.error('error during build of ranbuildfhi72_job or ranbuild_job or physim_job or clang_job')
status = status and wait
self.cmd.run(f'oc logs {ranbuildfhi72_job} &> cmake_targets/log/ran-build-fhi72.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
log_files.append(self._retrieveOCLog(ctx, ranbuildfhi72_job, lSourcePath, 'ran-build-fhi72'))
log_files.append(self._retrieveOCLog(ctx, ranbuild_job, lSourcePath, 'ran-build'))
log_files.append(self._retrieveOCLog(ctx, physim_job, lSourcePath, 'oai-physim'))
log_files.append(self._retrieveOCLog(ctx, clang_job, lSourcePath, 'oai-clang'))
self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}')
if status:
self._recreate_is_tag('oai-gnb-fhi72', imageTag, 'openshift/oai-gnb-fhi72-is.yaml')
@@ -405,19 +288,65 @@ class Cluster:
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
self._retag_image_statement('ran-build-fhi72', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build-fhi72', imageTag, 'docker/Dockerfile.gNB.fhi72.rhel9')
gnb_fhi72_job = self._start_build('oai-gnb-fhi72')
attemptedImages += ['oai-gnb-fhi72']
wait = gnb_fhi72_job is not None and self._wait_build_end([gnb_fhi72_job], 600)
if not wait: logging.error('error during build of gNB-fhi72')
self._recreate_is_tag('oai-enb', imageTag, 'openshift/oai-enb-is.yaml')
self._recreate_bc('oai-enb', imageTag, 'openshift/oai-enb-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.eNB.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.eNB.rhel9')
enb_job = self._start_build('oai-enb')
self._recreate_is_tag('oai-gnb', imageTag, 'openshift/oai-gnb-is.yaml')
self._recreate_bc('oai-gnb', imageTag, 'openshift/oai-gnb-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.rhel9')
gnb_job = self._start_build('oai-gnb')
self._recreate_is_tag('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-is.yaml')
self._recreate_bc('oai-gnb-aw2s', imageTag, 'openshift/oai-gnb-aw2s-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.gNB.aw2s.rhel9')
gnb_aw2s_job = self._start_build('oai-gnb-aw2s')
wait = gnb_fhi72_job is not None and enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end([gnb_fhi72_job, enb_job, gnb_job, gnb_aw2s_job], 800)
if not wait: logging.error('error during build of eNB/gNB')
status = status and wait
# recover logs
self.cmd.run(f'oc logs {gnb_fhi72_job} &> cmake_targets/log/oai-gnb-fhi72.log')
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log')
log_files.append(self._retrieveOCLog(ctx, gnb_fhi72_job, lSourcePath, 'oai-gnb-fhi72'))
log_files.append(self._retrieveOCLog(ctx, enb_job, lSourcePath, 'oai-enb'))
log_files.append(self._retrieveOCLog(ctx, gnb_job, lSourcePath, 'oai-gnb'))
log_files.append(self._retrieveOCLog(ctx, gnb_aw2s_job, lSourcePath, 'oai-gnb-aw2s'))
self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}')
self._recreate_is_tag('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-is.yaml')
self._recreate_bc('oai-nr-cuup', imageTag, 'openshift/oai-nr-cuup-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nr-cuup.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nr-cuup.rhel9')
nr_cuup_job = self._start_build('oai-nr-cuup')
self._recreate_is_tag('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-is.yaml')
self._recreate_bc('oai-lte-ue', imageTag, 'openshift/oai-lte-ue-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.lteUE.rhel9')
lteue_job = self._start_build('oai-lte-ue')
self._recreate_is_tag('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-is.yaml')
self._recreate_bc('oai-nr-ue', imageTag, 'openshift/oai-nr-ue-bc.yaml')
self._retag_image_statement('ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.nrUE.rhel9')
self._retag_image_statement('ran-build', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-build', imageTag, 'docker/Dockerfile.nrUE.rhel9')
nrue_job = self._start_build('oai-nr-ue')
wait = nr_cuup_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end([nr_cuup_job, lteue_job, nrue_job], 800)
if not wait: logging.error('error during build of nr-cuup/lteUE/nrUE')
status = status and wait
# recover logs
log_files.append(self._retrieveOCLog(ctx, nr_cuup_job, lSourcePath, 'oai-nr-cuup'))
log_files.append(self._retrieveOCLog(ctx, lteue_job, lSourcePath, 'oai-lte-ue'))
log_files.append(self._retrieveOCLog(ctx, nrue_job, lSourcePath, 'oai-nr-ue'))
self.cmd.run(f'oc get pods.metrics.k8s.io &>> {build_metrics}')
# split and analyze logs
imageSize = {}
for image in attemptedImages:
self.cmd.run(f'mkdir -p cmake_targets/log/{image}')
for image, _ in log_files:
tag = imageTag if image != 'ran-base' else baseTag
size = self._get_image_size(image, tag)
if size <= 0:
@@ -428,12 +357,14 @@ class Cluster:
imageSize[image] = f'{sizeMb:.1f} Mbytes (uncompressed: ~{sizeMb*2.5:.1f} Mbytes)'
logging.info(f'\u001B[1m{image} size is {imageSize[image]}\u001B[0m')
grep_exp = r"\|".join(attemptedImages)
self.cmd.run(f'oc get images | grep -e \'{grep_exp}\' &> cmake_targets/log/image_registry.log');
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> cmake_targets/log/build_pod_summary.log; done')
build_log_name = f'build_log_{self.testCase_id}'
cls_containerize.CopyLogsToExecutor(self.cmd, lSourcePath, build_log_name)
archiveArtifact(self.cmd, ctx, build_metrics)
logfile = f'{lSourcePath}/cmake_targets/log/image_registry.log'
grep_exp = r"\|".join([i for i,f in log_files])
self.cmd.run(f'oc get images | grep -e \'{grep_exp}\' &> {logfile}');
archiveArtifact(self.cmd, ctx, logfile)
logfile = f'{lSourcePath}/cmake_targets/log/build_pod_summary.log'
self.cmd.run(f'for pod in $(oc get pods | tail -n +2 | awk \'{{print $1}}\'); do oc get pod $pod -o json &>> {logfile}; done')
archiveArtifact(self.cmd, ctx, logfile)
self.cmd.run('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc delete pod ${pod}; done')
@@ -442,55 +373,24 @@ class Cluster:
self.cmd.close()
# Analyze the logs
collectInfo = cls_containerize.AnalyzeBuildLogs(build_log_name, attemptedImages, status)
for img in collectInfo:
for f in collectInfo[img]:
status = status and collectInfo[img][f]['status']
if not status:
logging.debug(collectInfo)
collectInfo = {}
for image, lf in log_files:
imgStatus, errors = cls_containerize.AnalyzeBuildLogs(image, lf)
info = f"Analysis of {os.path.basename(lf)}: {imgStatus=}, size {imageSize[image]}, {len(errors)} errors"
msg = "\n".join([info] + errors)
HTML.CreateHtmlTestRowQueue(image, 'OK' if imgStatus else 'KO', [msg])
status = status and imgStatus
if status:
logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m')
HTML.CreateHtmlTestRow('all', 'OK', CONST.ALL_PROCESSES_OK)
else:
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
HTML.CreateHtmlTestRow('all', 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, imageSize)
# TODO fix groovy script, remove the following.
# the groovy scripts expects all logs in
# <jenkins-workspace>/<pipeline>/ci-scripts, so copy it there
with cls_cmd.LocalCmd() as c:
c.run(f'mkdir -p {os.getcwd()}/test_log_{ctx.test_idx}/')
c.run(f'cp -r {ctx.logPath} {os.getcwd()}/test_log_{ctx.test_idx}/')
return status
def deploy_oc_physim(self, HTML, oc_release, svr_id):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {self.ranBranch} ranCommitID {self.ranCommitID}')
image_tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
logging.debug(f'Running physims from server: {svr_id}')
script = "scripts/oc-deploy-physims.sh"
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {self.eNBSourceCodePath}"
ret = cls_cmd.runScript(svr_id, script, 600, options)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
log_dir = f'{os.getcwd()}/../cmake_targets/log'
os.makedirs(log_dir, exist_ok=True)
result_junit = f'{oc_release}-run.xml'
details_json = f'{oc_release}-tests.json'
with cls_cmd.getConnection(svr_id) as ssh:
ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/{details_json}', tgt=f'{log_dir}/{details_json}')
ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/{result_junit}', tgt=f'{log_dir}/{result_junit}')
ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/physim_log.txt', tgt=f'{log_dir}/physim_log.txt')
ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/physim_pods_summary.txt', tgt=f'{log_dir}/physim_pods_summary.txt')
ssh.copyin(src=f'{self.eNBSourceCodePath}/ci-scripts/LastTestsFailed.log', tgt=f'{log_dir}/LastTestsFailed.log')
test_status, test_summary, test_result = cls_analysis.Analysis.analyze_oc_physim(f'{log_dir}/{result_junit}', f'{log_dir}/{details_json}')
if test_summary:
if test_status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result)
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
else:
HTML.CreateHtmlTestRow('Some test(s) failed!', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL)
HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result)
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
else:
HTML.CreateHtmlTestRowQueue('Physical simulator failed', 'KO', [test_result])
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
return test_status

View File

@@ -1,23 +1,5 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Required Python Version
@@ -45,12 +27,6 @@ def getConnection(host, d=None):
else:
return RemoteCmd(host, d=d)
def runScript(host, path, timeout, parameters=None, redirect=None, silent=False):
if is_local(host):
return LocalCmd.exec_script(path, timeout, parameters, redirect, silent)
else:
return RemoteCmd.exec_script(host, path, timeout, parameters, redirect, silent)
# provides a partial interface for the legacy SSHconnection class (getBefore(), command())
class Cmd(metaclass=abc.ABCMeta):
def cd(self, d, silent=False):
@@ -111,12 +87,12 @@ class LocalCmd(Cmd):
logging.debug(f'Working dir is {self.cwd}')
self.cp = sp.CompletedProcess(args='', returncode=0, stdout='')
def exec_script(path, timeout, parameters=None, redirect=None, silent=False):
def exec_script(self, path, timeout, parameters=None, redirect=None, silent=False):
if redirect and not redirect.startswith("/"):
raise ValueError(f"redirect must be absolute, but is {redirect}")
c = f"{path} {parameters}" if parameters else path
if not redirect:
ret = sp.run(c, shell=True, timeout=timeout, stdout=sp.PIPE, stderr=sp.STDOUT)
ret = sp.run(c, shell=True, cwd=self.cwd, timeout=timeout, stdout=sp.PIPE, stderr=sp.STDOUT)
ret.stdout = ret.stdout.decode('utf-8').strip()
else:
with open(redirect, "w") as f:
@@ -238,18 +214,15 @@ class RemoteCmd(Cmd):
cfg['sock'] = paramiko.ProxyCommand(ucfg['proxycommand'])
return cfg
def exec_script(host, path, timeout, parameters=None, redirect=None, silent=False):
def exec_script(self, path, timeout, parameters=None, redirect=None, silent=False):
if redirect and not redirect.startswith("/"):
raise ValueError(f"redirect must be absolute, but is {redirect}")
p = parameters if parameters else ""
r = f"> {redirect}" if redirect else ""
if not silent:
logging.debug(f"local> ssh {host} bash -s {p} < {path} {r} # {path} from localhost")
client = RemoteCmd._ssh_init()
cfg = RemoteCmd._lookup_ssh_config(host)
client.connect(**cfg)
logging.debug(f"local> ssh {self.hostname} bash -s {p} < {path} {r}")
bash_opt = 'BASH_XTRACEFD=1' # write bash set -x output to stdout, see bash(1)
stdin, stdout, stderr = client.exec_command(f"{bash_opt} bash -s {p} {r}", timeout=timeout)
stdin, stdout, stderr = self.client.exec_command(f"{bash_opt} bash -s {p} {r}", timeout=timeout)
# open() the file f at path, read() it and write() it into the stdin of the bash -s cmd
with open(path) as f:
stdin.write(f.read())
@@ -259,7 +232,6 @@ class RemoteCmd(Cmd):
if redirect: cmd += f" &> {redirect}"
ret = sp.CompletedProcess(args=cmd, returncode=stdout.channel.recv_exit_status(), stdout=stdout.read(size=None) + stderr.read(size=None))
ret.stdout = ret.stdout.decode('utf-8').strip()
client.close()
return ret
def run(self, line, timeout=300, silent=False, reportNonZero=True):

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +1,5 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Required Python Version
@@ -29,6 +12,7 @@ import yaml
import re
import cls_cmd
from cls_ci_helper import archiveArtifact
def listify(s):
if s is None:
@@ -76,7 +60,8 @@ class CoreNetwork:
words = line[1:].strip().split(" ")
script_name = words[0]
options = " ".join(words[1:])
ret = cls_cmd.runScript(host, script_name, 300, parameters=options, silent=silent)
with cls_cmd.getConnection(host) as c:
ret = c.exec_script(script_name, 300, parameters=options, silent=silent)
return ret
def _command(self, cmd_list, must_succeed=False, silent=False):
@@ -114,8 +99,7 @@ class CoreNetwork:
logging.info(f'deployed core network {self}, pingable IP address {ip}')
return True, output
def _collect_logs(self, log_dir):
logging.info(f'collecting logs into (local) {log_dir}')
def _collect_logs(self, ctx):
remote_dir = "/tmp/cn-undeploy-logs"
with cls_cmd.getConnection(self._host) as c:
# create a directory for log collection
@@ -134,18 +118,17 @@ class CoreNetwork:
logging.error("cannot enumerate log files")
return []
log_files = []
# copy them to the executor one by one, and store in log_dir
# copy them to the executor one by one
for f in ret.stdout.split("\n"):
l = f.replace(remote_dir, log_dir)
c.copyin(f, l)
log_files.append(l)
name = archiveArtifact(c, ctx, f)
log_files.append(name)
c.run(f'rm -rf {remote_dir}')
return log_files
def undeploy(self, log_dir=None):
def undeploy(self, ctx=None):
log_files = []
if log_dir is not None:
log_files = self._collect_logs(log_dir)
if ctx is not None:
log_files = self._collect_logs(ctx)
else:
logging.warning("no directory for log collection specified, cannot retrieve core network logs")
logging.info(f'undeploy core network {self}')

View File

@@ -0,0 +1,141 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
import re
import os
import logging
from collections import deque
class Default:
def run(file, opt=None):
success = True
logs = []
with open(file, "r") as f:
for line in f.readlines():
result = re.search('[Aa]ssertion', line)
if result:
logs.append(line)
success = False
return success, "\n".join(logs)
class ContainsString:
def run(file, needle):
with open(file, "r") as f:
for line in f.readlines():
if re.search(needle, line):
return True, ""
return False, f"could not find '{needle}' in logs"
class LastLineContains:
def run(file, string):
with open(file, "r") as f:
last_line = deque(f, maxlen=1).pop()
success = string in last_line
log = "" if success else f"could not find '{string}' in last line"
return success, log
class EndsWithBye:
def run(file, option):
# no option: we ignore any
with open(file, "r") as f:
n = 0
for line in reversed(f.readlines()):
if re.search(r'^Bye.\n', line, re.MULTILINE) is not None:
return True, ""
n = n + 1
if n > 50: # if not found in last 50 lines, assume it does not exist
break
return False, "No Bye. message found, did not stop properly"
class RetxCheck():
def _parseList(s):
if not s:
return []
return [int(n) for n in s.split(",")]
def _get_ul_dl(s):
dl, ul = (None, None)
for o in s.split(";", 1):
if o.startswith("dl="):
dl = o[3:]
elif o.startswith("ul="):
ul = o[3:]
else:
raise ValueError(f"unrecognized option {s}: needs format '[ul=,dl=]X,Y,...[;ul=Z,V,...]'")
return dl, ul
def _parseRetxCheckers(options):
if not "=" in options:
dlul = RetxCheck._parseList(options)
return dlul, dlul
dl, ul = RetxCheck._get_ul_dl(options)
return RetxCheck._parseList(dl), RetxCheck._parseList(ul)
def _analyzeUeRetx(rounds, checkers, regex):
perc = list(0 for i in checkers) # results in %
stats = list(False for i in checkers) # status if succeeded
tmp = re.match(regex, rounds)
if tmp is None:
logging.error('_analyzeUeRetx: did not match regex for DL retx analysis')
return stats
retx_data = [float(x) for x in tmp.groups()]
for i in range(0, len(perc)):
#case where numerator > denumerator with denum ==0 is disregarded, cannot hapen in principle, will lead to 0%
perc[i] = 0 if (retx_data[i] == 0) else 100 * retx_data[i + 1] / retx_data[i]
#treating % > 100 , % > requirement
stats[i] = perc[i] <= 100 and perc[i] <= checkers[i]
return stats
def _filter_retx_rounds(l):
# map to round number if False, else None
l = [i+1 if x is False else None for i, x in enumerate(l)]
# filter out None
return [x for x in l if x is not None]
def run(file, options):
# aggregate statistics per UE
dlsch_ulsch_stats = {}
status = True
with open(file, "r") as f:
for line in f.readlines():
keys = {'dlsch_rounds','ulsch_rounds'}
for k in keys:
result = re.search(k, line)
if result is None:
continue
result = re.search('UE (?:RNTI )?([0-9a-f]{4})', line)
if result is None:
logging.error(f'did not find RNTI while matching key {k}')
status = False
continue
rnti = result.group(1)
if not rnti in dlsch_ulsch_stats:
dlsch_ulsch_stats[rnti] = {}
dlsch_ulsch_stats[rnti][k]=re.sub(r'^.*\]\s+', r'' , line.rstrip())
dl, ul = RetxCheck._parseRetxCheckers(options)
msgs = []
for ue in dlsch_ulsch_stats:
dlulstat = dlsch_ulsch_stats[ue]
for key in dlulstat:
msgs.append(dlulstat[key])
retx_dl = RetxCheck._analyzeUeRetx(dlulstat['dlsch_rounds'], dl, r'^.*dlsch_rounds\s+(\d+)\/(\d+)\/(\d+)\/(\d+),\s+dlsch_errors\s+(\d+)')
retx_ul = RetxCheck._analyzeUeRetx(dlulstat['ulsch_rounds'], ul, r'^.*ulsch_rounds\s+(\d+)\/(\d+)\/(\d+)\/(\d+),\s+ulsch_errors\s+(\d+)')
if False in retx_dl or False in retx_ul:
dlstr = RetxCheck._filter_retx_rounds(retx_dl)
ulstr = RetxCheck._filter_retx_rounds(retx_ul)
msg = f"UE {ue}: retx rounds"
if dlstr:
msg = f"{msg} DL {dlstr}"
if ulstr:
msg = f"{msg} UL {ulstr}"
msg = f"{msg} exceeded threshold"
msgs.append('!!! Failure: ' + msg)
logging.error(f'\u001B[1;37;41m {msg}\u001B[0m')
status = False
else:
msg = f"UE {ue} retransmissions within bounds"
logging.debug(msg)
return status, "\n".join(msgs)

View File

@@ -1,22 +1,5 @@
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Required Python Version
@@ -32,6 +15,7 @@ import re
import yaml
import cls_cmd
from cls_ci_helper import archiveArtifact
class Module_UE:
@@ -59,26 +43,31 @@ class Module_UE:
}
self.interface = m.get('IF')
self.MTU = m.get('MTU')
self.trace = m.get('trace') == True
self.logStore = m.get('LogStore')
self.cmd_prefix = m.get('CmdPrefix')
logging.info(f'initialized UE {self} from {filename}')
t = m.get('Tracing')
self.trace = t is not None
if self.trace:
if t.get('Start') is None or t.get('Stop') is None or t.get('Collect')is None :
raise ValueError("need to have Start/Stop/Collect for tracing")
self.cmd_dict["traceStart"] = t.get('Start')
self.cmd_dict["traceStop"] = t.get('Stop')
self._logCollect = t.get('Collect')
if "%%log_dir%%" not in self._logCollect:
raise ValueError(f"(At least one) LogCollect expression for {module_name} must contain \"%%log_dir%%\"")
def __str__(self):
return f"{self.module_name}@{self.host} [IP: {self.getIP()}]"
return f"{self.module_name}@{self.host}"
def __repr__(self):
return self.__str__()
def _command(self, cmd, silent = False):
def _command(self, cmd, silent=False, reportNonZero=True):
if cmd is None:
raise Exception("no command provided")
if self.host == "" or self.host == "localhost":
c = cls_cmd.LocalCmd()
else:
c = cls_cmd.RemoteCmd(self.host)
response = c.run(cmd, silent=silent)
c.close()
with cls_cmd.getConnection(self.host) as c:
response = c.run(cmd, silent=silent, reportNonZero=reportNonZero)
return response
#-----------------$
@@ -86,40 +75,40 @@ class Module_UE:
#-----------------$
def initialize(self):
if self.trace:
raise Exception("UE tracing not implemented yet")
self._enableTrace()
# we first terminate to make sure the UE has been stopped
if self.cmd_dict["detach"]:
self._command(self.cmd_dict["detach"], silent=True)
self._command(self.cmd_dict["terminate"], silent=True)
ret = self._command(self.cmd_dict["initialize"])
logging.info(f'For command: {ret.args} | return output: {ret.stdout} | Code: {ret.returncode}')
if self.trace:
self._enableTrace()
# Here each UE returns differently for the successful initialization, requires check based on UE
return ret.returncode == 0
def terminate(self):
def terminate(self, ctx=None):
self._command(self.cmd_dict["terminate"])
if self.trace:
raise Exception("UE tracing not implemented yet")
if self.trace and ctx is not None:
self._disableTrace()
return self._logCollect()
return self._collectTrace(ctx)
return None
def attach(self, attach_tries = 4, attach_timeout = 60):
def attach(self, attach_tries = 3, attach_timeout = 40):
ip = None
while attach_tries > 0:
self._command(self.cmd_dict["attach"])
timeout = attach_timeout
logging.debug("Waiting for IP address to be assigned")
ip = self.getIP(silent=False, reportNonZero=True)
while timeout > 0 and not ip:
time.sleep(5)
timeout -= 5
ip = self.getIP()
time.sleep(1)
timeout -= 1
ip = self.getIP(silent=True, reportNonZero=False)
if ip:
break
logging.warning(f"UE did not receive IP address after {attach_timeout} s, detaching")
attach_timeout += 20
attach_tries -= 1
self._command(self.cmd_dict["detach"])
time.sleep(5)
@@ -160,8 +149,8 @@ class Module_UE:
logging.error(message)
return False
def getIP(self):
output = self._command(self.cmd_dict["getNetwork"], silent=True)
def getIP(self, silent=True, reportNonZero=True):
output = self._command(self.cmd_dict["getNetwork"], silent=silent, reportNonZero=reportNonZero)
result = re.search(r'inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
if result and result.group('ip'):
ip = result.group('ip')
@@ -191,10 +180,33 @@ class Module_UE:
return self.cmd_prefix if self.cmd_prefix else ""
def _enableTrace(self):
raise Exception("not implemented")
logging.info(f'UE {self}: start UE tracing')
self._command(self.cmd_dict["traceStart"])
def _disableTrace(self):
raise Exception("not implemented")
logging.info(f'UE {self}: stop UE tracing')
self._command(self.cmd_dict["traceStop"])
def _logCollect(self):
raise Exception("not implemented")
def _collectTrace(self, ctx):
remote_dir = "/tmp/ue-trace-logs"
with cls_cmd.getConnection(self.host) 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 []
log_cmd = self._logCollect.replace('%%log_dir%%', remote_dir)
self._command(log_cmd)
# enumerate collected files
ret = c.run(f'ls {remote_dir}/*')
if ret.returncode != 0:
logging.error("cannot enumerate log files")
return []
log_files = []
# copy them to the executor one by one, and store in log_dir
for f in ret.stdout.split("\n"):
name = archiveArtifact(c, ctx, f)
log_files.append(name)
c.run(f'rm -rf {remote_dir}')
return log_files

View File

@@ -1,24 +1,4 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
import logging
import re
@@ -28,26 +8,23 @@ import cls_cmd
import cls_oai_html
import cls_analysis
import constants as CONST
from cls_ci_helper import archiveArtifact
LOG_PATH_PHYSIM = 'phy_sim_logs'
DPDK_PATH = '/opt/dpdk-t2-22.11.0'
class Native():
def Build(test_case, HTML, host, directory, options):
logging.debug(f'Building on server: {host}')
HTML.testCase_id = test_case
def Build(ctx, node, HTML, directory, options):
logging.debug(f'Building on server: {node}')
with cls_cmd.getConnection(host) as ssh:
with cls_cmd.getConnection(node) as ssh:
base = f"{directory}/cmake_targets"
ret = ssh.run(f"{base}/build_oai {options} > {base}/log/build_oai.log", timeout=900)
ret = ssh.run(f"C_INCLUDE_PATH={DPDK_PATH}/include/ PKG_CONFIG_PATH={DPDK_PATH}/lib64/pkgconfig/ {base}/build_oai {options} > {base}/build_oai.log", timeout=900)
success = ret.returncode == 0
logs = ssh.run(f"cat {base}/log/build_oai.log", silent=True)
logging.debug(f"build finished with code {ret.returncode}, output:\n{logs.stdout}")
logs = ssh.run(f"cat {base}/build_oai.log", silent=True)
logging.debug(f"build finished with code {ret.returncode}")
# create log directory, and copy build logs
target = f"{base}/build_log_{test_case}/"
ssh.run(f"mkdir -p {target}")
ssh.run(f"mv {base}/log/* {target}")
archiveArtifact(ssh, ctx, f'{base}/build_oai.log')
# check if build artifacts are there
# NOTE: build_oai should fail with exit code if it could not build, but it does not
@@ -66,19 +43,3 @@ class Native():
logging.error('\u001B[1m Building OAI Failed\u001B[0m')
HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK)
return success
def Run_Physim(HTML, host, directory, options, physim_test, threshold):
logging.debug(f'Runnin {physim_test} on server: {host}')
workSpacePath = f'{directory}/cmake_targets'
os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}')
runLogFile=f'physim_{HTML.testCase_id}.log'
with cls_cmd.getConnection(host) as cmd:
cmd.run(f'sudo {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}')
success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold)
if success:
HTML.CreateHtmlTestRowQueue(options, 'OK', [msg])
else:
logging.error(msg)
HTML.CreateHtmlTestRowQueue(options, 'KO', [msg])
return success

View File

@@ -1,23 +1,5 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
@@ -51,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 = []
@@ -67,19 +46,9 @@ class HTMLManagement():
self.htmlUEFailureMsg = ''
self.startTime = int(round(time.time() * 1000))
self.testCase_id = ''
self.testCaseIdx = ''
self.desc = ''
self.OsVersion = ['', '']
self.KernelVersion = ['', '']
self.UhdVersion = ['', '']
self.UsrpBoard = ['', '']
self.CpuNb = ['', '']
self.CpuModel = ['', '']
self.CpuMHz = ['', '']
#-----------------------------------------------------------
# HTML structure creation functions
#-----------------------------------------------------------
@@ -106,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')
@@ -124,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')
@@ -201,7 +147,7 @@ class HTMLManagement():
self.htmlFile.write(' <table class="table" border = "1">\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th style="width:5%">Relative Time (s)</th>\n')
self.htmlFile.write(' <th style="width:5%">Test Id</th>\n')
self.htmlFile.write(' <th style="width:5%">Test Index</th>\n')
self.htmlFile.write(' <th>Test Desc</th>\n')
self.htmlFile.write(' <th>Test Options</th>\n')
self.htmlFile.write(' <th style="width:5%">Test Status</th>\n')
@@ -228,7 +174,7 @@ class HTMLManagement():
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
subprocess.run(cmd, shell=True)
else:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + r"__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
subprocess.run(cmd, shell=True)
self.htmlFooterCreated = False
@@ -257,7 +203,7 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n')
self.htmlFile.write(' <p></p>\n')
self.htmlFile.write(' <div class="well well-lg">End of Test Report -- Copyright <span class="glyphicon glyphicon-copyright-mark"></span> 2018 <a href="http://www.openairinterface.org/">OpenAirInterface</a>. All Rights Reserved.</div>\n')
self.htmlFile.write(' <div class="well well-lg">End of Test Report -- Copyright <span class="glyphicon glyphicon-copyright-mark"></span> 2026 <a href="http://www.openairinterface.org/">OpenAirInterface</a>. All Rights Reserved.</div>\n')
self.htmlFile.write('</div></body>\n')
self.htmlFile.write('</html>\n')
self.htmlFile.close()
@@ -269,7 +215,7 @@ class HTMLManagement():
currentTime = int(round(time.time() * 1000)) - self.startTime
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + format(currentTime / 1000, '.1f') + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCaseIdx + '</td>\n')
self.htmlFile.write(' <td>' + self.desc + '</td>\n')
self.htmlFile.write(' <td>' + str(options) + '</td>\n')
if (str(status) == 'OK'):
@@ -342,58 +288,6 @@ class HTMLManagement():
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
def CreateHtmlNextTabHeaderTestRow(self, collectInfo, allImagesSize, machine='eNB'):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return
self.htmlFile = open('test_results.html', 'a')
if bool(collectInfo) == False:
self.htmlFile.write(' <tr bgcolor = "red" >\n')
self.htmlFile.write(' <td colspan="6"><b> ----IMAGES BUILDING FAILED - Unable to recover the image logs ---- </b></td>\n')
self.htmlFile.write(' </tr>\n')
else:
for image in collectInfo:
files = collectInfo[image]
# TabHeader for image logs on built shared and target images
if allImagesSize[image].count('unknown') > 0:
self.htmlFile.write(' <tr bgcolor = "orange" >\n')
elif allImagesSize[image].count('Build Failed') > 0:
self.htmlFile.write(' <tr bgcolor = "red" >\n')
else:
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"><b> ---- ' + image + ' IMAGE STATUS ----> Size ' + allImagesSize[image] + ' </b></td>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th colspan="2">Element</th>\n')
self.htmlFile.write(' <th>Nb Errors</th>\n')
self.htmlFile.write(' <th>Nb Warnings</th>\n')
self.htmlFile.write(' <th colspan="2">Status</th>\n')
self.htmlFile.write(' </tr>\n')
for fil in files:
parameters = files[fil]
# TestRow for image logs on built shared and target images
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td colspan="2" bgcolor = "lightcyan" >' + fil + ' </td>\n')
if (parameters['errors'] == 0):
self.htmlFile.write(' <td bgcolor = "green" >' + str(parameters['errors']) + '</td>\n')
else:
self.htmlFile.write(' <td bgcolor = "red" >' + str(parameters['errors']) + '</td>\n')
if (parameters['errors'] > 0):
self.htmlFile.write(' <td bgcolor = "red" >' + str(parameters['warnings']) + '</td>\n')
elif (parameters['warnings'] == 0):
self.htmlFile.write(' <td bgcolor = "green" >' + str(parameters['warnings']) + '</td>\n')
else:
self.htmlFile.write(' <td bgcolor = "orange" >' + str(parameters['warnings']) + '</td>\n')
if (parameters['errors'] == 0) and (parameters['warnings'] == 0):
self.htmlFile.write(' <th colspan="2" bgcolor = "green" ><font color="white">OK </font></th>\n')
elif (parameters['errors'] == 0):
self.htmlFile.write(' <th colspan="2" bgcolor = "orange" ><font color="white">OK </font></th>\n')
else:
self.htmlFile.write(' <th colspan="2" bgcolor = "red" > NOT OK </th>\n')
self.htmlFile.write(' </tr>\n')
self.htmlFile.close()
#for the moment it is limited to 4 columns, to be made generic later
def CreateHtmlDataLogTable(self, DataLog):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
@@ -436,7 +330,7 @@ class HTMLManagement():
addOrangeBK = False
self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + format(currentTime / 1000, '.1f') + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCaseIdx + '</td>\n')
self.htmlFile.write(' <td>' + self.desc + '</td>\n')
self.htmlFile.write(' <td>' + str(options) + '</td>\n')
if (str(status) == 'OK'):
@@ -459,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
@@ -595,6 +405,6 @@ class HTMLManagement():
self.htmlFile.write(' <td bgcolor = "green" ><font color="white"><b>' + value[2] + '</b></font></td>\n')
else:
self.htmlFile.write(' <td bgcolor = "red" ><font color="white"><b>' + value[2] + '</b></font></td>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan">' + value[1] + '</td>\n')
self.htmlFile.write(f' <td colspan="2" bgcolor = "lightcyan"><pre style="display: inline flow-root list-item; margin: 0 3px 0 3px; min-width: 24em;">{value[1]}</pre></td>\n')
self.htmlFile.close()

View File

@@ -1,23 +1,5 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
#
@@ -32,7 +14,6 @@
#-----------------------------------------------------------
# Import Libs
#-----------------------------------------------------------
import sys # arg
import re # reg
import time # sleep
import os
@@ -41,12 +22,13 @@ import concurrent.futures
import json
#import our libs
import helpreadme as HELP
import constants as CONST
import cls_module
import cls_corenetwork
import cls_analysis
import cls_cmd
from cls_ci_helper import archiveArtifact
#-----------------------------------------------------------
# Helper functions used here and in other classes
@@ -83,6 +65,46 @@ 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':
return value / 1000
elif magnitude == 'M':
return value
elif magnitude == 'G':
return value * 1000
else:
return value
def extract_iperf_data(res):
if not res:
return None
bitrate_val = res.group('bitrate')
magnitude = res.group('magnitude')
return {
'bitrate_mbps': convert_to_mbps(bitrate_val, magnitude),
'jitter': res.group('jitter'),
'packetloss': res.group('packetloss'),
'bitrate_disp': f'{float(bitrate_val):.2f} {magnitude}bps'
}
def Iperf_analyzeV3TCPJson(filename, iperf_tcp_rate_target):
try:
with open(filename) as f:
@@ -130,54 +152,37 @@ def Iperf_analyzeV3BIDIRJson(filename):
return (True, msg)
def Iperf_analyzeV3UDP(filename, iperf_bitrate_threshold, iperf_packetloss_threshold, target_bitrate):
if (not os.path.isfile(filename)):
if not os.path.isfile(filename):
return (False, 'Iperf3 UDP: Log file not present')
if (os.path.getsize(filename)==0):
if os.path.getsize(filename) == 0:
return (False, 'Iperf3 UDP: Log file is empty')
sender_bitrate = None
receiver_bitrate = None
with open(filename, 'r') as server_file:
for line in server_file.readlines():
res_sender = re.search(r'(?P<bitrate>[0-9\.]+)\s+(?P<unit>[KMG]?bits\/sec)\s+(?P<jitter>[0-9\.]+\s+ms)\s+(?P<lostPack>-?\d+)/(?P<sentPack>-?\d+) \((?P<lost>[0-9\.]+).*?\s+(sender)', line)
res_receiver = re.search(r'(?P<bitrate>[0-9\.]+)\s+(?P<unit>[KMG]?bits\/sec)\s+(?P<jitter>[0-9\.]+\s+ms)\s+(?P<lostPack>-?\d+)/(?P<receivedPack>-?\d+)\s+\((?P<lost>[0-9\.]+)%\).*?(receiver)', line)
if res_sender is not None:
sender_bitrate = res_sender.group('bitrate')
sender_unit = res_sender.group('unit')
sender_jitter = res_sender.group('jitter')
sender_lostPack = res_sender.group('lostPack')
sender_sentPack = res_sender.group('sentPack')
sender_packetloss = res_sender.group('lost')
if res_receiver is not None:
receiver_bitrate = res_receiver.group('bitrate')
receiver_unit = res_receiver.group('unit')
receiver_jitter = res_receiver.group('jitter')
receiver_lostPack = res_receiver.group('lostPack')
receiver_receivedPack = res_receiver.group('receivedPack')
receiver_packetloss = res_receiver.group('lost')
if receiver_bitrate is not None and sender_bitrate is not None:
if sender_unit == 'Kbits/sec':
sender_bitrate = float(sender_bitrate) / 1000
if receiver_unit == 'Kbits/sec':
receiver_bitrate = float(receiver_bitrate) / 1000
br_perf = 100 * float(receiver_bitrate) / float(target_bitrate)
br_perf = '%.2f ' % br_perf
sender_bitrate = '%.2f ' % float(sender_bitrate)
receiver_bitrate = '%.2f ' % float(receiver_bitrate)
req_msg = f'Sender Bitrate : {sender_bitrate} Mbps'
bir_msg = f'Receiver Bitrate: {receiver_bitrate} Mbps'
brl_msg = f'{br_perf}%'
jit_msg = f'Jitter : {receiver_jitter}'
pal_msg = f'Packet Loss : {receiver_packetloss} %'
if float(br_perf) < float(iperf_bitrate_threshold):
brl_msg = f'too low! < {iperf_bitrate_threshold}%'
if float(receiver_packetloss) > float(iperf_packetloss_threshold):
pal_msg += f' (too high! > {iperf_packetloss_threshold}%)'
result = float(br_perf) >= float(iperf_bitrate_threshold) and float(receiver_packetloss) <= float(iperf_packetloss_threshold)
return (result, f'{req_msg}\n{bir_msg} ({brl_msg})\n{jit_msg}\n{pal_msg}')
else:
sender_data = None
receiver_data = None
with open(filename, 'r') as server_file:
for line in server_file:
res_sender = re.search(r'(?P<bitrate>[0-9\.]+)\s+(?P<magnitude>[kKMG]?)bits\/sec\s+(?P<jitter>[0-9\.]+\s+ms)\s+(?P<lostPack>-?\d+)/(?P<sentPack>-?\d+)\s+\((?P<packetloss>[0-9\.eE\-\+]+).*?\s+(sender)', line)
res_receiver = re.search(r'(?P<bitrate>[0-9\.]+)\s+(?P<magnitude>[kKMG]?)bits\/sec\s+(?P<jitter>[0-9\.]+\s+ms)\s+(?P<lostPack>-?\d+)/(?P<receivedPack>-?\d+)\s+\((?P<packetloss>[0-9\.eE\-\+]+)%\).*?(receiver)', line)
if res_sender:
sender_data = extract_iperf_data(res_sender)
if res_receiver:
receiver_data = extract_iperf_data(res_receiver)
if not sender_data or not receiver_data:
return (False, 'Could not analyze iperf report')
br_perf = 100 * receiver_data['bitrate_mbps'] / float(target_bitrate)
br_perf_str = f'{br_perf:.2f}%'
req_msg = f"Sender Bitrate : {sender_data['bitrate_disp']}"
bir_msg = f"Receiver Bitrate: {receiver_data['bitrate_disp']} ({br_perf_str})"
jit_msg = f"Jitter : {receiver_data['jitter']}"
pal_msg = f"Packet Loss : {receiver_data['packetloss']}%"
if br_perf < float(iperf_bitrate_threshold):
bir_msg += f' (too low! < {iperf_bitrate_threshold}%)'
if float(receiver_data['packetloss']) > float(iperf_packetloss_threshold):
pal_msg += f' (too high! > {iperf_packetloss_threshold}%)'
result = br_perf >= float(iperf_bitrate_threshold) and float(receiver_data['packetloss']) <= float(iperf_packetloss_threshold)
return (result, f'{req_msg}\n{bir_msg}\n{jit_msg}\n{pal_msg}')
def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetloss_threshold, target_bitrate):
result = None
if (not os.path.isfile(server_filename)):
@@ -190,12 +195,9 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos
result = re.search(statusTemplate, str(line)) or result
if result is None:
return (False, 'Could not parse server report!')
bitrate = float(result.group('bitrate'))
magn = result.group('magnitude')
if magn == "k" or magn == "K":
bitrate /= 1000
elif magn == "G": # we assume bitrate in Mbps, therefore it must be G now
bitrate *= 1000
bitrate_val = float(result.group('bitrate'))
magnitude = result.group('magnitude')
bitrate = convert_to_mbps(bitrate_val, magnitude)
jitter = float(result.group('jitter'))
packetloss = float(result.group('packetloss'))
br_perf = float(bitrate)/float(target_bitrate) * 100
@@ -228,9 +230,10 @@ def Custom_Command(HTML, node, command):
HTML.CreateHtmlTestRowQueue(command, status, message)
return status == 'OK' or status == 'Warning'
def Custom_Script(HTML, node, script):
def Custom_Script(HTML, node, script, args):
logging.info(f"Executing custom script on {node}")
ret = cls_cmd.runScript(node, script, 90)
with cls_cmd.getConnection(node) as c:
ret = c.exec_script(script, 90, args)
logging.debug(f"Custom_Script: {script} on node: {node} - return code {ret.returncode}, output:\n{ret.stdout}")
status = 'OK'
message = [ret.stdout]
@@ -240,25 +243,80 @@ def Custom_Script(HTML, node, script):
return status == 'OK' or status == 'Warning'
def IdleSleep(HTML, idle_sleep_time):
logging.debug(f"sleep for {idle_sleep_time} seconds")
time.sleep(idle_sleep_time)
HTML.CreateHtmlTestRow(f"{idle_sleep_time} sec", 'OK', CONST.ALL_PROCESSES_OK)
return True
def Deploy_Physim(ctx, HTML, node, workdir, script, options):
logging.debug(f'Running physims on server {node} workdir {workdir}')
with cls_cmd.getConnection(node) as c:
sys_info = c.exec_script("scripts/sys-info.sh", 5)
ret = c.exec_script(script, 1500, options)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
HTML.CreateHtmlTestRowQueue('Query system info', 'OK', [sys_info.stdout])
with cls_cmd.getConnection(node) as ssh:
details_json = archiveArtifact(ssh, ctx, f'{workdir}/desc-tests.json')
result_junit = archiveArtifact(ssh, ctx, f'{workdir}/results-run.xml')
archiveArtifact(ssh, ctx, f'{workdir}/physim_log.txt')
archiveArtifact(ssh, ctx, f'{workdir}/LastTestsFailed.log')
archiveArtifact(ssh, ctx, f'{workdir}/LastTest.log')
test_status, test_summary, test_result = cls_analysis.Analysis.analyze_physim(result_junit, details_json, ctx.logPath)
if test_summary:
if test_status:
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result)
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
else:
HTML.CreateHtmlTestRowQueue('At least one physical simulator test failed!', 'KO', ["See below for details"])
HTML.CreateHtmlTestRowPhySimTestResult(test_summary, test_result)
logging.error('\u001B[1m Physical Simulator Fail\u001B[0m')
else:
HTML.CreateHtmlTestRowQueue('Physical simulator failed', 'KO', [test_result])
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.testCase_id = ''
self.repository = ''
self.branch = ''
self.testXMLfiles = []
self.desc = ''
self.ping_args = ''
self.ping_packetloss_threshold = ''
self.ping_rttavg_threshold =''
@@ -266,18 +324,15 @@ class OaiCiTest():
self.iperf_packetloss_threshold = ''
self.iperf_bitrate_threshold = ''
self.iperf_profile = ''
self.iperf_options = ''
self.iperf_tcp_rate_target = ''
self.finalStatus = False
self.air_interface=''
self.ue_ids = []
self.nodes = []
self.svr_node = None
self.svr_id = None
self.cmd_prefix = '' # prefix before {lte,nr}-uesoftmodem
def InitializeUE(self, HTML):
ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids]
def InitializeUE(self, node, HTML):
ues = [cls_module.Module_UE(n.strip(), node) for n in self.ue_ids]
messages = []
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.initialize) for ue in ues]
@@ -288,8 +343,8 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('N/A', 'OK', messages)
return True
def AttachUE(self, HTML):
ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
def AttachUE(self, node, HTML):
ues = [cls_module.Module_UE(ue_id, node) for ue_id in self.ue_ids]
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.attach) for ue in ues]
attached = [f.result() for f in futures]
@@ -304,8 +359,8 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ["Could not retrieve UE IP address(es) or MTU(s) wrong!"])
return success
def DetachUE(self, HTML):
ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
def DetachUE(self, node, HTML):
ues = [cls_module.Module_UE(ue_id, node) for ue_id in self.ue_ids]
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.detach) for ue in ues]
[f.result() for f in futures]
@@ -313,8 +368,8 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
return True
def DataDisableUE(self, HTML):
ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids]
def DataDisableUE(self, node, HTML):
ues = [cls_module.Module_UE(n.strip(), node) for n in self.ue_ids]
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.dataDisable) for ue in ues]
status = [f.result() for f in futures]
@@ -327,8 +382,8 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ["Could not disable UE data!"])
return success
def DataEnableUE(self, HTML):
ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids]
def DataEnableUE(self, node, HTML):
ues = [cls_module.Module_UE(n.strip(), node) for n in self.ue_ids]
logging.debug(f'disabling data for UEs {ues}')
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.dataEnable) for ue in ues]
@@ -342,8 +397,8 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('N/A', 'KO', ["Could not enable UE data!"])
return success
def CheckStatusUE(self,HTML):
ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids]
def CheckStatusUE(self, node, HTML):
ues = [cls_module.Module_UE(n.strip(), node) for n in self.ue_ids]
logging.debug(f'checking status of UEs {ues}')
messages = []
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
@@ -352,7 +407,7 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue('NA', 'OK', messages)
return True
def Ping_common(self, cn, ue, logPath):
def Ping_common(self, ctx, cn, ue):
ping_status = 0
ueIP = ue.getIP()
if not ueIP:
@@ -360,13 +415,12 @@ class OaiCiTest():
svrIP = cn.getIP()
if not svrIP:
return (False, f"CN {cn.getName()} has no IP address")
ping_log_file = f'ping_{self.testCase_id}_{ue.getName()}.log'
ping_log_file = f'/tmp/ping_{ue.getName()}.log'
ping_time = re.findall(r"-c *(\d+)",str(self.ping_args))
local_ping_log_file = f'{logPath}/{ping_log_file}'
if re.search('%cn_ip%', self.ping_args) or re.search(r'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+', self.ping_args):
raise Exception(f"ping_args should not have IP address: {self.ping_args}")
interface = f'-I {ue.getIFName()}' if ue.getIFName() else ''
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {svrIP} 2>&1 | tee /tmp/{ping_log_file}'
ping_cmd = f'{ue.getCmdPrefix()} ping {interface} {self.ping_args} {svrIP} 2>&1 | tee {ping_log_file}'
cmd = cls_cmd.getConnection(ue.getHost())
response = cmd.run(ping_cmd, timeout=int(ping_time[0])*1.5)
ue_header = f'UE {ue.getName()} ({ueIP})'
@@ -374,8 +428,7 @@ class OaiCiTest():
message = ue_header + ': ping crashed: TIMEOUT?'
return (False, message)
#copy the ping log file to have it locally for analysis (ping stats)
cmd.copyin(src=f'/tmp/{ping_log_file}', tgt=local_ping_log_file)
local_ping_log_file = archiveArtifact(cmd, ctx, ping_log_file)
cmd.close()
with open(local_ping_log_file, 'r') as f:
@@ -415,18 +468,13 @@ class OaiCiTest():
return (True, message)
def Ping(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
def Ping(self, ctx, node, HTML, infra_file="ci_infra.yaml"):
if self.ue_ids == [] or self.svr_id == None:
raise Exception("no module names in self.ue_ids or/and self.svr_id provided")
# Creating destination log folder if needed on the python executor workspace
with cls_cmd.getConnection('localhost') as local:
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
local.run(f'mkdir -p {logPath}', silent=True)
ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
ues = [cls_module.Module_UE(ue_id, node, infra_file) for ue_id in self.ue_ids]
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(self.Ping_common, cn, ue, logPath) for ue in ues]
futures = [executor.submit(self.Ping_common, ctx, cn, ue) for ue in ues]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
@@ -447,20 +495,19 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.ping_args, 'KO', messages)
return success
def Iperf_Module(self, cn, ue, idx, ue_num, logPath):
def Iperf_Module(self, ctx, cn, ue, idx, ue_num):
ueIP = ue.getIP()
if not ueIP:
return (False, f"UE {ue.getName()} has no IP address")
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 = ""
udpIperf = re.search('-u', iperf_opt) is not None
bidirIperf = re.search('--bidir', iperf_opt) is not None
client_filename = f'iperf_client_{self.testCase_id}_{ue.getName()}.log'
client_filename = f'/tmp/iperf_client_{ue.getName()}.log'
if udpIperf:
target_bitrate, iperf_opt = Iperf_ComputeModifiedBW(idx, ue_num, self.iperf_profile, self.iperf_args)
# note: for UDP testing we don't want to use json report - reports 0 Mbps received bitrate
@@ -468,21 +515,23 @@ 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 /tmp/{client_filename}', reportNonZero=False, silent=True)
cmd_ue.run(f'rm {client_filename}', reportNonZero=False, silent=True)
if cn.runIperf3Server():
# Clean up any existing iperf3 server processes on this port.
ret = cmd_svr.run(f"{cn.getCmdPrefix()} pkill -f '.*iperf3.*{port}'", reportNonZero=False)
# If pkill succeeds, it means there was a leftover iperf3 server.
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 >> /tmp/{client_filename}', timeout=t)
# note: copy iperf3 log to the current directory for log analysis and log collection
dest_filename = f'{logPath}/{client_filename}'
cmd_ue.copyin(f'/tmp/{client_filename}', dest_filename)
cmd_ue.run(f'rm /tmp/{client_filename}', reportNonZero=False, silent=True)
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)
elif bidirIperf:
@@ -490,22 +539,21 @@ 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, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
logging.debug(f'Iperf: iperf_args "{self.iperf_args}" iperf_packetloss_threshold "{self.iperf_packetloss_threshold}" iperf_bitrate_threshold "{self.iperf_bitrate_threshold}" iperf_profile "{self.iperf_profile}" iperf_options "{self.iperf_options}"')
def Iperf(self, ctx, node, HTML, infra_file="ci_infra.yaml"):
logging.debug(f'Iperf: iperf_args "{self.iperf_args}" iperf_packetloss_threshold "{self.iperf_packetloss_threshold}" iperf_bitrate_threshold "{self.iperf_bitrate_threshold}" iperf_profile "{self.iperf_profile}"')
if self.ue_ids == [] or self.svr_id == None:
raise Exception("no module names in self.ue_ids or/and self.svr_id provided")
# create log directory on executor node
with cls_cmd.getConnection('localhost') as local:
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
local.run(f'mkdir -p {logPath}', silent=True)
ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)]
ues = [cls_module.Module_UE(ue_id, node, infra_file) for ue_id in self.ue_ids]
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(self.Iperf_Module, cn, ue, i, len(ues), logPath) for i, ue in enumerate(ues)]
futures = [executor.submit(self.Iperf_Module, ctx, cn, ue, i, len(ues)) for i, ue in enumerate(ues)]
results = [f.result() for f in futures]
# each result in results is a tuple, first member goes to successes, second to messages
successes, messages = map(list, zip(*results))
@@ -526,10 +574,10 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', messages)
return success
def Iperf2_Unidir(self, HTML, CONTAINERS, infra_file="ci_infra.yaml"):
def Iperf2_Unidir(self, ctx, node, HTML, infra_file="ci_infra.yaml"):
if self.ue_ids == [] or self.svr_id == None or len(self.ue_ids) != 1:
raise Exception("no module names in self.ue_ids or/and self.svr_id provided, multi UE scenario not supported")
ue = cls_module.Module_UE(self.ue_ids[0].strip(),self.nodes[0].strip(), infra_file)
ue = cls_module.Module_UE(self.ue_ids[0].strip(), node, infra_file)
cn = cls_corenetwork.CoreNetwork(self.svr_id, self.svr_node, filename=infra_file)
ueIP = ue.getIP()
if not ueIP:
@@ -537,23 +585,17 @@ class OaiCiTest():
svrIP = cn.getIP()
if not svrIP:
return False
server_filename = f'iperf_server_{self.testCase_id}_{ue.getName()}.log'
ymlPath = CONTAINERS.yamlPath[0].split('/')
logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}'
server_filename = f'/tmp/iperf_server_{ue.getName()}.log'
iperf_time = Iperf_ComputeTime(self.iperf_args)
target_bitrate, iperf_opt = Iperf_ComputeModifiedBW(0, 1, self.iperf_profile, self.iperf_args)
t = iperf_time*2.5
with cls_cmd.getConnection('localhost') as local:
local.run(f'mkdir -p {logPath}')
with cls_cmd.getConnection(ue.getHost()) as cmd_ue, cls_cmd.getConnection(cn.getHost()) as cmd_svr:
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} iperf -B {ueIP} -s -u -i1 >> /tmp/{server_filename} &', timeout=t)
cmd_ue.run(f'rm {server_filename}', reportNonZero=False)
cmd_ue.run(f'{ue.getCmdPrefix()} timeout -vk3 {t} iperf -B {ueIP} -s -u -i1 >> {server_filename} &', timeout=t)
cmd_svr.run(f'{cn.getCmdPrefix()} timeout -vk3 {t} iperf -c {ueIP} -B {svrIP} {iperf_opt} -i1 >> /dev/null', timeout=t)
localPath = f'{os.getcwd()}'
# note: copy iperf2 log to the directory for log collection
cmd_ue.copyin(f'/tmp/{server_filename}', f'{logPath}/{server_filename}')
cmd_ue.run(f'rm /tmp/{server_filename}', reportNonZero=False)
success, msg = Iperf_analyzeV2UDP(f'{logPath}/{server_filename}', self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
local = archiveArtifact(cmd_ue, ctx, server_filename)
success, msg = Iperf_analyzeV2UDP(local, self.iperf_bitrate_threshold, self.iperf_packetloss_threshold, target_bitrate)
ue_header = f'UE {ue.getName()} ({ueIP})'
logging.info(f'\u001B[1;37;45m iperf result for {ue_header}\u001B[0m')
for l in msg.split('\n'):
@@ -564,288 +606,17 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', [f'{ue_header}\n{msg}'])
return success
def AnalyzeLogFile_UE(self, UElogFile,HTML,RAN):
if (not os.path.isfile(f'{UElogFile}')):
return -1
ue_log_file = open(f'{UElogFile}', 'r')
exitSignalReceived = False
foundAssertion = False
msgAssertion = ''
msgLine = 0
foundSegFault = False
foundRealTimeIssue = False
uciStatMsgCount = 0
pdcpDataReqFailedCount = 0
badDciCount = 0
f1aRetransmissionCount = 0
fatalErrorCount = 0
macBsrTimerExpiredCount = 0
rrcConnectionRecfgComplete = 0
no_cell_sync_found = False
mib_found = False
frequency_found = False
plmn_found = False
nrUEFlag = False
nrDecodeMib = 0
nrFoundDCI = 0
nrCRCOK = 0
mbms_messages = 0
nbPduSessAccept = 0
nbPduDiscard = 0
HTML.htmlUEFailureMsg=''
global_status = CONST.ALL_PROCESSES_OK
for line in ue_log_file.readlines():
result = re.search('nr_synchro_time|Starting NR UE soft modem', str(line))
sidelink = re.search('sl-mode', str(line))
if result is not None:
nrUEFlag = True
if sidelink is not None:
nrUEFlag = False
if nrUEFlag:
result = re.search('decode mib', str(line))
if result is not None:
nrDecodeMib += 1
result = re.search('found 1 DCIs', str(line))
if result is not None:
nrFoundDCI += 1
result = re.search('CRC OK', str(line))
if result is not None:
nrCRCOK += 1
result = re.search('Received PDU Session Establishment Accept', str(line))
if result is not None:
nbPduSessAccept += 1
result = re.search('warning: discard PDU, sn out of window', str(line))
if result is not None:
nbPduDiscard += 1
result = re.search('--nfapi STANDALONE_PNF --node-number 2', str(line))
if result is not None:
frequency_found = True
result = re.search('Exiting OAI softmodem', str(line))
if result is not None:
exitSignalReceived = True
result = re.search('System error|[Ss]egmentation [Ff]ault|======= Backtrace: =========|======= Memory map: ========', str(line))
if result is not None and not exitSignalReceived:
foundSegFault = True
result = re.search('[Cc]ore [dD]ump', str(line))
if result is not None and not exitSignalReceived:
foundSegFault = True
result = re.search('[Aa]ssertion', str(line))
if result is not None and not exitSignalReceived:
foundAssertion = True
result = re.search('LLL', str(line))
if result is not None and not exitSignalReceived:
foundRealTimeIssue = True
if foundAssertion and (msgLine < 3):
msgLine += 1
msgAssertion += str(line)
result = re.search('uci->stat', str(line))
if result is not None and not exitSignalReceived:
uciStatMsgCount += 1
result = re.search('PDCP data request failed', str(line))
if result is not None and not exitSignalReceived:
pdcpDataReqFailedCount += 1
result = re.search('bad DCI 1', str(line))
if result is not None and not exitSignalReceived:
badDciCount += 1
result = re.search('Format1A Retransmission but TBS are different', str(line))
if result is not None and not exitSignalReceived:
f1aRetransmissionCount += 1
result = re.search('FATAL ERROR', str(line))
if result is not None and not exitSignalReceived:
fatalErrorCount += 1
result = re.search('MAC BSR Triggered ReTxBSR Timer expiry', str(line))
if result is not None and not exitSignalReceived:
macBsrTimerExpiredCount += 1
result = re.search('Generating RRCConnectionReconfigurationComplete', str(line))
if result is not None:
rrcConnectionRecfgComplete += 1
# No cell synchronization found, abandoning
result = re.search('No cell synchronization found, abandoning', str(line))
if result is not None:
no_cell_sync_found = True
if RAN.eNBmbmsEnables[0]:
result = re.search('TRIED TO PUSH MBMS DATA', str(line))
if result is not None:
mbms_messages += 1
result = re.search(r"MIB Information => ([a-zA-Z]{1,10}), ([a-zA-Z]{1,10}), NidCell (?P<nidcell>\d{1,3}), N_RB_DL (?P<n_rb_dl>\d{1,3}), PHICH DURATION (?P<phich_duration>\d), PHICH RESOURCE (?P<phich_resource>.{1,4}), TX_ANT (?P<tx_ant>\d)", str(line))
if result is not None and (not mib_found):
try:
mibMsg = "MIB Information: " + result.group(1) + ', ' + result.group(2)
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
mibMsg = " nidcell = " + result.group('nidcell')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg
logging.debug(f'\033[94m{mibMsg}\033[0m')
mibMsg = " n_rb_dl = " + result.group('n_rb_dl')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
mibMsg = " phich_duration = " + result.group('phich_duration')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg
logging.debug(f'\033[94m{mibMsg}\033[0m')
mibMsg = " phich_resource = " + result.group('phich_resource')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
mibMsg = " tx_ant = " + result.group('tx_ant')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
mib_found = True
except Exception as e:
logging.error(f'\033[91m MIB marker was not found \033[0m')
result = re.search("Initial sync: pbch decoded sucessfully", str(line))
if result is not None and (not frequency_found):
try:
mibMsg = f"UE decoded PBCH successfully"
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
frequency_found = True
except Exception as e:
logging.error(f'\033[91m UE did not find PBCH\033[0m')
result = re.search(r"PLMN MCC (?P<mcc>\d{1,3}), MNC (?P<mnc>\d{1,3}), TAC", str(line))
if result is not None and (not plmn_found):
try:
mibMsg = f"PLMN MCC = {result.group('mcc')} MNC = {result.group('mnc')}"
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
plmn_found = True
except Exception as e:
logging.error(f'\033[91m PLMN not found \033[0m')
result = re.search(r"Found (?P<operator>[\w,\s]{1,15}) \(name from internal table\)", str(line))
if result is not None:
try:
mibMsg = f"The operator is: {result.group('operator')}"
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + '\n'
logging.debug(f'\033[94m{mibMsg}\033[0m')
except Exception as e:
logging.error(f'\033[91m Operator name not found \033[0m')
result = re.search("SIB5 InterFreqCarrierFreq element (.{1,4})/(.{1,4})", str(line))
if result is not None:
try:
mibMsg = f'SIB5 InterFreqCarrierFreq element {result.group(1)}/{result.group(2)}'
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + mibMsg + ' -> '
logging.debug(f'\033[94m{mibMsg}\033[0m')
except Exception as e:
logging.error(f'\033[91m SIB5 InterFreqCarrierFreq element not found \033[0m')
result = re.search(r"DL Carrier Frequency/ARFCN : \-*(?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
if result is not None:
try:
freq = result.group('carrier_frequency')
new_freq = re.sub('/[0-9]+','',freq)
float_freq = float(new_freq) / 1000000
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + 'DL Freq: ' + ('%.1f' % float_freq) + ' MHz'
logging.debug(f'\033[94m DL Carrier Frequency is: {freq}\033[0m')
except Exception as e:
logging.error(f'\033[91m DL Carrier Frequency not found \033[0m')
result = re.search(r"AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
if result is not None:
try:
prb = result.group('allowed_bandwidth')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + ' -- PRB: ' + prb + '\n'
logging.debug(f'\033[94m AllowedMeasBandwidth: {prb}\033[0m')
except Exception as e:
logging.error(f'\033[91m AllowedMeasBandwidth not found \033[0m')
ue_log_file.close()
if rrcConnectionRecfgComplete > 0:
statMsg = f'UE connected to eNB ({rrcConnectionRecfgComplete}) RRCConnectionReconfigurationComplete message(s) generated)'
logging.debug(f'\033[94m{statMsg}\033[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if nrUEFlag:
if nrDecodeMib > 0:
statMsg = f'UE showed {nrDecodeMib} "MIB decode" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if nrFoundDCI > 0:
statMsg = f'UE showed {nrFoundDCI} "DCI found" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if nrCRCOK > 0:
statMsg = f'UE showed {nrCRCOK} "PDSCH decoding" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if not frequency_found:
statMsg = 'NR-UE could NOT synch!'
logging.error(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if nbPduSessAccept > 0:
statMsg = f'UE showed {nbPduSessAccept} "Received PDU Session Establishment Accept" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if nbPduDiscard > 0:
statMsg = f'UE showed {nbPduDiscard} "warning: discard PDU, sn out of window" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if uciStatMsgCount > 0:
statMsg = f'UE showed {uciStatMsgCount} "uci->stat" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if pdcpDataReqFailedCount > 0:
statMsg = f'UE showed {pdcpDataReqFailedCount} "PDCP data request failed" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if badDciCount > 0:
statMsg = f'UE showed {badDciCount} "bad DCI 1(A)" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if f1aRetransmissionCount > 0:
statMsg = f'UE showed {f1aRetransmissionCount} "Format1A Retransmission but TBS are different" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if fatalErrorCount > 0:
statMsg = f'UE showed {fatalErrorCount} "FATAL ERROR:" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if macBsrTimerExpiredCount > 0:
statMsg = f'UE showed {fatalErrorCount} "MAC BSR Triggered ReTxBSR Timer expiry" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if RAN.eNBmbmsEnables[0]:
if mbms_messages > 0:
statMsg = f'UE showed {mbms_messages} "TRIED TO PUSH MBMS DATA" message(s)'
logging.debug(f'\u001B[1;30;43m{statMsg}\u001B[0m')
else:
statMsg = 'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)'
logging.debug(f'\u001B[1;30;41m{statMsg}\u001B[0m')
global_status = CONST.OAI_UE_PROCESS_NO_MBMS_MSGS
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + statMsg + '\n'
if foundSegFault:
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
if not nrUEFlag:
global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
else:
if not frequency_found:
global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
if foundAssertion:
logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + 'UE showed an assertion!\n'
if not nrUEFlag:
if not mib_found or not frequency_found:
global_status = CONST.OAI_UE_PROCESS_ASSERTION
else:
if not frequency_found:
global_status = CONST.OAI_UE_PROCESS_ASSERTION
if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + 'UE faced real time issues!\n'
if nrUEFlag:
if not frequency_found:
global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
else:
if no_cell_sync_found and not mib_found:
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m')
HTML.htmlUEFailureMsg=HTML.htmlUEFailureMsg + 'UE could not synchronize!\n'
global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
return global_status
def TerminateUE(self, HTML):
ues = [cls_module.Module_UE(n.strip()) for n in self.ue_ids]
def TerminateUE(self, ctx, node, HTML):
ues = [cls_module.Module_UE(n.strip(), node) for n in self.ue_ids]
with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor:
futures = [executor.submit(ue.terminate) for ue in ues]
futures = [executor.submit(ue.terminate, ctx) for ue in ues]
archives = [f.result() for f in futures]
archive_info = [f'Log at: {a}' if a else 'No log available' for a in archives]
messages = [f"UE {ue.getName()}: {log}" for (ue, log) in zip(ues, archive_info)]
HTML.CreateHtmlTestRowQueue(f'N/A', 'OK', messages)
return True
def DeployCoreNetwork(cn_id, HTML):
def DeployCoreNetwork(cn_id, ctx, HTML):
core_name = cn_id.strip()
cn = cls_corenetwork.CoreNetwork(core_name)
success, output = cn.deploy()
@@ -859,41 +630,11 @@ class OaiCiTest():
HTML.CreateHtmlTestRowQueue(core_name, 'KO', [msg])
return success
def UndeployCoreNetwork(cn_id, HTML):
# Ping, Iperf, DeployObject put logs into a path based on YAML. We
# can't do this here (because there is no yaml), so hardcode a path for
# "cn_logs" for the moment
logPath = f'{os.getcwd()}/../cmake_targets/log/cn_logs'
with cls_cmd.getConnection('localhost') as local:
local.run(f'mkdir -p {logPath}', silent=True)
def UndeployCoreNetwork(cn_id, ctx, HTML):
core_name = cn_id.strip()
cn = cls_corenetwork.CoreNetwork(core_name)
logs, output = cn.undeploy(log_dir=logPath)
logs, output = cn.undeploy(ctx=ctx)
logging.info(f"undeployed core network {core_name}, logs {logs}, output:\n{output}")
message = "Log files: " + ", ".join([os.path.basename(l) for l in logs])
message = "Log files:\n" + "\n".join([os.path.basename(l) for l in logs])
HTML.CreateHtmlTestRowQueue(core_name, 'OK', [message])
return True
def LogCollectBuild(self,RAN):
# Some pipelines are using "none" IP / Credentials
# In that case, just forget about it
if RAN.eNBIPAddress == 'none':
sys.exit(0)
if (RAN.eNBIPAddress != '' and RAN.eNBUserName != '' and RAN.eNBPassword != ''):
IPAddress = RAN.eNBIPAddress
UserName = RAN.eNBUserName
Password = RAN.eNBPassword
SourceCodePath = RAN.eNBSourceCodePath
else:
sys.exit('Insufficient Parameter')
with cls_cmd.getConnection(IPAddress) as cmd:
d = f'{SourceCodePath}/cmake_targets'
cmd.run(f'rm -f {d}/build.log.zip')
cmd.run(f'cd {d} && zip -r build.log.zip build_log_*/*')
def ShowTestID(self):
logging.info(f'\u001B[1m----------------------------------------\u001B[0m')
logging.info(f'\u001B[1m Test ID: {self.testCase_id} \u001B[0m')
logging.info(f'\u001B[1m {self.desc} \u001B[0m')
logging.info(f'\u001B[1m----------------------------------------\u001B[0m')

View File

@@ -1,23 +1,5 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
@@ -43,216 +25,42 @@ from pathlib import Path
import helpreadme as HELP
import constants as CONST
import cls_cmd
#-----------------------------------------------------------
# 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]
from cls_ci_helper import archiveArtifact
class StaticCodeAnalysis():
def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBIPAddress = ''
self.eNBUserName = ''
self.eNBPassword = ''
self.eNBSourceCodePath = ''
def CppCheckAnalysis(self, HTML):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Building on server: ' + lIpAddr)
cmd = cls_cmd.getConnection(lIpAddr)
self.testCase_id = HTML.testCase_id
# on RedHat/CentOS .git extension is mandatory
result = re.search('([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/build_log_{self.testCase_id}'
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')
# Analyzing the logs
cmd.copyin(f'{logDir}/cppcheck-bionic.txt', 'cppcheck-bionic.txt')
cmd.copyin(f'{logDir}/cppcheck-focal.txt', 'cppcheck-focal.txt')
cmd.close()
CCR = CppCheckResults()
CCR_ref = CppCheckResults()
vId = 0
for variant in CCR.variants:
refAvailable = False
if self.ranAllowMerge:
refFolder = str(Path.home()) + '/cppcheck-references'
if (os.path.isfile(refFolder + '/cppcheck-'+ variant + '.txt')):
refAvailable = True
with open(refFolder + '/cppcheck-'+ variant + '.txt', 'r') as refFile:
for line in refFile:
ret = re.search(' (?P<nb_errors>[0-9\.]+) errors', str(line))
if ret is not None:
CCR_ref.nbErrors[vId] = int(ret.group('nb_errors'))
ret = re.search(' (?P<nb_warnings>[0-9\.]+) warnings', str(line))
if ret is not None:
CCR_ref.nbWarnings[vId] = int(ret.group('nb_warnings'))
if (os.path.isfile('./cppcheck-'+ variant + '.txt')):
xmlStart = False
with open('./cppcheck-'+ variant + '.txt', 'r') as logfile:
for line in logfile:
ret = re.search('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)
if self.ranAllowMerge and refAvailable:
if CCR_ref.nbErrors[vId] == CCR.nbErrors[vId]:
logging.debug(' No change in number of errors')
elif CCR_ref.nbErrors[vId] > CCR.nbErrors[vId]:
logging.debug(' Good! Decrease in number of errors')
else:
logging.debug(' Bad! increase in number of errors')
if CCR_ref.nbWarnings[vId] == CCR.nbWarnings[vId]:
logging.debug(' No change in number of warnings')
elif CCR_ref.nbWarnings[vId] > CCR.nbWarnings[vId]:
logging.debug(' Good! Decrease in number of warnings')
else:
logging.debug(' Bad! increase in number of warnings')
# Create new reference file
if not self.ranAllowMerge:
refFolder = str(Path.home()) + '/cppcheck-references'
if not os.path.isdir(refFolder):
os.mkdir(refFolder)
with open(refFolder + '/cppcheck-'+ variant + '.txt', 'w') as refFile:
refFile.write(vMsg)
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, 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
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Building on server: ' + lIpAddr)
cmd = cls_cmd.getConnection(lIpAddr)
self.testCase_id = HTML.testCase_id
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/build_log_{self.testCase_id}'
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.bionic {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')
cmd.run('docker volume prune --force')
# Analyzing the logs
cmd.copyin(f'{logDir}/oai-formatting-check.txt', 'oai-formatting-check.txt')
file = archiveArtifact(cmd, ctx, f'{logDir}/oai-formatting-check.txt')
cmd.close()
finalStatus = 0
if (os.path.isfile('./oai-formatting-check.txt')):
if (os.path.isfile(file)):
analyzed = False
nbFilesNotFormatted = 0
listFiles = False
@@ -263,7 +71,7 @@ class StaticCodeAnalysis():
gnuGplLicenceFiles = []
suspectLicence = False
suspectLicenceFiles = []
with open('./oai-formatting-check.txt', 'r') as logfile:
with open(file, 'r') as logfile:
for line in logfile:
ret = re.search('./ci-scripts/checkCodingFormattingRules.sh', str(line))
if ret is not None:

View File

@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Colosseum Automated Testing
These scripts are used by a Jenkins [job](../Jenkinsfile-colosseum) to trigger automated testing of OpenAirInterface (OAI) gNB and softUE on the [Colosseum](https://www.northeastern.edu/colosseum/) Open RAN digital twin.

View File

@@ -1,24 +1,5 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
set -x

View File

@@ -1,24 +1,5 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
set -eu

View File

@@ -1,24 +1,5 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
set -eu

View File

@@ -1,24 +1,5 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
set -eu

View File

@@ -1,24 +1,5 @@
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
set -xeu

View File

@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# Configuration files: naming style guide
The configuration files should have the following name format:

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#/* configuration for channel modelisation */
#/* To be included in main config file when */
#/* channel modelisation is used (rfsimulator with chanmod options enabled) */

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "rcc-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "rcc-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
RUs =
(
{

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
RUs =
(
{

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
@@ -200,9 +202,11 @@ RUs = (
}
);
rfsimulator: {
rfsimulator = (
{
serveraddr = "server";
};
}
);
THREAD_STRUCT = (
{

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-B38");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-B38");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
@@ -233,9 +235,11 @@ RUs =
}
);
rfsimulator: {
rfsimulator = (
{
serveraddr = "server";
};
}
);
THREAD_STRUCT =
(

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "enb-l2sim-vnf");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
@@ -233,9 +235,11 @@ RUs =
}
);
rfsimulator: {
rfsimulator = (
{
serveraddr = "server";
};
}
);
THREAD_STRUCT =
(

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
@@ -233,9 +235,11 @@ RUs =
}
);
rfsimulator: {
rfsimulator = (
{
serveraddr = "server";
};
}
);
THREAD_STRUCT =
(

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-in-docker");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
@@ -233,9 +235,11 @@ RUs =
}
);
rfsimulator: {
rfsimulator = (
{
serveraddr = "server";
};
}
);
THREAD_STRUCT =
(

Some files were not shown because too many files have changed in this diff Show More