Integration: `2025.w26`
See merge request oai/openairinterface5g!3493
* !3435 Cleanup PDU Session Handling in RRC/NGAP
* !3371 Add NAS Authentication Reject enc/dec library and unit test
* !3490 nr pdcp security: add a 'decipher' API function
* !3477 CI: Upgrade Aerial version to 25-1
* !3491 Fix Msg3 with MAC CE for C-RNTI and RRCReestablishmentComplete
Fix Msg3 with MAC CE for C-RNTI and RRCReestablishmentComplete
- Only trigger RRCReconfiguration if UE is not performing RRCReestablishment
- The RRCReconfiguration will be triggered by the RRCReestablishmentComplete
Since this MR fixes a regression, additional info can be found in the following
closed issues and merged MR:
- #687 (closed)
- #747 (closed)
- !2600 (merged)
CI: Upgrade Aerial version to 25-1
- Update the Nvidia L1 (cuBB) from version 24-3 to 25-1
- Decrease the number of cores dedicated to the OAI gNB; testing showed
it does not need that many
Cleanup PDU Session Handling in RRC/NGAP
Currently, NGAP and RRC share the same structures and responsibilities when
handling PDU Session information: this creates tight coupling, redundancy, and
makes the code harder to maintain.
- NGAP should be responsible only for: Protocol-specific encoding/decoding
(3GPP TS 38.413)
- RRC should own: PDU Session handling and storage in the UE context
This MR is the first step in a broader refactoring of the PDU Session handling
code across NGAP and RRC layers, with the goal of splitting responsibilities
cleanly between both modules.
- Unified gtpu_tunnel_t for tunnel endpoint config (formerly f1u_tunnel_t)
- Refactored and relocated PDU Session struct definitions for better separation
between NGAP and RRC
- Moved pdusession_t for PDU Session handling out of NGAP, now defined and
managed by RRC only
- Defined 3GPP TS 38.413 message-specific structs in NGAP module
- NGAP now decodes NGAP PDU Session Resource Setup/Modify IEs and transfers
decoded data to RRC via ITTI
- Add helper functions to copy from NGAP message to pdusession_t
- Introduced new encoders/decoders/helpers in NGAP for handling PDU Session
Resource Setup/Modify procedures (e.g. decode_pdusession_transfer)
- Migrated to NGAP and removed duplicated logic for QoS information decoding
(fill_qos)
- Improved logging of GTP tunnel info
- Merged redundant functions (f1u_dl_gtp_update and f1u_ul_gtp_update)
- Removed unused code and obsolete types
- do free_func in seq_arr_erase_it on the provided range and updated unit test
- Other fixes and simplifications (e.g. simplified and clarified naming of
tunnel/session parameters and structs)
This cleanup improves code readability, has a high code churn (the deletions are
~159.7% of the insertions) and prepares for better modularity before the
refactoring of PDU Session handling in RRC/NGAP.
Add NAS Authentication Reject enc/dec library and unit test
This MR introduces the library for encoding/decoding of NAS Authentication
Reject (8.2.5.1 of 3GPP TS 24.501) and relevant unit test.
The message is sent by the AMF to the UE to indicate that the authentication
procedure has failed. A NAS handler was also introduced.
CI: Add "may_fail" step to execute flaky steps
Add a generic may_fail CI XML step option that indicates the CI step may
fail, but the CI would still be marked as succeeded (instead of skipping
all steps and mark as failed). The cause of this failure depends on the
specific step, e.g., Iperf failing because of low throughput. This
allows to clean up some code and e.g. remove the command_fail option of
Custom_Command, which is then superfluous (and less generic). An
inconvenience is that those may_fail steps will be marked as "failed" in
the HTML. Later cleanup can correct this.
The may_fail is used for executing FHI7.2 testing to push 700 Mbps in DL
(close to the maximum).
Fix some bugs and add some clean up, see commit messages.
Enabling usage of ulsyncvalidityDuration timer in SIB19
ntn-UlSyncValidityDuration in SIB19 from Spec 38.331 v17.12 A validity
duration configured by the network for assistance information which
indicates the maximum time duration (from epochTime) during which the UE
can apply assistance information without having acquired new assistance
information. The unit of ntn-UlSyncValidityDuration is second. Value s5
corresponds to 5 s, value s10 indicate 10 s and so on.
ntn-UlSyncValidityDuration-r17 ENUMERATED{ s5, s10, s15, s20, s25, s30, s35,s40, s45, s50, s55, s60, s120, s180, s240, s900}
Implementation of epochtime is under discussion.
It can be configured in configuration file according to the above
enumeration. For GEO - 240s, MEO - 20s, LEO-5s can be used.
Handle authentication not accepted by the network. The handler assumes the message
is not integrity protected, processes the received NAS message and logs whether a
EAP-failure is enclosed. The UE enters state: 5GMM-DEREGISTERED.
Not done in this commit: the UE shall performs actions as per 5.4.1.3.5 of
3GPP TS 24.501, including (1) Abort any ongoing 5GMM procedure
(2) Stop all active timers: T3510, T3516, T3517, T3519, T3520, T3521
(3) Delete stored SUCI. (4) handle EAP-failure message.
- This is to avoid the Docker image builder from being confused in case we have multiple nvIPC files in `/opt/nvidia-ipc`
- This occurs when we have an MR to upgrade the cuBB image
USRP lib: fix incorrect config check for time_source fallback
Corrected a logic bug in usrp_lib.cpp where the code mistakenly checked
openair0_cfg[0].clock_source instead of time_source when a time_source
was already specified in usrp_args.
Also improved the warning log to clarify that the config value is being
ignored in favor of the explicit user-provided usrp_args.
Co-authored-by: Alexandre Serio alexandre.j.serio@altice.pt
NAS Registration Reject: Add bounds and lengths checks
This change adds lengths checks to the received registration reject
message and also performs a bounds check for the received cause.
Since the cause is not checked, any string in the memory can be
dereferenced, possibly leading to DoS.
Signed-off-by: Eduard Vlad eduard.vlad@rwth-aachen.de
Finalize FAPI dump functions, add Digital Beamforming Table and Precoding Matrix
Table to CONFIG.request
This MR finalizes the addition of dump utility functions for the PARAM.response,
CONFIG.request, CONFIG.response, TX_DATA.request and UCI.indication messages.
These functions are intended to be used to aid in debugging FAPI messages between
the VNF and the PNF by printing out every parameter in a more readable form,
instead of a simple hexdump. These are also used by the nFAPI Hex Parser utility,
to be able to debug an Hex dump provided from elsewhere.
Furthermore, this MR also adds the necessary logic to send/receive the Digital
Beamforming Table and Precoding Matrix Table, this in the CONFIG.request message.
This is achieved by the addition of 2 Vendor Extension TLVs (0xA002 and 0xA003),
in order to be able to reuse existing logic to pack/unpack the data. Note: The
present implementation predicts the existence of multiple instances of the
Precoding Matrix Table via the parameter num_pm_idx, whic is not present in the
SCF specification. Note: The created TLVs are only used to ease the pack/unpack
procedure, by allowing to reuse already existing logic for other TlVs, the tag
and length are not sent.
The necessary additions to the utility functions are done to account for these
table. The CONFIG.request unitary test is changed to fill these tables with
randomized data to test transport and copy.
Motivation of the commit:
Previously, the RRC module on the NGAP interface directly handled ASN.1 decoding
of NGAP PDU Session Resource items, that was directly stored in pdusession_t, i.e.
in the UE context. Decode logic between Setup and Modify was also duplicated.,
e.g. fill_qos/fill_qos2. The idea behind this change is to achieve this flow:
(1) NGAP handler: decoding (2) ITTI to RRC: transfer decoded message (3) RRC
handler: process decoded message, e.g. store in UE context, etc..
The goal of this commit is to:
* improve the NGAP decoding library by adding decoding functions
* let RRC handle the already decoded data
* enhance error handling, with decode failures now consistently detected and rejected early
* have a cleaner, more maintainable code with fewer duplications and a clearer separation of modules
Changes:
* Moved all ASN.1 decode logic for PDU Session Resource items into the NGAP library
* Introduced decode functions for NGAP IEs whenever necessary, e.g. decode_TNLInformation
decode_pdusession_transfer
* Removed duplicate fill_qos functions and centralized QoS handling in NGAP
* Added function to copy from NGAP PDU Session Resource item to RRC pdusession_t: this actually
replaces decodePDUSessionResourceSetup in RRC, copying from the decoded NGAP struct to
the UE context pdusession_t
Motivation:
The previous code had overlapping and partially inconsiste definitions of
`pdusession_t` and related structures across NGAP and RRC. This struct type
was used for either the data stored in the UE context and the NGAP message
IEs holding the PDU session to setup/modify information.
This patch aims to separte the `pdusession_t` in RRC, where it logically belongs,
since RRC owns the state of the PDU sessions. NGAP should only
deal with protocol messages, i.e. enc/dec and transfer structures to RRC.
This clarifies module ownership. This also makes the code easier to maintain.
Changes:
* Moved `pdusession_t` definition from NGAP (`ngap_messages_types.h`) to RRC
(`nr_rrc_defs.h`)
* Added a simpler `pdusession_resource_item_t` structure to NGAP for use in
protocol messages
* Adjusted NGAP structures accordingly (Initial Context Setup, PDU Session
Setup Request, and PDU Session Modify Request).
* do decodePDUSessionResourceSetup to decode the NGAP IEs holding PDU session
information and store what necessary in the UE context PDU Session IE: NOTE
this changes were necessary since previously this function was acting on
the common NGAP/RRC pdu_session_t struct
Rename the struct members:
`pdusession_param` to `pdusession` in NGAP Initial Context Setup Request
`pdusession_setup_params` in `ngap_pdusession_setup_req_t`
`pdusession_modify_params` and `ngap_pdusession_modify_req_t`
Motivation:
Clarify the role of GTP tunnel endpoint IDs in PDU session handling. Previously,
the struct members (gNB_teid_N3, UPF_teid_N3, etc.) were confusingly named and
duplicated with separate transport-layer address fields.
This refactoring replaces these with explicit n3_incoming and n3_outgoing members using
gtpu_tunnel_t. This aligns with GTP conventions: "incoming TEID" refers to the
TEID received from the remote peer (UPF on N3), while "outgoing TEID" is the
TEID sent by the local entity (NG-RAN on N3) to the remote peer.
Benefits:
* Improves readability and clarity of the code
* Reduces redundant struct members, i.e. remove UPF_teid_N3, UPF_addr_N3
* Aligns naming with 3GPP conventions for transport layer tunnels
Changes:
* Replace gtp_addr_N3, gNB_teid_N3, gtp_teid, upf_addr with n3_incoming and n3_outgoing
* Update all related code to use the new struct members
* Aligns naming with 3GPP conventions for transport layer tunnels
This struct is used in different layers, e.g. RRC, NGAP: therefore it
has been moved to platform_types.h.
Also, the struct holds the tunnel endpoint configuration for any GTP-U
tunnel, therefore the f1u prefix is not accurate and was updated
to a more generic gtpu.
* Remove drb_is_active: function is unused and the logic will be later
added to another function to add DRBs if necessary
* Remove unused NGAP structs and empty TODO functions
* Remove unused pdusession_setup_req_t struct definition
The seq_arr_erase_it function was modifying start_it during the free_func loop,
which led to incorrectly apply the free_func on the whole array.
This commit makes sure the elements "freed" are only those in the range and not the whole seq_arr.
* Fixes the logic by introducing a temporary iterator for the free loop,
preserving start_it and end_it for correct offset calculations.
* Adds a regression test in test_seq_arr to verify that only the selected
subrange is erased and that free_func is called exactly on that range.
DL NAS Transport: Fix Message Type retrieval on too short message
The change addresses the SM message type retrieval for DL NAS Transport
messages. The assumption of an offset 17 = 7 (MM Sec) + 3 (MM Plain) + 1
(IEI) + 2 (Len) + 4 (SM) is correct.
However, if the DL NAS Transport is received in a plain header, the
lengths would not add up anymore. (This is not complying with the
standard, so not allowed, but possible). The check for the length is
necessary to not process arbitrary memory contents beyond the
pdu_buffer.
Suspend RBs at UE
In case of suspended radio bearer (by RRC), the MAC needs to discarded received
PDUs and avoid to transmit using LCID related to that RB
"multi-ue profile" was a specific iperf option to do iperf across
multiple UEs. However, this is not necessary anymore, the Iperf
handling multiple UEs "implicitly" (based on the number of UEs).
As of the parent commit, there is a generic "may_fail" option through
which we could still ignore an error. Thus, command_fail is superfluous,
and avoids some extra code.
Further, in all these cases, we should better be informed about any
error, so let's not use may_fail for these tests.
There might be various occasions where a CI step should be attempted to
be executed, despite a chance of failing. For instance, we might want
to try executing an instable Iperf test, and still mark the CI as
passing if it fails.
This commit introduces a generic "may_fail" option that will mark any CI
test as succeeded, despite having failed.
Ideally, we would print a warning in the HTML code, but this is not
possible because each step emits its own HTML code, instead of the main
loop handling this. We can improve this in the future.
SPEC 38.331 section 5.2.2.6
Inform MAC that UL SYNC got lost because of T430 expiry
- Send message NR_MAC_RRC_CONFIG_RESET with cause UL_SYNC_LOST_T430_EXPIRY to MAC
Reacquire SIB19 after T430 expiry
This is not checked in this commit
- RACH needs to be performed through probably PDCCH order to reobtain UL-SYNC
- system usecase involving Recovery from T430 expiry not tested yet as that requires changes on gNB side.
Spec 38.331 section 5.2.2.4.21 indicates this
1> start or restart T430 for serving cell with the timer value set to ntn-UlSyncValidityDuration for the serving cell
from the subframe indicated by epochTime for the serving cell;
NOTE: UE should attempt to re-acquire SIB19 before the end of the duration indicated by ntn-UlSyncValidityDuration and epochTime
Epochtime IE
When explicitly provided through SIB, or through dedicated signaling, the EpochTime is the starting time of a DL
sub-frame, indicated by a SFN and a sub-frame number signaled together with the assistance information.
For serving cell, the field sfn indicates the current SFN or the next upcoming SFN after the frame where the message indicating the epochTime is received.
This field is mandatory present when ntn-Config is provided in dedicated configuration.
gNB implementation related to epochtime will be done in a separate merge request.
Adds the packing and unpacking functions needed for the PM Table in CONFIG.request
This table tag is specified in SCF222.10.06(0x104B), previous versions didn't have a tag for this table, and this version of the spec introduces the parameter `num_pm_idx`, previously not present.
A struct nfapi_nr_pm_tlv_ve_t is added to represent this TLV in order to be able to use the pack_nr_tlv function.
The necessary additions to the utility functions are done to account for this table.
The unitary test is changed to fill this table with randomized data to test transport and copy.
Adds the packing and unpacking functions needed for the DBT Table in CONFIG.request
This table tag is specified in SCF222.5.0 (0x1043) and this tag is used to transport the table, previous versions did not include a tag for the table.
A struct nfapi_nr_dbt_tlv_ve_t is added to represent this TLV in order to be able to use the pack_nr_tlv function.
The necessary additions to the utility functions are done to account for this table.
The unitary test is changed to fill this table with randomized data to test transport and copy.
NR UE fallback to RRCSetup from RRCReestablishment
Implementation of the procedure to handle reception of RRCSetup as response
to RRCReestablishment request
Step 004000 appears double in the XML description. Remove one to avoid
that it is executed twice (because the Python code goes through the list
of test descriptions and executes all that match the current ID =>
double if appears twice).
Corrected a logic bug in usrp_lib.cpp where the code mistakenly checked
openair0_cfg[0].clock_source instead of time_source when a time_source
was already specified in usrp_args.
Also improved the warning log to clarify that the config value is being
ignored in favor of the explicit user-provided usrp_args.
Co-authored-by: Alexandre Serio <alexandre.j.serio@altice.pt>
Integration: `2025.w24`
Closes#965
See merge request oai/openairinterface5g!3476
* !3354 Preparation Work for N2 Handover
* !3383 Add configurable values of NR RLC and NR PDCP to the configuration file
* !3468 Resolve "SSB frequency at gnb.sa.band78.fr1.24PRB.usrpb210.conf is invalid"
* !3466 YAML related updates
* !3460 SRS configuration
* !3474 Fix AMF selection fallback by PLMN ID when no UE identity is present or matching
* !3473 Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP
* !3169 NR RU improvements for analog beamforming
* !3456 CI: update config for AW2S pipeline
* !3369 Add Security Mode Reject lib/unit test and adopt in stack
* !3457 Fix NR reestablishment
* !3412 [E2 agent] E2AP README update and OAI-FlexRIC CI pipeline improvements
[E2 agent] E2AP README update and OAI-FlexRIC CI pipeline improvements
- E2AP README - add OSC nearRT-RIC section; update with proper FlexRIC
links, and explanations on prerequisites, as well as for xApps
- OAI-FlexRIC CI - use separate containers for xApps
- add reference files for CU-UP/CU-CP
- add logging for KPM NSSAI condition
Fix NR reestablishment by implementing the "DRB-suspend" at the MAC.
This means that the during reestablishment, gNB MAC discards received
DRB packets, and does not schedule DRB. Fix a couple of additional
issues in reestablishment. # Please enter a commit message to explain
why this merge is necessary,
For additional information, see
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/2668#note_119369
The spCellConfig is to be dropped during reestablishment and to be
applied after reconfiguration. Implement this using the
RRCReconfigurationComplete acknowledgment from the CU to the DU,
applying the spCellConfig if present (which signals a prior
reestablishment). Remove a prior flag that is not needed anymore, and
do not "guess" when is the reconfiguration, because it is now handled in
the case of the ack.
The spCellConfig is not relevant as long as we use a common search space
for DCIs (and the activation of dedicated search space happens after
applying spCellConfig). For PUCCH, there is the PDSCH transmission of
RRCReconfiguration which gets ack'ed in the default PUCCH.
RRCReconfigurationComplete is sent in PUSCH (again through common
search space). In theory, there cannot be another PUCCH before the
application of spCellConfig, as all bearers are still suspended, and
there should not be another SRB1 transmission in the meantime, as only
one RRC transaction can be active at a time.
Co-authored-by: francescomani <email@francescomani.it>
Add a flag for each RB that tracks suspension state. Mark all RBs
(except SRB1) as suspended on reestablishment, and de-suspend on
reconfiguration. Only check RLC status for non-suspended RBs. For UL
data traffic, check that DRB/SRB2 exist (SRB1 should be there as soon as
the UE context exists).
Add Security Mode Reject lib/unit test and adopt in stack
This MR is adding the library for the NAS Security Mode Reject, and
relevant unit test.
The UE shall send a SECURITY MODE REJECT containing a 5GMM cause that
typically indicates one of the following cause values: (23) UE security
capabilities mismatch. (24) security mode rejected, unspecified
- The message shall be protected if a security context is available.
- The message is adopted in the handling of Security Mode Command failure.
See 3GPP TS 24.501 5.4.2.5 "NAS security mode command not accepted by
the UE".
This MR includes changes from !3262:
> This patch series addresses a security issue where the UE improperly
> accepts a Security Mode Command (SMC) without an authentication header
> (Security Header 0). This behavior violates TS 24.501 and enables an
> attacker to bypass authentication, set integrity protection to NULL
> (NIA0), and reconfigure the UE without proper verification.
>
> We identified the following issues:
>
> 1. The UE currently accepts unauthenticated SMC messages, even
> allowing NIA0 and EIA0 to be set outside emergency mode.
> 2. When applying NIA0, the MAC field remains uninitialized,
> consistently containing the sequence 0xFF3F0000, making it feasible
> to bypass authentication and enforce insecure configurations.
> 3. The UE does not properly signal security mode failures to the Core
> Network.
>
> This patch series tries to address the above-mentioned issues:
>
> 1. Reject unauthenticated SMC messages, enforcing the requirement that
> they must be integrity-protected.
> 2. Validate MAC before applying security settings, ensuring that only
> authenticated messages are accepted.
> 3. Tear down the security context if an integrity check fails.
> 4. Introduce the Security Mode Reject message to inform the Core
> Network of failed SMC procedures, as required by TS 24.501.
This change performs the algorithm rejection in the corresponding NAS
handler for 5G, since the protocol definitions differ between LTE and
5G, regarding NIA0/EIA0 user plane traffic.
Therefore, for 5G NIA0 is rejected, since it is not allowed under normal
circumstances, while LTE user plane traffic can indeed have EIA0
selected.
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
It is not allowed to accept an unauthenticated SMC message,
as this effectively bypasses all security measures and
enables a malicioius attacker to compromise the confidentiality
and integrity of exchanged messages.
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
Retrieving the mac is necessary during the handling of the SMC, since the
context is generated from the specified keys therein. Therefore, it is
necessary to check the MAC right after generation and ensure the authenticity
of the message. If it is not given, the message must be rejected.
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
This is necessary to indicate to the Core network, that
the security mode command procedure has failed.
Check for the security context presence when generating the Security Mode
reject message: according to 3GPP TS 24.501 5.4.2.5 "NAS security mode command
not accepted by the UE" The UE shall send a SECURITY MODE REJECT containing
a 5GMM cause that typically indicates one of the following cause values:
(23) UE security capabilities mismatch
(24) security mode rejected, unspecified
The message shall be protected if a security context is available
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Co-authored-by: Guido Casati <hello@guidocasati.com>
This 5GMM message is required for an invalid security mode command,
e.g. when the MAC integrity fails, or the wrong Security Header is set.
* Add encode/decode functions for common IEs in fgmm_lib: this library
provides encoding/decoding helpers for IEs shared across multiple
NAS messages. The goal is to avoid the legacy approach of creating
separate files per IE
* add NAS Cause enc/dec lib
* Adopted byte_array_t to handle the buffer
Co-authored-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP
Fix bugs across various layers, mostly layer 3, including memory leaks.
See the commits for more details.
Fix AMF selection fallback by PLMN ID when no UE identity is present or matching
If a mask is present (i.e., not zero), AMF selection by PLMN ID may
still fail, causing the AMF selection process to skip the fallback
option, i.e. selection by PLMN ID, when no UE identity is available or
when no match is found.
This MR adds also warnings in case there's a match for the AMF is not
found.
SRS configuration
- Fix segmentation fault, a memory leak, and LOGs for SRS usage
NFAPI_NR_SRS_BEAMMANAGEMENT
- Refactor SRS configuration;
- Add SRS ResourceSet to get the SNR measurements at MAC layer
In this MR we have 2 SRS ResourceSet, for the same SRS Resource. This
way, in addition to obtaining the UL-RI, we also obtain the SNR in the
MAC and fill the PRB Black list.
This branch has been tested with COTS UE and with RFSim. The measured
values seem correct.
Using the USIM interface in the MAC is non-sensical (violates layer
separation). Add header include in nr-softmodem.c, which previously came
through nr_mac_gNB.h -> usim_interface.h.
Avoid leaking memory upon failed socket binding by calling
freeaddrinfo() before exiting in error cases.
Fixes leak:
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x0000004ac038 in malloc (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x4ac038) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
#1 0x7f0fdd92e2a6 in getaddrinfo (/lib64/libc.so.6+0x1202a6) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
#2 0x00000043d7ad in getaddrinfo (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x43d7ad) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
#3 0x000000700c73 in udpServerSocket(openAddr_s) /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:486:17
#4 0x000000700c73 in gtpv1Init /home/richie/oai/openair3/ocp-gtpu/gtp_itf.cpp:546:10
#5 0x000000c692b8 in cuup_init_n3 /home/richie/oai/openair2/E1AP/e1ap.c:744:61
#6 0x000000549ea1 in create_gNB_tasks /home/richie/oai/executables/nr-softmodem.c:320:7
#7 0x000000549ea1 in main /home/richie/oai/executables/nr-softmodem.c:619:15
#8 0x7f0fdd8115f4 in __libc_start_call_main (/lib64/libc.so.6+0x35f4) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
#9 0x7f0fdd8116a7 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x36a7) (BuildId: 2b3c02fe7e4d3811767175b6f323692a10a4e116)
#10 0x000000408524 in _start (/home/richie/oai/cmake_targets/ran_build/build/nr-softmodem+0x408524) (BuildId: 875d6e5bc54d7c89bdcf151452f12703cb6fd110)
This printf just shows which config sections are being read, but this
has no useful information for a user. It was introduced in 7731f5bd2d
but was not present prior to this commit, either.
YAML related updates
- Add common function config_common_getdefault
- Handle exceptions from the yaml-cpp library, transform them into
understandable errors written to stderr
- Add some unit tests.
Add configurable values of NR RLC and NR PDCP to the configuration file
This is for the gNB (the UE gets the values from the gNB).
The physical simulators were also adapted (we put the previously
hardcoded values that were everywhere in the code into the simulators
themselves). I don't think we need to have those values configurable for
the simulators, but I can study the possibility to add this if someone
tells me it's important (if not important I prefer not to do it, I am
not sure if it is trivial to do or not).
Preparation Work for N2 Handover
This MR introduces preliminary improvements to support !3334.
Refactored utility NGAP functions
- Moved allocAddrCopy to NGAP utilities
Decoding Functions for NGAP IEs:
- Added common decoding functions (decode_ngap_guami,
decode_ngap_UEAggregateMaximumBitRate, decode_ngap_nssai, etc.)
- Adopted these functions across the NGAP stack
Improvements to RRC and Handover Handling:
- Enhanced get_neighbour_cell_information and get_neighbour_config to
differentiate input parameters (cell by NR Cell ID vs. gNB by PCI)
- Used byte_array_t in nr_initiate_handover
- Introduced RRCReconfigurationParams_t to structure RRCReconfiguration
IEs
- Added a function to build NR_RRCReconfiguration_IEs_t
- Adopted this approach in do_RRCReconfiguration and refactored the
function
- Refactored the handling of Dedicated NAS message list
- Add masterKeyUpdate handling in RRCReconfiguration generation
PDCP Re-Establishment Improvements:
- Enabled PDCP re-establishment for SRB1/SRB2 based on a bitmap in
createSRBlist (3GPP TS 38.331 RadioBearerConfig)
NH & KgNB Key Management:
- Added NH derivation function as per 3GPP TS 33.501 A.10
- Moved KgNB derivation function to key_nas_deriver utilities
Add the ability to pack/unpack 2 new TLVs for analog beamforming
total_num_beams_vendor_ext and analog_beam_list
Add the unpack related changes for the first 2 vendor extension TLVs introduced related to beamforming.
For the moment the packing is guarded by an Assert to ensure it is not used.
Add the necessary utility function changes to support these VE TLVs
Add the necessary changes to the corresponding unitary test for pack/unpack,
commented for the moment, since the packing is disabled with an Assert.
The mask could be present, .e.g not zero, but the selection of the AMF could
fail. This would lead to a skipping the selection of the AMF by PLMN ID,
which is the last option when no UE identity is present and/or matching.
Free memory allocated in NGAP after use in RRC.
Direct leak of 29 byte(s) in 1 object(s) allocated from:
> #0 0x7f11200b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
> #1 0x558b7fcd0137 in malloc_or_fail /n2-handover-preparation/common/utils/utils.h:86
> #2 0x558b7fcd0137 in create_byte_array /n2-handover-preparation/common/utils/ds/byte_array.c:32
> #3 0x558b7fdb7a5c in rrc_gNB_send_NGAP_NAS_FIRST_REQ /n2-handover-preparation/openair2/RRC/NR/rrc_gNB_NGAP.c:183
> #4 0x558b7fd2ab30 in rrc_gNB_process_RRCSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:439
> #5 0x558b7fd2ab30 in handle_rrcSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1715
> #6 0x558b7fd63e23 in rrc_gNB_decode_dcch /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1851
> #7 0x558b7fd8b4c3 in rrc_gnb_task /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2718
> #8 0x7f111ea94ac2 in start_thread nptl/pthread_create.c:442
ASN_SEQUENCE_ADD is calling realloc which is allocating memory for the
'array' which was not freed.
> Direct leak of 32 byte(s) in 1 object(s) allocated from:
> #0 0x7ce97deb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
> #1 0x5813fba02574 in asn_set_add /openairinterface5g/n2-handover-preparation/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
> #2 0x5813faf6c672 in createSRBlist /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:331
> #3 0x5813faf9aa78 in rrc_gNB_generate_RRCSetup /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:421
> #4 0x5813fafba2ee in rrc_handle_RRCSetupRequest /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1243
> #5 0x5813fafba2ee in rrc_gNB_process_initial_ul_rrc_message /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2019
> #6 0x5813fafcdc3a in rrc_gnb_task /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2761
> #7 0x7ce97c894ac2 in start_thread nptl/pthread_create.c:442
> Direct leak of 32 byte(s) in 1 object(s) allocated from:
> #0 0x7ce97deb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
> #1 0x5813fba02574 in asn_set_add /openairinterface5g/n2-handover-preparation/cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
> #2 0x5813faf6c672 in createSRBlist /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:331
> #3 0x5813faf7d89d in get_RRCReconfiguration_params /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:660
> #4 0x5813faf914b3 in rrc_gNB_generate_dedicatedRRCReconfiguration /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:716
> #5 0x5813faf96856 in rrc_CU_process_ue_context_setup_response /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2190
> #6 0x5813fafcd3ed in rrc_gnb_task /openairinterface5g/n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2796
> #7 0x7ce97c894ac2 in start_thread nptl/pthread_create.c:442
dynamically allocated memory is pushed to the seq_arr that
is doing a memcpy, so it can be either or better allocated
in the stack instead
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
> #0 0x7efd8f6b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
> #1 0x577888f3457e in fill_neighbour_cell_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:1914
> #2 0x577888f3457e in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2108
> #3 0x57788869a0d2 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
> #4 0x57788869a0d2 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
> #5 0x7efd8e029d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
the dynamically allocated memory is pushed to the seq_arr that
is doing a memcpy, so it can be either or better allocated in the
stack instead
> Direct leak of 48 byte(s) in 1 object(s) allocated from:
> #0 0x7d4c934b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
> #1 0x577622a40137 in fill_neighbour_cell_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:1933
> #2 0x577622a40137 in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2109
> #3 0x5776221a30f2 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
> #4 0x5776221a30f2 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
> #5 0x7d4c91e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
seq_arr_push_back is doing a memcpy so locally allocated memory can be freed after.
Allocate in stack.
> Direct leak of 64 byte(s) in 2 object(s) allocated from:
> #0 0x7ec4bb8b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
> #1 0x55895aae1b1f in fill_measurement_configuration /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2015
> #2 0x55895aae1b1f in RCconfig_NRRRC /openairinterface5g/n2-handover-preparation/openair2/GNB_APP/gnb_config.c:2112
> #3 0x55895a246112 in create_gNB_tasks /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:253
> #4 0x55895a246112 in main /openairinterface5g/n2-handover-preparation/executables/nr-softmodem.c:619
> #5 0x7ec4ba229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Inside of passing the RRCReconfiguration buffer, call RRCReconfiguration
message generation inside the F1 callback. This will simplify the code in the
rrc_CU_process_ue_context_setup_response() function once the N2 handover case
is introduced. In rrc_CU_process_ue_context_setup_response(), with presence
of the HO context, the HO ACK callback is called only once and depending
on the type of HO it will do either RRCReconfiguration for F1 and
HandoverCommand for N2.
The byte_array reference contains the pointer to the
encoded RRC buffer to be used in the handover acknowledge
callback (e.g. in F1 to trigger RRCReconfiguration)
This is necessary because the function was re-establishing PDCP only for SRB2
however according to specs 3GPP TS 38.331 RadioBearerConfig, PDCP shall be
re-established for SRB1 and/or SRB2 whenever the security key used for the
radio bearer changes, with some exceptions for SRB1 (i.e. when resuming
an RRC connection, or at the first reconfiguration after RRC connection
reestablishment in NR, do not re-establish PDCP for SRB1).
* the input param "reestablish" is converted into a bitmap to indicate
whether PDCP should be re-established for the SRB1 and/or SRB2.
* For convenience the bitmap is 0-based, with index 1 corresponding to SRB1,
index 2 to SRB2.
This commit is keeping the legacy re-establishment, that is re-establishment
of PCDP for SRB2 only.
according to TS 38.331, RRCReconfiguration messages can be carried
in a container by different RRC messages, e.g. HandoverPreparationInformation,
HandoverCommand, RRCResume etc.. therefore before the introduction of new
RRCReconfiguration messages, e.g. for handover, a new design seems to be necessary
in order to improve modularity and maintainability of the code.
The goal of this commit is to make the generation of RRCReconfiguration
messages more modular by (1) preparing the RRCReconfiguration parameters
data in RRC (2) pass it to ASN1 for IEs allocation (3) encode to buffer
The following changes are introduced:
(1) introduce struct nr_rrc_reconfig_param_t to store the RRC parameters relevant
to encode the RRCReconfiguration IEs
(2) add RRC function get_RRCReconfiguration_params to fetch nr_rrc_reconfig_param_t
data from the UE context and
(3) pass it to the ASN1 encoder, e.g. do_RRCReconfiguration
(4) add a function build_RRCReconfiguration_IEs to allocate memory and build the
ASN1 NR_RRCReconfiguration_IEs_t and
(5) adopt it in do_RRCReconfiguration
(4) add free_RRCReconfiguration_params for memory management of nr_rrc_reconfig_param_t data
(6) add test for rrc_reconfiguration
get_RRCReconfiguration_params:
This function prepares RRCReconfigurationParams for RRC encoding.
Motivation of this change: depending on the RRCReconfiguration
message to be encoded, the ownership of ASN1 memory allocation
should belong to the ASN1 layer, therefore this function is
preparing the nr_rrc_reconfig_param_t data to pass to the
ASN1 encoder to build the ASN1 message and encode to buffer
The function is preparing the params for the IEs that are
either mandatory or shared among different RRC messages.
Specific fields that depend on the message to be encoded are then
added afterwards in the caller. The input param to indicate
re-establishment has been split between SRBs and DRBs, since
depending on the scenario the PDCP re-establishment can vary.
This will be addressed in a later commit.
This function is also handling xid.
build_RRCReconfiguration_IE:
The long term goal is to transfer ownership of memory allocation in ASN1 encoding to
build_RRCReconfiguration_IE, then by calling ASN_STRUCT_FREE_CONTENTS_ONLY
on dl_dcch_msg, all IEs allocated in the context are freed after encoding to buffer.
In the long term, createDRBlist, createSRBlist can also be brought into the context
of build_RRCReconfiguration_IEs and free the ASN1 structure after encoding.
This improves maintability and helps preventing memory leaks.
Currently, what is not allocated in the context, is nulled and freed outside.
free_RRCReconfiguration_params:
this function frees memory allocated to build the nr_rrc_reconfig_param_t data,
including the NR_DRB_ToAddModList_t and NR_SRB_ToAddModList_t. The function
freeDRBlist has been removed since no longer necessary.
dedicated_NAS_msg_list:
dedicated_NAS_msg_list handling has also been refactored, by:
(1) fetch the NAS PDUs from the UE context in get_RRCReconfiguration_params,
which translates to (2) passing an array of dedicatedNAS-MessageList + size
to the ASN1 encoding function where (3) the ASN1 encoding logic for the
dedicated_NAS_msg_list IE has been moved
Note, 3GPP TS 38.331:
dedicatedNAS-MessageList: SEQUENCE (SIZE(1..maxDRB)) OF DedicatedNAS-Message
* differentiate the 2 functions based on the input: either NR Cell ID or PCI
* enhanced variables naming to distinguish the parameters
* add logging for debugging purposes
this commit is refactoring the function ngap_gNB_handle_nas_first_req
to (1) fill first a local instance of ngap_gNB_ue_context_t and then
(2) pass it to ngap_store_ue_context which will allocate memory
for the instance to store in ngap
This count is used to size the dynamic array lcids_bj_pos. In case
count is zero, this would lead to runtime error. With this change,
the function will indicate to the caller that no SDUs are present and
will print an error.
According to 3GPP TS 38.331 5.3.5.5.2 (Reconfiguration with sync), the UE
shall consider the target SpCell to be one with a physical cell identity
indicated by the physCellId
The primary motivation here is to remove a VLA, as in the parent
commits. Closer inspection revealed that (1) it is only used by the LTE
UE, and (2) it only logs some data which we likely don't need. So I
simply removed this function.
Upon failure, the error message was saying that something failed (i.e.,
the reason), but not parameters of the getaddrinfo(). Simplify root
cause analysis by providing the parameters for the attempted
getaddrinfo() call.
This function is needed also in upcoming NGAP
libraries (i.e. N2 Handover) and therefore is moved
to the NGAP utilities file. The function converts
transport_layer_addr_t data struct to BIT_STRING_t
by copying the content of its members. The naming
is also updated to tnl_to_bitstring.
* Functions added:
decode_ngap_guami
decode_ngap_UEAggregateMaximumBitRate
decode_ngap_nssai
decode_ngap_security_capabilities
decode_ngap_mobility_restriction
* Adopt these functions in the common NGAP library
- remove hardcoded values
- adapt gNB RRC code
- adapt gNB MAC code
- adapt physical simulators, where we put the hardcoded values
that were everywhere else before; if there is a need for those
simulators to get configurable values, more work is needed
(but it's doubtful that it is needed)
To be used in a later commit to retrieve NR PDCP configuration
parameters.
To use, add the following to the configuration file (outside of other
configurations). Adapt the values to your setup. The names ("len18bits",
"ms100", etc.) come from 3GPP TS 38.331.
pdcp = {
drb = {
sn_size = "len18bits"
t_reordering = "ms100"
discard_timer = "infinity"
}
}
Default values are applied if the configuration is absent.
The default values are the ones given above.
To be used in a later commit to retrieve NR RLC configuration
parameters.
To use, add the following to the configuration file (outside of other
configurations). Adapt the values to your setup. The names ("ms45",
"size12", etc.) come from 3GPP TS 38.331.
rlc = {
srb = {
t_poll_retransmit = "ms45"
t_reassembly = "ms25"
t_status_prohibit = "ms0"
poll_pdu = "infinity"
poll_byte = "infinity"
max_retx_threshold = "t8"
sn_field_length = "size12"
}
drb_am = {
t_poll_retransmit = "ms45"
t_reassembly = "ms15"
t_status_prohibit = "ms15"
poll_pdu = "p64"
poll_byte = "kB500"
max_retx_threshold = "t32"
sn_field_length = "size18"
}
drb_um = {
t_reassembly = "ms15"
sn_field_length = "size12"
}
}
Default values are applied if the configuration is absent.
The default values are the ones given above.
Integration: `2025.w23`
Closes#962, #956, and #801
See merge request oai/openairinterface5g!3464
* !3302 Enhance UE identity management in Initial UE Message and other NGAP improvements
* !3400 T bugfix: check input data a bit better
* !3459 Improvements in NR band tables according to Rel.17
* !3465 Fix checking that amf_ip_address section is not set.
* !3463 Move RRC radio parameters file to DU
* CI: Use host network mode in NSA-B200 pipeline
* !3389 Relax NR_UE_CAPABILITY_SLOT_RX_TO_TX asserts
* !3417 Imscope updates
* !3443 Fix data race in NR UE MSG3 scheduling
* !3467 remove dead globals
Fix data race in NR UE MSG3 scheduling
Fixed a data race between DL processing of RAR and UL scheduler, which might
result in dropping MSG3.
It was possible that the UL scheduler for the UL slot which RAR indicates as
MSG3 slot was already run by the time the RAR was decoded.
Therefore when DCI for RAR is decoded, assume worst case and halt UL scheduler
for next slot until RAR is decoded solving the data race. This also in turn
halts all later scheduling due to sequential nature of the UL scheduler calls.
Closes#962
imscope updates
- Add CSV export button to imscope
- Add extra cache for IQ data in imscope record thread so that UE time domain
data can be kept until PDSCH is decoded.
- Add metadata to UE time domain samples scope
- Add UE pdsch pre-compensation IQ and PDSCH channel estimates
Move RRC radio parameters file to DU
A number of radio-related RRC parameters, e.g., CellGroupConfig, "originate" at
the DU and are sent to the CU for forwarding to the UE only. Similarly, there
are additional parameters, e.g., RLC-BearerConfig (part of CellGroupConfig),
that originate at the DU.
Hence, the DU decides about these parameters, depending on the MAC state and
capabilities. To clarify this, move the existing
openair2/RRC/NR/nr_rrc_config.{c,h} => openair2/LAYER2/NR_MAC_gNB/nr_radio_config.{c,h}
So that developers know that while those are RRC parameters, they originate at
the DU.
In other words, the CU/RRC is not supposed to use any of these functions in
the RRC. Correspondingly, includes of this file have been cleaned up (and when
they are not necessary at the MAC as well)
Instead of running xApps from oai-flexric container,
create dedicated xApp containers.
In addition, modify the flexric.conf: DB_PATH doesn't exist;
DB_DIR is the correct name.
- prerequisites - use the links to FlexRIC tutorial
- build FlexRIC - use the build tutorial from FlexRIC tutorial
- explain in more details the supported service model functionalities
- explanation if no RIC INDICATION is being sent
- use multi-UE rfsim tutorial from doc/, not oai-workshops repository
Fixed a data race between DL processing of RAR and UL scheduler, which
might result in dropping MSG3.
It was possible that the UL scheduler for the UL slot which RAR
indicates as MSG3 slot was already run by the time the RAR was decoded.
Therefore when DCI for RAR is decoded, assume worst case and halt the
earliest corresponding UL scheduler call until RAR is decoded solving
the data race. This also in turn halts all later scheduling due to
sequential nature of the UL scheduler calls.
Following a power cycle of the CI machines in the NSA-B200 setup, the gNB
machine encountered a networking issue. Although packets were observed leaving
and returning to the host of gNB, they failed to reach the container.
Debugging steps taken:
- upgraded the gNB machine
- reinstalled Docker
- reviewed and verified IP rules and routing settings
Setting the container to use host network mode resolved the issue.
Enhance UE identity management in Initial UE Message and other NGAP improvements
This MR improves the Initial UE Message procedures by supporting simultaneous
presence of both 5G-S-TMSI and GUAMI. Previously, only one identity could be
used, leading to potential AMF selection failures. Now the presenceMask allows
both identities. The AMF selection is prioritizing GUAMI first, then falling
back to 5G-S-TMSI, and finally using PLMN or highest capacity.
Also, fix handling of selected PLMN identity in NGAP.
Refactoring:
- Select the AMF based on (1) absence of UE Identity (2) Presence of GUAMI
(3) Presence of 5G-S-TMSI
- Also refactored the AMF selection logic for better readability and reliability.
- Refactor and cleanup rrc_gNB_send_NGAP_NAS_FIRST_REQ
- Replace ngap_pdu_t with byte_array_t
- Add guami_t to ngran_types.h: refactor NGAP and RRC code to use one common
GUAMI type instead of two identical ones
Also:
- Bugfix in ngap_gNB_handle_ng_setup_response: use correct count for PLMNSupportList
Closes issue #801
Segmentation fault occured since the commit ID 9e5c5497ab,
where we try to copy the pointer which was not even been allocated. Before, we were
copying the address of a NULL pointer and therefore no segmentation fault.
This commit fixes the segmentation fault by checking if the memory was allocated, i.e. should not be
in the case of CU (as it doesn't contain MAC/RLC layers).
A number of radio-related RRC parameters, e.g., CellGroupConfig,
"originate" at the DU and are sent to the CU for forwarding to the UE
only. Similarly, there are additional parameters, e.g., RLC-BearerConfig
(part of CellGroupConfig), that originate at the DU.
Hence, the DU decides about these parameters, depending on the MAC state
and capabilities. To clarify this, move the existing
openair2/RRC/NR/nr_rrc_config.{c,h} => openair2/LAYER2/NR_MAC_gNB/nr_radio_config.{c,h}
So that developers know that while those are RRC parameters, they
originate at the DU.
In other words, the CU/RRC is not supposed to use any of these functions
in the RRC. Correspondingly, includes of this file have been cleaned up
(and when they are not necessary at the MAC as well).
One of the next commits moves nr_rrc_config.c "down to" the MAC/DU. The
BearerConfig functions are only used at the DU, so move them here in the
corresponding file.
When data is generated by "normal" T tracers, it should be fine.
But it might come from unknown sources and then content might be
"strange". So let's validate input data a bit more.
The way allocation is done (granularity of 64KiB) makes a crash more
difficult to achieve, but if a trace is exactly 64KiB, we miss 4 bytes
in the realloc and then anything may happen.
Integration: `2025.w22`
Closes#832
See merge request oai/openairinterface5g!3452
* !3415 several fixes and cleanup for nrLDPC_coding_t2
* !3448 T: macpdu2wireshark: dump to file instead of sending UDP packets
* !3449 bugfix: pass correct buffer
* !3453 CI: revert modification of SSB per RACH occasion in SC-FDMA test
* !3440 Update NAS documentation
* !3451 fix the number of preambles per SSB at UE in case PRACH is configured with groupB
* !3441 Replace hashtable with epoll_event_t in rfsimulator
* !3277 Add CI test to force RRC IDLE and new connection setup with 5G-S-TMSI
* !3454 Keep old MAC stats after re-establishment
* !3450 Make number of UL/DL actors in NR UE fully configurable
* !3458 (doc): update README with build icons for dedicated arch and os
Make number of UL/DL actors in NR UE fully configurable
Due to different processing requirements on different CPUs it might be
beneficial to enable the users to set the number of UL/DL actors.
Allow disabling UL/DL actor frameworks and processing inline or setting
the number of DL/UL threads with --num-ul-actors/num-dl-actors
This was tested to work with 0 UL/DL actors with rfsim.
GUAMI fields (Set ID, Pointer and Region ID) were decoded as Octet String,
however they are encoded as BIT STRING. Therefore, the GUAMI value was wrongly decoded.
In the AMF logs the AMF IDs are 1,1,1, however in gNB logs we had 1,64,4
Quick local test confirmed that:
---- TESTING AMF IDs = 1 ----
Region ID (OCTET STRING): 1
Region ID (BIT STRING): 1
Set ID (OCTET STRING): 64
Set ID (BIT STRING): 1
Pointer (OCTET STRING): 4
Pointer (BIT STRING): 1
The difference arises because:
- OCTET STRING treats the buffer as raw bytes, with all bits used.
- BIT STRING includes a `bits_unused` field, which tells how many padding bits
are present in the least significant end. This is especially important in
3GPP ASN.1 definitions like AMF Set ID (10 bits), AMF Region ID (8 bits),
AMF Pointer (6 bits), where the full byte(s) may contain unused bits that
must be masked out.
selectedPLMN-Identity IE in RRCSetupComplete is an Index (long) of the PLMN selected
by the UE from the plmn-IdentityInfoList (SIB1) (see 3GPP TS 38.331)
while
Selected PLMN Identity in NGAP INITIAL UE MESSAGE Indicates the selected PLMN
id for the non-3GPP access (PLMN Identity ID carrying MNC, MCC and MNC size,
9.2.5.1 3GPP TS 38.413)
The legacy code was setting Selected PLMN Identity in the latter to an ID
value as the former, however in NGAP the IE to be encoded is PLMN Identity 9.3.3.5
therefore:
* set plmn type plmn_id_t in ngap_nas_first_req_t
* check whether received selectedPLMN-Identity is within bounds
* select PLMN from gNB_RrcConfigurationReq by selectedPLMN-Identity ID
note: this commit is assuming that the plmn-IdentityInfoList in SIB1
is matching the PLMN list in gNB_RrcConfigurationReq
* in NGAP: store the PLMN in the NGAP UE context, no need to fetch the PLMN
in the NGAP instance since the UE context already tells what PLMN
was selected
Closes#801
* use bitmask to select presence of either 5G-S-TMSI or GUAMI
* select the AMF based on
(1) absence of UE Identity (2) Presence of GUAMI (3) Presence of 5G-S-TMSI
Related to #801
* add function to process AMF Identifier
* add function to select AMF
* set const parameters in utility nnsf functions
* adopt utilities for memory allocation
* improve readability and maintainability
* improve logging
ngap_pdu_t has the same definition as byte_array_t, so it is
replaced by the latter. This simplify the stack and reduces
duplicated code.
Also, add function create_byte_array to copy from an
existing buffer to a new byte_array_t and replaced
allocCopy with create_byte_array, and adopted
OCTET_STRING_fromBuf whenever possible.
Due to different processing requirements on different CPUs it might
be beneficial to enable the users to set the number of UL/DL actors.
Allow disabling UL/DL actor frameworks and processing inline or
setting the number of DL/UL threads with --num-ul-actors/num-dl-actors
This was tested to work with 0 UL/DL actors with rfsim.
Add CI test to force RRC IDLE and new connection setup with 5G-S-TMSI
This MR is a follow up to !2725 (merged)..
The primary goal is to introduce a CI test that enforces the following behavior:
- Forces the UE to enter RRC_IDLE state.
- Validates the UE's re-connection procedure using the 5G-S-TMSI as the UE
identity.
fix the number of preambles per SSB at UE in case PRACH is configured with groupB
To fix an issue reported in the mailing list related to UE configured by a 3rd
party gNB with groupB PRACH
Replace hashtable with epoll_event_t in rfsimulator
Replace the FD <-> buffer_t hashtable with epoll_event_t mapping. This
simplifies the code, reduces the probability of memory leaks, and removes
a possible data race on the hashtable during rfsimulator shutdown.
Replace the FD <-> buffer_t hashtable with epoll_event_t mapping.
This simplifies the code, reduces the probability of memory leaks and removes a
possible data race on the hashtable during rfsimulator shutdown.
The UE shall use the currently stored UL NAS count to derive the
KgNB. Hardcoding the UL count to 0 is wrong, if there is a reset
to be done it should be explicitly done elsewhere.
Closes#832
The Security Mode Command is the only NAS message sending a security header
type "integrity protected with new 5G NAS security context". Such header
type is indicating that there is no valid security context and it is
indicating the current one configured by the AMF.
When receiving a Security Mode Command the "AMF shall reset the downlink NAS COUNT"
and use it to integrity protect the initial Security Mode Command. "The AMF shall
send the SECURITY MODE COMMAND message unciphered, but shall integrity protect [...]
The AMF shall set the security header type of the message to
"integrity protected with new 5G NAS security context".
See 5.4.2.2 3GPP TS 24.501.
This commit is ensuring the NAS DL count is reset when the relevant security header
is received. Also, the security container is deleted since no more valid and
NAS_SECURITY_NO_SECURITY_CONTEXT is returned. The setup of the new security context
is done by "handle_security_mode_command",
NAS 3GPP TS 24.501 clause 4.4.4.2 specify which NAS messages
are an exception to the integrity protection. All the other
scenarios are expected to be integrity protected. The
nas_security_rx_process function is returning:
1) NAS_SECURITY_NO_SECURITY_CONTEXT if no security context is established
2) NAS_SECURITY_UNPROTECTED for the messages listed in 4.4.4.2
3) NAS_SECURITY_INTEGRITY_PASSED if the integrity check is successful
These 3 results can be all considered successful. The other not.
Also, add a function to check whether a message is allowed to be
integrity unprotected, as per clause 4.2.2.2.
* trigger Identity Response callback from the handler
* process decoded message
According to 4.4.4.2 3GPP TS 24.501, Identity Request
with Identity Type SUCI is not expected to be
integrity protected.
The information about the payload carried by NAS DOWNLINK is helpful
in the logging and also for debugging purposes, therefore it was
added in this commit by enabling the already existing relevant function.
This commit restores the behaviour before the changes introduced in 611c0554. The NAS
Deregistration Accept message is unprotected, therefore the function will return
NAS_SECURITY_UNPROTECTED that would then be considered as NAS_SECURITY_INTEGRITY_PASSED
Unprotected message have a plain header of 3 octets, however security protected messages
have a 7 octets header.
* Close entity->pdusession_sock manually before pthread_join() to unblock sdap_tun_read_thread()
* Update tun_destroy() to open a fresh socket for interface management, independent from the data socket
* Fix check on success of change_interface_state() in tun_destroy(): is a boolean
* Handle ENODEV error when bringing interface down: treat as success if the interface is already gone.
* tun_destroy() is now handling INTERFACE_DOWN, so `INTERFACE_DOWN` in `tun_config()` is no longer needed
CI: revert modification of SSB per RACH occasion in SC-FDMA test
This MR reverts the parameter ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR back
to 4, undoing the change introduced in commit a4f9a7a6. The initial modification
was made as a potential fix for a reestablishment failure observed in the SC-FDMA
test case of the SABOX-B200 pipeline. However, further validation has shown that
this parameter was not the root cause of the issue.
T: macpdu2wireshark: dump to file instead of sending UDP packets
In NR with several layers, we may have MAC PDU of size bigger than 64KB,
which does not fit into a UDP buffer, destroying macpdu2wireshark.
Let's add an option to dump to a pcap file instead of using UDP packets.
The DLT 252 magic is used (check wireshark documentation to understand).
Run macpdu2wireshark with -h to see how to configure wireshark to read
the produced files.
several fixes and cleanup for nrLDPC_coding_t2
Newer DPDK driver versions may directly provide the internal HW mbuf in the
dequeued structure. So don't try to free the mbufs from that dequeued structure,
but the ones we allocated. Also, this mbuf has an offset to its output data, we
must consider this when accessing the output data.
Main contents of this MR:
- support newer DPDK versions
- make sure to free allocated mbufs
- fix q_bufs memory leak
- use rte_pktmbuf_mtod_offset() to consider offset when accessing output data
- convert the correct number of LLRs from 16 Bit to 8 Bit
- remove unused variables and functions
- some more code cleanup
ntn-UlSyncValidityDuration in SIB19 from Spec 38.331 v17.12
A validity duration configured by the network for assistance information which indicates the maximum time duration
(from epochTime) during which the UE can apply assistance information without having acquired new assistance information.
The unit of ntn-UlSyncValidityDuration is second. Value s5 corresponds to 5 s, value s10 indicate 10 s and so on.
ntn-UlSyncValidityDuration-r17 ENUMERATED{ s5, s10, s15, s20, s25, s30, s35,s40, s45, s50, s55, s60, s120, s180, s240, s900}
Implementation of epochtime is under discussion.
It can be configured in configuration file according to the above enumeration. For GEO - 240s, MEO - 20s, LEO-5s can be used.
In NR with several layers, we may have MAC PDU of size bigger than 64KB,
which does not fit into a UDP buffer, destroying macpdu2wireshark.
Let's add an option to dump to a pcap file instead of using UDP packets.
The DLT 252 magic is used (check wireshark documentation to understand).
Run macpdu2wireshark with -h to see how to configure wireshark to read
the produced files.
This change adds lengths checks to the received registration reject
message and also performs a bounds check for the received cause.
Since the cause is not checked, any string in the memory can be
dereferenced, possibly leading to DoS.
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
The change addresses the SM message type retrieval for DL NAS Transport
messages. The assumption of an offset 17 = 7 (MM Sec) + 3 (MM Plain) + 1
(IEI) + 2 (Len) + 4 (SM) is correct.
However, if the DL NAS Transport is received in a plain header, the
lengths would not add up anymore. (This is not complying with the
standard, so not allowed, but possible). The check for the length is
necessary to not process arbitrary memory contents beyond the
`pdu_buffer`.
Signed-off-by: Eduard Vlad <eduard.vlad@rwth-aachen.de>
The DPDK driver may directly provide the internal HW mbuf in the dequeued structure.
So don't try to free the mbufs from that dequeued structure, but the ones we allocated.
Integration: `2025.w20`
Closes#826 and #884
See merge request oai/openairinterface5g!3438
* !3168 Improvements for LDPC encoding
* !3386 E1 Bearer Context Release enc/dec lib and unit test
* !3394 Fix Liteon with MTU 1500 and update the FHI docs
* !3437 CI: RFsim F1/HO: Use hanging-workaround to avoid blocking of second client
* !3384 Add enc/dec library and unit test for E1 Bearer Context Modification Failure
* !3418 Use common function to generate CSI-RS signal
* !3379 Add physim tests into ctest framework
* !3420 Added intercommunication between namespaces
* !3422 Tutorials: updates for NR SA Tutorials
* !3436 Beam switching small fixes
* !3439 Fix RRC resources periodicity determination according to number of slots per period
* !3434 Remove EPC/UE main.py parameters
* !3423 Fix PDSCH and PUSCH BWP Start and Size when PXSCH is scheduled with a DCI format x_0 in any type of PDCCH common search space
* !3442 Fix UL chanel estimates mapping in 2-layer MMSE receiver
Fix UL chanel estimates mapping in 2-layer MMSE receiver
This MR addresses a degradation in UL throughput observed in 4x4 MIMO
tests, starting from 2025.w17.
The issue was traced to incoherent indexing in the ul_ch_estimates_ext
when handling 4-antenna UL configurations.
Fix PDSCH and PUSCH BWP Start and Size when PXSCH is scheduled with a DCI format x_0 in any type of PDCCH common search space
- Fix PDSCH and PUSCH BWP Start and Size when PDSCH/PUSCH is scheduled
with a DCI format x_0 in any type of PDCCH common search space
- Fix resource block assignment information (RIV field) for DCI format
x_0 when scheduling in any type of PDCCH common search space
Fix RRC resources periodicity determination according to number of slots per period
Otherwise we may end up in scenarios where some channels would end in
the wrong TDD slot type
Tutorials: updates for NR SA Tutorials
- Update links for the latest Ubuntu 24.04.2 LTS iso file
- Update docker install to the latest instructions on the official
website
- Update UHD to v4.8.0.0
- Add support for 'default'/"empty" DNN to CN5G configuration file
* Add support for 'default' DNN to CN5G configuration file (that
will also be used when DNN is not available, "empty" DNN). This
configuration will allow most of the COTS UE to get PDUSession
without any APN configuration made by the user
* The 'default'/"empty" DNN configuration support was added in
oai/cn5g/oai-cn5g-amf!343
Add physim tests into ctest framework
Convert physim testcases listed in
cmake_targets/autotests/test_case_list.xml into ctest. Note: Tests for
dlsim_tm4 are excluded, due to compilation issues.
CTest evaluates success based on return code: '0' = pass, non-zero =
fail. For some simulators, the return code is non-zero even when the
test is successful (as indicated by success messages in the test logs).
For some simulators, the return code is always '0'. This inconsistency
has been address in the first two commits of this MR.
To build and execute these tests:
- using cmake
cd openairinterface5g
mkdir build && cd build # you can also do that in cmake_targets/ran_build/build
cmake .. -GNinja -DENABLE_PHYSIM_TESTS=ON && ninja tests
ctest
- using build_oai: physim-related ctests are activated when PHY
simulators are built (use build_oai with '-P' or '--phy_simulators'
option)
cd openairinterface5g/cmake_targets
./build_oai --ninja --phy_simulators
cd ran_build/build
ctest
Link to newly created 4g and 5g RAN-Physim-Cluster pipelines:
- RAN-Physim-Cluster-4G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-4G/
- RAN-Physim-Cluster-5G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-5G/
Initially we were testing SNR from -3 to 7 dB, in recent runs PUCCH test
succeeds at SNR = 0 or 1 dB. Starting at higher SNR helps to reduce test
runtime. Set maximum SNR to 7dB, as it was done in the initial test scenario,
to ensure that possible performance degradation is detected.
The cls_physim1.py is no longer needed. Function for physim deployment has
been migrated to the Cluster class. Log analysis functionality has been
moved to the Analysis class.
Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY CMake option during the OAI build
to control the location of runtime target files. This ensures that ctest
can locate necessary executables after they are copied to the target
Docker image.
Convert physim testcases defined in cmake_targets/autotests/test_case_list.xml
into CTest based tests. These test are activated when '-DENABLE_PHYSIM_TESTS=ON'
CMake flag is set.
Note: Tests for dlsim_tm4 are excluded, due to compilation issues.
CTest evaluates success based on return code: '0' = pass, non-zero = fail.
The following table outlines the physim executables, their success expressions
(`expr_true`), and the return codes for success (`ret_success`) and failure
(`ret_fail`). The `expr_true` is used in test_case_list.xml to check for test
results.
| test_exec | expr_true | ret_succ | ret_fail |
| ------------- | -------------- | --------------- | ----------------- |
| dlsim | passed | 0 | -1 |
| ulsim | passed | 0 (ret) | 1 (ret) |
| ldpctest | BLER 0.000000 | 0 | 1 |
| polartest | BLER= 0.000000 | 0 | 1 |
| nr_pbchsim | PBCH test OK | 0 | 1 |
| nr_dlsim | PDSCH test OK | 0 | 1 |
| smallblocktest| BLER= 0.000000 | 0 | 1 |
| nr_ulschsim | PUSCH test OK | 0 (n_errors) | n_errors |
| nr_pucchsim | PUCCH test OK | 0 | 1 |
| nr_ulsim | PUSCH test OK | 0 (ret) | -1 (ret) |
| nr_prachsim | PRACH test OK | 0 (prach_errors)| > 0 (prach_errors)|
| nr_psbchsim | PSBCH test OK | 0 (errors) | > 0 (errors) |
Add CMake flag "ENABLE_PHYSIM_TESTS=ON" when building OAI with "-P"
or "--phy_simulators" option. This allows physim-related ctest to
be executed from build directory.
Add dependency on coding lib for all 4G physims
Setting the DEBUG_UE_TIMING flag caused a flood of UE timing logs, resulting
in dlsim output logs as large as 1.5MB per test in CI. This commit comments
out the line where we set the flag to reduce log verbosity.
- Change return value of nr_dlsim, nr_pbchsim and nr_pucchsim to:
- Return '0' if test succeeds (indicated also by "PDSCH/PBCH/PUCCH test
OK" in the test log).
- Return '1' if test fails.
- Updated polartest, smallblocktest, and ldpctest to check BLER and return
appropriate status:
- Returns '0' if BLER equals 0.000000 (indicating success).
- Returns '1' for all other BLER values (indicating failure).
- This change improves consistency in return values across the test physims.
Add enc/dec library and unit test for E1 Bearer Context Modification Failure
This MR is adding:
- the enc/dec library
- unit test
- handler and callback in stack
For the E1 Bearer Context Modification Failure.
Fix Liteon with MTU 1500 and update the FHI docs
- Closes#884 - needed to update the max fragments needed for
transmission of one symbol; technically, 5 are enough but due to wrong
equation in the xran F release we had to increase to 6
- Clarify packet length for VFs
- Update Foxconn doc and config file with MTU set for jumbo frames
- Update Benetel docs with new version v1.2.2
E1 Bearer Context Release enc/dec lib and unit test
This MR is adding:
- the enc/dec library
- unit test
And adopting the lib in stack, for the E1 Bearer Context Release.
Improvements for LDPC encoding
AVX512 modifications for LDPC encoding: interleaving, ZC384 BG1, output
formatting for encoder, segmentation (memcpy instead of loop). some
improvement in TX for aarch64 in same places where AVX512 support was
added. Also, rate matching and interleaving are done on bytes containing
8 segments and reformatting of the output is done at the end of segment
processing instead of after ldpc encoding.
This improves the overall performance of the NR DL transmitter in gNB
See the merge request description for numbers.
Release all SDAP entities for a UE in nr_rrc_going_to_IDLE().
With this change the SDAP entities of the UE are cleaned up
when going into RRC_IDLE, including tun sockets, threads etc.
A new SDAP entity is created when re-attaching to the network.
- modify retrieve_ldpc_enc_op() to store encoded results in a packed format
- add timing measurements for T2 encoder
- add simde implementation for bit reversal
- Introduce new bit reversal implementation using simde_mm_gf2p8affine_epi64_epi8
instruction, based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/.
This implementation requires GFNI and AVX512VL support on the target machine.
1. The encoder writes the output in sequence after the encoding tasks completed instead of writing within the tasks.
2. Simplify the output writing to make it more readable.
Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
There was a risk of a race condition between encoding tasks on the output array.
It could be that two task compete in writing a word at the border of their respective segment groups.
This commit offers to solve this issue by retaining the tail word in a struct that is returned after task completion so that segment group border can be fixed after completion of all the tasks.
Comes with additional cleanups of nrLDPC_coding_segment_encoder:
1. Move the section of code dedicated to writing to the encoding library output to a separate function.
2. Remove bit interleave debug in AVX512VBMI case of output writing for improving code readability.
1. nrLDPC_coding_segment_encoding: Clarifying encoder parameters
The way the encoder implementation params was used could be made clearer:
* `macro_num` was always used in order to calculate segment indexes.
It is clearer to pass directly the first segment index.
* The initialisation of a common implementation parameters structure can be made clearer.
2. nrLDPC_coding_segment_encoder: Remove multi segment dimension in encoder output
The output of `LDPCencoder` was a 2D unsigned char array.
But all the segments were actually packed in the first segment, 8 bits of different segments per byte of the first segment.
So the first dimension was useless. This commit removes this dimension.
3. nrLDPC_coding_segment_encoder: Rename `nrLDPC_prepare_TB_encoding` into `nrLDPC_launch_TB_encoding`
4. nrLDPC_coding_segment_encoder: Remove the useless second rate matching for E2, one rate matching with max(E, E2) does the job.
5. nr_interleaving_ldpc: cleanup
Rewrite code to use different SIMD sizes in a linear fashion.
This means cascading preprocessor directives are used to start from a high SIMD size an decrease it progressively.
6. ldpc_encoder_optim8segmulti: linear usage of SIMD
Use cascading preprocessor directives to include different SIMD sizes and types depending on which are available on the system.
The different loops use a common index that is progressively incremented.
Also add AVX512 version of bits distribution from 8 segments into one byte.
Co-authored-by: Laurent Thomas <laurent.thomas@open-cells.com>
Since this branch aims to bring all the encoded segments packed and contiguous,
it doesn't make anymore sense to have one output array per segment.
Therefore this commit moves the output array to the TB instead of the segment and adapts its size.
TODO: Adapt the size of f where it is relevant.
1. nrLDPC_coding_segment_encoder: pointer not aligned on 64 bits
An undefined behavior was happening because of a shift on a __m64 which
was actually a uint32_t which was not aligned on 64 bits.
This commit suggests a fix by properly loading into a __m64 with _mm_set_pi32
before performing the shift.
2. nr_rate_matching: Filler bits detection
Previously, if the bit selection was reaching Ncb and restarting selection from the beginning of encoded data, the filler bits were detected by testing the bytes again NR_NULL which was equal to 2.
But on this branch the bits of up to 8 segments are stored in one byte while doing rate matching so that one byte could be tested to be a filler while it is not.
So this commit changes the way to test filler bits.
Instead of relying on NR_NULL, bit selection now relies on the offset and size of filler bits.
3. nr_ulsch_coding: missing filling f with zeros
The array `f` of the UE UL HARQ process was not filled with zeros between transmissions.
This is a problem if the encoder does not properly overwrite its output.
In order to avoid such situation, this commit adds a memset to fill `f` with zeros before passing it to the encoder.
4. nrLDPC_coding_segment_encoder: missing init of f to zeros
In the encoder, `f` is not filled with zeros before being used.
`f` is instead somehow filled with arbitrary values.
When writing to `output` by 64 bit vectors, some arbitrary bits may be added after the segment.
Then the arbitrary added ones are not overwritten when writing the next segment because of writing with a logical or.
This commit properly fills `f` and `f2` with zeros.
5. nr_ulschsim & nr_dlschsim: Adapt modulation to new encoder output
The QPSK symbols that are feed to the channel model of nr_dlschsim were determined based on the bytes of the encoder output.
With the new output of the encoder, it had to be reworked to determine the QPSK symbols based on the bits of the encoder output.
1. 3GPP Rate-matching/interleaving on 8-segment blocks, deinterleaving at output of multi-segment processing.
2. Bit-packing done in nrLDPC_coding_segment_encoder.c now instead of nr_scrambling.
Interestingly, it improves performance significantly too.
Tested for AVX512 only for now.
Avoid the use of simde_mm_sign_epi8 which is inefficient on aarch64.
Decoding times are significantly improved on aarch64.
Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
Add --allowerasing, which will downgrades some packets in order to
satisfy LLVM dependencies.
When building the docker image for clang, CI fails with
Error:
Problem: llvm-18.1.8-3.el9.i686 from ubi-9-appstream-rpms does not belong to a distupgrade repository
- package llvm-toolset-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires llvm = 18.1.8, but none of the providers can be installed
- package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires llvm-libs(x86-64) = 18.1.8-3.el9, but none of the providers can be installed
- package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires libLLVM.so.18.1()(64bit), but none of the providers can be installed
- package llvm-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms requires libLLVM.so.18.1(LLVM_18.1)(64bit), but none of the providers can be installed
- cannot install both llvm-libs-18.1.8-3.el9.x86_64 from ubi-9-appstream-rpms and llvm-libs-19.1.7-2.el9.x86_64 from @System
- package mesa-dri-drivers-24.2.8-2.el9_6.x86_64 from @System requires libLLVM.so.19.1()(64bit), but none of the providers can be installed
- package mesa-dri-drivers-24.2.8-2.el9_6.x86_64 from @System requires libLLVM.so.19.1(LLVM_19.1)(64bit), but none of the providers can be installed
- package mesa-libGL-24.2.8-2.el9_6.x86_64 from @System requires libgallium-24.2.8.so()(64bit), but none of the providers can be installed
- package mesa-libGL-24.2.8-2.el9_6.x86_64 from @System requires libgallium-24.2.8.so(libgallium-24.2.8.so)(64bit), but none of the providers can be installed
- package mesa-libGL-devel-24.2.8-2.el9_6.x86_64 from @System requires mesa-libGL(x86-64) = 24.2.8-2.el9_6, but none of the providers can be installed
- conflicting requests
- problem with installed package mesa-libGL-devel-24.2.8-2.el9_6.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
So when trying to install llvm-toolset from docker/Dockerfile.clang.rhel9,
we have a conflict because this installs 18.1 from ubi-9-appstream-rpms,
but various mesa packets have llvm 19.1.
1. I don't understand why we have mesa installed (no graphics system?)
2. --allowerasing downgrades the relevent mesa package(s)
Alternatively, we would need to select 19.1 when installing
llvm-toolset, but I don't know how to do that.
As per CUS spec, the MTU can be 1500 or 9000 B, where MTU = IQ data format.
Packet length = ethernet header + RTE_PKTMBUF_HEADROOM + MTU
However, xran assumes different definitions of the MTU:
(1) in xran_init_mbuf_pool(): MTU = ethernet header + IQ data format;
(2) in xran_get_num_prb_elm(), xran_init_PrbMap_from_cfg(), xran_init_PrbMap_from_cfg_for_rx(), xran_init_PrbMap_by_symbol_from_cfg(): MTU = complitely wrong (as the IQ data format is not well included).
Additionally, xran assumes that the max MTU 9600 B, instead of 9000 B as per spec.
Nevertheless, I left 9600 B in all config files and docs due to wrong calculation of (2) for the total number of PRBs per fragment.
1. Closes#884 - increase the XRAN_MAX_FRAGMENT from 4 to 6 (sufficient for MTU 1500 with compression 8b)
2. Add new firmware version that supports jumbo frames
3. Update the config file to align with the new Liteon unit in our lab - center frequency, jumbo frames, compression and RU MAC address,
as well as the max DL MIMO layers.
Add support for 'default' DNN to CN5G configuration file (that will also be used when DNN is not available, "empty" DNN). This configuration will allow most of the COTS UE to get PDUSession without any APN configuration made by the user
The 'default'/"empty" DNN configuration support was added in https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf/-/merge_requests/343
Integration: `2025.w19`
Closes#852, #952, and #957
See merge request oai/openairinterface5g!3427
* !3409 Correctly handle minimum RB condition in MAC
* !3421 Fix DMRS for PUCCH format 2
* !3424 limit the number of HARQ processes in case of DCI00 and 10
* !3116 ue txData more contextual, but still global as it is entangled with usrp driver
* !3408 Handling 2 search spaces per slot in SIB1
* !3419 PRACH configuration index warning
* !3429 CI: Add `-l` option for the UL iperf test
* !3381 Add 5GMM Authentication Failure enc/dec lib and unit test
CI: Add `-l` option for the UL iperf test
In this MR, we set the packet length to 1428 bytes for UL iperf3 testing using
the -l option to prevent packet fragmentation. Fragmentation is causing packet
drops between the gNB and the UPF, leading to failed UL throughput tests in CI.
Add 5GMM Authentication Failure enc/dec lib and unit test
This MR is introducing the 5GMM Authentication Failure message library as per
8.2.4 of 3GPP TS 24.501. This message is sent from UE to network under certain
conditions. The message is also introduced in stack and is send if the received
ngKSI already in use.
- add new library for 5GMM Authentication Failure enc/dec and unit test
- introduce handler and generate function for NAS Authentication Failure
store ngKSI
- send Authentication Failure if ngKSI is already associated with one of
the 5G security contexts stored in the UE
Closes#852
After capturing the FH packets, we observed that the RU supports the MTU value for jumbo frames.
Therefore, no fragmentation needed on DL.
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
ue txData more contextual, but still global as it is entangled with usrp driver
- txData buffer is global and entangled even in usrp oai driver because of tx
thread feature
- it also makes weird combination with continuous tx usrp bug workaround
- this MR makes most of the calls contextual but keep the globakl txData
- later a MR should remove the global and tackle it with proper context, but we
need to modify gNb, UE, 4G and probably all oai drivers
Fix DMRS for PUCCH format 2
This MR fixes the DMRS for PUCCH format 2.
While at the OAI-UE we have:
uint16_t startingPRB = pucch_pdu->prb_start + pucch_pdu->bwp_start;
uint idxGold = startingPRB >> 2;
uint32_t *seq = gold_cache(temp_x2, idxGold + pucch_pdu->prb_size);
At gNB side, it was missing pucch_pdu->bwp_start, i.e., it was:
uint32_t *sGold = gold_cache(x2, pucch_pdu->prb_start / 4 + ngroup / 2);
uint8_t *sGold8 = (uint8_t *)(sGold + pucch_pdu->prb_start / 4);
This MR was tested with COTS UE with a bwp_start other than 0, and now PUCCH format 2 is being decoded correctly.
Move this message down, at the end of the function, if no code path
exists under which msg3 allocation might fail despite this log having
been printed.
Assume the minimum grant (min_rb) size to be the bandwidth part size. As
an example: rbStart 0, min_rb=bwpSize=106. This should pass, hence
modify these two conditions.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
The functions nr_generate_csi_rs() and nr_ue_generate_csi_rs() are
identical. This commit removes nr_ue_generate_csi_rs() and moves
nr_generate_csi_rs() to nr_phy_common_csirs.c so both gNB and UE can use
the same function.
Integration: `2025.w18`
Closes#953
See merge request oai/openairinterface5g!3413
* !3385 Add enc/dec lib for E1 Bearer Context Setup Failure
* !3410 Avoid segmentation fault when testing trigger reestablishment and there is no DRB[0] established
* !3411 Remove assert for SRI-PUSCH-PowerControl
* !3291 Improvements in handling UE context in gNB DU
* !3416 Signal gNB-DU config update CellStatus from DU to CU
* patch to fix memory leak on DRB_ToAddModList
* update phytest-timing thresholds
Signal gNB-DU config update CellStatus from DU to CU
Add the cell status to gNB-DU configuration update message, including
test. Use the gNB-DU configuration update to signal the cell status in
the stack.
This IE was not included in a previous refactoring round, but is at
least necessary to be decoded when interoperating with the OSC O-DU.
Improvements in handling UE context in gNB DU
The goal of this MR is to improve the handling of UE context in gNB DU.
To achieve this goal, the UE structure is created as soon as the gNB
receive a PRACH indication. At that stage the UE is placed in a new
structure containing UEs performing RA, untill RA is complete where it
is moved to the list of connected UEs. To simplify the code and to
improve the handling of initial procedures (see #751), DCI 10 and DCI 00
is used at every stage until the DU receives from CU the indication of
UE RRC reconfiguration being completed.
Remove assert for SRI-PUSCH-PowerControl
SRI-PUSCH-PowerControl is not implemented at this point but its enough
to warn about incorrect power control behavior rather than assert on the
configuration.
Closes#953
This is preparatory work to allow NSA-like modes to be used over F1 in
the future. Notably, it fills the F1 message for UE context setup with
GTP TEID, and fills additional information to "make the F1 encoder
happy" (fill in QFI etc). Also, provide some F1 fixes to make this work.
Remove stale UE connections, if relevant.
sdap_tun_read_thread needs to know if we are gNB/UE. Previously, we
passed this into the thread, but the next commit also needs to for
interface termination, where this info is not available. So, for noS1
mode, pass this in.
Add functionality to trigger the addition of a new RRC UE context (in
the CU) for NSA modes, using F1. This commit makes do-ra and phy-test
modes work. "True" NSA will work in the next commit, which also sends
the X2 addition request answer message.
Use the gNB-DU configuration update to signal the cell status in the
stack. At the DU, modify the code to always send this message --
previously, we only sent this message if a SIB1 update was necessary,
but now it's always, only including SIB1 updates if necessary.
At the CU, as we don't really have a use as of now, print the
information, but don't do anything with it.
Add enc/dec lib for E1 Bearer Context Setup Failure
This MR is adding:
- the enc/dec library
- unit test
- handler and callback in stack
For the E1 Bearer Context Setup Failure.
- rewrite add_UE_to_list() and rewrite remove_UE_from_list() to simplify
list handling
- return pointer from get_new_nr_ue_inst(); it's completely freed by
delete_nr_ue_data()
- have add_new_UE_RA() add UE context to access list; remove with
nr_release_ra_UE()
- have add_connected_nr_ue() only add UE to connected list; to move from
access to connected use transition_ra_connected_nr_ue(); remove with
mac_remove_nr_ue() as previously
- free memory on problems during RA
- add some documentation
- in NSA/HO: check for pre-configured RA process
- there are asserts in all functions to clarify when a UE has RA
In phy-test and do-ra modes, we will trigger a UE context creation after
F1 Setup (because the DU is ready), in a later commit. However, before
this commit, E1 is started after the gnb_app (which triggers F1 Setup).
E1 starts an (integrated) CU-UP; if the E1 Setup arrives after the F1
setup (which creates a UE context), then the E1 setup handler will drop
the newly created RRC context for a do-ra/phy-test mode.
Avoid/minimize this by starting E1 first, so that E1 setup is done
before F1 Setup is completed (this does not make sure the problem does
not happen, but lowers the risk of the above problem).
SRI-PUSCH-PowerControl is not implemented at this point but its enough
to warn about incorrect power control behavior rather than assert on the
configuration.
This commit does not introduce the callback on the CU-UP to trigger
a Bearer Context Setup Failure when the setup of the bearer context was unsuccessful.
This should be handled properly in the stack e.g. in e1_bearer_context_setup (a comment
in the code says "We assume all DRBs to setup have been setup successfully, so we always
send successful outcome in response and no failed DRBs")
Integration: `2025.w17`
Closes#947
See merge request oai/openairinterface5g!3403
* !3377 Fix all direct MAC memory leaks
* !3397 Fix for MIB/SIB gNB delay mechanism
* !3399 SIBs in DL slot check
* !3401 F1AP: Allocate gNB_DU_ID before storing ID
* !3380 Issue 947 and compilation improvements
* !3391 small bugfix for T tracer
* !3261 Add Bearer Context Modification Request/Response enc/dec lib and adopt in stack
* !3178 mod: refactor PHY multiplications
* !3382 Improve radio for Metanoia RU (and likely others)
* !3388 Update CN5G images tags to the latest release in all CI pipelines
* !3351 Fix ASN1 struct double free
* !3405 Fix for NR UE DLSCH decoding barrier in case of no feedback
* !3404 Polar: remove dead code and a wrong comment
Polar: remove dead code and a wrong comment
a file code duplicated and no more used a comment is wrong:
uint16_t x = INFINITY; is wrong, the gcc comment is true
uint16_t x= INFINITY; sets x=-32768 because it is truncature of 0x7FFFFF
add SIMD for the top lines when i run polartest
Fix for NR UE DLSCH decoding barrier in case of no feedback
In !3291 NTN CI RFsim test fails with the UE being stuck. After some
investigation, this seems to be caused by the scenario where there is no
feedback for DLSCH. In that case there is no need to wait for DLSCH
being completed before generating feedback (there is no feedback).
Fix ASN1 struct double free
When paging, RA and other SI have same PDCCH search space, we should
free the struct once and reset the other pointers to NULL.
Update CN5G images tags to the latest release in all CI pipelines
This MR is updating the tags of the CN5G docker images to the latest
release v2.1.9, for all CI pipelines.
Improve radio for Metanoia RU (and likely others)
We introduced a regression that lowered the achievable DL throughput
with at least the Metanoia RU (i.e., in the configuration and the UE
that we use). git bisect showed up one commit, which does not seem
necessary. We just revert this commit, as it improves the throughput and
does not seem to have a negative impact on performance.
Further, increase RLC buffers a bit. Limit 7.2 pipeline number of layers
to 2.
With PMI reporting working (see HEAD^^), it seems that four layers put
two much processing strain on the machine (cacofonix), which asserts
immediately. In tests, it was found that the same test throughput
(600Mbps) can be achieved with two layers, while not crashing the
machine.
The UE stores PDCCH search spaces from the network in NR_BWP_PDCCH_t
struct within NR_UE_MAC_INST_t. After storing, the pointers otherSI_SS,
ra_SS and paging_SS are updated to point to the stored SS. Multiple
pointers could point to the same stored SS struct depending on
configuration. Then when the UE wants to release the SS, the pointers
are used to free the stored SS using ASN_STRUCT_RESET(). If multiple
pointers point to the same SS, calling ASN_STRUCT_RESET() on all
pointers would lead to double free. So one needs to check for dangling
pointer before freeing.
Instead of using pointers and assigning them during configuration, we
use SS id for otherSI_SS, ra_SS and paging_SS to retrieve the pointers
whenever needed. When the UE wants to release the SS, we make them -1
indicating an invalid SS id.
Add Bearer Context Modification Request/Response enc/dec lib and adopt in stack
This MR is introducing the Bearer Context Modification Response enc/dec
library with relative unit test, and it is also adopting it in the
stack. Also:
- Refactor Security Information IE decoding function
- Adopt Bearer Context Modification Request lib in stack (introduced in
!3219 (merged))
small bugfix for T tracer
small bugfix: missing beam index when addressing txdataF in T tracer
command. Also changed order of if(gNB->phase_comp) so that data is
exported in any case.
Issue 947 and compilation improvements
This MR started with a small commit (03c7f151) to close#947. Little did
I know that I would be taken in a long journey through OAI compilation
hell.
F1AP: Allocate gNB_DU_ID before storing ID
Update the test so it would catch that bug. Check in eq_() that both
gNB_DU_IDs would be present, or not, using xor.
Found while interop testing with OSC DU.
Fix all direct MAC memory leaks
This MR fixes many memory leaks in the MAC that are otherwise shown by
asan if the gNB is started. UEs can be connected and it seems the MAC
does not leak memory. It also fixes a number of memory problems where
e.g., the generation of SIB1 "steals" memory from the
ServingCellConfigCommon. See the commits for more details.
Note that this still leaves behind a lot of memory after calling the new
function mac_top_destroy_gNB(). To see them, add free(mac); in that
function. However, there are no "direct leaks", so it would be feasible
to still clean up (it's just that we don't do it, yet).
I checked. In a "standard" configuration (FR1, 30kHz), the memory leaks
come basically from RRC. Also, the F1 UE context setup message leaks
some memory, which we will handle in the future by adding
encoding/decoding functions that with corresponding utility (free, copy)
functions. On the other hand, the frequent F1 messages (UL/DL RRC
Message Transfer) do not leak memory (they have the utility functions).
A final commit just makes the inability to write nrRRC_stats.log,
nrL1_stats.log, and nrMAC_stats.log, non-fatal to the gNB.
Pass a "type" of RLC operational mode, from which split-type/gNB/UE
decision is derived.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
prepare_scd() sets up memory for possible dedicated BWPs to be set up.
If they are not used, they are freed in fix_scd(). [1]
There are two problems:
1. in prepare_scd(), multiple structures are allocated once (for
multiple elements), but inserted once. When trying to free those, the
logic of ASN.1 is to free list elements individually, but then we try
to call free() on each element of the list that has been allocated in
one go. Fix this by doing multiple allocations to be in line with
ASN.1 logic.
2. in fix_scd(), free recursively all data structures, not only the
sequence element itself.
[1] this is horrible. We should only allocate memory if we actually need
it, but let's fix the more urgent problem of memory leaks first. Fixing
the logic problem would be more involved.
Integration: `2025.w16`
Closes#949, #929, and #941
See merge request oai/openairinterface5g!3392
* !3207 Create nrUE network interface from SDAP (rebased)
* !3293 Cleanup and refactor initial gNB configuration
* !3326 Enable SSB-SINR based CSI reporting
* !3330 NR UE: consider the ratio of PUSCH EPRE to DMRS EPRE when calculating PUSCH DMRS power scaling
* !3376 Correct block_length to Kprime for LDPC decoder
* !3390 fix IP address in 4G UE
* !3071 time management module
* !3254 Follow up on NAS Registration Accept lib
* !3121 Bugfix for number of PRBs in PUCCH format 2
* !3387 fix NTN LEO scenario
* !3393 rejecting DRB if not configured in PDCP-Config
* !3372 Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler
fix NTN LEO scenario
NR UE: in nr_slot_fep() perform FO compensation in local tmp_dft_in
array instead of global rxdata array.
This avoids problems if nr_slot_fep() is called more than once for an
OFDM symbol.
Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler
- Delay MIB/SIB in gNB until PRACH noise converges
- Remove the first PRACH random access attempt delay in NR UE
Bugfix for number of PRBs in PUCCH format 2
[TS 38.213 - Section 9.2.1 PUCCH Resource Sets] If the format indicates
PUCCH-format2 or PUCCH-format3, the PUCCH format configured for a PUCCH resource
is PUCCH format 2 or PUCCH format 3, respectively, where the PUCCH resource also
includes a number of PRBs provided by nrofPRBs, a number of symbols for a PUCCH
transmission provided by nrofSymbols, and a first symbol for the PUCCH
transmission provided by startingSymbolIndex.
[TS 38.213 - Section 9.2.3 UE procedure for reporting HARQ-ACK] If a UE transmits
a PUCCH with O_ACK HARQ-ACK information bits and O_CRC bits using PUCCH format 2
or PUCCH format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE
determines a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the
minimum number of PRBs (...)
[TS 38.213 - Section 9.2.5.1 UE procedure for multiplexing HARQ-ACK or CSI and
SR in a PUCCH] If a UE transmits a PUCCH with O_ACK HARQ-ACK information bits,
O_SR = ⌈log2(K+1)⌉ SR bits, and O_CRC CRC bits using PUCCH format 2 or PUCCH
format 3 in a PUCCH resource that includes M_PUCCH_RB PRBs, the UE determines
a number of PRBs M_PUCCH_RB_min for the PUCCH transmission to be the minimum
number of PRBs (...)
[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in
a PUCCH] If a UE has HARQ-ACK, SR and wideband or sub-band CSI reports to
transmit and the UE determines a PUCCH resource with PUCCH format 2, or the UE
has HARQ-ACK, SR and wideband CSI reports to transmit and the UE determines a
PUCCH resource with PUCCH format 3 or PUCCH format 4, where (...) the UE
transmits the HARQ-ACK, SR, and CSI reports bits by selecting the minimum number
PUCCH M_PUCCH_RB_min of the M_PUCCH_RB PRBs satisfying (...)
[TS 38.213 - Section 9.2.5.2 UE procedure for multiplexing HARQ-ACK/SR/CSI in a
PUCCH] If a UE has one or more CSI reports and zero or more HARQ-ACK/SR
information bits to transmit in a PUCCH where the HARQ-ACK, if any, is in
response to a PDSCH reception without a corresponding PDCCH; if any of the CSI
reports are overlapping (...); else, the UE transmits the
O_ACK + O_SR + O_CSI + O_CRC bits in a PUCCH resource provided by
pucch-CSI-ResourceList and determined as described in clause 9.2.5
Therefore, the number of PRBs to be used by PUCCH-format2 is M_PUCCH_RB_min,
except if we have zero HARQ-ACK bits, or if we have any HARQ-ACK, is in response
to a PDSCH reception without a corresponding PDCCH. In this case, we must use
the resources indicated in the pucch-CSI-ResourceList and determined as described
in clause 9.2.5.
In OAI, we have:
asn1cSeqAdd(&csirep->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list, pucchcsires);
Where the resource added to the list corresponds to:
pucchres2->pucch_ResourceId = *pucchressetid;
pucchres2->startingPRB = 0;
pucchres2->intraSlotFrequencyHopping = NULL;
pucchres2->secondHopPRB = NULL;
pucchres2->format.present = NR_PUCCH_Resource__format_PR_format2;
pucchres2->format.choice.format2 = calloc(1,sizeof(*pucchres2->format.choice.format2));
pucchres2->format.choice.format2->nrofPRBs = 8;
pucchres2->format.choice.format2->nrofSymbols = 1;
pucchres2->format.choice.format2->startingSymbolIndex = 13;
Currently, in develop branch, we get these prb_size for PUCCH-format2:
[NR_RRC] NGAP_PDUSESSION_SETUP_RESP: sending the message
[NGAP] pdusession_setup_resp_p: pdusession ID 1, gnb_addr 172.31.0.1, SIZE 4, TEID 1579669408
[NR_MAC] (596.3) pucch_pdu->prb_size = 4
[NR_MAC] (596.4) pucch_pdu->prb_size = 3
[NR_MAC] (600.3) pucch_pdu->prb_size = 4
[NR_MAC] (600.4) pucch_pdu->prb_size = 3
[NR_MAC] (604.3) pucch_pdu->prb_size = 4
[NR_MAC] (604.4) pucch_pdu->prb_size = 3
[NR_MAC] (608.3) pucch_pdu->prb_size = 4
While in QXDM we have Num RB = 8, whenever we have zero HARQ-ACK bits:
UCI Request BMask = ACK_NACK_RPT | CSI_RPT
Start symbol = 13
Num Symbols = 1
Starting RB = 0
REL16 DMRS EN = 0
Dual Pol Status = 0
Num RB = 2
Freq Hopping Flag = HOP_MOD_NEITHER
Second Hop RB = NA
Num HARQ ACK Bits = 1
Num SR Bits = 0
Num UCI P1 Bits = 8
UCI Request BMask = ACK_NACK_RPT | CSI_RPT
Start symbol = 13
Num Symbols = 1
Starting RB = 0
REL16 DMRS EN = 0
Dual Pol Status = 0
Num RB = 3
Freq Hopping Flag = HOP_MOD_NEITHER
Second Hop RB = NA
Num HARQ ACK Bits = 3
Num SR Bits = 0
Num UCI P1 Bits = 13
UCI Request BMask = CSI_RPT
Start symbol = 13
Num Symbols = 1
Starting RB = 0
REL16 DMRS EN = 0
Dual Pol Status = 0
Num RB = 8
Freq Hopping Flag = HOP_MOD_NEITHER
Second Hop RB = NA
Num HARQ ACK Bits = 0
Num SR Bits = 0
Num UCI P1 Bits = 10
UCI Request BMask = CSI_RPT | SR_RPT
Start symbol = 13
Num Symbols = 1
Starting RB = 0
REL16 DMRS EN = 0
Dual Pol Status = 0
Num RB = 8
Freq Hopping Flag = HOP_MOD_NEITHER
Second Hop RB = NA
Num HARQ ACK Bits = 0
Num SR Bits = 1
Num UCI P1 Bits = 11
Therefore, this MR fixes the prb_size, so that the number of PUCCH-format2 PRBs matches correctly.
Follow up on NAS Registration Accept lib
This MR is a follow up on !2984 (merged).
The goal is to enhance the NAS Registration Accept lib:
- Add regression test for NAS Registration Accept: the goal of this test is to
prevent on the decoding of the NAS Registration Accept sent by the OAI CN5G
- Add equality check and free utility functions to NAS Registration Accept
library
- Free NAS Registration Accept after use: heap memory is allocated for this
message during decoding and shall be free after processing
- Remove harcoded Slice Differentiator (SD) in NAS decode_nssai_ie and update
the processing logic: The SD stored in the allowed S-NSSAI list was hardcoded
in the decoding function, however this IE is not mandatory but optional.
Therefore, the check of the decoded message contents should take into account
the presence of the field in the received message and in that scenario, check
the stored value against the one from the UICC. If no SD was received, consider
the UICC SD a valid one.
- Cleanup and other fixes to decode_registration_accept: (1) adopt byte array
(2) move registration result enc/dec to registration accept library (3) check
on buffer lengths (4) add defines whenever necessary (5) simplify the code
Disable the PRACH workaround in NR UE. With the MIB/SIB delay
implemented on the gNB there is no longer a need to delay first
NR UE random access attempt.
This commit introduces a delay mechanism for the first MIB/SIB transmission
in the gNB scheduler to allow PRACH noise estimate to converge stabilize
before first PRACH preamble reception.
Key changes:
- Added the `num_scheduled_prach_rx` variable to gNB_MAC_INST to keep track
of total number scheduled of PRACH receptions. Using uint64_t type to avoid
overflow.
- Updated the `gNB_dlsch_ulsch_scheduler` function to conditionally schedule
MIB/SIB transmissions if `num_scheduled_prach_rx` is at least 100.
The value comes from OAIs implementation of PRACH noise estimate.
fix IP address in 4G UE
The following error was appearing when running LTE UE:
inet_pton(): cannot convert -64.-74.0.2 to IPv4 network address
The allocated address by the core actually is 192.182.0.2.
On my host "char" is signed, leading to the above error (192 and 182
are seen as signed).
Let's force "ip_addr" unsigned and everyone is happy.
Correct block_length to Kprime for LDPC decoder
When compile the OAI by CMake, it shows the following error:
../openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_CL.c:353:40: error: no member named 'block_length' in 'struct nrLDPC_dec_params'
int block_length = p_decParams->block_length;
NR UE: consider the ratio of PUSCH EPRE to DMRS EPRE when calculating PUSCH
DMRS power scaling
When calculating DMRS scaling ratio, we should consider PUSCH EPRE to DMRS
EPRE according to TS 38.214 Table 6.2.2-1.
Close#929
Enable SSB-SINR based CSI reporting
3GPP 38.331 release 16 specifies that If the field reportQuantity-r16 is present,
UE shall ignore reportQuantity (without suffix). reportQuantity-r16 configures
SSB based SINR as the reporting quantity.
set do_SINR = 1; in gNB params part of the config file to enable SSB based SINR
reporting.
Cleanup and refactor initial gNB configuration
This is follow-up on !3048 (merged). Major changes in this MR:
- Add config functions to reduce redundant code repeated in multiple places in the file
- Add macros to reduce redundant code in gNB configuration
- Refactor RCconfig_NR_NG
- Cleanup obsolete and commented out code
- Refactor includes in executables/nr-gnb.c
- Introduce platform type plmn_id_t for consistency across the stack: F1AP, NGAP can now use the same struct type
- And other minor formatting
Create nrUE network interface from SDAP (rebased)
A rebase of !2485. Dropped a few refactors and SDAP manager changes.
Changes
1. Move tunnel interface read thread to SDAP for gNB (noS1) and UE (noS1 and SA).
2. Hold tunnel interface socket fd in SDAP entity instead of global variable.
3. Handle UE tunnel interface creation and IP configuration from NAS thread in noS1 and SA modes.
4. Modified UE tunnel interface naming scheme. Additional PDU sessions get oaitun_ue<id>p<pdusession_id>.
Closes#941
The following error was appearing when running LTE UE:
inet_pton(): cannot convert -64.-74.0.2 to IPv4 network address
The allocated address by the core actually is 192.182.0.2.
On my host "char" is signed, leading to the above error (192 and 182
are seen as signed).
Let's force "ip_addr" unsigned and everyone is happy.
This commit refactors the TUN interface management by moving its creation
and configuration from the PDCP layer to the SDAP layer for UE.
Key changes include:
- Introduced `tun_generate_ue_ifname` and `tun_destroy` functions for better
TUN interface lifecycle management.
- Added support for creating and destroying UE-specific TUN interfaces in SDAP.
- Refactored `nr_pdcp_module_init` to remove TUN-related logic and moved it
to SDAP.
- Updated NAS and SDAP layers to handle PDU session-specific TUN interface
creation and configuration.
- Enhanced SDAP entity management to include TUN socket handling and thread
lifecycle.
- Updated NAS message handling to initialize default PDU session TUN
interfaces in NOS1 mode.
- Use a single SDAP thread function for gNB and UE
- Allow noS1 mode also in SA on gNB
These changes improve modularity by isolating TUN interface management within
the SDAP layer, aligning with the 3GPP architecture, and simplifying the PDCP
layer.
Co-Authored-By: Robert Schmidt <robert.schmidt@openairinterface.org>
This test verifies that a NAS Registration Accept message, as received
from the OAI CN5G, is correctly decoded and matches the expected output
structure. It ensures that future changes to the NAS decoder do not
break compatibility or correctness with existing decoding behavior.
The SD stored in the allowed S-NSSAI list was hardcoded in the decoding
function, however this IE is not mandatory but optional, therefore
the check of the decoded message contents should take into account
this and check the stored value against the one from the UICC only when the field is present.
If no SD was received, consider the UICC SD a valid one.
Also, add free function to Registration Accept library and adopt in stack to free NAS
Registration Accept after use: heap memory is allocated for this message during decoding
and shall be free after processing.
3GPP 38.331 release 16 specifies that If the field reportQuantity-r16 is present, UE shall ignore reportQuantity (without suffix).
reportQuantity-r16 configures SSB based SINR as the reporting quantity.
set do_SINR = 1; in gNB params part of the config file to enable SSB based SINR reporting instead of the default RSRP based.
Replaced `sprintf` with `snprintf` in gnb_config.c to enhance memory safety
by preventing potential buffer overflows. `sprintf` can cause buffer overflows
by not checking the destination buffer size. In contrast, `snprintf` allows
specifying a maximum buffer size, ensuring no overflow occurs by limiting
the number of characters written, including the null terminator.
Integration: `2025.w15`
Closes#901, #943, #944, #942, and #939
See merge request oai/openairinterface5g!3374
* !3358 RedCap InitialBWP
* !3364 NR UE: fix PRACH generation with frequency resource id not 0 when msg1-FDM > 1 in SIB1
* !3365 nr pdcp: 'count' is 32 bits, use explicit type instead of generic 'int'
* !3366 Fix typo in gNB_scheduler_uci.c
* !3370 Doc: add information on how to avoid a common asan bug
* !3275 NAS service reject
* !3312 NR UE: enable concurrent UL slot processing
* !3368 Encapsulate cmake asn1c call, suppress useless output
* !3336 Fix logging in nr_dlsim
* !3281 Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters
* !3355 NR UE: add support for continuous frequency offset compensation (in particular NTN LEO Doppler)
* !3375 CI CoreNetwork fixes
* !3184 NR SIB2
* !3348 CI: Replacing Devkit server with a Grace Hopper in Aerial pipeline
CI: Replacing Devkit server with a Grace Hopper in Aerial pipeline
Switch servers on the Aerial pipeline from Gigabyte (AMD) to Grace
Hopper (ARM), and make the necessary changes:
- Update XML, YAML, and gnb.conf
- Change the argument passed to the L1 in aerial_l1_entrypoint.sh to be
compatible with the GH
- Update the Aerial setup in TESTBench.md and Aerial_FAPI_Split_Tutorial.md docs
- Decrease the tested throughput due to an issue with the RU. Will open
another MR to increase it once the problem is fixed.
NR UE: add support for continuous frequency offset compensation (in particular NTN LEO Doppler)
- move function add_noise() to file
openair1/SIMULATION/TOOLS/phase_noise.c
- refactor (co)sinus calculation out of phase_noise() into get_sin_cos()
in nr_common.c
- NR UE: continuously estimate the frequency offset using PBCH DMRS
- NR UE: add command line parameter --initial-fo to specify known
initial frequency offset
- NR UE: add support for continuous DL frequency offset compensation
--cont-fo-comp
- NR UE: add support for continuous UL frequency offset
pre-compensation. Depending on the main source of frequency offset,
pre-compensate the UL frequency offset (FO) accordingly. Therefore
modify the flag --cont-fo-comp to accept an integer value, where
* 1 specifies, that the main FO contribution comes from the accuracy of the local oscillator (LO)
* 2 specifies, that the main FO contribution comes from Doppler shift
- NR UE: add PI controller to continuous frequency offset compensation
- rfsimulator: enable and correct NTN LEO doppler simulation
- use SIMD to speed up nr_fo_compensation()
- Extend NTN LEO example in RUNMODEM.md to include continuous Doppler
compensation
- NR UE: in nr_adjust_synch_ue() extend the peak search to +/- cyclic
prefix size, esp. for LEO NTN scenarios the timing drifts during
initial sync, which is mostly compensated with
--ntn-initial-time-drift. But there might be a residual time offset,
and by extending the peak search window we make this more tolerant.
- NR UE: remove unused nr_slot_tx_offset, it is unused since commit
f3e60a14
- NR UE: remove now unnecessary local variable
update_ntn_system_information, directly use
UE->ntn_config_message->update instead
- Update the Aerial tutorial to include Grace Hopper server and add reference to Gigabyte server setup instructions.
- Update the Aerial setup in the TESTBench.md
- encode all SI containers the encoding function gets (it's not the
encoding function's job to enforce semantics)
-
Fixes: 30628b820c ("Add encoding/decoding lib for F1AP Setup Response
(Interface Management)")
In various places, e.g., during initialization (before deployment), we
use the name of the CN object, previously including the IP address.
However, the IP might not be available (because the CN is not deployed),
so we would get warnings at this stage. Avoid this by not looking up the
IP.
There is now one place where we have to look up the IP address
separately.
Also, the exception in initialization might be misleading if we used
{self}, because we complain about no node being present, but the {self}
would include a non-existing node name => do not use it.
Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters
Add support for 'dl_min_mcs' and 'ul_min_mcs' configuration parameters,
they will enforce the gNB scheduler to select always a MCS equal or
above its values
In addition to use a min value for MCS, this MR also enables the testing
of a specific MCS value with COTS UE, by setting
xl_min_mcs = xl_max_mcs
example:
dl_min_mcs: 22
dl_max_mcs: 22
ul_min_mcs: 7
ul_max_mcs: 7
In the example above, the scheduler will use always MCS 22 for downlink
and MCS 7 for uplink.
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.
Use the new run_asn1c() in all occasions for code generation.
[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
NR UE: enable concurrent UL slot processing
This commit introduces support for concurrent UL slot processing
Key changes:
- Increased number of UL actors from 1 to 2
- fix several issues related to writing to global variables inside processSlotTX
- Ensure in-order execution of if_module calls by utilizing the preexisting dynamic_barrier structure.
Note: for NTN, concurrent UL slot processing does not work. A flag
`--num-ul-actors X` has been introduced that allows to fix the number of
UL actors to `X` (default is 2).
Add 5GMM Service Reject enc/dec library and unit test
- introduce the library for the NAS Service Reject enc/dec
- add relevant unit test
- add handler
nr_dlsim allocates memory on every SNR iteration without freeing it.
This can lead to memory exhaustion. Fix this by allocating only once
and reuse memory. Also, free it before exit.
NR UE: fix PRACH generation with frequency resource id not 0 when msg1-FDM > 1 in SIB1
When msg1-FDM > 1 (2, 4 or 8) in SIB1, the frequency resource id of
PRACH could be not 0, current PRACH generation only considers frequency
resource id = 0. This MR fixes it, verified with 3rd-party gNB.
Closes#939
RedCap InitialBWP
Prevent RedCap UEs to move to DedicatedBWP
This allows the coexistence of RedCap UEs and non-RedCap UEs in the
same cell by having an InitialBWP with 20MHz and a larger
DedicatedBWP.
Update example RedCap configuration file to have 20 MHz InitialBWP and
40 MHz DedicatedBWP
esp. for LEO NTN scenarios the timing drifts during initial sync, which is mostly compensated with --ntn-initial-time-drift.
But there might be a residual time offset, and by extending the peak search window we make this more tolerant.
Depending on the main source of frequency offset, pre-compensate the UL frequency offset (FO) accordingly.
Therefore modify the flag `--cont-fo-comp` to accept an integer value, where
- `1` specifies, that the main FO contribution comes from the accuracy of the local oscillator (LO)
- `2` specifies, that the main FO contribution comes from Doppler shift
This commit introduces support for concurrent UL slot processing
Key changes:
- Increased number of UL actors from 1 to 2
- fix several issues related to writing to global variables inside
processSlotTX
- Ensure in-order execution of if_module calls by utilizing the
preexisting dynamic_barrier structure.
Encapsulate the asn1c call from cmake in a cmake function run_asn1c().
As a notable change to the previous manual add_custom_command()
invocation, in suppresses the output of asn1c by default [1] and stores
it in a log file. In case of asn1c4 error, the output will output on
stdout.
Use the new run_asn1c() in all occasions for code generation.
[1] it is quite verbose, with many warnings that we cannot influence nor
suppress, and lists all generated files which is verified by the build
system automatically, anyway.
- Update the L1 (cuBB) version in the docker-compose.yaml
- Change the argument for the L1 config file (cuphycontroller.yaml) in the aerial_l1_entrypoint.sh
- Update the N2 and N3 IP addresses to match the Grace Hopper's in the gnb.conf.
- Remove the test XML file for pulling images in the ARM image builder.
- Update the Aerial XML file to pull ARM images.
- Decrease tested throughput (temporarily) due to problems with Foxconn RU
Integration: `2025.w14` (part 2)
See merge request oai/openairinterface5g!3362
* !3255 Fixes for E1 and PDU session usage
* !3332 sched_ctrlCommon earlier
* !3356 Avoid accessing current_DL_BWP structure when scheduling DCI for other SIBs
* !3359 Fix inconsistent maxnoofPDUSessions definitions between NGAP and platform constants
* !3357 CI: update VVDN configuration file
* !3333 NR RLC improvements
* !3342 Fix bugs detected gcc
* !3347 feat(oran_fhlib_5g): O-RAN 7.2 FrontHaul Interface on Arm
* !3153 [E2 agent] RAN Control SM - support for REPORT Style 1 ("RRC Message" and "UE ID" RAN Parameter IDs)
* !3234 CI: minor tunings and improvements
* !3276 Optimization for unused symbols in NR UE
* !3317 Extend F1 Handover test
Extend F1 Handover test
do 1 more handover in the same test to verify robustness
- This MR keeps a simple ping after the second handover since there are
still issues due to scheduling starting too early, that is as soon as
the UE context is added. This leads to retransmissions that could
eventually lead to a test failure. The issue will be fixed in a future
MR.
add check on connected DU to verify successful handover
- a new telnet function gets in input the UE ID and returns the ID of
the connected DU
wait some time after deploying DU to mimic time for measurements
Optimization for unused symbols in NR UE
After processing TX frequency domain data skip IFFT call for symbols
that aren't used, the time domain buffer is memset instead.
Biggest benefit is when UE does not transmit PUSCH, or PUSCH is using <
14 symbols
[E2 agent] RAN Control SM - support for REPORT Style 1 ("RRC Message" and "UE ID" RAN Parameter IDs)
[Spring of Code 2024] contributions
Extended the RAN Control Service Model at E2 Agent to support all RC
REPORT Styles (1 - 5)
Implemented the following RAN Parameter IDs for REPORT Style 1:
1. "RRC Message": any DL-DCCH, and any UL-DCCH
2. "UE ID": as per spec, when the RRC Setup Complete or F1 UE Context
Setup Request detected
feat(oran_fhlib_5g): O-RAN 7.2 FrontHaul Interface on Arm
This MR is enabling the 7.2 FHI on Arm systems.
Even though the performance are yet very bad (UE connection is very
difficult, 100Mbps DL, almost no UL), still I would like to merge this
now since the matter of making the FHI work is rather orthogonal to the
performance issues.
So merging this feature would provide a reliable settlement on top of
which we could then progressively enhance the porting of OAI to Arm.
Especially that would make our work easier by having less features to
rebase regularly on develop.
The main features this MR is made of are:
1. Make the xran patches dual
We provide patches for both E and F releases of xran that handles x86
targets as well as Arm targets. Both patches have been tested on both
types of machines (armix, broadbill). Thanks to @brobert and @changy
for their work on xran.
2. Perform 9-bits BFP compression with ArmRAL
Since the BFP compression implementation provided with xran does rely
heavily on AVX512, we provide an alternative implementation that is
relying on Arm's RAN Acceleration Library (ArmRAL).
As of writing this commit description, only 9-bits compression is
supported. Other IQ width will be added.
This upcoming change does not prevent review to be performed since the
BFP compression functions of ArmRAL are identical except for the IQ
width. Adding further IQ width is therefore very straightforward.
3. Fixes in oran_fhlib_5g to support Arm
The library oran_fhlib_5g needed few changes to successfully compile and
run on Arm systems. Thanks to @brobert for his work on oran_fhlib_5g.
Fix inconsistent maxnoofPDUSessions definitions between NGAP and platform constants
There are 2 different definition of maxnoofPDUSessions (as per 3GPP TS
38.413), one in NGAP lib (set to 16) and one in platform_constants.h
(256 as per specs). The NGAP lib definition is removed in this commit
and replaced by the one compliant with the specs.
This is fixing the warning:
In function 'fill_pdu_session_resource_failed_to_setup_item',
inlined from 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP' at /openair2/RRC/NR/rrc_gNB_NGAP.c:588:7:
/openair2/RRC/NR/rrc_gNB_NGAP.c:451:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
451 | f->cause = cause;
| ~~~~~~~~~^~~~~~~
In file included from /common/utils/ocp_itti/intertask_interface.h:235,
from /openair2/RRC/NR/rrc_gNB_NGAP.h:39,
from /openair2/RRC/NR/rrc_gNB_NGAP.c:31:
/openair2/COMMON/ngap_messages_types.h: In function 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP':
/openair2/COMMON/ngap_messages_types.h:546:13: note: at offset [8724, 25769812488] into destination object 'gNB_ue_ngap_id' of size 4
546 | uint32_t gNB_ue_ngap_id;
| ^~~~~~~~~~~~~~
Avoid accessing current_DL_BWP structure when scheduling DCI for other SIBs
Avoid access to mac->current_DL_BWP structure when scheduling DCI for
SIBs other than 1. This is not needed and can cause NULL pointer access
which can happen if the UE has released MAC configuration or has not
started RA yet.
sched_ctrlCommon earlier
This MR configures sched_ctrlCommon earlier, in RCconfig_nr_macrlc().
The objective of this MR is to solve the following Assert in the F1 test:
19897952.126019 [NR_MAC] I Adding new UE context with RNTI 0x3269
/oai-ran/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c:366:15: runtime error: member access within null pointer of type 'struct NR_UE_sched_ctrl_t'
[INFO tini (1)] Spawned child process '/opt/oai-gnb/bin/entrypoint.sh' with pid '7'
[INFO tini (1)] Main child exited normally (with status '1')
Wait before triggering a handover. First, we send it very quickly after
deployment, which can make the DU crash (should be fixed in !3332). Second, a
UE would typically first measure neighbors. While we don't do this with OAI UE,
mimic this somewhat by giving more time.
See also !3332.
* the handover is followed by a sleep and an ping test
This MR keeps a simple ping after the second handover since there are still issues due to scheduling starting too early,
that is as soon as the UE context is added. This leads to retransmissions that could eventually lead to a test failure.
The issue will be fixed in a future MR.
The Bearer Context Modification Request test is adding 1 QoS Flow, therefore the encoding/decoding
is done and this bug does not show. The issue is there when no QoS Flow is mapped in the DRBnGRanModList,
therefore when no memory is allocated for the optional IE, and the member is accessed in the decoding
of the Flow Mapping Information.
As per spec, UE ID shall be reported when the message event configured by
the Event Trigger Style 1 is set to “RRC Setup Complete" message (UE attach), or
“Xn/NG Handover Request” or “F1 UE Context Setup Request” (Intra gNB Handover).
In OAI RAN, Xn/NG Handover is not yet supported, and therefore not added as the trigger event
in this commit.
Additionally, as the Event Trigger Definition Format 1 is common for both "RRC Message" and "UE ID",
E2 node will report the “RRC Setup Complete" message which the xApp will decode and print.
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Theodoros Tsourdinis <theodoros.tsourdinis@sorbonne-universite.fr>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
The fronthaul library ships with BFP compression for AVX512 enabled targets.
This commit adds BFP compression for Arm targets by using the ArmRAL library.
Temporarily deactivate DRB integrity protection in SABOX-B200 E1 testcase
to avoid CI failure due to low measured throughput. Our investigation
suggests that the low throughput is likely due to limitation of the UE
(Quectel RM500Q), which appears to restrict the maximum data rate when
integrity protection is enabled. This limitation is not observed with
Quectel RM520N.
- Cleanup and update of "Machines" table:
- remove asterix - not used in CI
- remove nokiabox - not used in CI
- remove orion - not used in CI
- update of "Lockable Resource" for individual machines - synch with
https://jenkins-oai.eurecom.fr/lockable-resources/
- remove column of "IP Address"
- Update information about build pipelines
The healthcheck interval sets when the first health check occurs after the
container starts. Increasing the healthcheck interval helps avoid marking
the container as "healthy" during the initialization phase of PNF. In
particular, USRP initialization of PNF service may take longer, and deployment
failures can occur even after the 10 seconds interval. Extending the healtcheck
interval provides more time for the service before assessing container health.
Remove memset of the UE TX time domain samples array after trx_write in
RU_write()
This memset is unnecessary and can break openair0 libraries. Some
functionalities, e.g. usrp_lib write_thread expect the samples to be
present in the array after trx_write returns.
The array is always set before being sent either in idft or using memset
so there is no risk of sending the same data twice.
- use Ubuntu image, instead of RHEL image - gNB fails with "Illegal
instruction" during RA, when running with RHEL image
- init DPDK in VA mode
- increase number of cores Tpool
Fixes for E1 and PDU session usage
Fix a number of problems in E1 and PDU session handling:
- For multiple PDU session setup reqs, we send a bearer context setup
each time; fix an assert that was triggered on the second bearer
context setup message
- Add a log for E1 bearer context setup, as already done for
modification and release
- If we get a PDU session setup for an existing PDU session, reject it
as required by the spec [actually, it says to reject individual PDU
sessions; keep it simple for now and reject the entire message, which
might not be correct if there is one new PDU session that does not
exist]
- Add a workaround to handle multiple PDU session setup requests that
come in quick succession for different PDU sessions
Leading to clang error:
/oai-ran/openair2/RRC/NR/rrc_gNB_NGAP.c:1329:37: error: result of comparison of constant 256 with expression of type
'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
The value comes from the decoding of: ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count
Integration: `2025.w14` (part 1)
Closes#931
See merge request oai/openairinterface5g!3353
* !3247 Add enc/dec lib and unit test for 5GS NAS Service Accept
* !3316 Fix: Correctly Read PDU Address IE
* !3322 Refactor core network handling in CI, harmonize code
* !3327 NR UE fix for disable HARQ
* !3350 Cleanup NR PHY common definitions
* !3352 Turn off any Nagle-like algorithm for SCTP
There are 2 different definition of maxnoofPDUSessions (as per 3GPP TS 38.413),
one in NGAP lib (set to 16) and one in platform_constants.h (256 as per specs).
The NGAP lib definition is removed in this commit and replaced by the one
compliant with the specs.
This is fixing the warning:
In function 'fill_pdu_session_resource_failed_to_setup_item',
inlined from 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP' at /openair2/RRC/NR/rrc_gNB_NGAP.c:588:7:
/openair2/RRC/NR/rrc_gNB_NGAP.c:451:12: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
451 | f->cause = cause;
| ~~~~~~~~~^~~~~~~
In file included from /common/utils/ocp_itti/intertask_interface.h:235,
from /openair2/RRC/NR/rrc_gNB_NGAP.h:39,
from /openair2/RRC/NR/rrc_gNB_NGAP.c:31:
/openair2/COMMON/ngap_messages_types.h: In function 'rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP':
/openair2/COMMON/ngap_messages_types.h:546:13: note: at offset [8724, 25769812488] into destination object 'gNB_ue_ngap_id' of size 4
546 | uint32_t gNB_ue_ngap_id;
| ^~~~~~~~~~~~~~
Turn off any Nagle-like algorithm for SCTP
This means that packets will be sent as soon as possible and no
unnecessary delays are introduced, at the cost of more packets in the
network.
https://www.man7.org/linux/man-pages/man7/sctp.7.html
Refactor core network handling in CI, harmonize code
Prior to change set, there is a highly heterogeneous situation for core
network management in CI code: some log collection is done from groovy
files (when it could be done in python, which is easier for local
development), there are multiple commands to start a CN from XML files,
the code for starting a CN is always different (no one unified way to
start "any" CN), Ping/Iperf require some support in ci_infra.yaml, ...
To help with the above, refactor the handling of core networks in the CI
code as follows:
- define all CNs in ci_infra.yaml (basically how to deploy, undeploy,
collect logs, and on which node)
- make one Python class that reads from ci_infra.yaml and that allows to
start/stop previously defined CNs (and add unit tests...)
- make one XML command for start/stop of CNs, leveraging above class
- leverage the CNs defined in ci_infra.yaml consistently in
Ping()/Iperf()
- delete old code
Furthermore, the following supporting changes/bugfixes are done:
- repair Iperf2_Unidir() and add unit test
- fix a number of invalid escape sequence errors (there are some
remaining, which I will do soon)
- various bug fixes
- remove unused XML steps
Fix: Correctly Read PDU Address IE
The QoS Rules loop correctly moves msg pointer allowing the PDU Address
IE to be read correctly. The PDU Address IE is only processed if it is
provided, otherwise there is a warning.
Closes#931
Add enc/dec lib and unit test for 5GS NAS Service Accept
- add new files for Service Accept fgmm_service_accept.c/.h containing
the enc/dec functions (8.2.17 3GPP TS 24.501)
- enabled compiling
- add unit test
- add handler in stack
This is a hack. With some UEs/CN combinations, PDU session requests
might come in quick succession. Since 38.331 asks us to only have one
reconfiguration at once, we need to delay a second, third, ... PDU
session request until the first has passed, to make one reconfiguration
at a time.
The following cases are covered
- we have a regex whose escape sequences are not to be evaluated in the
string, but given verbatim to the regex engine. Hence, mark them as
raw strings.
- some are parameters for the cmd.run() call, but the parameters are
wrong, so remove that
- there is a `\|` that is also to be passed verbatim
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:97: SyntaxWarning: invalid escape sequence '\-'
if re.search('buildconfig.build.openshift.io/[a-zA-Z\-0-9]+ created', ret.stdout) is not None:
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:167: SyntaxWarning: invalid escape sequence '\-'
result = re.search(f'pod/(?P<pod>[a-zA-Z0-9_\-]+) created', ret.stdout)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:325: SyntaxWarning: invalid escape sequence '\$'
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:385: SyntaxWarning: invalid escape sequence '\$'
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:398: SyntaxWarning: invalid escape sequence '\$'
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:413: SyntaxWarning: invalid escape sequence '\$'
self.cmd.run(f'oc get pods.metrics.k8s.io &>> cmake_targets/log/build-metrics.log', '\$', 10)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:429: SyntaxWarning: invalid escape sequence '\|'
grep_exp = "\|".join(attemptedImages)
/home/richie/w/ci-refactor-core-handling/ci-scripts/cls_cluster.py:431: SyntaxWarning: invalid escape sequence '\$'
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', '\$', 60)
As parent. The second change has no escape sequence, but since it's also
a regex, mark it as raw for uniformity (it doesn't hurt either).
ci-scripts/cls_module.py:165: SyntaxWarning: invalid escape sequence '\.'
result = re.search('inet (?P<ip>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', output.stdout)
With the server object to be passed into ping test, it's not necessary
to either hardcode an IP address or provide a template. Instead, always
fill the IP address, which simplies the Ping() code.
Verify that we don't have an IP address/hardcoded by throwing an
assertion.
38.413 section 8.2.1.4 says that if PDU session resource setup req
contains an existing PDU session, that one should be reported as failed.
That is rather complicated for us to do; simply reject all PDU sessions
and let the core deal with that.
If two PDU sessions are to be setup, the CU-CP sends two bearer context
setup requests. When running only the CU-UP, we inconditionally tried to
set up the CU-UP UE ID identifiers upon reception of the bearer context
setup request, leading to an assert. Check if the IDs are not already
set up, to avoid assertions in that case.
The REPORT service was hardcoded to only style 4, and therefore not easily extendable.
This commit moves the support for style 4 in a separate function.
Delete duplicated enum structs for RAN Parameter IDs for all the REPORT styles.
They are already defined in "openair2/E2AP/flexric/src/sm/rc_sm/ie/rc_data_ie.h".
Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net>
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
Update the xran E release patch to work for Arm targets in addition to x86 targets.
Co-authored-by: Yi-Hung Chang <Yi-Hung.Chang@eurecom.fr>
Co-authored-by: brobert <brobert@valiha.com>
Remove include of SIMDE Neon header sse_intrinsic.h to compile on ARM. Otherwise the error below is issued.
```
/usr/include/simde/arm/neon/get_lane.h:279:5: error: incompatible type for argument 1 of ‘vget_lane_f16’
279 | SIMDE_CONSTIFY_8_(vget_lane_f16, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT16_VALUE(0.0)), lane, v);
removed the inclusion of neon.h
```
Currently we still activated the DL HARQ process for PUCCH transmission,
and only at the time of the scheduled PUCCH transmission, we actually skip sending the ACK.
This is not only unnecessary, it is at least misleading and strange that
DL HARQ processes can be reused in the meantime, even though they are active...
Therefore simply don't activate the DL HARQ process by skipping the call to set_harq_status() if feedback for it is disabled.
This is not really used as of now, because most IPs are hardcoded. See
one of the next commits for the use of this.
To make sure that we have the correct IP, there is some code that
verifies that a hardcoded IP and the CN IP would be the same.
Note: need two separate ci_infra.yaml entries, because
- for FlexRIC, the container name is different (is the tutorial CN)
- for RFsim5G E1, we don't have ext-dn => ping UPF
- call scripts for magma MME-based deployment of OAI 5GC in
ci_infra.yaml
- implement the existing python code through scripts (which does the same)
- save the cql file in the repo, which was previously downloaded every
time
- use for porcepix-cn4g and nano-cn4g (un)deployment, ping, perf, in XML
files
- Use scripts to deploy OpenShift-based 5GC in ci_infra.yaml
- Use for oc-cn5g, oc-cn5g-20897, and oc-cn5g-20897-aerial2
for (un)deployment, ping, iperf in relevant XML files
- Convert hardcoded IP addresses to %cn_ip%
Use the core network class to configure one "end" of these tests. This
will make the tests more generic and predictable, as they are explicitly
configured through two ci_infra.yaml "entities", instead of some
implicit "EPC" IP address given in configuration.
As of this commit, no XML passes this info into the framework, so no XML
step will work. As it is many changes, the following commits will add
the necessary info one by one.
This adds a helper class to manage various core networks in the CI
testing framework. Specifically, it reads from a YAML file information
such as a node, (un-)deployment script (file), log collection
instructions, etc., in order to allow a common interface to be used to
deploy and undeploy various core network implementations.
This commit adds the class (in cls_corenetwork.py) as well as tests for
this class.
These two functions use the EPC class to potentially fill in
EPC/5GC-related information, or start a packet tracer (tshark). The only
pipeline that uses these functions is RAN-gNB-N300-Timing-Phytest-LDPC,
which does not use a core network. This functionality is not used, and
can therefore be removed.
Add a possibility to use an "infrastructure YAML file" to configure both
ends of the iperf2 call through a file.
Fix bugs in Iperf2: at least on my machine, iperf2 start time is logged
at 0.00 not 0.0, so update the regex to match both. Do not overwrite
results if the matched regex (otherwise, the result might be None at the
end) and suppress server output.
Add a unit test to test that this function actually works (on my
machine, with iperf v2.2.1), as well as a unit test for analysis.
The 5GMM library in openair3/NAS/NR_UE/5GS/5GMM/ contains the
all the definitions necessary to do the enc/dec of 5GMM IEs.
5GMM messages can share the same IEs, therefore they can use
common definitions and enc/dec functions.
The goal of this commit is to add common definitions to new shared
5GMM library files. The consumers of fgmm_lib are the functions
defined in the openair3/NAS/NR_UE/5GS/5GMM/ library.
# Declare variables to be passed into your templates.
replicaCount:1
image:
# pullPolicy: IfNotPresent or Never or Always
pullPolicy:Always
imagePullSecrets:[]
nameOverride:""
fullnameOverride:""
serviceAccount:
# Specifies whether a service account should be created
create:true
# Annotations to add to the service account
annotations:{}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:"oai-smallblocktest-sa"
podSecurityContext:
runAsUser:0
runAsGroup:0
securityContext:
privileged:false
resources:{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector:{}
tolerations:[]
affinity:{}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.