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.
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
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.
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;
| ^~~~~~~~~~~~~~
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.
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.
Integration: `2025.w13`
Closes#923, #924, #928, and #925
See merge request oai/openairinterface5g!3345
* !3300 Allow RSRP report handling in phy-test mode
* !3318 Improve handling of some pointers causing potential segfault
* !3321 DLSCH scheduler LOGs assertion prevention in case of HARQ disabled
* !3335 Other compilation improvements
* !3338 prevent access to NULL pointer in RELEASE_IE_FROMLIST
* !3337 Fix for wrong NSA init at UE
* !3339 fix NTN regression by correctly setting cellBarredNTN_r17 for NTN band again
* !3340 NR UE: fix nr_pbch_channel_estimation()
* !3260 Shared memory realtime radio simulation
* !3341 rfsimulator: apply deadlock detection only if more than one client is connected
* !3343 K-offset updated with configured sub carrier spacing
* !3331 Add documentation for Foxconn RU
* !3216 FHI72: Management plane support
* !3295 Fix SRS report TLV unpack
Fix SRS report TLV unpack
Changes the SRS unpacking to not expect padding to be present in the buffer when
working with Aerial, with which the report TLVs are not padded to the nearest
32-bit boundary. This issue was found when using a UE with 1 SRS port, which
causes the TLV to not have a length divisible by 4. Also adds a function to pull
X amount of bytes into a uint32_t, which is used to process the last 4 byte
block of the TLV, only pulling the bytes which are not padding. Completed the
SRS.indication dumping procedure to print out the report TLV. Changed the
SRS.indication unitary test to fill the last 4 byte block of the report TLV
appropriately according to the length ( which ensures the padding bytes are set
to 0 )
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.
FHI72: Management plane support
At the moment, tested with Benetel 550 and 650 RUs FW v1.2.2
- support for multiple RUs
- RPCs implemented: <connect>, <subscribe>, <get>, <supervision-watchdog-reset>,
<edit-config>, <validate>, <commit>, <disconnect>
- read PTP sync status from operational datastore xml
- get vendor name, and for xran store RU MAC, MTU and IQ bitwidth and PRACH
offset, and transfer this info
- store interface name, low-level-tx/rx-endpoint names, tx/rx-carrier names,...,
from operational datastore xml
- add reference gNB/DU config files with M-plane support
- update FHI readme
Add documentation for Foxconn RU
This MR adds documentation for using the Foxconn RU with OAI, as it piques the
interest of some in the community. Note that this RU is not continuously tested
with OAI L1. Additionally, we have observed throughput degradation in OAI
versions beyond tag 2024.w30, and the issue is under investigation. For now, we
are providing documentation based on what we have tested in our lab.
K-offset updated with configured sub carrier spacing
According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in
number of slots as per 15Khz SCS Koffset before being applied, needs to be
updated to the slots according to the configured subcarrier spacing.
- Increase the maximum logging line for print done through
log_output_memory().
The reason is that we hit this line length when printing some machine
generated configuration (XML) through the M-plane. Increase to make
more of it visible.
- To limit the impact, only increase this locally in function
log_output_memory(), and statically assert that it will never be
larger than 64 kB.
In other places, we use the old limit.
- Move the definition MAX_LOG_TOTAL to log.c, because it's only used
there.
- if RU(s) are not well configured, disconnect immediately and stop the DU
- if all RUs are well configured, proceed with waiting until ready. The RU is
ready when the carriers are activated. Either the RU already has preconfigured
carriers (previous M-plane client configured), or the DU has to wait until receives
the notifications.
Ideally, we should load the yang models from the RU operational datastore, but the issues are following:
1) the yang models order is not good - dependancy models have to be loaded first
2) earlier O-RAN yang versions (e.g. v4) is not properly defined (i.e. optional parameters should not be included by default)
Added support in both cases, loading from RU with <get-schema> RPC, and loading statically from "radio/fhi_72/mplane/yang/models" folder.
Add a function pullx32 to pull x amount of bytes into uint32_t
Change the unpacking to pull only the needed bytes, and skip over the padding, when not Aerial
Change SRS.indication dumping function to also print the report TLV contents
Change SRS.indication unitary test to fill the last 4 byte block of the report TLV according to the length, with padding
Shared memory realtime radio simulation
Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.
The library is loaded using --device.name vrtsim. The server side (gNB) should
also configure --vrtsim.role server and --vrtsim.timescale according to
requirements.
Limitations:
- Only 1UE-to-1gNB connection supported
Future work:
- Telnet API
- cmake version 3.12 defines libxml2 module; the default path is
/usr/share/cmake-3.<sub-version>/Modules/FindLibXml2.cmake
- OAI requires minimum cmake version 3.16
- RU IP address - to connect to RUs via netconf
- DU MAC address - for setting up the CU-planes on RU; not used in xran
- VLAN tag (*) - for setting up the CU-planes on RU; not used in xran
- DU keypair - for authentication when connecting to RU(s)
The parameters that RU-controller shall retreive from RU list of
capabilities:
- MTU
- compression
- RU MAC address
- PRACH offset (**)
(*) VLAN tag is not used in xran but an option is given in fh_config struct.
In my opinion, it is not a very suitable place, as it is needed for VFs.
Therefore, I moved it in the initialization part for M-plane purposes.
(**) PRACH offset shall be >= max(Ntx,Nrx), as per O-RAN CUS specification:
"The O-DU may decide to use same eAxC ID value to address endpoints on different O-RUs,
but eAxC ID values assigned to one O-RU must be unique within the O-RU’s endpoints of same direction."
=> however, LITEON supports flexible assignment of PRACH eAxC IDs, so
we made a workaround in the xran library to support PRACH eAxC IDs same
as PUSCH eAxC IDs.
According to 38.331 , cell specific K-OFFSET provided in SIB19 is provided in number of slots as per 15Khz SCS
Koffset before being applied, needs to be updated to the slots according to the configured subcarrier spacing.
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.
Fix for wrong NSA init at UE
This error is shown in the UE logs as following
[RLC] Activated srb0 for UE 0
[RLC] SRB0 already exists for UE 0, do nothing
- This addition is based on past tests, iperf3 UDP throughput was 520Mbps DL and 40Mbps UL.
- Throughput degrades when using OAI L1 with tags beyond `2024.w30`.
- This RU is being CI tested only in the Aerial pipeline, not with OAI L1.
- The document will be updated once the issue is identified and fixed.
The above is necessary to not compile as many gNB dependencies into the
UE. RLC only uses GTP, which was satisfied by L2_NR, but that's not
necessary. However, only that change results in
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o): in function `get_list_for_report_style':
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xbe7): undefined reference to `cp_e2sm_rc_event_trigger'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xc5b): undefined reference to `cp_e2sm_rc_event_trigger'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd3b): undefined reference to `cp_e2sm_rc_event_trigger'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xd9d): undefined reference to `cp_e2sm_rc_event_trigger'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596:(.text+0xded): undefined reference to `cp_e2sm_rc_event_trigger'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc.c.o):openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:596: more undefined references to `cp_e2sm_rc_event_trigger' follow
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_cuup.a(ran_func_rc_subs.c.o): in function `remove_rc_subs_data':
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:60:(.text+0xbe): undefined reference to `find_if'
/usr/bin/ld: openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_subs.c:62:(.text+0xca): undefined reference to `free_e2sm_rc_event_trigger'
nr-cuup previously satisfied these dependencies by depending on L2_NR
which links in e2_ran_func_du_cucp_cuup. However, the nr-cuup E2 RAN
functions are in e2_ran_func_cuup. In the latter, the file rc_data_ie.c
was missing (for cp_e2sm_rc_event_trigger), which in turn needs
e2sm_rc_ir_obj. Finally, find_if comes through alg.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Realtime and near-realtime RFSimulator alternative without channel modelling.
The purpose of this library is to allow realtime simulation of gNB and nrUE.
The library is loaded using --device.name shm_radio. The server side (gNB) should also
configure --shm_radio.role server and --shm_radio.timescale <timescale> according to requirements.
Limitations:
- Only 1UE-to-1gNB connection supported
Future work:
- Channel modelling
- Telnet API
- Histogram of the TX time budget
This implements a server-client bidirectional time domain IQ channel via
shared memory.
The server creates the channel and should be aware of the client
receiver configuration (num rx/tx antennas).
Server shall be the time source and should call shm_iq_channel_produce_samples
at regular intervals
Integration: `2025.w12`
Closes#920 and #915
See merge request oai/openairinterface5g!3325
* !3301 Remove unused NR UE PHY unit tests
* !3319 Disable EPS NAS security algorithms in 5GMM UE capabilities
* !3315 SCTP: avoid assert on partial SCTP message
* !3323 Fix long RACH regression
* !3311 Harmonize and update Frequency Range computation to the current values specified by the standard
* !3320 Miscelaneous improvements in PHY simulators
* !3286 Add support for ARM build pipeline
* !3308 remove ul_ch_estimates_time to save memory
* !3310 remove globale llr_layers to save memory, improve CPU, simplify code
* !3274 Add initial support for RedCap
* !3328 Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
* !3329 NR build improvements
* !3285 Update FHI 7.2 documentation, minor code cleanup
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.
Update FHI 7.2 documentation, minor code cleanup
- remove some unused functions
- make one function static
- add callback function documentation
- provide some developer function
NR build improvements
This MR is an attempt to improve compilation of NR softmodems by
removing some of NR-LTE cross-compilation (at the cost of a small dummy
file for nr-softmodem) and one small gNB-NRUE cross-compilation.
Fix ULSCH ID type to handle large max_nb_pusch values (ULSCH procedures)
The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and
MAX_MOBILES_PER_GNB). This can lead to incorrect behavior or undefined
results when max_nb_pusch is larger than 255. This commit changes the
type of ULSCH_id from uint8_t to int to accommodate larger values of
max_nb_pusch.
The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB
set to 64 UEs. The root cause was traced back to the changes to UL
processing introduced in !2952.
Change to bool for clarity. The log message would sometimes only show up
at the end, which is misleading; use the logging module, which
harmonizes log statements and should make this appear immediately.
We still do not handle RUs with MTUs of 1500 properly in F release;
therefore, for the close future, we cannot remove support for E release.
Also, it "promises" this for January, which is in the past already.
Update to keep the warning logical.
remove ul_ch_estimates_time to save memory
remove ul_ch_estimates_time that saves 50MB memory to access in RAM, and
make better quality scope data passing (no race)
Add support for ARM build pipeline
Modify the existing python code to be able to build images where the
image tag can be prepended with a prefix, here arm_. This is preparatory
work to create the ARM build image pipeline, and reuse the existing
internal registry on porcepix to have x86 and ARM images coexist.
Fix various bugs in the build system to allow to build on a system with
as many cores as gracehopper.
Also, fix two programs (usim, nvram) to work correctly under ARM.
Miscelaneous improvements in PHY simulators
1: Add a SIGINT handler to NR PHY simulators
When using T2 virtual functions, it is important to properly stop DPDK
and free the device. Otherwise the virtual functions may be blocked and
a restart of the admin application is necessary.
If not carefully done, such kind of operation can lead to losing cores
to DPDK processes that cannot be stopped. This can lead to situations
where the machine is locked and can only be unlocked by a power cycle.
Always properly stopping DPDK and freeing the device reduces the risk of
such situation to happen.
Up to now, SIGINT was shutting down the PHY simulators without freeing
the device. This commit adds a signal handler to handle SIGINT in a way
that allow to properly free the device.
This feature is added to all the NR PHY simulators whether they use T2
or not in case it is now or later of any use.
2: Make nr_ulschsim functional
There were two issues that were making nr_ulschsim non functional:
1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong
The result was that nr_ulschsim was succesfull whatever were its
arguments. This changeset fixes the two issues so that nr_ulschsim is
now functional.
Harmonize and update Frequency Range computation to the current values
specified by the standard
3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency
ranges
- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
1. Change the name of `openair1/SIMULATION/NR_PHY/nr_dummy_functions.c` into `openair1/SIMULATION/NR_PHY/nr_unitary_common.c` for naming coherence after adding the SIGINT handler which is not a dummy function.
2. Instead of being built once for every NR PHY simulators, the common functions source file is built once as an object and linked to each simulator.
The ULSCH_id variable is currently defined as uint8_t, which limits its
range to 0-255. However, gNB->max_nb_pusch can exceed this range
depending on the configuration (buffer_ul_slots and MAX_MOBILES_PER_GNB).
This can lead to incorrect behavior or undefined results when max_nb_pusch
is larger than 255. This commit changes the type of ULSCH_id from uint8_t
to int to accommodate larger values of max_nb_pusch.
The issue was observed when running the OAI gNB with MAX_MOBILES_PER_GNB set
to 64 UEs. The root cause was traced back to the changes to UL processing
introduced in !3166 (!2952).
After the parent commit, the registry might contain prefixed images.
This commit adds the functionality to pull such prefixed image. Since we
rename the pulled image (to have a consistent name, from whichever
registry we might pull), remove the prefix as well so that it can be
used with other CI functionality (remove image, use in test, ...)
Examples for renaming:
- pull from internal_registry for x86
internal_registry/oai-gnb:branchA => oai-ci/oai-gnb:branchA
- pull from internal registry for ARM with "arm_" prefix
internal_registry/oai-gnb:arm_branchA => oai-ci/oai-gnb:branchA
- pull from x86 other registry (e.g., openshift)
openshift/namespace/oai-gnb:branchA => oai-ci/oai-gnb:branchA
The only currently viable way to push ARM images to our registry is to
use a custom tag prefix. Modify the python test code to specify such a
tag, and default to "" (no prefix).
After the preceding commits, it's now possible to build images on ARM.
Add a specific "native_arm" build kind to only build what we need as of
now (do not only call it "arm", as that would match the kind
"build_cross_arm64").
Add the corresponding XML. Pushing of images is disabled, as this does
not work as of now.
The (existing) Aerial pipeline on devkit uses an older version of nvipc,
which is upgraded on gracehopper. Use a glob to match them equally,
which also aligns this code with the corresponding Dockerfile, which
already uses that glob.
Use the right type for variable, as getopt_long() returns an int. Using
char is not a problem on x86, but prevents the return of -1 in case of
parameter reading end. This led to infinite loops on ARM, which is fixed
through the variable type change. An additional counter measure (showing
the problem) would be to print and error out when reading an undefined
parameter, which is added here as well.
This has been forgotten when making the same change for getopt() in
cf9854601c ("getopt() returns int").
Dockerfiles hardcoded one copy operation to x86; generalize to capture
ARM as well. Since the target directory cannot have any globs, we need
to manually check the right directory, then move the file.
Note that this is only necessary since we are forced to switch the
compiler, as Ubuntu's default gcc-11 does not work with FlexRIC. When
upgrading to Ubuntu 24, these lines should disappear and asan be
installed as normal. See commit 94497435e7 ("Upgrade CI images to
Ubuntu 22").
SCTP: avoid assert on partial SCTP message
The receive buffer for SCTP, before this branch, is 8192. If a message
is larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.
also, increase the receive buffer to be more forgiving for large messages
Closes: #920
Disable EPS NAS security algorithms in 5GMM UE capabilities
OAI nrUE is not supporting multiple RATs, therefore the EPS NAS security
algorithms bit in 5GMM UE capabilities is not relevant.
This bit is only relevant if N26 interface is supported by the AMF and
the UE is supporting S1 mode, meaning that the UE is connected to a 4G
LTE network, via the S1 interface (eNB - MME/SGW). When the UE performs
an inter-system change from N1 mode to S1 mode, it transitions from 5GC
to the EPC: at network level this happens over the N26 interface (which
connects the 5G AMF to the 4G MME).
In this transition is where the EPS security context becomes relevant:
the UE does not know about the N26 interface, however is the AMF that
can tell the UE, e.g. during the registration procedure, if the UE sets
the S1 mode bit to "S1 mode supported" in the 5GMM capability IE, and
the AMF supports the N26 interface, the AMF will include the Selected
EPS NAS security algorithms IE in the SECURITY MODE COMMAND message,
which is what happened in #915.
Closes: #915
Even though the remaining NR PHY simulators do not use the T2, we may still feature them with a SIGINT handler for proper termination on SIGINT and for a matter of completeness.
The remaining NR PHY simulators are:
* nr_pbchsim
* nr_prachsim
* nr_psbchsim
* nr_pucchsim
There was two issues that were making nr_ulschsim non functional:
1. The channel output was not copied to decoder input (llr array)
2. The test on decoding successful outcome was wrong
The result was that nr_ulschsim was succesfull whatever were its arguments.
This commit fixes the two issues so that nr_ulschsim is now functional.
When using T2 virtual functions, it is important to properly stop DPDK and free the device.
Otherwise the virtual functions may be blocked and a restart of the admin application is necessary.
Up to now, SIGINT was shutting down the PHY simulators without freeing the device.
This commit adds a signal handler to handle SIGINT in a way that allow to properly free the device.
This feature is first added to the PHY simulators that use the T2 which are `nr_ulsim`, `nr_dlsim`, `nr_ulschsim` and `nr_dlschsim`.
The receive buffer for SCTP, as of this commit, is 8192. If a message is
larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.
Closes: #920
Integration: `2025.w11`
Closes#848
See merge request oai/openairinterface5g!3309
* !3306 Add a new CI label: nrUE
* !3303 remove wrong assertion for B4 PRACH format
* !3296 fix(nrLDPC_decoder): fix numIter increment
* !3150 Rework of NR UE RA procedures
* !3305 CI: Fix timeout for OC Deployments
* !3307 Add CI UE test for RA with C-RNTI
* !3271 Handle changing N_TA_offset correctly
* !3313 Small fix for jenkins message formatting
Add a new CI label: nrUE
Added handling of the nrUE label which limits the amount of CI tests to run. Only tests that use nr-uesoftmodem or phy simulators are triggered.
See merge request oai/openairinterface5g!3306
Local_Cmd forces use to use absolute paths for copy operations (because
that makes more clear where files are being copied). Use the absolute
path to avoid the corresponding exception.
Various libraries in this commit use the log headers (that is the
direct dependency). The log headers in turn include the T headers
(transitive dependency). Building on gracehopper with its many cores
triggers the build of these libraries before T headers have been
generated.
To resolve this and force the generation of T headers before building
the libraries, correctly express their dependency on the log headers,
which in turn ensures that T headers have been generated.
Depending on log_headers is preferrable because it is really the headers
that we depend on. Using instead e.g., utils, would trigger build of
source files, that we don't need for these libraries. This commit is
part of a larger cleanup that I have that is not merged yet. Follow-up
work will generalize this in the repo, and ensure that every(!) library
builds.
We have to add CONFIG_LIB, as the log module has a direct dependency
onto the configuration module (it uses it). I am not sure why this was
not relevant before.
This merge request is for two issues:
1. Core Network Deployment/Undeployment
If the Helm release oai5gcn does not exist (e.g., it was already deleted,
failed during installation), helm uninstall will fail with a "release not
found" error. The --timeout 60s makes Helm wait up to 60 seconds for all
resources to be deleted. If cleanup takes longer (e.g., due to resources
or dependencies), the command fails with a timeout error, potentially
leaving resources in an incomplete state.
2. Increase the timeout value for OpenShift RHEL Builds
The timeout parameter is set as the maximum wait time for the jobs to complete.
If the jobs do not complete within that time, the function logs an error. The
jobs may take longer to complete, the function exits early with an error, even
if the jobs are still progressing.
So, to address both the issues:
We first list all installed Helm releases in the given namespace, returning only
their names. We then pass the release names to helm uninstall, uninstalling all
releases in the namespace. The default value for timeout is 5 minutes.
Increased the timeout value for the RHEL Builds.
fix(nrLDPC_decoder): fix numIter increment
The logs of ./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4 were showing that sometimes
the decoding of one segment was failing while the CRC check succeeded. This was
happening because the iteration counter numIter was not properly managed so that
when the last iteration was successful to decode the segment still numIter at
the exit was equal to numMaxIter plus 1 so that decoding was considered to have
failed. In other words the last iteration if it occured was always wasted.
This commit offers to solve this problem by simply moving the iteration counter
increment at the end of the iteration loop while remaining careful at fixing the
tests relying on this counter.
Post-Scriptum:
After a first review, we decided to make the counter more standard from a C code
perspective. The counter now counts from 0 to numMaxIter minus 1. If it reaches
numMaxIter, it means that decoding was unsuccessful.
Integration: `2025.w10`
See merge request oai/openairinterface5g!3299
* !3265 Remove some unnecessary extern files
* !3288 FeedbackDisabled removed from RA
* !3294 Fix OAI UE uplink_frequency in FDD mode
* !3282 Use common function to prepare DL PDUs in gNB RA
* !3290 Fix get_nr_prach_info_from_index() for FDD and long format
* !3244 Add F1 handover CI test
* !3292 Ensure clean exit of NR UE
* !3298 Preventing segmentation fault in print_rrc_meas (if reviewed and CI is OK)
* !3297 Reset timing_advance on sync/re-sync
* !3289 use slot type for slots in NR
The idea is to make LDPC iteration accounting more standard from a C coding perspective by making two changes:
1. Now the iteration counter starts at 0 for the first iteration and goes up to max_ldpc_iterations - 1 for the last iteration.
If it is equal to max_ldpc_iterations, it means that decoding failed.
2. A chain of useless returns in the UE DLSCH decoding call chain was removed.
Handle N_TA_offset update the same way timing advance changes are handled:
modify writeBlockSize to ensure continuous transmission. Also address possible
data races by making sure the new timing_advance/N_TA_offset is only read
once from global memory.
Added 3 way F1 handover test with data exchange in the F1 pipeline.
The major change is that the UE is acting as a server in the handover
scenarion, so it needs to comply with the changes in !3280.
This prevents the UE to use an outdated timing_advance after a re-sync. It prevents the UE to send a PRACH with a wrong TA, thus preventing a RAPID mismatch in Msg2 (example: '[UE 0][RAPROC][0.0] Received RAR preamble (29) doesn't match the intended RAPID (30)')
The logs of `./nr_ulsim -n100 -m19 -s12 -S12 -z2 -L4` were showing that sometimes the decoding of one segment was failing while the CRC check succeeded.
This was happening because the iteration counter `numIter` was not properly managed so that when the last iteration was successful to decode the segment
still `numIter` at the exit was equal to `numMaxIter` plus 1 so that decoding was considered to have failed.
In other words the last iteration if it occured was always wasted.
This commit offers to solve this problem by simply moving the iteration counter increment at the end of the iteration loop
while remaining careful at fixing the tests relying on this counter.
the standard in 213 8.4 says: "In response to the PDSCH reception with the UE contention resolution identity, the UE transmits HARQ-ACK information in a PUCCH."
Integration: `2025.w09`
See merge request !3284
* !3088 Support for long PRACH formats
* !3266 Add optional UTC time stamp to the logging module
* !3280 Changes required for UE to work as a rfsim server with channel modelling
* !3279 Fix UL-MCS when UL inactivity and no data
* !3283 Limit amp_dmrs to 16 bit signed max
Use `rfsimu_channel_ue1`, `rfsimu_channel_ue2`, etc. if you want to
use different channel models for each client. The client connection
order determines its channel model name.
Enable/disable workaround based on a new option "hanging-workaround".
This addresses an issue where the workaround will trigger even if there
is no risk of a permanent lockup of the system.
If "utc_time" is selected, log lines are prepended with the UTC time,
formatted as YYYY-MM-DD hh:mm:ss.ssssss UTC.
The documentation has been updated. For other time methods, additional
description of what they show has been added.
Integration: `2025.w08`
Closes#772
See merge request oai/openairinterface5g!3273
* !3263 Free ITTI message after receiving it at MAC from RRC
* !3268 Upgrade SIMDe commit
* !3269 chore(ci): change image rentention from 4weeks to 3weeks
* !3227 fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes
* !3270 Update of gNB-N300-Timing-Phytest threshold
* !3272 Fix: write NSSAI info of F1AP Cell Info struct
* !3259 UE DCI no candidates
* !3264 Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs
* !3228 Add option to use global noise power for all RX channels in RFSimulator
* !2725 Use 5G-S-TMSI as UE identity in RRCSetupRequest
Use memcpy in nr_prach.c to fill txdata buffer.
Remove global tables related to PRACH generation.
Add new function to compute modulo multiplicative inverse and use it
directly to get inverse instead of LUT.
Removed nr_ru table and compute the values in-place.
In UE, added new flag root_seq_computed in nrUE_config to only compute
the sequence once after new nrUE_config is received.
Long PRACH extends beyond a slot. Changes necessary to mark future slots
that may contain prach in ru, phy and mac functions.
In RU, the PRACH IDFT is done only after receiving last slot and marks
for L1 to start processing. The L1 processes at the last prach slot and
reports to MAC with the first slot index.
In MAC scheduler, the VRB for future slots are also marked as used.
PRACH scheduler is called in advance one frame minus num prach slots.
Use 5G-S-TMSI as UE identity in RRCSetupRequest
This MR includes the following implementation:
- Handle 5G-S-TMSI in RRCSetup:
- Set the ue-Identity to ng-5G-S-TMSI-Part1 in RRCSetupRequest and
- If RRCSetup is received in response to an RRCSetupRequest: set the
ng-5G-S-TMSI-Value to ng-5G-S-TMSI-Part2 in do_RRCSetupComplete
TS 38.331 5.3.3.3 Actions related to transmission of RRCSetupRequest message:
The UE shall set the contents of RRCSetupRequest message as follows:
1> set the ue-Identity as follows:
2> if upper layers provide a 5G-S-TMSI:
3> set the ue-Identity to ng-5G-S-TMSI-Part1;
- Pass 5G-S-TMSI to RRC when NAS receives GUTI in Registration Accept
- NAS extracts GUTI from Registration Accept
- send ITTI indication from NAS to RRC when GUTI is available and store
5G-S-TMSI in RRC instance
- Rework of Initial UE message handling in RRCSetupComplete: simplify code and memory management
- Fix for integrity failure after UE comes back from RRC IDLE
- Other NAS fixes
Note:
- Initial implementation of Initial NAS Message: Service Request -> moved to !3065 (merged)
- Rework of Registration Request added to !3176 (merged)
Closes#772
Add option to use global noise power for all RX channels in RFSimulator
Added new command line option to rfsimulator: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the
per-channel value.
This makes it so noise is not accumulated per channel reaching higher than
expected values.
The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS
setting. e.g. to reach 3dB SNR one should set the noise_power_dBFS value to -39.
function returns mu of UL BWP if msg1-SubcarrierSpacing absent instead
of asserting. The mu retured by this function is used to compute the
slot number of PRACH. In case of long format, the slot number is as per
UL mu.
Fix "Received Nack" log for Msg4/MsgB and minor improvement in RA logs
Fix "Received Nack" log for Msg4/MsgB, in 4-Step RA. When there is a Msg4 NACK,
we have this log:
[NR_MAC] (UE 91db) Received Nack in MsgB, preparing retransmission!
This MR fixes the message and now works correctly both in 4-Step RA and 2-Step RA.
Other additional but minor improvement in RA logs.
Fix: write NSSAI info of F1AP Cell Info struct
During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.
Fixes: f278b008 ("Add encoding/decoding library for F1AP Setup
Request (Interface Management) ")
Update of gNB-N300-Timing-Phytest threshold
Current results are in some cases well below the current thresholds. We should
periodically adapt them to actual values so that the test is meaningful.
fix(nrLDPC_coding): timers in DL encoding, fix(ldpctest): Confusion in sizes
Main improvements:
1. fix(ldpctest): Confusion in sizes
IMPORTANT: This fix makes that ldpctest now works with BG2 and K' != K!
(Worth double checking with more cases than I did check with though)
The variable block_length had an ambiguous role and was used as both K and
Kprime. This was leading to arrays with wrong sizes and functions with wrong
arguments. Now there is not anymore block_length but K and Kprime.
Kprime can be set with the command line argument -l.
There was also some problems with array allocation for segments with length
not divisible by 8. A proper sizing with ((size_in_bits + 7) & ~7) / 8 was
used.
A proper masking of the last byte containing payload bits was also added to
keep filler bits to 0 after random initialization.
2. fix(nrLDPC_coding): timers in DL encoding
While timers were available for rate matching and interleaving in the new
interface, these timers were not merged to rate matching and interleaving
timers in nr_dlsch_coding.
chore(ci): change image rentention from 4weeks to 3weeks
The cluster image registry is getting full. At the moment we have limited
storage so we should reduce the retention period.
Free ITTI message after receiving it at MAC from RRC
Sanitize reporting the following leaks. This small commit seems to fix them.
```
Direct leak of 9888 byte(s) in 103 object(s) allocated from:
#0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
#1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
#2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
#3 0x556dd87100a1 in nr_rrc_ue_decode_NR_BCCH_BCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:858
#4 0x556dd87100a1 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2013
#5 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
#6 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
#1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
#2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
#3 0x556dd86d707c in nr_rrc_ue_process_masterCellGroup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1094
#4 0x556dd86faed9 in nr_rrc_process_rrcsetup /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1138
#5 0x556dd86faed9 in nr_rrc_ue_decode_ccch /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1200
#6 0x556dd870a518 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2028
#7 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
#8 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477
Direct leak of 88 byte(s) in 1 object(s) allocated from:
#0 0x7fea59b60a06 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:153
#1 0x556dd89473e7 in itti_malloc /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:64
#2 0x556dd8947b76 in itti_alloc_new_message /home/francesco/openairinterface5g/common/utils/ocp_itti/intertask_interface.cpp:93
#3 0x556dd86be183 in nr_rrc_process_sib1 /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:337
#4 0x556dd870c3b3 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:954
#5 0x556dd870c3b3 in rrc_nrue /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:2015
#6 0x556dd871392e in rrc_nrue_task /home/francesco/openairinterface5g/openair2/RRC/NR_UE/rrc_UE.c:1943
#7 0x7fea59a16608 in start_thread /build/glibc-FcRMwW/glibc-2.31/nptl/pthread_create.c:477
```
During refactoring, the previously implemented NSSAI field of the cell
info structure was not written to F1AP ASN.1 structures anymore;
eq_f1ap_cell_info() also conveniently omitted the corresponding equality
check. Add this back so the CU can correctly receive the NSSAI in case
of F1 split operation.
Fixes: f278b00837 ("Add encoding/decoding library for F1AP Setup
Request (Interface Management) ")
Added new command line option to channelmod: noise_power_dBFS. This options
allows the user to configure noise power in dBFS added instead of the per-channel
value.
This makes it so noise is not accumulated per channel reaching higher than expected
values.
The dBFS unit allows easy configuration. The gNB by default uses -36 dBFS setting.
To reach 3dB SNR one should set the noise_power_dBFS value to -39.
To configure using command line use --channelmod.noise_power_dBFS -50. Using this
setting the gNB and nrUE connect without issue.
After a new connection from RRC IDLE, an integrity failure occurs. This
commit is addressing this issue to pass the integrity check.
* Reset ciphering and integrity algorithms when going into RRC IDLE
* Use uplink NAS COUNT in Registration Request for initial KgNB derivation
* Temporarily deriving UP protection keys in Registration Request
* Note: AS SMC handling should be done according to 33.501 §6.8.1.1.2.2
* Use the 5G-S-TMSI stored in RRC to be used as UE identity
* Use 5G-S-TMSI part 1 in RRCSetupRequest encoding (TS 38.331 clause 5.3.3.3)
* Set the ng-5G-S-TMSI-Value in RRCSetupComplete to ng-5G-S-TMSI-Part2 (5.3.3.4 of 3GPP TS 38.331)
* current and only scenario: RRCSetup is received in response to an RRCSetupRequest
* use initialNasMsg to store nas messages buffer and length
* buffer is dynamically allocated in generateRegistrationRequest, so do the
same in NSA and free dynamic allocated data afterwards
> In N1 mode, upon indication from lower layers that the access stratum
connection has been released, the UE shall enter 5GMM-IDLE mode and
consider the N1 NAS signalling connection released (3GPP TS 24.501)
* NAS -> RRC: RRC receives an ITTI message with NAS 5GMM indication message
containing the 5G-S-TMSI derived from NAS GUTI
* 5G-S-TMSI is stored in the RRC instance and to be later encoded in the RRCSetup
During re-establishment we still have a valid SIB1 so we don't decode it
again. Then the UE never moves out of UE_RECEIVING_SIB, making
re-establishment impossible. This fixes addresses this.
Fixes: 11b87d8744 ("NR UE: RRC layer now explicitly tells MAC layer
when the RA procedure can be started)"
[E2 agent] Multi RC REPORT service styles support
Issue: unforeseen capability of having the same RAN Parameter ID across
different REPORT service styles.
Solution: keep only RAN Parameter IDs from REPORT styles that are
supported by OAI. Implement sequence array where each element is
combination of RIC request ID (unique per RIC SUBSCRIPTION) and Event
Trigger Definition. This way we can properly check further conditions
for a certain RAN Parameter ID. (e.g. if xApp is subscribed to RRC
Connected and/or other modes, for "RRC State Changed To" RAN Parameter
ID)
Next steps: for new RAN Parameter ID, add new sequence array.
Issue: unforeseen capability of having the same RAN Parameter ID across different
REPORT service styles.
Solution: keep only RAN Parameter IDs from REPORT styles that are supported by OAI.
Implement sequence array where each element is combination of RIC request ID (unique per RIC SUBSCRIPTION)
and Event Trigger Definition. This way we can properly check further conditions for a certain RAN Parameter ID.
(e.g. if xApp is subscribed to RRC Connected and/or other modes, for "RRC State Changed To" RAN Parameter ID)
Next steps: for new RAN Parameter ID, add new sequence array.
Co-authored-by: Bischoff <tano.bischoff@hhi.fraunhofer.de>
Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de>
Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de>
FHI72: remove polling, fix memory leak
- FHI72 used polling to track the next slot. This is not necessary, a
simple queue does the job and allows to save one core that was
previously at 100%
- Remove a workaround to avoid a memory leak (fixes#812); allows to
also run RFsim/USRP/otehr radios when compiling for FHI72
fix NTN LEO scenarios
- gNB: add support for NTN parameter ta-CommonDrift-r17
- NR UE: fix application of NTN TA information
- NR UE: add command line parameter ntn-initial-time-drift to compensate
time drift during initial sync
- NR UE: fix writeTimestamp inconsistencies
- NR UE: add MAC state UE_RECEIVING_SIB ensuring to start RA only after
successfully receiving SIBs
- rfsimulator: update earth radius for LEO simulation to match UE
position in ue.conf file
- update conf files for NTN LEO scenario
- update description how to run NTN scenarios in RUNMODEM.md
- fix: ta-Common is a round-trip-time, not a one-way delay
- NR UE: simplify calculation of next_tx_slot_and_frame by moving up
assignment of duration_rx_to_tx
- cellbarredNTN indicates notbarred in SIB1 if NTN access is available
- Removed b66 NTN and enabled B254 NTN conf file in CI
- NR UE: RRC layer now explicitly tells MAC layer when the RA procedure
can be started
- move NTN LEO config to band 254 and update doc/RUNMODEM.md
Closes#901
The "writeTimestamp inconsistencies" are coming from the fact that during the actual processing we write `N_TA_offset` samples _and_ `NR_UE_CAPABILITY_SLOT_RX_TO_TX` slots ahead,
but both was not corrently considered in readFrame() and syncInFrame().
Therefore, there was always a warning about a gap in write timestamps as soon the actual processing starts.
The value of ntn_init_time_drift is used at initial sync to compensate for the time drift during initial sync detection.
To perform the initial time and frequency sync, the OAI UE currently takes a snapshot of two frames and then performes PSS correlation, SSS detection and MIB decoding.
Doing this takes much time, several tens of ms. During that time, the DL timing drifts so much, that we immediatedly lose sync again.
Therefore the current OAI UE implementation needs to know the drift rate to compensate for this drift, as we are "blind" while performing the initial sync.
To my undestanding, commercial UEs simply have a faster initial sync, so the DL timing will not drift away too much while performing that initial sync.
Add check on force_local in custom_command CI handling
The force_local flag was introduced earlier in the main CI script in
order to run a CI test locally.
The flag was still missing in the Custom_Command handling, which was
still targeting the node specified in the test configuration file. This
was causing a failure in the tests with custom commands and therefore
limiting the scenarios that could be run locally.
With this commit, if force_local is enabled the node for the
Custom_Command is set to localhost.
Refactor and extend NAS Registration Request
Extended NAS Registration Request generation and encoding according to
8.2.6 of 3GPP TS 24.501. Main topics:
- NAS Registration Type
- NAS KSI
- integrity protection
- NAS container encoding
Improvements:
- Add 5GMM Modes in NAS
- Introduced 5GMM state machine
Fixes:
- add 5GMM Capability IE to Registration Request
- closes#881, #819
Dynamic PDCCH aggregation level
The aggregation level search order for PDCCH candidates is modified:
- the search starts from desired_agg_level_index, which is a value from
0 to 4 proportial to pdcch_cl_adjust.
- pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH
channel quality by averaging HARQ DTX rate. A value of 0 means perfect
channel, a value o 1 means impaired channel.
Also added configuration option for number of PDCCH candidates per
aggregation level.
The aggregation level search order for PDCCH candidates is modified:
- the search starts from desired_agg_level_index, which is a value from 0 to 4
proportial to pdcch_cl_adjust.
- pdcch_cl_adjust is a value between 0 and 1 that indicates PDCCH channel quality
by averaging HARQ DTX rate. A value of 0 means perfect channel, a value o 1 means
impaired channel.
first_rx_set is polling-specific: it makes the polling loop wait to only
check the frame/slot counter once we set it for the first time. However,
that is equivalent to checking the frame/slot directly, which will also
be 0 in the beginning.
first_read_set seems to have the function of making frame/slot time
advance only if we started to read the samples in
xran_fh_rx_read_slot(). I interpret that as "only advance the time if
the gNB is reading from xran", which does not make sense to me, because
xran advances the time anyway. Also, polling would not notice, and
no-polling would simply warn about double messages. So the outcome is
likely the same, whether first_read_set is set or not.
I checked in multiple CI runs; it happens that first_read_set is always
set already when oai_xran_fh_rx_callback() is called anyway.
xran_fh_rx_read_slot() uses polling (a loop over cnt++) to wait for the
next frame/slot. The reasons I have been told is "it does not work
differently", or "there are real-time problems". None of those seem to
be true; by default disable polling, and use the queue instead.
It is possible to enable polling with the cmake option
OAI_FHI72_USE_POLLING=ON. Documentation has been updated to inform about
this change.
The queue L1_rx_out was in place to keep RX/TX processing relatively
"close" to each other (in terms of time, since in RFsim, they might
advance faster than realtime; see also parent commit). This lead to a
memory leak in radios that do not use ru->feprx (no front-end processing
for RX, e.g., PRACH), as the code to read the L1_rx_out messages was
inside a block of if (ru->feprx). Move it out so that the queue is
always read and messages are freed to eliminate the memory leak, and
remove the workaround for FHI72 to avoid this memory leak.
This also allows to run RFsim when compiling FHI72, which was not
possible before this commit.
Closes: #812
Some radios (e.g., RFsim) can run faster. A mechanism has been put in
place to keep RX/TX frame/slot numbers not too far from each other.
Refactor in a separate function with documentation to make this clearer.
* The force_local flag was introduced earlier in the main CI script
in order to run a CI test locally. The flag was missing in the
Custom_Command handling, which was still targeting the node specified
in the test configuration file. With this commit, if force_local
is enabled the node for the Custom_Command is set to localhost.
Integration: `2025.w06`
See merge request oai/openairinterface5g!3248
* !3202 Simplify usage of the old segment decoding libraries with the slot coding interface
* !3240 Fix typos in NR_SA_Tutorial_OAI_multi_UE.md
* !3242 Period based phytest bitmap
* !3238 Refactor tun_if.h
* !3000 Improvements for NR dlsim and ulsim
* !3239 Remove inexistant SIMD instruction
* !3246 Deadlock avoidance in rfsimulator
* !3251 nFAPI: make 4-layer on 100MHz work
* !3243 Reset E1 UE contexts after E1 Setup Response
* !3245 Added Support of 35Mhz,45Mhz,70Mhz Bandwidth
* !3219 E1AP enc/dec lib improvements
E1AP enc/dec lib improvements
This MR is including some fixes and improvements for the E1AP library,
focusing mostly on Bearer Context Management:
- struct reorganization: split setup and modification request messages
into distinct structures, ensuring compliance with 3GPP TS 38.463
specifications
- add encoding/decoding sub-functions for different IEs
- improvements to Bearer Context Management: Implemented various
improvements to the E1 Bearer Context Setup Response and Request,
including the adoption of encoding/decoding sub-functions for
different IEs
- use lib functions whenever need (e.g. cp_bearer_context_setup_request
in cucp_cuup_e1ap.c)
- handle optional struct members as pointers
- updated copy/equality check utility functions
EDIT: The MR is also including the changes from !3222 (closed):
> While testing E1 with security enabled for DRBs, it was found that
> data traffic was not functional.
>
> The problem was that security settings were modified in the PDCP
> reestablishment happening when receiving Bearer Context Modification
> Request.
>
> So some restructuring was done.
>
> The actual fix is in 18176297, the others are for support. Basically
> we introduce a boolean to check if the security settings are present in
> Bearer Context Modification Request and we change PDCP security settings
> only if they are.
>
> (Note that in OAI CU security settings are not sent in Bearer Context
> Modification Request, so we could also remove all this, but we need to
> be compatible with other cu-up and/or cu-cp.)
Added Support of 35Mhz,45Mhz,70Mhz Bandwidth
Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.
Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
Reset E1 UE contexts after E1 Setup Response
38.463 sec. 8.2.3 says
> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes
> like a Reset procedure would do.
Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID]. After this
MR, this is what happens if these entities fail:
- CU-CP fails: all context lost implicitly, upon reconnection, both DU
and CU-UP reset all contexts (like "start from zero")
- DU fails: CU-CP triggers NGAP UE context release request immediately
(radio connection with UE lost), all UE contexts attached to this DU
cleared (like "start from zero" for affected DU)
- CU-UP fails: initially, nothing (UE has no user plane); upon
reconnection of CU-UP, CU-CP triggers NGAP UE context release request
(cause radio connection with UE lost) and sends F1 Reset to DU, all UE
contexts associated to this DU cleared (like "start from zero")
for the last case, a possible improvement could be to use the F1 Reset
message to only clear affected UE conetxts. I chose not to do this,
because this MR is very big now already, and possible "victim" UEs
that were not at that CU-UP will reconnect as well
In Bearer Context Modification Request, the security information
field is needed only if we change the PDCP algorithms/keys. Since we
don't, no need to pass it.
Let's keep the old code, maybe the current understanding of the
specifications is wrong.
If the Bearer Context Modification Request does not contain security
information, the PDCP entity shall keep the currently configured security
settings.
Passing -1 for ciphering_algorithm and integrity_algorithm is the way
to implement this logic.
Check if the IE is memory allocated to deal with presence/absence of this information
element in Bearer Context Modification Request and add encoding/decoding
in the code.
Note that for decoding the integrity settings may be absent, in which
case we consider NIA0 to be used (no integrity protection). To be refined
if needed.
And for encoding, we always encode integrity settings, even if it's NIA0.
May also be refined if needed.
This was not a big problem, but we were advertising wrong
algorithm and deriving keys using this wrong algorithm in case
DRB ciphering and/or integrity was not active. (Say SRBs
are configured with NIA2 but DRBs are configured without
integrity, we would advertise NIA2 and send the integrity
key derived for NIA2, instead of NIA0 for both.)
It was not a problem because in the PDU Session Resource To Setup
item, there is "securityIndication" which we use to effectively
activate/deactivate the ciphering and/or integrity.
But it did not look clean to see a SecurityInformation with
incorrect data when inspecting the message in wireshark.
So let's use the correct values.
We could also not include the SecurityInformation if both ciphering
and integrity are not used, and only include ciphering if integrity
is not used (because integrity settings are optional).
But then if only integrity is used, we still need to include
ciphering, setting algorithm to NEA0 (no ciphering), because
the ciphering settings are always included.
This logic is too complex, let's use the simple one to always
include SecurityInformation with NEA0 and/or NIA0 if ciphering
and/or integrity is not activated.
As in deba3ae066 ("Reset CU-UP E1 UE contexts after E1 Setup
Response"), the CU-CP should reset the E1 UE contexts after E1 Setup
Response. 38.463 sec. 8.2.3 says
> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.
In the case of CU-CP, this is a bit more complicated. More precisely, we
need to wait for the CU-UP to be available again before informing the DU
about the loss (implemented via an F1 Reset message), because otherwise,
the UE might reconnect immediately, before the CU-UP is online again.
Hence, on connection loss, we mark affected UEs (by setting their E1
association ID to 0); as long as the CU-UP does not connect, nothing
will happen (but UEs don't have user plane). Upon CU-UP connecting
again, we request release of the UEs via NGAP (similarly to what is done
if the DU goes offline, see invalidate_du_connections()), free the UE
contexts locally, and send an F1 Reset message to the DU, because
38.473 sec 8.2.1.2.1 says
> a failure at the gNB-CU [...] has resulted in the loss of some or
> all transaction reference information [...] a RESET message shall be
> sent to the gNB-DU.
The core should accept and send an NGAP release command message; since
no UE contexts are to be found (already deleted), the CU-CP will just
send a release complete (together with some warnings).
It might be possible to more gracefully handle the situation (e.g., as
described in 38.401 section 8.9.5 "Change of gNB-CU-UP"), but
- we lack the PDCP SN exchange
- the current procedure has the advantage of being equivalent to
"restart of the entire gNB", with less downtown.
The next commit will use rrc_remove_ue() to delete a CU(-CP+-UP)
context. However, we don't send NGAP UE context release at that moment
(we will instead *request* the release); more generally, it's not clear
that every user of rrc_remove_ue() wants to actually send this message.
Hence, refactor the code by separately calling
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE() where appropriate.
Bearer context setup request and modification request messages
differ in various IEs according to 9.2.2 of 3GPP TS 38.463, e.g.
the Bearer context setup request does not contain a list of
DRBs to modify and does not contain an UP TL configuration.
Thus, the goal of this commit is to split the setup request message
and the modification request into two different structs:
* adopt e1ap_bearer_mod_req_t where necessary (e.g. fill_e1_bearer_modif)
Also, reorganized existing struct members according to specs:
* remove irrelevant struct members from the setup request
* group members from the same IEs into structs
* set optional struct members IEs as pointers
* add and adopt enc/dec/cp/eq lib functions for single IEs
* add UP_TL_information_t struct with TEID and TL address info and adopt in stack
* use int instead of long for count types
* update the relevant copy/equality check utility functions
Extra:
* add a function to handle Security Information in RRC in the process
* add create_up_tl_info and adopt in unit tests
nFAPI: make 4-layer on 100MHz work
5G nFAPI headers specify 32 bits for the length field, so use it also
when segmenting messages. This should stabilize 4-layer MIMO operation
on 100MHz with nFAPI.
Deadlock avoidance in rfsimulator
This change introduces a countermeasure for deadlock in rfsimulator. The
deadlock happens when all entities are waiting for new data to come in,
and happens with 2+ clients, when a new client connects. I think this
issue is due to ordering of fullwrite calls, resulting in out-of-order
delivery of packets and eventually trashing the packets on the receiving
side. The out-of-order delivery warnings are printed just before the
system deadlocks but I have not found a better solution so far. The
workaround makes the server never lock up permanently by ignoring the
client failure to write on time after 10 tries.
This was tested locally for both UE as server and gNB as server and
works correctly, causing the deadlock to clear and the added log to be
printed several times when the deadlock is detected, after which the
system goes back to normal.
I have some gdb output of the executables during deadlock:
UE:
$7 = {conn_sock = 98, lastReceivedTS = 3226163740, headerMode = true, trashingPacket = false, th = {size = 13184, nbAnt = 1, timestamp = 3226150556, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a500018a8 "\200\063", remainToTransfer = 24,
circularBufEnd = 0x7f6a503b3ac0 "", circularBuf = 0x7f6a501f1ac0, channel_model = 0x0}
(gdb) p t->buf[5]
$8 = {conn_sock = 97, lastReceivedTS = 0, headerMode = true, trashingPacket = false, th = {size = 0, nbAnt = 0, timestamp = 0, option_value = 0, option_flag = 0}, transferPtr = 0x7f6a50001900 "", remainToTransfer = 24, circularBufEnd = 0x7f6a50575ad0 "",
circularBuf = 0x7f6a503b3ad0, channel_model = 0x0}
nextRxTimestamp 3225937740
nsamps = 30720
gNB 1:
(gdb) p t->buf[0]
$4 = {conn_sock = 95, lastReceivedTS = 3226026876, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
transferPtr = 0x7f8dfc003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7f8e1c3ff010 "", circularBuf = 0x7f8e1c23d010, channel_model = 0x0}
nextRxTimestamp 3225996956
gNB 2:
lastReceivedTS = 3226026875
$2 = {conn_sock = 95, lastReceivedTS = 3226026875, headerMode = true, trashingPacket = false, th = {size = 1, nbAnt = 1, timestamp = 3226026875, option_value = 0, option_flag = 0},
transferPtr = 0x744898003ab8 "\001", remainToTransfer = 24, circularBufEnd = 0x7448bc2e7010 "", circularBuf = 0x7448bc125010, channel_model = 0x0}
nextRxTimestamp 3226026875
As you can see all executables are in have_to_wait state.
38.463 sec. 8.2.3 says
> This procedure also re-initialises the E1AP UE-related contexts (if
> any) and erases all related signalling connections in the two nodes like
> a Reset procedure would do.
Hence, delete all contexts after reception of E1 Setup Response. This
minimizes a risk of receiving an E1 bearer setup req for an existing UE,
which currently leads to an assert [we trust the CU-CP does not send the
same UE ID twice, as we only "mirror" the existing UE ID].
* Without a valid 5G NAS security context:
* Send REGISTRATION REQUEST with cleartext IEs only.
* After activating a security context via Security Mode Control:
wrap the entire REGISTRATION REQUEST (with both non-cleartext and cleartext)
in a NAS message container IE, include it in SECURITY MODE COMPLETE
* With a valid 5G NAS security context:
* If non-cleartext IEs are needed, wrap the entire message in a NAS message container IE and cipher it.
* If only cleartext IEs are needed, send the message directly without the NAS message container IE.
* this commit is enabling the handling of non-cleartext IEs in the NAS Registration Request message
according to 24.501, 23.502
* send the full Registration Request message in the NAS Container of the SECURITY MODE COMPLETE
* send the non-cleartext IEs in the NAS container of the Registration Request
closes#881
* send integrity protected Initial NAS Message when UE in 5GMM-IDLE mode has valid current 5G NAS security context:
> According to 4.4.2.5 TS 24.501:
> when a UE in 5GMM-IDLE mode establishes a new NAS signalling connection and has a valid current 5G NAS
> security context, the UE shall transmit the initial NAS message integrity protected with the current 5G NAS security
> context and further protect this message as specified in subclause 4.4.6.
* set NAS key set identifier IE to "no key is available (UE to network)"
* previously set to 1 which has no impact
* set now to 111 in order to trigger new authentication
* See 9.11.3.32 of 3GPP TS 24.501
* Do 5GS Registration Type "mobility registration updating" when 5GMM state is De-registered
Make the same change as in parent commit, i.e., write the full 32-bit
segment size.
I could not test this, as we do not reach these rx_data.indication
length. It's based on the fix in the parent commit, and to avoid future
bad surprises.
The 5G nFAPI message length is 32bits. In particular tx_data.requests
can be longer than 64kB. When segmenting, we should correctly write the
message of the current segment (across all 32bits), because the
length would interpreted wrongly otherwise.
This fixes a bug in which tx_data.requests were discarded for 4-layer DL
MIMO on 100 MHz with this message:
P7 unpack message length is greater than the message buffer
Further, increase the type of various (segment-related) variables to 32
bits. Currently, the maximum segment size is sxt to 65000 bytes (and in
will likely remain, because the maximum UDP size is 65536);
nevertheless, increase it in case we will ever go beyond this.
See also commit dee68e6319 ("nFAPI: increase maximum segment size to
65000")
Simplify usage of the old segment decoding libraries with the slot coding interface
This MR transforms the segment coding libraries into slot coding
libraries by statically linking the adaptation layer and the segment
coding libraries.
Therefore they can be used directly in ldpctest which uses the segment
coding interface as well as in all the other PHY simulators and the NR
softmodem which use the slot coding interface.
It is not anymore needed to use the
--nrLDPC_coding_segment.segment_shlibversion
flag. Instead a segment coding library can be directly chosen with
--loader.ldpc.shlibversion
since it implements the slot coding interface.
* added fgs_mm_mode_t enum
* added struct member to NAS
* modes: FGS_IDLE, FGS_CONNECTED
* according to 5GS mobility management (5GMM) modes 5.1.3.2.1.1 of TS 24.501
The variable block_length had an ambiguous role and was used as both K and Kprime.
This was leading to arrays with wrong sizes and functions with wrong arguments.
Now there is not anymore block_length but K and Kprime.
Kprime can be set with the command line argument `-l`.
There was also some problems with array allocation for segments with length not divisible by 8.
A proper sizing with `((size_in_bits + 7) & ~7) / 8` was used.
A proper masking of the last byte containing payload bits was also added to keep filler bits to 0 after random initialization.
The name ldpc8blocks_coding_segment was previously used to avoid any confusion with ldpc8blocks while both were coexisting.
They are not anymore coexisting so it can now be shortened.
While timers were available for rate matching and interleaving in the new interface,
these timers were not merged to rate matching and interleaving timers in nr_dlsch_coding.
Integration: `2025.w05`
Closes#885
See merge request oai/openairinterface5g!3233
* !3102 Dockerized development environment
* !3185 Add IQ file recording and IQ file viewer to ImScope
* !3218 more layer1 cleaning
* !3224 Ensure execution of processSlotTX in order in NR UE
* !3231 Bugfix in frame and slot setting for ULSCH beam allocation
* !3229 Verify the integrity protection of the RRCReestablishment message
* !3230 FHI72: fix for single distributed antenna array for xran F release
* !2984 NAS 5GS refactor
* !3235 Parametrized JenkinsNode and JenkinsResource
* !2799 Changes to support multiple TDD patterns
* !3208 Downgrade gNB power limit LOG from "warning" to "debug"
Downgrade gNB power limit LOG from "warning" to "debug"
Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid
flooding stdout when UE in low coverage enters power limited state for a
longer period of time. The same information can be inferred from the
periodic UE print which also contains PH value (negative PH values
indicate that the UE is power limited)
Also, correct some typos in PH calculation.
Closes#885
Changes to support multiple TDD patterns
- Updated the configuration changes for 2 Patterns
- Update the TDD table configuration for NFAPI
- Added the tdd bitmap for the period
- Adapted the bitmap for UL/DL for the multi TDD pattern
- Updated the RACH procedure for multi TDD pattern
- Updated DL and UL scheduler for multi TDD pattern
Parametrized JenkinsNode and JenkinsResource
Parametrized variables in Jenkinsfile for automated tests on Colosseum
after update of OAI Jenkins server.
NAS 5GS refactor
The goal of this MR is to reorganize the NR NAS code into:
- enc/dec library functions (5GS, 5GMM, 5GSM, NR_NAS_defs.h,
nr_fgs_nas_lib.c)
- handlers and callbacks (nr_nas_msg.c)
The following changes are introduced:
1. migrate 5GS enc/dec lib (5GMM and 5GSM) to a dedicated folder
2. add a nested CMakeLists structure
3. refactor NR NAS enc/dec functions
4. refactor NR NAS messages struct definitions
5. remove most of dependency from NAS LTE
6. further refactor of PDU Session Establishment Accept processing to
separate enc/dec from handling
7. made naming of 5GS definitions consistent whenever necessary
8. cleanup unused code
9. remove redundant struct definitions
Also:
1. fix decoding of AMF Set ID in 5G-S-TMSI UE identity
2. replace Byte_t directly with uint8_t
FHI72: fix for a distributed antenna array for xran F release
in the Rx callback I reset the number of section descriptions/number of
fragments to 0, but for each antenna up to max number of antennas per
RU, instead of up to max number of distributed antenna array
* Remove the ulsch_slot_bitmap and dlsch_slot_bitmap from nrmac
* Adopt the new is_dl_slot/is_ul_slot functions in the stack
to replace is_xlsch_in_slot: these functions are getting
the DL and UL slots as they are set in the TDD configuration
stored in tdd_slot_bitmap (frame_structure_t)
* Keep is_xlsch_in_slot in openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c:
this is necessary because the phy-test pre-processors are using the bitmaps
dlsch_slot_bitmap and ulsch_slot_bitmap to check which DL/UL slots to use
for transmission among those set in the TDD configuration
Co-authored-by: Guido Casati <guido.casati@firecell.io>
previously we had decodeRegistrationAccept acting as a handler and calling
decode_registration_accept to do the decoding. However the logic was mixed
between the two functions, the naming was confusing and the code was hard
understand. The goal of this commit is to simplify the code, improve
readability and maintainability, while adapting the relevant function
to the new OAI NAS libs structure.
To this purpose:
* move enc/dec logic to NAS lib openair3/NAS/NR_UE/5GS/5GMM/MSG/RegistrationAccept.c -
the logic of parse_allowed_nssai, get_allowed_nssai has been moved to
decode_registration_accept and decode_nssai_ie
* add decode_nssai_ie and use it for both Allowed/Configured NSSAIs list (IE handling was added)
* do processing in the handler handle_registration_accept
* simplify the code by removing nested calls
* improve handling of PDU length
Currently only Registration Result, 5GS Mobile Identity, Allowed/Configured NSSAI
are decoded. The other optional IEIs are skipped (only the length is processed).
Downgrade the UE power limited LOG from LOG_W to LOG_D. This is to avoid flooding
stdout when UE in low coverage enters power limited state for a longer period of
time. The same information can be inferred from the periodic UE print which also
contains PH value (negative PH values indicate that the UE is power limited)
- in the Rx callback I reset the number of section descriptions/number of fragments to 0,
but for each antenna up to max number of antennas per RU, instead of up to max number of a distributed antenna array
Ensure execution of processSlotTX in order in NR UE
Make sure that processSlotTX is executed in slot order.
There is a bug that causes decoding error when processSlotTX is executed
out of order. The root cause is not known at this point, but this change
avoids the bug altogether.
Add IQ file recording and IQ file viewer to ImScope
This changeset introduces the following changes to ImScope:
- Added the ability to record IQ data using the same mechanism as
ImScope.
- Added a new executable target imscope_iq_file_viewer for viewing IQ
files.
- Introduced a command line argument --imscope-record that enables data
recording mode.
- Refactored a lot of the scope code
Usage:
- To record IQ data, run a modem with --imscope-record flag. The
recording happens whenever a modem calls dumpScopeData, which
currently is done only in gNB on PUSCH DTX and PUSCH CRC NOK. There
is a limit of ~1GB of files written by the thread in a signle run to
avoid accidentally exhausting disk space. If a directory imscope-dump
is available the data will be recorded there in .imscope files.
Otherwise files are written to the directory the modem was run. This
is done so that the directory can be mapped in a docker container.
- To view recorded IQ files, use the new executable
imscope_iq_file_viewer. This can be done by running:
./imscope_iq_file_viewer <path_to_iq_file>
Replace <path_to_iq_file> with the path to the IQ file you want to view.
Dockerized development environment
This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.
This allows to migrate development environments between machines easily.
Several complementary scripts were added to enable smooth transition
between your docker environment and host environment. Your user and sudo
should work inside the environment.
In its current state, the environment can be used to compile
nr-softmodem with 7.2 FHI but it cannot run it due to missing
dependencies.
This commit introduces a fully dockerized dev env you can start on any
machine that has docker without installing any direct OAI dependencies
on host.
This allows to migrate development environments between machines easily. Several
complementary scripts were added to enable smooth transition between your docker
environment and host environment. Your user and sudo should work inside the
environment.
* the last 6 bits of the GUTI represent the AMF Pointer
* the AMF Set ID is 10 bits long
* the Registration Accept message received from the network contains the GUTI
which, when properly decoded, will be used in any possible following Registration Request
* use defines whenever possible
* introduce a switch to handle security type. Currently only integrity protected and ciphered
is handled, however the idea of the switch is to make the code ready for the future when
different security types will be handled and different actions should be taken based on that.
* define NAS_INTEGRITY_SIZE
* the goal of this commit is to refactor capture_pdu_session_establishment_accept_msg
into a decoding function
* PduSessionEstablishmentAccept.c is in the 5GSM library and shall only do encoding operations
* handling of PDU Session Establishment accept message is done in nr_nas_msg.c
* adopted new NAS decoding functions in the process
* improved QoS rules decoding
* convert getShort into a macro and add to NAS utils
as per legacy code, the NAS functions in nr_nas_msg.c were encoding
the header in the plain header contained in MM_msg
(e.g. plain -> mm_msg -> header in fgs_nas_message_t). The same
header was encoded in the mobility management message contained
in the same struct (e.g. plain -> mm_msg -> registration_request
-> protocoldiscriminator). As this was more complicated than
necessary, the goal of this commit is to simplify the code and
improve readability. Namely:
* Refactor MM_msg into fgmm_nas_message_plain_t to contain
(1) 5GMM Header
(2) 5GMM Payload union
* Use fgmm_nas_message_plain_t and fgmm_nas_msg_security_protected_t
in the 5GMM NAS procedures
* Remove NAS header IEs from 5GMM messages structs and use
the header in fgs_nas_message_plain_t.
This reduce also the repetitions of header members in each
of the 5GMM messages structs.
* Rename struct to distinguish between 5GMM and 5GSM
* Remove fgs_nas_message_t and nas_msg_header_t,
use directly basic 5GS struct definitions, simplify the code
* The callbacks in nr_nas_msg.c are now doing
(1) encode header with the common NAS lib
(2) encode contents with the 5GMM libs
* improve code readibility in the process
* replace encoding code with proper functions from the lib
* remove unnecessary header members in struct definition
this commit removes last enc/dec code in nr_nas_msg.c
* move enc/dec definitions to NR_NAS_defs.h and add new lib file nr_fgs_nas_lib.c
both used by nr_nas_msg.c
* move utility macros to fgs_nas_utils.h: this can be used in all the 5GMM, 5GSM lib files
* use nr_nas_msg.c for handlers/callbacks only, it should call the enc/dec
functions in nr_fgs_nas_lib and in the 5GMM, 5GSM libs
* 5GMM, 5GSM libs should only do the enc/dec of the NAS message contents
* move defines to openair3/NAS/NR_UE/nr_nas_msg.h as they are
only used in nr_nas_msg.c
* made naming of all message types consistent, using the same
prefix for all
* the only function used from nr_common.c is servingNetworkName which is
used in nr_nas_msg.c, so it was moved to the latter file and its scope
was reduced
Every NAS 5GS message can have 3 different headers: (1) security protected
(2) 5GMM plain (3) 5GS plain;
According to 3GPP TS 24.501:
> 4.2 Coordination between the protocols for 5GS mobility management and 5GS session management
> A 5GS session management (5GSM) message is piggybacked in specific 5GS mobility management (5GMM) transport
> messages. To this purpose, the 5GSM messages can be transmitted in an information element in the 5GMM transport
> messages.
A PDU Session Establishment accept is a 5GSM message and as such it is contained in a 5GMM
transport message. The code in capture_pdu_session_establishment_accept_msg is reflecting this.
The message is thus expected to have: (1) Security protected 5GMM header (2) Plain 5GMM message
(3) 5GSM Payload Container (4) Plain 5GSM message.
5.4.5 of 3GPP TS 24.501: also says:
> The type of the payload is identified by the Payload container type IE and includes one of the following: a) a single 5GSM message;
Thus, a 5GSM is not the only possible payload of a NAS transport message.
This commit is focusing on the refactoring of the structs definitions and adaptation of the CMakeLists.
Based on the above:
* Move NR_NAS_defs.h to 5GS subfolder in NR_UE
* Move NAS FGS structs and definitions to NR_NAS_defs.h
* Rename mm_msg_header_t to fgmm_msg_header_t
* Remove duplicated NAS struct definitions
(1) kept fgs_nas_message_security_header_t over security_protected_nas_5gs_msg_t
(2) Kept fgsm_msg_header_t over fgs_sm_nas_msg_header_t
* Remove unused definitions, structs, functions in the process
This commit is introducing the following macro changes:
(1) Migrate NAS 5GS lib files to a new 5GS subfolder in NR_UE
and organize NAS 5GS lib messages into 5GMM and 5GSM subfolders.
A nested CMake structure was implemented and CMakeLists.txt were
added whenever necessary. This is effectively separating 5GS
libraries from LTE libraries.
(2) In order to simplify the separation of 5GS libs from LTE libs,
remaining dependencies from NAS LTE (e.g. nas_ue_task.c, ue-idx-standalone)
were removed in the process
(3) ExtendedProtocolDiscriminator.c/.h and SpareHalfOctet.c/.h were deleted
and affected types were replaced with simple integer types
(4) Cleanup: unused definitions and libs (e.g. LIB_5GNAS_GNB)
were removed
(5) Update doc/Doxyfile
(6) clang-formatted the migrated files in the process
(7) Update includes of headers in affected files
This avoids the issue of compare_exchange_weak always failing. The issue
was that `store()` is not equal to `exchange()`. `exchange` uses memory
copy while `store()` copies the value representation of the argument, which
is not always the same thing.
- Added event parameter for recording which is reflected in the filename
- Added event in the UE for DLSCH NACK
- Added program name to the filename for ease of identification
- Reworked spinlock to use atomics
This commit introduces the following changes to ImScope:
- Added the ability to record IQ data using the same mechanism as ImScope.
- Added a new executable target `imscope_iq_file_viewer` for viewing IQ files.
- Introduced a command line argument `--imscope-record` that enables data recording mode.
- Refactored a lot of the scope code
Usage:
- To record IQ data, run a modem with `--imscope-record` flag.
The recording happens whenever a modem calls dumpScopeData, which currently is
done only in gNB on PUSCH DTX and PUSCH CRC NOK.
There is a limit of ~1GB of files written by the thread in a signle run to avoid
accidentally exhausting disk space.
If a directory `imscope-dump` is available the data will be recorded there in .imscope
files. Otherwise files are written to the directory the modem was run. This is done so that
the directory can be mapped in a docker container.
- To view recorded IQ files, use the new executable `imscope_iq_file_viewer`. This can be done by running:
```
./imscope_iq_file_viewer <path_to_iq_file>
```
Replace `<path_to_iq_file>` with the path to the IQ file you want to view.
* is_ul_slot: returns `true` for UL or mixed slots
* is_dl_slot: returns `true` for DL or mixed slots
* is_mixed_slot: returns `true` for mixed slots
These functions use the TDD slot bitmap for slot type checks
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* take into account pattern2 in nr_rrc_config_dl_tda
* use get_tdd_period_idx in nr_rrc_config_ul_tda
* use get_first_ul_slot_multi_tdd in set_SR_periodandoffset
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* refactor set_ideal_period to use frame_structure from MAC
* use get_ul_slot_offset to assign slot offset to nth UE and adopt in
updated config_csirs, configure_periodic_srs, set_csi_meas_periodicity
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* the function is returning the index of the first full UL slot in tdd_slot_bitmap
or the first UL slot (including mixed) if the "mixed" flag is provided
* the get_ul_slot_offset function calculates the offset of the nth uplink (UL) slot for a given UE index within a TDD period
* this function uses the frame structure bitmap to determine the UL slot positions
* allocate memory for pattern2 only if the IE is present (it is optional)
* fix scc (deallocate memory) when necessary
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* use config_frame_structure in config_common:
- fill frame_structure in MAC and NFAPI Config Request
- use get_tdd_period_idx to set periodicity index in Config Request
- use config_tdd_patterns to fill tdd_period_config
- use set_tdd_config_nr to complete NFAPI Config Request configuration
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* assuming num_dl_slots and num_ul_slots are including also
slots with dl/ul symbols respectively
* refactor set_tdd_config_nr
* moved function to MAC
* fill max_num_of_symbol_per_slot_list depending on slot type
* use new set_tdd_config_nr in stack
* minor refactor in config.c to improve readability (scs)
Co-authored-by: Guido Casati <guido.casati@firecell.io>
* set_tdd_bmap_period, config_tdd_patterns: to configure TDD period, including bitmap, in the frame structure
* get_tdd_periodicity: to retrieve the periodicity in milliseconds for the given TDD pattern
* get_tdd_period_idx: to get the TDD period index based on pattern periodicities
* get_ul_slots_per_period: get the number of UL slots (including mixed with UL symbols) in period
* get_full_ul_slots_per_period: get the number of full UL slots in period
* get_dl_slots_per_period: get the number of DL slots (including mixed with DL symbols) in period
* get_full_dl_slots_per_period: get the number of full DL slots in period
Co-authored-by: vijay chadachan <vijay.chadachan@firecell.io>
* allocate and configure NR_PUSCH_TimeDomainResourceAllocation in a separate function
* remove duplicated lines of code
* use in nr_rrc_config_ul_tda
* use calloc_or_fail
* clang-formatted
Integration: `2025.w04`
Closes#876, #896, #875, #893, and #878
See merge request oai/openairinterface5g!3226
* !3198 remove a set of compile options that don't work anyway
* !3171 Refactor SCTP Association Response Handling and E1 connection loss at CU-UP
* !3023 usrp constant and slow derive timestamp
* !3215 Remove unused code
* !3192 fix nr phy-test mode in ntn
* !3214 fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
* !3020 use ML receiver for 64 QAM UL-MIMO
* Demote error logs to debug for "PUCCH not processed"
* !3217 minor improvements in T hacks
* !3199 Add a small FAPI Hex parser utility
* !3209 Remove most of m64 type usage
* !3211 Avoid huge calloc by alloc'ing TBs independently
* !3212 F1AP IDs: Allow AddMod, fix concurrency bug
* !3152 E1 Setup enc/dec library and unit test
* !2999 Repair nFAPI in 5G
* !3210 FHI72: FDD support
* !3220 Improve RA logs
Improve RA logs
Modify existing LOG entries to include preamble index, timing advance and
estimated distance from the gNB. This makes mapping RA attempts to
physical/simulated UEs easier via sent/received preamble index or physical
distance from the gNB in scenarios with >1 UE.
FHI72: FDD support
- harmonize DL/UL PRB mapping in one get_xran_prb_map() function with support
of mixed slot and duplex mode
- do not assume TDD by default
Repair nFAPI in 5G
Add 5G nFAPI in OAI/Make it it work.
Many commits in this branch are basically bug fixes of things that don't work
properly, such as
- check for correct conditions (e.g. instance numbers in the RAN context)
- remove artificial limitation (e.g. only one PUCCH per TDD period in the PNF)
- improve performance (reduce big mallocs, make some static buffers such as a
global ring buffer for nFAPI messages in the PNF)
- fix bugs in nFAPI (e.g., increase maximum message size to ~64kB instead of
1500 bytes, because the latter is way too small for many TX_data.requests in
5G, and it will delay message arrival unduly)
- fix bugs in message enc/dec (e.g., handle FDD in config.request)
- adjust the L1 such that the condition "we run monolithic" is not necessery
(e.g., some message numbers in nFAPI struct where reset in MAC, instead of
L1, and this breaks when running the PNF)
There are instructions that explain how to set it up. Two CI tests have been
added, one with COTS UE and MIMO in DL+UL in TDD numerology 1 (30kHz), and a
second test with FDD mu=0 (15kHZ) in RFsimulator.
These were some old to-dos that have been addressed.
- test with COTS UE - 4x4 pipeline works good in DL, UL now also work
- test in RFsim
- make PNF status message
- make FDD in u0 work
This function packs P7 messages. At least RX_data.indication messages
might be much bigger than the global buffer that is used here. Allocate
the buffer on the stack, and make it bigger. Do not use the global
buffer, it's simply not necessary; increasing the global tx buffer size
might have negative effects elsewhere in the code.
That change might make the function reentrant. The mutex seems to only
guards the codec config. However, leave it to not introduce any
regressions as of now.
E1 Setup enc/dec library and unit test
This MR is adding a library for E1 Setup enc/dec functions:
- E1 CU-UP Setup Request
- E1 CU-UP Setup Response
- E1 Setup Failure
and relevant unit tests
F1AP IDs: Add update, fix concurrency bug
I suspect a concurrency bug: For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info. At the
same time, the PDCP thread might look up the information. This can lead
to asserts. Modify the code to do the update under (one) lock.
Also, refactor some code.
Similar to the parent commit, make the numerology in the VNF
configurable. Unlike for the PNF change, the VNF frame/slot info is in a
per-PNF connection structure to which the "oai_integration" code has no
access. So we need to hack the nfapi_vnf_p7_add_pnf() function signature
to take the numerology, to be able to save this on a per-PNF basis.
The fact that we store this on a per-PNF basis is not strictly required,
as the VNF cannot handle multiple numerologies as of now, either.
However, we might want to extend this in the future, so it seems prudent
to store this on a per-PNF basis, so that we could start handling
multiple numerologies at the L2 without the need to change the L1 or
nFAPI code itself.
Also, the numerology is not needed except for some code that deals with
timing over nFAPI. As of now, we don't use this code (nFAPI gets a
trigger every slot, as per the VNF request, see an earlier commit in
this series), but also here, let's not make the future more complicated
by storing the numerology for each PNF now (this could always be reverted).
For 4G, put numerology 0 (15kHZ SCS), which is the SCS that LTE uses.
Fill in the dynamically received numerology, and make the numerology at
the PNF configurable, following the changes in the parent commit.
The change for the reading is somewhat of a hack, because nFAPI, as of
now, does not really foresee to store the numerology, so we fill the
numerology during the start request, when the numerlogy has been
received in the config request, but at that time, the structure for the
time information (frame/slot) does not exist yet.
At both the PNF and the VNF, introduce a separate numerology field, and
pass the numerology when converting time information using macros from
nfapi_interface.h. The actually numerology is still hardcoded to 1 (as it
was before), but the follow-up commits will put a suitable numerology.
In both cases, but the numerology next to the frame/slot information.
Similar as the parent comment, remove time macros. In this particular
case, we can just pass the exact frame/slot information, instead of
squeezing it in a single integer.
The next commits will modify the time macros used in the 5G nFAPI code
to handle different numerologies. As a preparation, remove all the
usages of these macros where they really don't matter (e.g., don't
convert if we don't need to).
the L1 needs both a PDU (in TX_data.req) as well instructions for
the actual transmission (in DL_TTI.req) to encode a PDSCH message. In
nFAPI, it can happen that a DL_TTI.request message has been received
(configuring the PDSCH transmission), without the TX_data.request having
reached the PNF. The L1 assumes to have the PDU.
To avoid problems, ensure that only the pair of DL_TTI.req/TX_data.req
is delivered. Otherwise, drop either message.
nFAPI has a mechanism to segment messages that are too big for transport
over a given medium (see e.g. SCF 225, section 2.3.2).
The maximum segment size of 10000 makes that for larger payloads, e.g.
TX_data.request, many small segments are to be sent. This can create or
increase delays on the transport. On the other hand, the currently only
available transport mechanism, UDP, allows to transport packets of up to
almost 65535 bytes. Correspondingly, increase the maximum segment size
so that less segments are to be created, and potentially, less delay is
to be incurred. # Please enter the commit message for your changes.
Lines starting
Avoid delays in tx_data.request handling by avoiding big malloc()s and
copy operations. Reimplement function to (1) peek the frame/slot
numbers, (2) decide on buffer, and (3) unpack directly into
pre-allocated memory.
Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
The next commits refactor the rx handling of messages in the PNF. To
efficiently handle them, provide a "peek()" function that gives us the
frame/slot for which a message is destined. This allows to decide if a
message is on time and select a destination buffer, before unpacking it
completely, avoiding copies.
The time that a message between PNF/VNF to arrive depends mostly on the
transport. To allow for some delays, there is a slot_ahead time, during
which the VNF is allowed to schedule and send instructions to the PNF.
This can be multiple slots; the 1ms hitherto given might typically too
short. Increase to 10ms, to encompass a wider range of slot_ahead times.
Make the corresponding log message of when old (stale) message are
removed a bit clearer with respect to times.
This is the first commit in which nFAPI works. Follow-up commits improve
performance.
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode
runs L1, or not. Correspondingly, add an assert to check this invariant.
In the NR_IF_module, the correct check to do is for VNF (implying no L1,
or "emulation of L1" [which is not true]), in which case we use
queues.
The L1 receives a pointer to the L1 payload to use for PDSCH generation.
This would overwrite an existing pre-allocated pointer. Remove this
preallocation. Instead, allocate it in the simulator (the only place
that actively uses this buffer allocation; in nr-softmodem, it's lost by
assigning a pointer). Allocate with an extra byte, because the payload
(in bits) might not be a multiple of 8 bits/1 byte, so the CRC is in the
last 3 bytes.
Also, improve the log with frame/slot information if the PDSCH payload
pointer is NULL.
The function now utilizes simpler variable names and logic to determine
if a given NR P7 request falls within the timing window.
The logic for determining if a request is within the timing window is as follows:
- The function calculates the absolute difference between the current
and received SFN slots, taking into account the possibility of
wraparound.
- If the absolute difference is greater than half of the maximum SFN
slot value, it subtracts this difference from the maximum SFN slot
value to get the actual difference.
- The function then checks if this difference is less than or equal to
the specified timing window. If it is, the request is considered to be
within the window.
Additionally, the commit updates the function signature to return a
boolean value for better readability and consistency.
Changes made:
- Simplified variable names for readability
- Improved logic for handling wraparound scenarios
- Updated function signature to return a boolean value
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
Since commit defc97ec16 ("Msg2 and Msg3 at gNB: check allocation before
committing to Msg2"), the scheduler calculate Msg2/Msg3 frame/slot
before allocation of Msg2, and not when receiving Msg1. It also respects
the RA response window correctly.
Correspondingly, we don't need to calculate here if the RACH.indication
is within the time window. The scheduler will do this.
If VNF and PNF are deployed through different processes, it's crucial to
maintain synchronization and ensure smooth operation. This commit
addresses the need to keep the VNF slot ahead of 2 (as required for
network deployment), while ensuring that PNFs wait appropriately to
avoid overtaking the slot. Specifically, this involves measuring slot
duration and implementing a wait mechanism to ensure that PNFs do not
exceed a slot duration of 300 microseconds. This ensures proper smooth
operation, especially in the case of RFsim.
Reset the counters. In monolithic, this happens in the scheduler; in the
PNF, without this change, it would trigger PDCCH again.
Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Refactor pnf_phy_ul_dci_req(), pnf_phy_dl_tti_req(),
pnf_phy_tx_data_req(), pnf_phy_ul_tti_req(), to use L1 functions to
"load" L1 jobs to be executed, via L1 functions.
In monolithic, the sched_response mechanism ensures that FAPI messages
for one slot are not overwritten by scheduler instructions for the
following slots (i.e., it is like a memory allocation pool).
The allocation happens in nr_schedule_response(), not used by the PNF.
Hence, only deallocate when in monolithic.
The PNF uses a big ring buffer over all slots in a frame to ensure the
same.
This function applied an sf_ahead, bigger than the actual slot
indication message sending (so a message could NEVER arrive on time!).
Reduce to zero, because this is when it should arrive for us.
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe
a frame, or a TDD period? but likely not two frames). Reduce to one
frame.
Also, the nFAPI code assumes one entire frame, so use that (this commit
necessary to actually make the PNF work, otherwise, the
packing/unpacking of the FAPI message would need to do 2 frames).
Closes: #876
Upon reception of FAPI UL messages (e.g., RACH.indication), those
messages are put into queues, to be delivered in a single call,
NR_UL_indication(). Call the scheduler to trigger processing in UL.
Note that ideally, these queues should not exist at all, and messages
should just be delivered asynchronously, as this would lead to less
copying of messages. Currently, we fulfill the scheduler interface
instead.
Important! Trigger UL after having run DL scheduler and sent the
messages, to ensure short delay between Slot.indication, and the
response to those messages.
The previous designs seems to do:
loop {
poll_ind_queue()
if (msg)
scheduler;
pselect() on messages;
handle_message {
if slot_ind
put_ind_queue()
}
}
So basically, we artificially put a queue for slot indications in the
middle, but still handle it in the same thread(!). This for some reason
results in a big slow down if the PNF runs faster.
Now, we just do pselect(), waiting for messages. We handle the slot
indication immediately (the schedule should take some microseconds),
then return to pselect().
Use this function to implement distinct behavior for monolithic or PNF:
- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
will handle elsewhere.
Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
We are required to store multiple PUCCH (e.g., for multiple UEs).
However, nr_fill_pucch() automatically freed the previously active PUCCH
structure. Of course(!) this does not make sense.
However, the problem is that init_nr_transport() allocated only one
PUCCH structure. Also this does not make sense to me. The problem was
that slot_ahead was 0, which logically cannot happen in this function
(because slot_ahead is illogical, we must give the radio some time). The
reason is that it uses if_inst->sl_ahead, which, prior to this commit,
was not set.
The init_nr_transport() function is called normally from main() through
init_eNB_afterRU(). In this case, we initialize if_inst->sl_ahead to
what is set in main(). In the PNF case, however, we call
init_nr_transport() from the PNF thread, when receiving the start
request. In the main(), we wait for this to happen, before setting
if_inst->sl_ahead. Hence, initializing this variable (which we should
safely be able to do) before solves the problem.
The radio gives the clock. Therefore, we do not need to keep the time
separately in the PNF.
Also, the VNF should not run the ru_thread, as this is an L1 thread.
This is to align with monolithic/FAPI, where we get slot indications in
each slot. In the nFAPI, this is replaced by timing information, such
that the VNF ticks automatically, and gets indications from the PNF on
early/late messages. The timing information handling is not implemented
in the present nFAPI implementation. Instead, we adopt the FAPI behavior
and send timing information in every slot, abusing it to be a slot
indication.
There is no need to add the PNF in nr_start_resp_cb(), because it has
already been done in nr_param_resp_cb(). This might be wrong, because 4G
does it only in nr_start_resp_cb(), but for the moment, since it is also
used in nr_param_resp_cb(), avoid the double add.
The same function is called in nr_start_resp_cb(), why there and not here?
At reception of nr_param_response, we receive the remote PNF information
on PNF/VNF. We have to store it.
In nr_start_response, it might not be correct and/or can be taken out.
The next commit will remove it.
Remove most of m64 type usage
MMX instructions were first SIMD version, the registers management is complex
(_mm_empty()) so, it is better to remove it now and use more recent instructions
anyway, gcc/clang should replace it automatically as long as we enable sse2,
that should always be the case but for code understanding and for ARM porting
for example, it is better to explicitly remove it
Add a small FAPI Hex parser utility
Adds a small FAPI hex parser utility nfapi_hex_parser, that takes in a FAPI
message hexdump, either from the command line or a file, unpacks it and prints
the contents out to the console.
The functions to print the data to the console were added alongside the existing
utility functions, for both P5 and P7 messages.
This allows the user to quickly check if a message has the valid format to be
unpacked in OAI.
The file examples.md contains some examples of execution and output.
This utility is compiled alongside the NFAPI_LIB, as such, it is compiled
whenever we compile nr-softmodem, or any other target that uses the NFAPI_LIB.
Prior to this this commit, the structure NR_UE_info_t is 4881632 bytes.
On some machines, e.g., one of the CI systems, this can lead to realtime
problems when doing the initial calloc() of the data structure.
Commit e586efb29d ("Enable 32 HARQ
Processes in DL, UL") introduced the real-time problems by increasing
the number of HARQ processes.
The reason NR_UE_info_t is that big is that it contains buffers for DL
HARQ data that might need to be retransmitted (the L1 is stateless, it
cannot store this for the L2). To reduce the size, dynamically allocate
the DL HARQ buffers when they are needed. This also reduces the size of
NR_UE_info_t to 15840 bytes.
Encapsulate transportBlock in byte_array and accessory functions, and
allocate in big chunks of multiple of ~32kB.
Reported-By: Cedric Roux <cedric.roux@eurecom.fr>
Fixes: e586efb29dCloses: #875
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define
it so we can link properly, instead of relying on FlexRIC (where it was
defined).
Introduce function cu_update_f1_ue_data() which does remove+add under
one lock. This fixes a concurrency bug. For instance, during
reestablishment, the CU needs to update the DU UE ID under which the UE
is identified in the DU. Previously, the CU would remove, then add the
DU UE ID info. At the same time, the PDCP thread might look up the
information. This can lead to asserts. Use the above addmod
functionality to do the remove-add under a mutex.
Modify test to verify this works as expected.
use ML receiver for 64 QAM UL-MIMO
Change condition on MMSE/ML selection to include 64QAM for ML UL-MIMO receiver.
Only 256QAM will now use MMSE UL-MIMO receiver.
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
1. HARQ combined offset:
The offset provided for each code block in the HARQ combined input and output
buffer shall not be above 512. A modulus was performed on the offset of the TB
in the buffer to avoid this situation. But the offset of the code block was
added afterward so that the total offset was sometimes going above 512.This
commit performs the modulus after adding the code block offset. Usually this
issue was triggering a segfault after less than 2 minutes of an iperf test on
some setup using T2. The same iperf test was successfully performed during 10
minutes on the same setup with this change.
2. Properly stop LDPC coding in gNB and UE:
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface
in gNB and UE. This was not causing major issue until now. It was especially not
causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the
coding library is not properly stopped then the VF cannot be used anymore unless
the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
fix nr phy-test mode in ntn
Following SIB19 MR !3019 (merged), the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
More details: !3019 (comment 145103)
usrp constant and slow derive timestamp
Sample write reorder function doesn't handle properly the clock shift.
It keeps the same time origin forever, so, if the clock sifts in one direction,
we finish to reach the maximum time shift that was designed for slot to slot
maximum shift.
We may also consider if this function is useful: gNB and UE currently ensure Tx
in order because there are other issues above if we let Tx preparation run out
of order in separate threads
Closes#893
- Refactor SCTP Association Response Handling
- Unified function for both CU-CP and CU-UP handling
- CU-CP: Notifies RRC of E1 connection loss with CU-UP
- CU-UP: Initiates a new SCTP association request to regain E1 connection
- this fix will prevent issue #878 from happening
- Send list of PDU Session Resources to Failed Setup in the (PDU Session
Resource/Initial Context) Setup Response
- depending on different failure scenarios
- e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
Session Setup Request
- add relevant functions to handle NGAP Setup Response messages with failed
list of items
- this is an extra failure handling to make #878 is handled if it ever happens
again
- NGAP Cause Refactoring
- Refactor struct for NGAP cause group and value
- Add extended radio network cause enumeration values
- Refactor redundant code into a new NGAP cause encoding function
- Minor logging, function descriptions improvements
Closes#878
Useful to debug realtime issues, for example when calling a periodical
routine, if it's not programmed carefully enough, it may be that the first
call takes way longer than the next ones (for example it uses some memory
that is not mapped in the process, leading to many page faults the first
time it's executed).
Having a periodic log for the timing of this routine with min/avg/max/count
will reveal that a call is way longer than average and will help in
finding where exactly in the code the time is spent, thanks to the ease
of use of the T tracer; you put T(T_XX, T_INT(1)) just before the code
you want to measure, you put T(T_XX, T_INT(0)) just after and time_meas
will show the delta time between those events. Then you cut the routine
in smaller pieces, measure with T(1)/T(0), and you finally reach the small
guilty part that takes too long.
In time_meas.c, when getting 0 for the event, we log delta time with
previous 1 for the event. "start_valid" was not cleared, so receiving
a second 0 without 1 in between may lead to wrong logging.
Should not happen in practice, but still, little bug.
(Note: we don't protect against streams of 1, but this case should also
not happen.)
Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
Now uses RC.nb_nr_L1_inst instead of RC.nb_nr_inst in order to configure the L1, since in PNF RC.nb_nr_inst is always 0, and so, it wouldn't configure the L1
chore(ci): Move to new Jenkins and Openshift Cluster
- Update helm-charts with new node roles
- Add resource definition in physim helm-charts to easily schedule them
on different cluster servers
- Update entitlement creation methodology
- Add namespace for aerial pipeline
Due to HW version differences between the CI RHEL build machine and
the FHI 7.2 test machine (cacofonix), FHI 7.2 test using RHEL image
failed, reporting an 'Illegal Instruction' error.
* this commit is making explicit the mandatory IE cn_support
in the E1 Setup Request message
* also, init cn_support in E1 Setup Request initial message preparation
* E1 CU-CP Setup Request is an E1 Interface Management message
whose type defition was missing, and it is introduced in this commit
(see 9.2.1.7 of 3GPP TS 38.463)
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512.
A modulus was performed on the offset of the TB in the buffer to avoid this situation.
But the offset of the code block was added afterward so that the total offset was sometimes going above 512.
This commit performs the modulus after adding the code block offset.
- extend get_xran_prb_map() function to handle mixed slot
- properly fill PRB configuration based on DL/UL direction and duplex mode
- do not implicitly assume TDD
Modify xu_add_f1_ue_data() to be xu_addmod_f1_ue_data(), i.e., "addmod"
behavior in which it is possible to also update f1_ue_data. I do it this
way since an xu_updade_f1_ue_data() function would be almost the same as
the add function (only deleting existing data, whereas the original
add() was asserting in that case).
Modify tests to test for this behavior.
This fixes a concurrency bug. For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info.
At the same time, the PDCP thread might look up the information. This
can lead to asserts. Use the above addmod functionality to do the
remove-add under a mutex.
- the parameters used in DL/UL are exactly the same, except the direction and the number of PRBs;
therefore, passing the direction seems convenient for visibility purposes and reduces the code.
Note: Number of PRBs we store in fh_config for both DL/UL is num_rb_dl of openair0_config struct.
At the end, it is actually the same info.
Following SIB19 MR !3019, the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
Integration: `2025.w03`
See merge request oai/openairinterface5g!3206
* !3167 remove calls to clear SIMD registers, that was a historical issue
* !3179 UE statistics improvements
* !3193 Remove spinlock from threadpool task return
* !3195 UE MAC: in phy-test/do-ra, fill TB randomly
* !3201 T tracer: minor fixes for compilation
* !3204 CI: Increase number of test trials for timing tests
* !3034 Delay compensation for PUCCH2
* !3205 Fix calculation of RSSI in pucch_rx.c
Fix calculation of RSSI in pucch_rx.c
Fix two issues with RSSI calculation in PUCCH:
- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.
The proper way to calculate power in dBFS is
let signal_energy = average of squared samples of received signal over resource elements, antennas and symbols under measurement
then:
rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
or (to avoid division):
rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
CI: Increase number of test trials for timing tests
- Increasing a number of test trials aims to reduce variations and
improve reliability of the nr_ulsim and nr_dlsim test results.
- Disable CPU sleep states on the machine when running physims.
- Minor adjustment of timing threshold in 60 MHz phytest.
Delay compensation for PUCCH2
- Implementation of delay compensation for PUCCH2, which minimizes for
exampe logs "reported RSRP index XXX invalid"
- Adding a test to the CI to perform the delay compensation in PUCCH2
- Refactor code to use c16_t data type in PUCCH decoder
Remove spinlock from threadpool task return
The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added.
remove calls to clear SIMD registers, that was a historical issue
This works because gcc/clang replaces the MMX calls by SSE2 automatically.
There are some mm_empty() calls in bad places (places where we don't use
_m64) and it is lacking in places where we still use _m64. Given that
MMX calls are converted to SSE2, there is no problem, and we will remove
remaining _m64 variables.
Fix two issues with RSSI calculation in PUCCH:
- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.
The proper way to calculate power in dBFS is
let signal_energy = average of squared samples of received signal over resource
elements, antennas and symbols under measurement
then:
rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
or (to avoid division):
rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
CU-CP: inform RRC of E1 connection loss with CU-UP
CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
task. The function e1apHandleTimer() is basically triggering a new E1 association request
until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed
Related to #878
* add function to check whether cu-up is connected
* add functions to send the relevant response messages with the failed list
e.g. to fill PDU Session Resource Failed to Setup items
* set return value of trigger_bearer_setup to bool and handle the
failure by sending setup response messages with list of PDU sessions failed to setup
i.e. send failed list of items when no CU-UP is associated to the CU-CP
note: it considers all PDU Sessions as failed to setup in the considered failure scenarios
* e.g. send a list of failed PDU session resources in the response message to reject
PDU Session Resource Setup in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
* the Initial Context Setup has a Failure message, but for the considered failure scenario
when no CU-UP is available the current design is just sending a list of failed to setup
items in the Response message
* transfer PDU Session Resource/Initial Context Setup Request NAS PDU to UE
closes#878
* new struct definition including both NGAP cause group and value
* add encoding function, temporarily in ngap_common.c
(in the long term to be place in a enc/dec NGAP library)
* extend Radio Network cause enum values
* add cause member to Setup Failure
Integration: `2025.w02`
Closes#866 and #887
See merge request oai/openairinterface5g!3197
* !3135 replace a set of #define by a C bit array, remove duplicated extern global variable declaration
* !3173 nrLDPC_coding: improvements
* !3181 Use UL actor for processSlotTx
* !3186 chore(ci): improved errors messages visibility
* !3101 NR gNB improvements for analog beam management
* !3130 NR gNB MSG3 TPC
* !3175 Improvements for PUSCH per symbol processing
* !3177 CI: change frequency for timing and B200-SABOX pipelines
* !3188 NR UE fix DCI mask size
* !3119 Config files improvements for PRACH
* !3196 Fix yaml example config file
* !3187 nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
* !3076 move UL_INFO structure allocation local to a rx slot processing
* !3189 fhi_72: allow to provide dpdk_iova_mode to xran
* !3182 RSSI threshold for PUSCH & PUCCH power control
* !3103 Introduce ITTI queue in RRC-to-MAC direction
RSSI threshold for PUSCH & PUCCH power control
To prevent ADC railing or "clipping" when the received power is too
large, introduce RSSI threshold parameters for PUSCH and PUCCH, which
are now configured in units of 0.1 dB. Here is how you can configure and
use these thresholds:
1. Configuration:
- Set the pusch_RSSI_Threshold and pucch_RSSI_Threshold parameters in
your configuration file (e.g., gnb.conf) (MACRLC section).
- These parameters define the maximum acceptable RSSI values for
PUSCH and PUCCH, respectively. The unit is either dBm or dBFS,
depending on the RSSI reporting configuration.
2. Usage:
- The nr_limit_tpc function will automatically adjust the Transmit
Power Control (TPC) commands based on the configured RSSI
thresholds.
- If the RSSI exceeds the threshold, the TPC command will be limited
to prevent further increase in power, thereby avoiding ADC
clipping.
Introduce ITTI queue in RRC-to-MAC direction
resolve ue rcc to mac race conditions by a itti queue, but it doesn't
resolve the problem of exact slot we should apply the new cell
configurtion
fhi_72: allow to provide dpdk_iova_mode to xran
- Introduce a gNB configuration option that enables users to select the
desired IOVA mode for DPDK ("PA" or "VA") with dpdk_iova_mode
parameters in fhi_72 configuration section. If not set, the default
remains PA mode to ensure backward compatibility with existing
configurations. Detailed information about IOVA modes, including their
advantages and disadvantages, can be found in the DPDK documentation:
Memory in DPDK Part 2: Deep Dive into IOVA
- Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability for the docker container.
- Switch to IOVA VA mode in the FHI7.2 pipeline and reduce the required
capabilities for the docker container.
Move UL_INFO structure allocation local to a rx slot processing
UL_INFO is allocated a gNB, so require mutex and obscur information
passing function to function. Instead, make a local UL_INFO per slot,
removing the mutex and making the code easier to understand.
Use UL_INFO on the stack, to simplify the code. move in the same struct
the associated rach, pdu, crc, srs arrays that where pointed from
directly in gNB structure Keep in nfapi the existing logic that make
malloc for theses rach, pdu, crc, srs array lists
Pass only relevant fields, where appropriate.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
This MR is clarifying the interfaces to the LDPC coding libraries. It
aims to improve the readability of the interfaces and compliance of
naming with specification 38.212.
Fix yaml example config file
amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t,
so in the config file it should be a list of ip addresses
In current develop just by trying to run this config file with:
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml
results in a segfault.
Config files improvements for PRACH
Some PRACH parameters in configuration files are not properly set.
- number of SSB per RACH occasion should be 1 when we have only 1 SSB
(it would still work with 1/2 but it makes little sense and might
limit UE selection of ROs).
- some PRACH configuration indices would generate PRACH conflicting with
PUCCH and therefore reducing scheduling capabilities
Further cleanup of some config files still using deprecated fields
Switching to IOVA VA mode in the FHI7.2 pipeline reduces the required
capabilities for the Docker container. This change allows the removal
of the SYS_ADMIN capability.
In DPDK, IO Virtual Addresses (IOVA) refers to the memory addressing
scheme used for IO operations. The two IOVA modes supported by DPDK are:
- IOVA as Physical Address (PA): IO memory addresses correspond directly
to physical addresses, no address translation required.
- IOVA as Virtual Address (VA): IO memory addresses align with user-space
virtual addresses, requiring IOMMU to remap physical memory.
Previously, this was hardcoded to 0, to use IOVA as PA mode, with xRAN's
DPDK EAL initialization using the "--iova-mode=pa" flag.
This commit introduces a gNB configuration option to allow users to select
the desired IOVA mode. The default remains PA mode to
ensure backward compatibility.
Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability in the docker container.
NR UE fix DCI mask size
Previous maximum size was 15 but in practice it could be at least up to
18. Also moved assertion on non-contiguous type0 DLSCH allocation to L1
(to remove blocking point for L2 implementation).
CI: change frequency for timing and B200-SABOX pipelines
Change center frequency of
- RAN-SA-B200-Module-SABOX-Container - 20 MHz TDD SA scenario from
3309.48 MHz to 3609.12 MHz
- RAN-gNB-N300-Timing-Phytest-LDPC - Timing phytest 40 MHz scenario from
3619.08 MHz to 3319.68 Mhz
to avoid interference between the SABOX and timing pipeline.
Improvements for PUSCH per symbol processing
- Improved the assert in task_ans.c
- Fixed and issue with PUSCH per-symbol processing that could cause an
issue in case num_pusch_symbols_per_thread is not 1.
NR gNB MSG3 TPC
This MR improves the handling of MSG3 TPC commands at MAC gNB.
TODO: Compute TPC when PRACH sends a valid power measurements (currently
not the case for OAI L1, to be verified with Aerial L1)
Closes#866
NR gNB improvements for analog beam management
- Improvements at gNB MAC layer to properly handle analog beam
management for all channels
- Simple beam switching mechanism based on UE RSRP report
- Introduced new configuration parameters `pusch_RSSI_Threshold` and `pucch_RSSI_Threshold`
(MACRLC section)
- Added `nr_limit_tpc` function in `gNB_scheduler_primitives.c` to limit TPC based on RSSI
threshold.
- Integrated `nr_limit_tpc` in PUCCH and PUSCH power control
Example Configuration
puxch_RSSI_Threshold takes value between -1280 and 0 and is mapped to range -128.0 dBm/dBFS
to 0.0 dBm/dBFS in 0.1 dB increments. Unit depends on RSSI reporting config.
pucch_RSSI_Threshold = -500; # Set the PUSCH RSSI threshold to -50.0dBm/-50dBFS
pucch_RSSI_Threshold = -600; # Set the PUCCH RSSI threshold to -60.0dBm/-60dBFS
chore(ci): improved errors messages visibility
1. There was a trailing && before $BUILD_OPTIONS in the command line
2. Added leading lines and more pattern to the grep command that
displays errors/warnings messages during docker build since we don't
have access to all.txt if build fails
nrLDPC_coding: improvements
One improvement in this changeset: Functions nr_interleaving_ldpc,
nr_deinterleaving_ldpc, nr_rate_matching_ldpc and
nr_rate_matching_ldpc_rx that were previously linked with the PHY layer
in the executables are now linked with the LDPC coding implementations
where they are called.
The parent commit cleans up and groups oai_exit in one place,
nr-softmodem-common.h. Therefore, this 5G file is included in the 4G
defs_common.h (at least it's mostly 4G), which is not nice. Instead,
define oai_exit also in 4G softmodem-common.h, and include this in
defs_common.h. Remove the cyclic inclusion of defs_common.h in
softmodem-common.h, and resolve all subsequent errors around unknown
types and extern definition mismatches.
Commit d641a76196 ("fix BSR report malformed, add SHORT BSR when it
can") removed code to fill the remainder of a TB, if it is not filled
with data from RLC, with random data when using phy-test or do-ra modes.
This random data filling is intentional, as it might prove useful for
demos or when debugging (e.g., to see used spectrum instead of 0, etc.).
Reintroduce the functionality, but unlike the original code, make it
dependent on the mode, not RFsim.
See also discussion in #888.
Fixup: d641a76196
* size of fgs_nas_message_security_header_t is platform-depending
while protocol_discriminator must be 1 byte
* fgs_protocol_discriminator_t stays as enum type
Reduce race conditions through a itti queue, such that RRC-initiated MAC
memory modifications happen at the same time as MAC thread writes.
However, it doesn't resolve the problem of exact slot we should apply
the new cell configurtion.
This assert checks if the structure is correctly initialized. The structure
is one-time use so the assert is valid, but the value of the atomic was added
to the output to improve debugging.
Integration: `2024.w51`
Closes#879
See merge request oai/openairinterface5g!3180
* !3155 UL BLER vs SNR plot
* !3170 Replace AssertFatal with static_assert for cmdline arguments check
* !3172 A script to run CI tests locally.
* !3151 Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
* !3164 Fix and refactor channel average
* !3154 Fix TPMI for UL retransmissions
Fix TPMI for UL retransmissions
If the ul_ri of srs_feedback changes between a UL transmission and a
retransmission, we use the TPMI of transmission.
Closes#879
Assertion ((*nrOfLayers==1 && srs_feedback->tpmi <= 1) || (*nrOfLayers==2 && srs_feedback->tpmi == 0)) failed!
In compute_precoding_information() /home/user/openairinterface5g/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c:2896
TPMI 1 is invalid!
Fix and refactor channel average
- Fixing missing init average variable with zero and refactor the code #86b11ab7
Fixes just the missing avg1=0
- Refactor the code to a common SSE/AVX2 inline function using also horizontal add.
- We use int64_t result from now on.
- We decided to fix length to x12 instead of old x9 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
//compute average channel_level on each (TX,RX) antenna pair
void nr_pdcch_channel_level(int32_t rx_size,
c16_t dl_ch_estimates_ext[][rx_size],
NR_DL_FRAME_PARMS *frame_parms,
int32_t *avg,
int symbol,
int nb_rb)
{
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
//clear average level
simde__m128i avg128P = simde_mm_setzero_si128();
simde__m128i *dl_ch128 = (simde__m128i *)&dl_ch_estimates_ext[aarx][symbol * nb_rb * 12];
for (int rb = 0; rb < (nb_rb * 12) >> 2; rb++) { <-------------- here
avg128P = simde_mm_add_epi32(avg128P, simde_mm_madd_epi16(dl_ch128[rb], dl_ch128[rb]));
}
DevAssert(nb_rb);
avg[aarx] = 0;
for (int i = 0; i < 4; i++)
avg[aarx] += ((int32_t *)&avg128P)[i] / (nb_rb * 12); <-------------- and here
LOG_DDD("Channel level : %d\n",avg[aarx]);
}
}
Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
A script to run CI tests locally.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some
testcases that utilize hardware resources will not run. However most if not all
rfsimulator testcases should run as in CI.
To this end, the CI python scripting framework was updated:
- override and <srv_node> elements from XML so all commands are executed locally
in case --local flag is passed
- Allow RemoteCmd class to run on localhost
Replace AssertFatal with static_assert for cmdline arguments check
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.
This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some testcases that
utilize hardware resources will not run. However most if not all rfsimulator testcases
should run as in CI.
To this end, the CI python scripting framework was updated, adding --local flag which changes
the script behavior as follows:
- overrides <node> and <srv_node> XML elements to 'localhost' so all commands are executed locally
- Avoid running image pull, image cleanup and workspace creation steps of the scripts:
user is responsible for that
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.
This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
Alignment of temporary IDFT buffer was changed to 64 bytes. This is in preparation
for possible use of different IDFT implementation which could use AVX-512, requiring
64-byte alignment.
Integration: `2024.w50`
Closes#753
See merge request oai/openairinterface5g!3166
* !3159 CI: Add FHI7.2 test with Metanoia RU
* !3111 Enable USRP Tx thread in nrUE
* !3144 UE data race fix
* !3149 Fix several issues in ulsch_mmse_2layers
* !3158 GTP: use direct call instead of ITTI
* !3160 FHI-72: initialize mask, find correct libxran
* !3019 SIB19 utilization on UE
* !3162 Add Rocky 9.5 to list of distributions
* !3163 NGAP-Initial Context Setup Failure
* !2952 New LDPC coding library interface for decoding and encoding complete slots in one call to the library
* !3125 Add support for O1 in O-DU via telnet
* !3161 Cmd line option for sync in frames for iqrecorder
Cmd line option for sync in frames for iqrecorder
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
Add support for O1 in O-DU via telnet
This change set adds a simple telnet interface to nr-softmodem. Together
with oai/o1-adapter>, this implements a part of the O1 interface, for
the DU only. Currently supported uses cases:
- some stats are send to an SMO (such as bandwidth, PLMN, frequency, ...)
- re-configuration of bandwidth, frequency
- stop/start of the softmodem, while keeping the CU and L2 running
- the o1-adapter implements two alarms, load overload and base station
offline, using this interface.
It is possible to use the telnet interface by itself (i.e., "o1" without
the o1-adapter). To do this, compile with telnet support (./build_oai
--build-lib telnetsrv) and start the nr-softmodem with O1 module
(./nr-softmodem --telnetsrv --telnetsrv.shrmod o1). You can then do the
following:
- see some statistics as exposed to o1-adapter, in JSON: echo o1 stats | nc 127.0.0.1 9090 && echo
- stop the L1: echo o1 stop_modem | nc 127.0.0.1 9090 && echo
- reconfigure bandwidth: e.g., echo o1 bwconfig 20 | nc 127.0.0.1 9090 && echo (also supported: 40, 60, 100)
- start the L1: echo o1 start_modem | nc 127.0.0.1 9090 && echo
Note that the reconfiguration works with split-8 radios. Notably, it
does not work yet out-of-the-box with 7.2 radios, because they have to
be manually reconfigured on bandwith/frequency switch. The planned
M-plane should allow such use case, though.
To help with the above, this branch also includes fixes (for more
information, refer to the corresponding commits):
- fixes for stopping the L1, notably stop threads in right order, stop
thread pool of RU
- collect some general MAC metrics, fix some bugs in MAC
- fix problems in F1AP gNB-DU configuration update message, update test
- fix some problems in RRC
The consumer of this function just passes a pointer to something to be
sent. This function should not free this memory, it's simply not it's
task. This is the same bug as above in
"CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC"
This adds a basic telnet module to support the O1 interface at the DU,
to be used together with the oai/o1-adapter>. Concretely, this first
version supports to
- read/modify cell parameters
- stop/start the L1
Implements the re-start of the L1 after it has been stopped through
stop_L1(). It takes into account some changes, such as bandwidth, or
frequency, when restarting the L1. To this end, it also triggers a
gNB-DU configuration update message on each restart to inform the CU
about any changes in the DU. FDD has not been tested.
Refactor L1 stopping code into a function. The function is basically the
same as what we were doing at the end of main() of nr-softmodem.c.
This will be reused to support the "soft-restart" functionality in the
next commits.
Need to proper forward declaration, as we otherwise need to make
telnet_o1 module dependent on F1. Make functions publicly accessible,
as the F1 functions are used in an upcoming commit to start the L1.
Need to keep track of number of RUs, as the RU initialization increments
the number of RUs. Therefore, subsequent initializations would fail if
we don't decrement first. There is no better place (or I did not find
it) to decrement the number of RUs than in nr_phy_free_RU(). For this
reason, we also have to manually set the number of RUs in nr_prachsim to
1, otherwise the assert will trigger.
Split out these functions, to be reused in a follow-up commit to
correctly have gNB-DU configuration update message working.
Change the return type copy_f1ap_served_cell_info(), to return the copy,
which IMO is more intuitive then passing target and source in
parentheses.
For the "restart" feature, earlier versions where creating multiple UL
TDA. This is not a problem (anymore), but to avoid that we call this
multiple times, add this assert.
The existing code prevents double initialization if e.g., both gNB&UE
call these functions (like in a simulator). However, in the case of a
double-initialization such as stopping and re-starting the L1, the
memory will be freed, but not freed again. Basically, this works:
generate()
generate() # not initialized again
but this leads to problems:
generate()
free()
generate() # not initialized again, but should be!
Reimplement the check based on the data to be initialized, such that an
intermediate free() will be handled properly.
These are the "main" worker threads (apart the ru_thread). If the
thread-pool stops, they might get stuck. E.g., in PUSCH channel
estimation, it uses a local response queue, and if the thread pool is
terminated, it seems that the L1_rx_thread can get stuck in there.
To limit these problems, attempt to stop these threads first; stop the
queue from which they read and make them terminate; then, stop the
thread pool.
Also, fix the termination of respPuschSymb queue.
A later commit implements the "restart" of the L1. The L1 reads
configuration options. First, allow to re-read configurations by
increasing the amount of memory the config module might allocate. Then,
avoid an out-of-bound write by checking that we still have memory
available (and assert if not possible).
New LDPC coding library interface for decoding and encoding complete slots in one call to the library
Previous attempts to integrate LDPC decoding relying on offloading show
the limitation of the original code segment coding interface for the
library implementing LDPC coding. In order to perform the offload and
therefore the decoding in an optimal fashion, it is relevant to provide
the implementation with the broader amount of data possible per call,
which is a slot. A previous MR related to T2 offload managed to offer
an interface for decoding transport blocks by modifying only
nr_ulsch_decoding.c. But this may not be sufficient for performing an
efficient decoding in any situation. Slots could be shared between
multiple transport blocks in case multiple UEs are connected to the RAN,
which makes the transport block size shrink and therefore degrades the
efficiency of the offloading.
This MR offers a broader interface with a gNB decoding entry point in
phy_procedures_nr_gNB.c. The file nr_ulsch_decoding.c now lets the
decoding library implement deinterleaving, rate-unmatching and decoding
for the slot. In gNB encoding and UE decoding and encoding as well,
tasks are partitioned in a similar fashion.
As it allows to feed the implementation with the broadest amount of data
possible, it allows to fit any coding solution in a library. This will
avoid further modification to OAI source code and addition of options to
select an implementation when integrating new decoding solutions. An
implementation of this interface will therefore be offered for every
existing decoding solution in OAI and solutions added in the future will
be provided as independent module code without any modification to the
core of OAI code. The way to choose the decoding solution and to
configure it was also unified using configmodule. The library can be
chosen through the option --loader.ldpc.shlibversion. The slot coding
solutions shipped with this MR can be configured through configmodule
(e.g., T2 address and isolated cores).
This MR includes three coding implementations:
- A wrapper around segment decoding libraries for test purpose: libldpc.so
- A one shot slot coding and encoding with the T2 board: libldpc_t2.so
- A decoder on FPGA using the XDMA driver: libldpc_xdma.so
Improvements brought by this MR:
- Easy integration of a wider variety of LDPC coding solution at gNB and UE
- Easy selection of the LDPC coding solution (option --ldpc-offload-enable is kept for now but it can be ultimately removed)
- T2:
* More efficient when many UEs are connected
* Decoding and encoding in nr-uesoftmodem
NGAP-Initial Context Setup Failure
NGAP Failure message - Initial Context Setup Failure. When an Initial
Context Setup Request is received with the UE context as null, it
triggers Initial Context Setup failure
SIB19 utilization on UE
Following SIB19 initialization and scheduling on gNB (!2899 - merged)
and Receive SIB19 on nrUE (!2920 - merged), this merge request aims to
introduce the actual use of the SIB19 provided parameters by gNB in UE.
Changes needed for utilization include: initialization of position
coordinates parameters for UE (which are needed to calculate propagation
delay between UE and SAT), propagation delay calculations and timing
advance adjusts. Moreover, this change removes the now unused arguments
for ntn_koffset, ntn_ta_common and ntn_ta_commondrift
GTP: use direct call instead of ITTI
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
More complex implementations will be achieved using the new reworked interface
- t_nrLDPC_dec_params: remove F, Qm, rv and perCB
- encoder_implemparams_t: remove Qm, Tbslbrm, G, rv and perCB
- Remove all variables (like OPENAIR1), they serve no purpose and make
unnecessarily long lines
- Remove linking to T, it does not seem to be necessary
- Avoid intermediate variables to keep sources, and declare libraries
directly, making for shorter code
NGAP Failure message - Initial Context Setup Failure.
When an Initial Context Setup Request is received with the UE context as null, it triggers Initial Context Setup failure.
Fix several issues in ulsch_mmse_2layers
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.
Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.
Change type of sum_det to uint32_t to prevent possible overflow. Fix
the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting
negative integers.
Closes: #753
UE data race fix
When a new sync request is sent to PHY, we clear harq buffer and start
synchronization process. This could lead to unexpected behavior or segv
because DL actors might be using the buffer we just cleared. To avoid
this, the DL actors are shutdown and re initiated before clearing harq
info.
Some users copy libxran.so to a system directory (e.g., /usr/local/lib).
At the same time, we require xran_LOCATION to be set to find the build
directory. Use HINTS to prefer the location passed through
xran_LOCATION.
Also, use NO_DEFAULT_PATH to outright disallow global scope, to prevent
"accidentally" finding libxran.so in global scope (this is for
multi-user systems that are used in development, and where people have
different version of libxran for testing purposes). To still use
packages in e.g., /usr/local/, it would be possible to set xran_LOCATION
to this directory. (there is a problem that the version information will
likely not be read correctly, so this might not be enough)
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
Set the number of barriers to 512 and implement proper slot and frame
based selection. Now the dynamic barriers should not be overwritten in
case the rx-to-tx offset is high. The maximum offset supported is 512.
- Removed ntn_koffset, ntn_ta_common, ntn_ta_commondrift arguments in order to be used directly from SIB19
- Removed global NTN_UE_Koffset variable and it's use
- Introduced getter functions for ntn related parameters
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
- Added new structure to hold timing advance parameters
- Made SIB19 related calculation to save to this struct
- Modified in ra to get ta struct values
Move handling of sync request from MAC from UE_dl_preprocessing(). This
will process the sync request before receiving the samples of current
slot from radio so we don't 'lose' the slot.
Integration: `2024.w49`
See merge request oai/openairinterface5g!3148
* !3065 NAS Service Request enc/dec implementation
* !3129 Refactor UL MAC PDU decoding
* !3136 Use ninja -k option in CI
* !3137 T tracer: add macpdu traces for the NR UE
* !2392 Documentation: add multi-UE deployment with RFsimulator
* !3145 a lib has been added but missed dependancies
* !3050 doc: Add instructions for 5G NR gNB frequency configuration
* !3141 CI: Allow restart of the container if deployment fails
* !3138 Align YAML config getlist with libconfig implementation
* !3140 remove un-necessary global variables
* !3146 Updates to match more fapi-compliant tx_data.request
* !3025 New threadpool, fixed in NR UE
* CI: Remove USRP mgmt_addr from LTE-2x2 conf files
* !3147 Fronthaul xran library update to F release (2. and final step towards M-plane integration)
* !3142 Add CI test to trigger RLF with high pathloss in channelmod
Upon restoration to ploss, set to 20; when setting to 0, the UE is not
able to sync to the cell anymore.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Fronthaul xran library update to F release (2. and final step towards M-plane integration)
- xran library support -> both E and F releases
- RU delay profile removed -> not used in neither of the releases
- DU delay profile updated
- one-way delay measurements support is improved/fixed in the F release.
However, not implemented here as it depends on the RU capabilities
The "mgmt_addr" parameter is not required for USRP N310 initialization. The
critical parameter for successful operation is the "addr", which specifies
the IP address of the SFP port used for data transfer.
Including both "mgmt_addr" and "addr" can lead to initialization failures if
one of the specified addresses is unavailable. Since the "mgmt_addr" is
unnecessary for this context, it has been removed to avoid potential conflicts
and simplify the configuration.
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.
Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.
Change type of sum_det to uint32_t to prevent possible overflow.
Fix the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting negative
integers.
Updates to match more fapi-compliant tx_data.request
The packing of PDUs as required in aerial for the Tx_data.Request wasn't
complaint with FAPI. That was fixed in Aerial 24-2. This change makes L2
pack the payloads in the way that Aerial now requires.
remove un-necessary global variables
Remove global variables that can be removed by a trivial way:
- simply dead globals
- or reference is a single source, so can be static
setting them static reduces the scope, that is a progress, but of course as
for all static variables, the code is still not re-entrant
Major improvements:
1) bbu_offload - enable packet handling on BBU cores
2) dlCpProcBurst - DL CP processing on one or more symbols
3) SRS CP processing - depends on the RU capabilities that can be
retreived via M-plane (if RU is CAT B)
4) nSecDesc - the number of section descriptors per symbol; it was hardcoded to 0 in E release;
depends on the RU capabilities that can be retreived via M-plane
5) RunSlotPrbMapBySymbolEnable - enable PRB mapping by symbol with multisection;
depends on the RU capabilities that can be retreived via M-plane
6) DSS (Dynamic Spectrum Sharing) support - depends on the RU capabilities that can be retreived via M-plane
Minor fixes in F that exist in E:
1) prach_config->nPrachFilterIdx - explained in commit ID f3045396
2) T1a_min_cp_dl - explained in the commit under title "Clarification on DU delay profile"
3) fh_config->nULRBs - explained in commit under title "Further clarification on xran E release parameters"
Removed const for prb_conf argument in oran_allocate_cplane_buffers()
function, as F release requires the not const struct for
xran_init_PrbMap_by_symbol_from_cfg() and xran_init_PrbMap_from_cfg()
even though the struct is not modified inside of these functions.
- remove xran parameter io_cfg->port logging => this parameter
is filled within xran library in both E and F releases
- PRACH offset explanation; not limited to >= max(Ntx, Nrx);
workaround done in xran to support PRACH eAxC IDs same as PUSCH eAxC IDs
- DL PRB not used in xran; UL PRB used in xran F release, therefore
removed from the patch
- these fixes should have been done in the commit ID f3045396
Align YAML config getlist with libconfig implementation
This aligns the behavior of params_yaml with params_config library:
- when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0
- when a mapping is read using get it returns the number of parameters used
for input
CI: Allow restart of the container if deployment fails
In CI we sometimes encounter fail of the gNB/UE deployment (and fail of the test
scenario) caused by unsuccessful initialization of the USRP N310.
This MR enables to optionally restart the gNB or UE container, if the deployment
fails on the health check during start up. By default, restarts of the container
are not allowed, but we can enable them by setting num_attemps > 1 for a given
deployment in the XML file.
Logs from failed deployment attempts are collected.
This MR aims to avoid known CI failure caused by "USRP N310 Initialization Failure"
mentioned in #871.
Documentation: add multi-UE deployment with RFsimulator
Extended doc/NR_SA_Tutorial_OAI_nrUE.md with section about how to run multiple UEs
- multiple UEs with namespaces (provided new script)
- multiple UEs with Docker UEs
- updated rfsimulator and channel simulation tutorials
- updated README.md
This change makes it so the fapi_nr_p7_message_pack is used to pack TX_DATA.request for Aerial, reducing the amount of repeated code.
Add the capability to pack TLVs with TAG=2 (offset from first address)
Packs the TLV.length differently according to whether or not Aerial is in use ( for Aerial TLV.length is 16-bit, for OAI is 32-bit )
In CI we sometimes encouter fail of the gNB/UE deployment (and fail of
the pipeline) caused by unsuccsessful initialization of the USRP N310.
Restart the container if the health check fails during initialization.
Introduce a configurable parameter (from XML) to set max number of
attempts for the container deployment.
Store logs from failed deployment attempts.
Rework GetContainerHealth() to work with docker compose and services,
instead of using docker and containers. Return health and message about
deployment status (used for console and HTML logging) for a given service.
T tracer: add macpdu traces for the NR UE
MIB, SIB1, random access and regular scheduling are traced.
At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
Refactor UL MAC PDU decoding
Refactor the UL MAC PDU decoding: A single function is created to decode the
entire MAC subheader
uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *length).
It returns the length of the MAC subheader and outputs the LCID and Length.
This new function is called from 2 functions: lcid_crnti_lookahead() and
nr_process_mac_pdu().
After calling it in nr_process_mac_pdu(), the validation of the PDU can be
made for all the MAC subPDUs in a single place, allowing for less and more
clean code (as opposed with the previous version where the validation was
made multiple times inside the LCID switch-case).
Additionally, this MR updates the list of LCIDs as in 3GPP TS 38.321 v18.3.0
Table 6.2.1-2: Values of LCID for UL-SCH when the LX field is not present or
is set to 0.
- removed some whitespace noise.
- cleaned up CMakeLists.txt
- reintegrated task_manager.c into thread-pool.c
- cleaned up some unnecessary code
Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Mikel Irazabal <mikel.irazabal@openairinterface.com>
Integration: `2024.w48`
See merge request oai/openairinterface5g!3134
* !2951 Integrate Tracy with NR UE
* !2985 E1AP Bearer Context Setup encoding/decoding library and unit tests
* !3115 T2: minor fix for 4x4 processing
* !3117 F1AP lib: minor fixes
* !3126 NR MSG3 scheduling improvements
* !3128 NR UE RRC T304 in phy-test mode
* !3132 Run the last job of gNB pusch channel estimation inline
* !3133 NR UL HARQ handling improvements
* !3091 Update NR UE threading model
* !3030 Imscope updates
* !3131 FAPI P7 Refactoring and unitary test creation
* !3033 Increase the number of UE supported at gNB by having more than 1 PUCCH2 frequency occasion per slot
MIB, SIB1, random access and regular scheduling are traced.
At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
This aligns the behavior of params_yaml with params_config library so that
when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0.
FAPI P7 Refactoring and unitary test creation
This MR is a follow-up to the work done in !2714 this time separating
the P7 FAPI messages into its own library (nr_fapi_p7).
In the same way, utility functions to copy, free and compare have been
added for each message, as well as an addition function to get the
allocated size for a message, which is used for the messages that can be
too big to fit in a buffer that's allocated in the stack.
Unitary tests have been added for each of the messages, testing
pack/unpack and the utility functions added.
Some users of the OAI CI complain that since we build with -Werror, it
is difficult to see all warnings/errors and fix them, necessitating
multiple attempts at times to see all warnings. To allow them to see
more warnings, use ninja option -k10 to keep going after errors, and
show more errors at once.
There are command line options that one might pass to ninja/make, but
for which cmake does not provide an interface. For instance, make/ninja
support -k/-kN to "keep going" after errors. Cmake does not provide an
option, but it is still possible to pass this. Make a build_oai option
to allow this, used in the next commit.
Imscope updates
- Using imgui docking branch - allows window docking.
- Moved scopes to different windows to allow docking.
- Disabled scatterplot for time domain samples - issues with amount of
vertices caused segfaults.
- Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was
incorrect and currently I don't know how to fix it. This will be
reenabled once it is.
- added a simple menu and disabled demo windows by default.
Update NR UE threading model
This updates the NR UE threading model by preventing calling threadpool
from threadpool and fixes deadlock issues related to processSlotTX. By
making processSlotTX run to completion instead of starting and waiting
for other threads to finish it prevents locking thread pool cores,
therefore prevening deadlocks.
There is a slight difference here compared to the previous version where
I do not use the UL actor as I believe it is not necessary,
processSlotTX satisfies the run-to-completion requirement now. If in the
future any UL procedure would be parallelized using the thread pool it
should either be done in a run-to-completion model or the processSlotTX
function should be taken off the thread pool.
The documentation has been updated.
- Using imgui docking branch - allows window docking.
- Moved scopes to different windows to allow docking.
- Disabled scatterplot for time domain samples - issues with amount of vertices caused segfaults.
- Disabled IQ heatmaps for RX IQ samples on gNB and UE - this was incorrect and currently I don't know
how to fix it. This will be reenabled once it is.
- added a simple menu and disabled demo windows by default.
4G/5G FAPI code is located in the same file. Since 5G code calls 5G
specific functions, these functions need to be defined in 4G.
The solution would be to separate the FAPI changes into 4G and 5G.
Add nr_fapi_p7 library to NFAPI_USER_LIB for access to utility functions
Change message handlers to use the utility functions to copy and properly free the messages
Change the SRS handler to call the handler for the measurements instead of trying to copy to RC.gNB[0], which does not exist
Change nfapi_nr_p7_message_unpack to not allocate unneeded memory
Changed parameter in unpack function to be inline with other unpack functions.
Changed nfapi_p7_allocate call to calloc to avoid dependency to NFAPI_LIB.
Added unitary test for RACH.indication( test pack/unpack, free, copy and compare )
Added constant NFAPI_NR_RACH_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.
Removed now unneeded dependency to NFAPI_LIB and NFAPI_USER_LIB
Changed parameter in unpack_nr_srs_indication to void * to be inline with other unpack procedures.
Added memory allocation for pdu_list inside unpack function.
Add unitary test for SRS.indication( test pack/unpack, free, copy and compare )
Added rands16 to provide random int16_t values, needed for SRS.indication unitary test
Added constant NFAPI_NR_SRS_IND_MAX_PDU to follow constants related to other P7 messages limiting the maximum number of PDUs to use.
This adds the equality, free and copy functions for SRS.indication message as described in the Table 3–129 of SCF222.10.04, it does not add the functions for the report type structures, as these are always sent/received inside the uint32_t array.
The utility functions for these will be added at a later commit, and subsequently tested in the upcoming unitary test for SRS.indication.
Extra utility function to calculate allocated memory added.
Apply clang-format to pack/unpack procedures.
Add comments to improve readability of iqSize usage.
Fix unpacking return value to not return 0 on success.
Renames nfapi_nr_srs_reported_symbol_t prgs into *reported_symbol_list for two reasons:
So that the name is more representative of what the parameter represents.
For it to actually be a list, and not assume only 1 reported symbol is used.
Allocate reported_symbol_list in unpack_nr_srs_beamforming_report.
Updated all references to prior prgs to point to the first position of reported_symbol_list, still only effectively using the first reported_symbol.
Rename fill_srs_reported_symbol_list into fill_srs_reported_symbol and update input parameter name, since it only fills the information related to one reported symbol
Reordered PDU pack/unpack function to follow PDU value order
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for UCI.indication( test pack/unpack, free, copy and compare )
Fix PUCCH Format2/3/4 value to be indexed at 0, not 2.
This is according to Table 3-66 of SCF222.10.02
Add utility functions related to UCI.indication
Extra utility function to calculate allocated memory added.
Changed parameter of `unpack_nr_crc_indication` to void* to stay inline with other unpack procedures.
Changed nfapi_p7_allocate call to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for CRC.indication( test pack/unpack, free, copy and compare )
Now allocates memory for `uint8_t* cb_crc_status` before pulling in unpack procedure.
Add utility functions related to CRC.indication.
Extra utility function to calculate allocated memory added.
Changed parameter of unpack_nr_rx_data_indication to void* to be inline with other unpack procedures.
Changed nfapi_p7_allocate calls to calloc to avoid dependency from FAPI lib to nFAPI lib.
Add unitary test for RX_DATA.indication( test pack/unpack, free, copy and compare )
Changes pack/unpack procedure to expect pdu_length of 32 bits instead of 16.
This change was first added for compatibility with Aerial L1.
Add utility functions related to RX_DATA.indication
Extra utility function to calculate allocated memory added.
Allocate memory for TX_DATA.request TLV value pointer on tag == 1
In the past, this wasn't noticed because tag == 1 is not used
Add utility functions related to TX_DATA.request
Add extra function to calculate allocated memory
Create separate function to pack/unpack rx_beamforming PDU
Reorder PDU handling order to follow from 0 to 3
Changed PUSCH pdu_bitmap switch to separate if to handle multiple optional sub-pdus
Fix bit_len_harq size to 16 bit
Add utility functions related to UL_TTI.request
Add pack/unpack functionality for parameters
added in previous commit
Add utility functions related to DL_TTI.request,
creating 2 news files to contain these functions
Reorder switch to follow PDU Type order
This makes it so the functions are available to both FAPI and nFAPI libraries, and to more easily move them later to the FAPI library, while being available for nFAPI
Update NR P5 and P7 nFAPI headers to have 32-bit message_length
In the NR functions, this causes the header parameters following message_length to have their position shifted by 2 bytes, due to the increase in message_length size.
Change needed to accommodate SCF222.10.02 Table 3-3
Separates nfapi_p4_p5_message_header_t and nfapi_nr_p4_p5_message_header_t
Change the callbacks signature to accept/return void* intead of expecting a particular header type, being the NR/LTE distinction done inside the callback functions.
Create NR related functions for nFAPI transmit timestamp and checksum calculation.
Move nfapi_p7_codec_config_t and nfapi_p4_p5_codec_config_t to separate header to be shared between LTE and NR VNF/PNF
Move nfapi_nr_timing_info_t into NR header.
Move NR specific function declarations to NR header.
Fix Assert condition to properly check that body was packed successfully
Fix retval value when performing bitwise AND with push16
Remove commented code
Remove dummy_subframe variable, which is initialized once in
start_request() and then copied to memory on the heap. It is not needed.
In nr_start_request(), it should not be necessary, but we keep it for
the moment to not make more changes than necessary.
This avoids a segfault for me, but I am not exactly sure why.
The previous code fills random number in the TDD config, which leads to
unrealistic TDD patterns. Filling wtih a specific, realistic TDD config
allowed to fix the bug in the next commit.
Testing showed that some messages could be at least slightly bigger than
the previous maximum size of 8192. Given that the maximum transport
block could be larger, increase this value to 32768.
unpack_dl_tti_ssb_pdu_rel15_value() reads two additional bytes,
seemingly for RX power information. However, table 3-79 does not
contain such info, so I remove to match the corresponding pack function
pack_dl_tti_ssb_pdu_rel15_value().
TODO: tx power info relevant?
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.
For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
Run the last job of gNB pusch channel estimation inline
In case of 1 antenna this prevents the usage of threadpool which
eliminates the thread pool overhead. In case of >1 antenna the
threadpool contention should be reduced providing smaller benefits.
NR UE RRC T304 in phy-test mode
RRC timer T304 is stopped upon completion of the associated RA handover
procedure. There is no RA procedure in phy-test mode so T304 should not
be started to avoid unwanted expiration.
NR MSG3 scheduling improvements
- fix wrong condition on MSG3 allocation assertion message
- remove assertion altogether and handle properly the case where MSG3
can't be allocated
T2: minor fix for 4x4 processing
- correct max number of LDPC segments for T2 processing
- use pointer arithmetics in retrieve_ldpc_enc_op() in T2 lib to
optimize loop processing
Implement run-to-completion for processSlotTX. This is achieved by using a new
dynamic_barrier_t which allows to specify callback after the first join has been
made.
This commit introduces dynamic_barrier_t. Its a thread barrier that counts joins
but allows callback to be specified later. See std::barrier for a basic barrier
description.
In case of 1 antenna this prevents the usage of threadpool which eliminates
the thread pool overhead.
In case of >1 antenna the threadpool contention should be reduced providing
smaller benefits.
* tac is optional IE, and it was assumed as always present
* is now allocated in DU container by copy_f1ap_served_cell_info
when present in the updated cell info and missing in the
DU container
Integration: `2024.w47`
See merge request oai/openairinterface5g!3120
* !2972 Parallelize PUSCH channel estimation
* !3105 Fix a small bug with total_res in gNB PUSCH symbol processing
* !2996 Ue monitoring stats
* !3122 Avoid assert on non-implemented SM write callback
* !3110 Fronthaul 7.2 improvements (1. step towards M-plane integration)
* !2966 Refactor of includes in gNB/UE for improved header management
* !3123 Reduce double-usage of CI XML files
* !3029 NR UE RRC reconfiguration improvements
* !2670 chore(ci): adding Flexric-RAN integration test
* !3124 CI: use OC CN in aerial pipeline
chore(ci): adding Flexric-RAN integration test
- Triggering a standalone FLEXRIC + 5G-RAN pipeline: OAI-FLEXRIC-RAN-Integration-Test
- will be triggered by the RAN-Container-Parent
- but also by the OAI-FLEXRIC pipeline (to be done once integrated)
- Added an new python option: --FlexRicTag= than if not used, won't have any effect
- Nice addition:
- if --FlexRicTag=develop or --ranCommitID=develop --> will use the latest commit
on either dev or develop branch.
- Scenario-wise
- Using the cn5g deployment file from Luis in documentation, at least we will use
it to make sure it is working at all time
- We can add more test and especially checkers on the flexric calls
Linked to !3085 (merged)
Occasionally, the CN deployment takes longer than 60 seconds to complete
successfully. As a result, the CI reports failure, even when all other test
stages pass (e.g., gNB attaches to the CN, UE connects, and iperf tests succeed).
Replace current docker deployment of OAI CN by deployment on OC. With change
of the CN, we also need to change the routing for UE module - change the
mbim script for controling the UE.
Reduce double-usage of CI XML files
Some pipelines use the same XML files. For instance,
RAN-NSA-B200-Module-LTEBOX-Container and RAN-LTE-{TDD,FDD}-LTEBOX-Container
use both fr1_epc_{closure,start}.xml, but use the core network on different
hosts, by means of different pipeline configuration (EPCtype, etc).
A future MR will remove these additional pipeline configuration, and store
all the CN config in the repository. To simplify the transition, duplicate
some XMLs (i.e., remove duplicate usage of them).
After this MR, the only "double usage" of XML files for core (un-)deployment
should be through pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container.
Refactor of includes in gNB/UE for improved header management
This merge request implements changes suggested by the Include What You Use
(IWYU) open source tool to streamline the project’s header file usage.
The adjustments ensure that each file includes only the necessary headers for
the symbols it uses, making the code more efficient and maintainable.
Unnecessary includes have been removed, and missing headers have been added
where required. This improves modularity and reduces inter-dependencies between
files, helping to avoid future build issues caused by unused or missing includes.
Each output has been manually reviewed.
Followed a similar approach as in !2953 (merged).
Affected folders/files:
- NR_MAC_gNB/main.c
- nr-softmodem.c
- unitary simulators: nr_dlsim, nr_ulsim, prachsim
- openair2/RRC/NR
- openair3/NGAP
- openair2/LAYER2/nr_pdcp
- openair2/SDAP/nr_sdap
Fronthaul 7.2 improvements (1. step towards M-plane integration)
- added explanations for each parameter used for XRAN library
- added new config files for VVDN, Benetel 550 and Metanoia RUs
- changed config file for Benetel 650
- deleted 8x8 650-550, and added 8x8 650-650 config file
- updated FHI README
- setting one or more VFs; compatibility with Mellanox NIC as well
- fhi_72 section
Avoid assert on non-implemented SM write callback
The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead.
If we are pulling FlexRIC, overwrite the tag to use with what has been
provided on the command line. This is because we hardcode the tag schema
"branchname-commitId[0:8]" everywhere else, but this does not apply for
FlexRIC, and we have to overwrite this here.
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to read through common code in the next commits
- pass images to express which images will be deleted
- refactor function to use "with" for cls_cmd, and return success (or
not)
- reuse cls_containerize.Containerize.PullImage()
- pass parameter directly instead of indirectly via class
- always read node name and use this instead of "sometimes" looking it
up from a class member. With "sometimes" I mean that if no node name
is given, it will take it from self.eNBIPAddress, which is confusing
at best if we can give the node name directly
- consistently put the node name in the xml file
- pass parameter directly instead of indirectly via class
- call it simply "images", to harmonize with clean-function later
- harmonize to svr_id as in the previous commit
- rewrite function to use with-statement with cls_cmd
- optionally pass a tag to use (which will be used in a test, and can be
used to pull flexric)
- Introduce Pull_Image() which does the actual pulling, can pull from
any registry, and will be reused in the case of pulling from cluster.
* ideally the result of these macros shall be relevant
only in unit tests, in order to validate enc/dec NAS functions
* use a local print macro
* remove dependency from LOG module
* simplified the code
* cleanup TLVDecoder.c (kept it for LTE dependencies)
* FGMM enc/dec library files
* Plain message encoding + logic for security protected message
* added fill_fgstmsi function
* add checks on length in 5G-S-TMSI encoder function
* encoding of NAS Service Request and relevant mandatory IEs
Ue monitoring stats
- one commit to add UE mac stats similar to gNB one and remove a partial
implementation at phy level of some counters
- second commit only rename the two UE persisted HARQ tyepdef names for DL
and for UL (one was saying "UE" but not the direction and the second the
direction but not "UE")
The asserts might be used to intentionally stop the running process.
Further, it might be an annoyance if it happen unintentionally. Just
print an error message instead, and return to FlexRIC that nothing is to
be sent.
The CI pipeline RAN-NSA-B200-Module-LTEBOX-Container uses the same core
network (ltebox) as the pipelines RAN-LTE-{TDD,FDD}-LTEBOX-Container,
triggered through the same XML files. However, the core networks are on
different hosts, configured through (Jenkins) pipeline configuration. A
future MR will move the entire core network configuration into the XML
files [1]. To facilitate this, create separate XML files for the NSA
pipeline.
[1] The advantage is that it will be easier to reason with only the XML
files what is going to be run where and how.
Fix a small bug with total_res in gNB PUSCH symbol processing
Replaced total_res with res_per_task when deciding whether to start a threadpool
task or not. This does not have big impact on the software as the
nr_pusch_symbol_processing will recheck ul_valid_re_per_slot anyway but it may
reduce the number of thread pool tasks created.
- identification of each parameter in fh_init and fh_config structs
- identification of unused parameters in xran library
- identification of parameters used for CAT A O-RU
=> CAT B not supported in this release
- pass parameter directly instead of indirectly via class
- harmonize to svr_id to harmonize parameter with parameters in the next
commit (and towards a future harmonization of directly taking node
names instead of "IDs")
The queue for finished jobs of PUSCH channel estimation is only used inside
nr_pusch_channel_estimation(). Since initialization is fast, it can be
declared on the stack in the function where it is used.
This commit enables the optional use of Tracy for profiling NR UE & gNB.
See https://github.com/wolfpld/tracy/releases/tag/v0.11.1 for details.
How to compile:
use -DTRACY_ENABLE=ON to enable instrumentation and sampling
For gNB currently only sampling is implemented.
How to collect data:
- Windows hosts: tracy-profiler.exe in link above
- Linux hosts: Compile tracy-profiler from source
Enabling collection from docker:
- open port 8086
- to collect cpu data
--privileged
--mount "type=bind,source=/sys/kernel/debug,target=/sys/kernel/debug,readonly"
--user 0:0
--pid=host
How to add instrumentation:
- See examples in this commit or manual in the link above.
Fix error reported by the T2 card when running nr_dlsim with 4 DL layers.
Error can be reproduced by running:
./nr_dlsim -n100 -s30 -e25 -b273 -R273 -x4 -z4 -y4 -P --ldpc_offload.dpdk_dev 41:00.0 -c
So far we set NR_LDPC_MAX_NUM_CB to 72, which is sufficient for max 2 DL layers.
Set max possible number of LDPC segments based on the max number of layers
and max number of DLSCH segments (currently it is 144).
Integration: `2024.w46`
See merge request oai/openairinterface5g!3106
* !3095 UE: Set default SSB config
* !2991 fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...
* !3104 Trigger deregistration only in SA mode → small fixup?
* !3107 Clip the input for -32768 because this will make different result in...
* !3109 T tracer: support float types in traces
* !2777 NR UE trigger for re-establishment
* !3108 Prevent segfaults in gNB stack
* !3059 Test for init_RA
* CI: increase UE thread pool size
* !3036 Further improvements in analog beam management for CSI-RS
* !3093 Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5
Added NTN FDD FR1 bands defined in 3GPP TS 38.101-5
Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP
TS 38.101-5. Example Conf files added for band254 for 15Khz, 5Mhz and
30Khz, 10Mhz configurations. Tested NTN GEO configuration on band 254
using these conf files.
There seem to be randomly occurring deadlocks when running the UE in the
CI. MR !3091 should fix this. While waiting for this, apply a workaround
by increasing the number of worker pools in the UE to 12.
Since tag 2024.w45/commit f54ca5714e,
standalone mode/--sa is the default and does not exist. Correspondingly,
it has been removed from the documentation.
For users reading recent documentation, but running an older version of
OAI, there might be a mismatch in that --sa is necessary to run OAI, but
not given in the documentation. Provide explanatory text to make users
aware of this.
Test for init_RA
A testcase for init_RA function.
The testcase redefines the following functions as stubs:
- nr_mac_rrc_ra_ind
- nr_write_ce_ulsch_pdu
- mac_rlc_data_req
- lockGet_ul_config
- release_ul_config
- remove_ul_config_last_item
- nr_ue_configure_pucch
These stubs can be used to check init_RA behavior
NR UE trigger for re-establishment
The implementation in this MR triggers RRC re-establishment at the UE in case
of radio link failure either for out of sync messages from lower layers or in
case maximum number of RLC retransmissions is reached.
/opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf --sa --log_config.global_log_options level,nocolor,time --rfsimulator.options chanmod --telnetsrv --telnetsrv.listenaddr 192.168.71.150 --telnetsrv.shrmod ci
=================================================================
==7==ERROR: AddressSanitizer: odr-violation (0x7fce78b85be0):
[1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
[2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
[1]:
\#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
\#1 0x7fce7bd0c47d in call_init elf/dl-init.c:70
[2]:
\#0 0x7fce7b691658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
\#1 0x7fce7a5e2eba in call_init ../csu/libc-start.c:145
\#2 0x7fce7a5e2eba in __libc_start_main_impl ../csu/libc-start.c:379
==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14
==7==ABORTING
[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')
* trigger re-establshemnt on DU: reset RLC counters on DRB 1
for OAI UE, since SRB 1 does not work for lack of periodic
measurements reports
* how is the re-establishment triggered?
* a transmission on DRB 1 occurs
* detection of a mismatch of RLC counters at the UE side
* max number of RLC retransmissions reached
* RLF detection
* verify re-establishment on CU: we ping the core from the UE; this
sends packets on DRB, and because the sequence number mismatches, will
trigger a reestablishment. We accept in the ping that a couple of
packets might be lost; after ping is over, reestablishment must be
done as well (else the ping will already fail).
Clip the input for -32768 because this will make different result in...
Clip the input for -32768 because this will make different result in
mult_complex_vectors() compared to C version
Trigger deregistration only in SA mode
Upon press of ^C, the UE triggers a NAS deregistration. This does not work
in do-ra or phy-test modes, because there is no NAS. Therefore, in non-SA
modes, just stop the UE directly.
This can potentially improve the 5G RFsim CI test case, because together with
a high RFsim timeout, the chances of the last HARQ status line being without
retransmissions is much higher. If that does not help, we can further increase
the retx threshold.
fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)...
fix BSR report malformed, add SHORT BSR when it can (instead of LONG BSR)
simplify the code and make the code more explicit, but the may structure
remain (nr_write_ce_ulsch_pdu interface is complex, merging it into the
called would make simpler and more interstandable code), fix some asserts
related to this part of code
Added support for NTN FDD FR1 bands 254, 255, 256 as specified in 3GPP TS 38.101-5
Conf files added for 15Khz, 5Mhz and 30Khz, 10Mhz configurations added for these bands
In some runs of a multi-UE deployment, we see segfaults because
cell_group->spCellConfig is NULL. We should not segfault in that case,
so check for spCellConfig.
When the UE list is full, the iterator will run through all
MAX_MOBILES_PER_GNB UEs. It expects that eventually the pointer is NULL,
which is not the case if we have MAX_MOBILES_PER_GNB (or it simply
depends on the following memory). So give one array entry more, to
ensure that the last one is NULL.
- add new data structures for antenna processing.
- create arrays that keep track of certain values (max_ch, noise_amp2, nest_count and delay) per each antenna. These values are processed in order to determine one final output.
- add time processing measurements for each antenna, and prints them in nr_ulsim.
- make num_antennas_per_thread configurable in nr_ulsim and the gNB config file.
Co-authored-by: Nada Bouknana <bouknana@eurecom.fr>
Co-authored-by: Brice Robert <brobert@valiha.com>
UE: Set default SSB config
After initial sync the UE sets the ssb index bitmap in nrUE_config with
index obtained in initial sync. This allows UE to continue decoding PBCH
and stay synched with the gNB till SIB1 is received.
Replaced total_res with res_per_task when deciding whether to start a threadpool task or not.
This does not have big impact on the software as the nr_pusch_symbol_processing will recheck
ul_valid_re_per_slot anyway but it may reduce the number of thread pool tasks created.
Upon press of ^C, the UE triggers a NAS deregistration. This does not
work in do-ra or phy-test modes, because there is no NAS. Therefore, in
non-SA modes, just stop the UE directly.
If the RLC cannot retransmit a package, 3GPP specs say that we should
declare radio link failure (RLF). Up to this commit, the code did
nothing though. In this commit, add a per-UE RLF callback; the RLC will
call into this function to signal that RLF has been detected through
maximum retransmissions on a particular RLC bearer.
Integration: `2024.w45`
See merge request oai/openairinterface5g!3097
* !3048 Cleanup and refactoring at gNB initialization
* !3077 Address most thread safety issues in NR UE
* !3089 Improve cross-compile documentation
* !3092 Remove Interop-F1/Accelleran-CU testing pipeline
* !3096 Remove x86-specific instructions from telnet server
* !2949 Better polar decode
* !3070 CI: Add test with 4 DL layers, 60 MHz BW to SA-2x2 pipeline
* !3098 nr rlc: hotfix: test allocation valid before use
* !3090 Add UL PRBs Blacklist section to NR_SA_Tutorial_COTS_UE.md
* !3082 fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
* !3100 CI: Remove 5g_l2sim files
* !3024 Set SA mode as default
* !3087 Remove some usage of the old CI sshConnection class
* !3074 CI: cleanup of cls_physim.py
Extract nr_ra_procedures.c into a separate library and add a testcase for init_RA function.
The testcase redefines the following functions as stubs:
- nr_mac_rrc_ra_ind
- nr_write_ce_ulsch_pdu
- mac_rlc_data_req
- *lockGet_ul_config
- release_ul_config
- remove_ul_config_last_item
- nr_ue_configure_pucch
These stubs can be used to check init_RA behavior
CI: Cleanup of cls_physim.py
- Remove unused code and file
- Rework functions for CUDA and T2 log analysis
- Check if test was successful for nr_ulsim and nr_dlsim in
RAN-gNB-N300-Timing-Phytest-LDPC pipeline
Set SA mode as default
- Set standalone (SA) mode as the default.
- Adjust commands in Docker Compose files by removing --sa flags and
adding --nsa flags where applicable.
- Add a function to verify that only one mode is being used at a time.
- Update all relevant documentation.
In the last commits, SSHconnection class has been removed from
cls_containerize.py. We therefore don't need the username and password,
as cls_cmd uses certificates only. Remove the usage of the username and
the password, and harmonize the use of GetCredentials().
Recent refactoring replaced the CreateWorkspace function call with a
dedicated XML step (for clarity, and because it avoids needless
recreation of workspaces). In the proxy function, the same
CreateWorkspace xml step has been added, cloning the OAI RAN repo, when
we actually need the repository for the proxy. Hence, fix this by
calling the CreateWorkspace() function manually, but only when
necessary, to build the proxy. (It would only be a problem if the
pipeline would rebuild the proxy, which did not happen because not much
work is happening on the proxy repo).
Further, refactoring and simplication of the proxy build function were
done:
- never tag proxy with develop, that makes no sense
- overwrite CreateWorkspace() info after having created and used the
workspace (the "if" to build the proxy)
- simplify copying of logs
- add simple unit test
- remove check for ubuntu; the dependcy is "docker". Simplify the code
to not obscure with a class variable.
The first thing Build_Proxy does is to remove the repository. Further,
Build_Proxy does not use the OAI RAN repo, but the proxy repo. The
Create_Workspace() is therefore completely useless.
Remove CheckAndAddRoute(), as it is complicated to read, uses a
multitude of hostname/IP/password combinations. Replace with scripts on
the machines, which, as of this commit, are:
- porcepix: ~/after-reboot.sh
- ofqot: ~/after-reboot.sh
- nepes: ~/after-reboot.sh
- obelix: ~/how-to-resetup-obelix-out-of-reboot.sh
It is clearer in CI logs to use absolute paths, and that is also a
"preference" of the new SSH class (cls_cmd.py) in the sense that some
functions don't handle "cd" gracefully (because of underlying Python
library paramiko).
For zip, though, we should change to have nice relative paths in the
archives, so use cd <path> && zip ... to achieve that, instead of
changing to a directory. This way, the path on which we operate is still
visible in the logs in each line.
The clang build fails with
/oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
16 | complex<double> t[len];
| ^~~
/oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: note: function parameter 'len' with unknown value cannot be used in a constant expression
So ignore this warning (and make the build pass), since OAI uses VLAs in
various places.
The previous version would put the user-defined options first. However,
the default options include e.g., -Wall. If a user tries to override
(see for instance the next commit) -Wall or other options might override
this and not honor the user choice.
To always have the user have the last work, put user-defined compile
options last.
THere are four possibilities, for the three options (phy_test, do_ra,
nsa):
- None is set -> SA
- Only one is set of each -> corresponding mode
Introduce a function softmodem_verify_mode() to check for these.
- Introduce "Run_Physim" function for running ldpctest (with CUDA) and
nr_dlsim/nr_ulsim (with T2) in RAN-gNB-N300-Timing-Phytest-LDPC test
pipeline.
- Create "cls_analysis.py" and introduce "analyze_physim" for
log analysis of physim tests.
- Define patterns to be searched in the physim logs.
- Extract and print information about total gNB RX/TX PHY processing time
from nr_ulsim/nr_dlsim logs.
- Remove "cls_physim.py" as it is not used anymore, cleanup "main.py".
fix blocking bugs in command nr_dlsim -n100 -e27 -s35 -b 273 -R273 -x4 -y4 -z4
errors in main OAI code:
- one stack overflow
- one variable array of size 0
- one direct usage of unaligned SIMD
and small fixes inside the tests tool nr_dlsim to handle this large configuration (4layers, 100MHz)
use a better complex vector multiplication function
Since commit 041b2b2d7a, the CI main loop
iterates over all steps, even if there has been a problem during an
earlier XML step. In all cases, UndeployObject() is marked to always
run, as we always need to make sure that all deployed services are
terminated. UndeployObject() always recovers logs. Hence, it's not
necessary to do it here as well; it leads to duplicated logs.
This is visible in all pipeline with a failed deployment: the logs
appear twice.
create_workspace.sh used to check out develop by default. However, this
is unnecessary because the script later checks out a specific reference
(which can be a commit ID, which is not accepted by git clone, the
reason we don't check out during clone); the repository will simply be
empty in the beginning, which should not be a problem.
Further, it is problematic because we use this script for the build of
the L2sim proxy, and the repository does not have develop; thus, without
this modification, L2sim proxy build will always fail.
- simplify the code
- prevent to use "beta" tables from one decoder run to the next one (to see it
is the case, don't initialize beta, you will see it doesn't decode)
- decrease memory footprint of the decoder by x10 or more
- save about 15% of cpu in polartest unitary test tool, and more if we run in
realistic use case
- still this decoder performs much worse than the (very) slow OAI version by 3dB
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.
The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.
Also, add it to the cross-compilation pipeline
csiim_vars/csirs_vars used to be global array for each UE. Now its present
in phy_data which is in dynamically allocated memory.
MAC config was done without mutex while DL and UL threads could be running
at the same time.
get_ue_nas_info was allocating memory possibly from more than one thread.
Moved it into new init function for UE NAS layer.
Addreses most issues in #869
The goal of this MR is to improve readability, maintainability and consistency
of gNB initialization functions.
This MR is:
- cleaning up redundant and unused code
- refactoring init_gNB, l1_north_init_gNB, RCconfig_NR_L1, NRRCConfig
- removing redundant memory allocation for gNB RAN context and L1 instances
- cleaning up redundant log lines
telnetsrv uses the Intel/AMD-specific "cpuid" instruction, which is not
available on ARM machines. Remove the call.
The previous code was checking for the number of cores, which is
retained by a call to get_nprocs(). I did not find an equivalent for the
number of threads in C. In C++, there would be
https://en.cppreference.com/w/cpp/thread/thread/hardware_concurrency, in
case it's relevant for anybody.
the version in develop is difficult to understand, and surprizing design
it loops only when avx2mod == 0 because when this test is false, the
size is always small i also spent time to understand, but i think i have
not changed it by not looping over the array.
Use non-recursive polar decoder after traversing the tree once. Maximum number
of nodes is set to 600 (unsure of the maximum). This is more performant
than the recursive version.
- Ensure packed struct through bitfield
- decoder tree buffer increase: i don't find evidence in the 3GPP
standard of the max size of polar coded PDU. even with this max size,
the way this tree is built is not trivial. so, it is hard to predict,
i just put 8 system pages (32KB) that looks enough [1]
- a lot of reformatting
[1] https://arxiv.org/pdf/1804.04389
according to this paper, the largest polar code in 5G is in UL, so
likely the biggest problem will be in gNB, not the UE. in DL, the max
output coded block is 512, in UL 1024. probably the tree we discuss is
related to this size.
"frozen bits" means only bits we don't encode/decode because polar code
size is only by power of 2.
We see this in OAI code: NR_POLAR_PUCCH_N_MAX is 10, so 2^10 is 1024,
that is the maximum size for 5G polar code length. in the code, we
assert if N > 512: "N = %d, not done yet\n",
polarParams->N". so, the today OAI code can't do PUCCH large blocks.
using current oai limitation of 2⁹ max code size, we can create up to
2^9+2⁸... nodes, so 1023 nodes in the tree. the problem then is that
each node have variable size, depending on the 'level' (the power of 2
we are currently). the algo provision large alpha and beta to be able
to store all lower levels in the tree (int leaf_sz = 1 << level)
therefore upper tree nodes are large (the top level for n=9 uses about
1.5KB) and the bottom nodes uses 64 bytes. if all nodes are populated,
the size will be very large: 1.5KB + 2 * 800 + .... but, we create
nodes in the tree only for the "information bits", so the payload, that
is limited to 128 bits (else we assert, the code is not "finished").
1.5KB * 128 is >> 8KB i allocated. but, we can't create more than one
mode at top level, so there is maximum 1.5KB + 2 * 800, + 4 * 400 + 8 *
200 + 16 * 100 + remaining of 128-32 nodes of 64 bytes. about 14KB.
i allocated 1024*sizeof(__m256i) bytes = 32KB that looks good.
* the goal of this function is to initialize and configure the RAN Context
* the goal of get_options is to get command line options
* this commit aims at making the implementation more consistent
* move initialization of RC.nb_nr_CC to this function
* cleanup redundant initializations of RC.nb_nr_macrlc_inst outside NRRCConfig
* cleanup redundant initization of RC.nb_nr_macrlc_inst from getter function (get_node_type)
* cleanup RC initialization in RCconfig_NR_L1
* removed redundant log lines (print number of instances in NRRCConfig only)
* do RC init after getting CL options and configuration
* get_node_type shall access configuration only, not RC context
* NRRCConfig shall be called only once: made it thread-safe
* nb_nr_inst represents the number of gNB instances and the number of RAN contexts
* it used also to count the number of RRC instances in the node
* it is set from config file in NRRCConfig, therefore redundant checks after
this function have been removed
* redundant global variable NB_gNB_INST, set after nb_nr_inst, was removed
* gNB and L1 init is done in init_gNB and RCconfig_NR_L1
* moved RCconfig_nr_prs out of create_gNB_tasks for consistency
* do RCconfig_nr_prs only for L1 instances
* removed initialization of gNB
* separate function to get blacklisted UL PRBs
* call the getter in both L1 and MAC/RLC configuration
* other minor improvements
Integration: `2024.w44`
See merge request oai/openairinterface5g!3081
* !2988 Add functional DFT test
* !3072 snow3g: fix array size
* !3073 small fix for 3 digit mnc usage in sib1
* !3040 Update pbchsim to work with other numerologies
* !3078 Simplify logs in gNB&UE
* !3080 Add Fedora 41, build_oai cleanup
* !3061 RLC optimization
* !3008 Fix regression 4g
* !3084 Fix a typo in nrue.uicc.yaml file
* !3085 chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
chore(ci): creating a develop tag on top of develop-commit-id tag for the local private registry
Create a 2nd tag of develop for all images on the local registry. We
are doing this in order to simplify cross-repository testing between
FlexRIC and RAN.
Fix two issues with softmodem yaml files
- Fix a typo that prevents casting max_chan to integer in nrue.uicc.yaml
- Remove unused field ssb_PositionsInBurst_PR from gNB example config
yaml file
Fix Regression 4G
- Fix various bugs and/or regressions in 4G code
- Also, the CI does not test RFsim 4G with --sanitize, enables this to
detect problems.
Add Fedora 41, build_oai cleanup
- Add Fedora 41 to list of supported distributions
- Remove some dependencies in RHEL that are not necessary
- Cleanup some build_oai documentation of non-supported options
Simplify logs in gNB&UE
- reduce the amount of printf() that outputs useless info
- in MAC, PHY, NGAP, RRC, mark some "important" UE events with LOG_A for
better visibility -> can put log_config.global_log_level analysis to
only see important stuff
- in RRC, use some macro to consistently print logs
- track the cellID of a UE in RRC
small fix for 3 digit mnc usage in sib1
When 3 digit MNC is used in PLMN, during preparation of SIB1, first
digit of MNC was not taking into account. UE derives Serving Network
Name (SNN) using PLMN info from sib1. Because of 5GCore and UE has
different SNNs, this leads to XRES*, RES* mismatch during Authentication
Procedure between 5GCore and UE. (SNN is used for derivation of these
keys)
Add functional DFT test
- clean up code on (i)dft calls
- add DFT test for some DFT sizes against trivial implementation: it
tests a simple square signal in only real values
- correctly scale DFT-16
Moved some functions around so that instead of a function pointer a function
call is used. This enables inlining of functions which reduces number of function calls.
During preparation of SIB1, first digit of MNC was not taking into account.
This leads to XRES*, RES* mismatch during Authentication Procedure between 5GCore and UE because of derived serving network names.
This commit removes many logs that just show memory addresses, indices,
etc., which, I presume, do not mean anything to the "average user" and
developers alike.
Integration: `2024.w43`
Closes#769 and #841
See merge request oai/openairinterface5g!3069
* !2994 Refactor file descriptor handling in rfsimulator
* !3010 Fix heap overflow in websrv
* !3043 CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases
* !3060 process registration reject in UE
* !3062 fix nr rlc tests
* !3067 Bugfix: Fill QFI for N3 GTP messages
* !3057 Bugfix in ue pusch mac pdu creation
* !3068 getopt() returns int
* !3056 F1AP Enc/Dec Library follow-up
* !3064 T: don't check argument in optimized version of T IDs
* !2786 Add F1 Handover procedures
* !2980 Refactor NAS 5GS PDU Session Establishment Accept handling and other NAS improvements
* !3063 Update yaml-cpp dependency handling
* !2989 NR gNB scheduler improvements for BWP operation
This MR removes limitations on BWP scheduler operation for which only
the information from the first UE of the list was taken into account. To
do so, I moved the VRB map check for DL and UL scheduler out of the
preprocessor and in the scheduler itself.
Closes: #769
Update yaml-cpp dependency handling
- Added CPM fallback in case package is not found automatically.
- Using yaml-cpp::yaml-cpp target instead of yaml-cpp to silence
deprecation warnings on newer cmake versions.
By omitting the variable CPM_SOURCE_CACHE as CACHE'd, it is actually
given to CPM, but does not appear when viewing it's content, e.g.,
through ccmake. Mark is as CACHE so that it will also appear.
- Added CPM fallback in case package is not found automatically.
- Using yaml-cpp::yaml-cpp target instead of yaml-cpp to silence deprecation
warnings on newer cmake versions.
Add F1 Handover procedures
- Clean up at RRC and MAC
- Add DU handover procedures, completely handle CellGroupConfig at DU
- Add CU handover procedures
- Maintain reestablishment working between/after handover
- Changes at UE to resync on different frequency DUs
Instructions: see doc/handover-tutorial.md
Things not implemented/open/missing: see #855
When receiving a measurement report including an A3 event, trigger
handover towards the indicated cell.
Note that currently, we are still limited to one Cell by DU, hence
looking up a cell comes down to looking up a DU, as is done here.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
This commit implements reestablishment during handover when occurring at
the source DU, either as a handover Failure or "normal" reestablishment
(something else went wrong). In this case, the CU will trigger HO
cancel, which in F1, means to cancel on the target DU. Also, undo any
previous ID changes. Retain the old CellGroupConfig (before handover)
for the case of reestablishment at source. If not needed, it is freed
after the reconfiguration complete.
Reestablishment on target cell during handover cannot be handled by the
gNB (yet). It is the same as with a normal reestablishment (not during
handover) on a different cell: that cell has no notion of the old UE, so
we cannot simply indicate the old UE to reestablish; at least, we would
need to cleanup the CellGroupConfig, and I am not sure this works out of
the box, either.
After handover, the last CellGroupConfig received is the one for
handover, containing a reconfigurationWithSync. Resending this
CellGroupConfig to the UE after reestablishment would trigger a
handover. Free the reconfigurationWithSync to have the UE complete
reestablishment at the current cell.
The CU implementation of reestablishment modifies the CellGroupConfig.
It should not do this, but does as of now. The specification (38.473 Sec
8.7) foresees an optional F1 UE context modification procedure (which
can be used to receive the CellGroupConfig). This should be done instead
to retrieve the correct CellGroupConfig.
Note that the F1 UE context setup procedure, similar to the UE context
modification procedure, would also allow to perform reestablishment on a
DU that is not the original one.
If we release a request from a DU during, handle as follows:
- from the source: Handover is still ongoing, so ignore it by
acknowledging the release, and marking handover as done. In this case,
we did not receive an acknowledgement from the target, but since the
source DU does not keep the UE context, we could not cancel the
handover anymore either. The UE might come back on any DU through
reestablishment (or simply be connected on the target)
- from the target: consider this to be a genuine release, and forward to
AMF.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
The HO is completed (from a pure RAN perspective) when receiving
reconfiguration complete. In that case, remove the HO context, and
signal successful handover through the callback. For the F1 handover,
this means releasing the UE at the source DU.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
We expect the UE's RRC Reconfiguration Complete to come through the
target DU, as the "new UE" at the target CU. Also, function
CU_handle_UL_RRC_MESSAGE_TRANSFER() checks that the UL RRC Message,
through which we will receive RRC Reconfiguration Complete, matches the
DU UE ID stored in RRC. Since the DU UE ID will be the one at the target
DU, while up to now, we stored the DU UE ID at the source DU.
Correspondingly, update the DU UE ID to the one at the target DU; also
update the corresponding assoc_id.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
In this commit, handle the reception of a UE context setup response, in
the case of handover. In that case, store the gNB-DU UE ID and C-RNTI of
the UE at the target DU, and trigger a reconfiguration towards the UE at
the source DU via the callback.
To ensure that the CU-UP's PDCP is SN-aligned with the UE, use
cuup_notify_reestablishment() to reset the bearers with PDCP
reestablishment, which has already been implemented in the last commit.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
This is preparatory work to handle the UE context setup response from
the target DU. There are two cases:
- "Initial" UE context setup response (during connection setup): we need
to inform the CU-UP via an E1 message of the new bearers (GTP tunnel
update)
- F1 handover: we need to inform the CU-UP via an E1 message that there
are DRBs to reestablish
There are two different functions, e1_send_bearer_updates() and
cuup_notify_reestablishment(), to do this. Harmonize the code, before
implementing the actual handover logic in the next commit.
Add a function to trigger an F1 handover, including the corresponding
telnet function implementation. The function looks up source&target DU,
creates a HO context, and reads PDU information to send a UE context
setup request to the target DU towards which to handover.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
Functions get_qos_char_from_qos_flow_param() and
get_qos_characteristics() will be used in rrc_gNB_mobility.c to read PDU
information for handover. Move the definitions to a header to reuse
later.
HandoverPreparationInformation will be used in the follow-up commit to
trigger a handover.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
This F1 message sends us the CellGroupConfig of the UE. Store it in case
we need it. For instance, at least in OAI, it is possible to make a
handover without a DRB (this might or might not be standard compliant).
However, in this case, we did never receive a UE context setup request,
which stores the CellGroupConfig. Hence, store the first CellGroupConfig
we receive, to be able to do e.g., handover.
RETURN_IF_INVALID_ASSOC_ID() checks if an assoc_id (of a DU) is valid.
It will be also used in the mobility RRC module later. Move it to the DU
header (where it logically belongs) to move it from there.
Prior to this commit, after RA failure, the DU would send a UE context
release complete, without actually requesting one. This could lead to
inconsistent state between DU and CU, because the CU might just discard
this (unrequested) message, and not actually trigger a release [1].
Thus, refactor the release request into a function, and use it to
request release of a UE for which RA has not been completed. If the CU
does not know the UE, release the UE immediately.
[1] One possibility would be that during reestablishment, the CU would
request to look up an old DU UE ID when it has been released, resulting
in
Assertion (oldUE) failed!
In dl_rrc_message_transfer() /home/oaicicd/robert/openairinterface5g/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c:860
CU claims we should know UE bc7f, but we don't
In handover, we might need to remove a UE that we knew under it's
C-RNTI, for which we also have the RA process. Hence, when removing a UE
by RNTI, remove it also from RA.
* DL NAS Transport messages can piggy-back 5GSM messages
* the relevant decoding functions can be called in the handler (e.g. capture_pdu_session_establishment_accept_msg)
* the capture_pdu_session_establishment_accept_msg function is already handling
the code in the case FGS_PDU_SESSION_ESTABLISHMENT_ACC of NAS_DOWNLINK_DATA_IND
Closes: #841
Bugfix in ue pusch mac pdu creation
When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough to equally serve
all lcids. This commit checks for this condition. Before this fix the ue
would send malformed mac pdus when serving multiple lcids.
See getopt(3): returns int, so store it in an int variable.
I went through all occurrences, project-wide. All return values of
getopt() should be stored in ints now.
process registration reject in UE
when the 5GC rejects the ue, the message was not processed (information
element not declared)
this MR process it to print it and stop the UE
a more complete code should be done when the UE will be able to select
another cells than the most powerful PBCH, but it require larger
enhancement
CI: Update RAN-gNB-N300-Timing-Phytest-LDPC test cases
- update enc/decoder tests in RAN-gNB-N300-Timing-Phytest-LDPC - test
only for given SNR value (check of the test results to be added in the
following MR)
- add cores to Tpool in the nr_dlsim test cases, currently we test with
only one core
- always execute all the nr_ulsim/nr_dlsim tests, even if one of them
fails
- add new nr_dlsim test cases - test with 4 antennas, 2 layers
Refactor file descriptor handling in rfsimulator
- add hashtable iterator to hashtable.c
- use hashtable for file descriptor to buffer_t mapping in rfsimulator
This enables the use of file descriptors above 250. The linux file
descriptors can reach the value of FD_SETSIZE which could be e.g. 1024.
This is not an issue in most cases but if the UE or gNB process opens a
lot of file descriptors for other purposes we might see rfsimulator file
descriptors reach > 250 and cause a segfault.
Also added tests for new hashtable functions.
Instead of hardcoding to 0, instruct the GTP module to send N3 GTP
packets with the right GTP.
We currently only support one QoS Flow, so check that it is really only
one.
When more than one sdu with equal priority is present, there could be
buffer left after serving the lcids and also not enough for equaly
serving all lcids. This commit checks for this condition. Before this
fix the ue would send malformed mac pdus when serving multiple lcids.
After RA, in the case of HO, we need to make sure to use the right radio
configuration (MCS table, etc). This commit is important to make HO
actually work.
Our initial CellGroupConfig always contains LCID1, because in normal
connection setup, the DU has to automatically set it up anyway. In
handover/UE Context Setup, the CU requests to set up SRB1 (which we
assume to be LCID1), but we reuse the initial CellGroupConfig. To not
have SRB1 added twice, skip in this case.
This commit implements adding a new UE on the target DU in case of
handover. We identify this case by the fact that the gNB-CU did not send
a gNB-DU UE ID (which is optional in F1AP, but not in our
implementation), such that we know there is no corresponding UE, which
therefore has to be created.
If it happens that there is a handover preparation information, we read
the UE capabilities from this information, and subsequently trigger the
creation of a new UE.
Another change is that for all bearers that we are asked to setup, we
add reestablishRLC so that the UE does a reestablishment during the
reconfiguration.
As we have to remove the reconfigurationWithSync and reestablishRLC IE
after application of the CellGroupConfig (because we might reuse the
CellGroupConfig later), free these IEs. As there are now multiple fields
to free, introduce a separate nr_mac_clean_cellgroup() function that
handles cleaning of the CellGroupConfig.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
The next commit will modify the UE context setup request procedure to
(possibly) receive UE capabilities through Handover Preparation
Information, which extracts the UE capabilities for the UE to be setup.
To avoid code duplication, extract the code that will be needed in UE
capability extraction from Handover Preparation Information.
Implement the Transmission Action Indicator F1AP forwarding logic, and
add it to the F1 internal representation structure. After the
transmission interrupt timer (during which SRB1 can send messages), the
UE will be out-of-sync (we assume it's not there anymore).
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
Implement the HandoverPreparationInformation F1AP forwarding logic, and
add it to the F1 internal representation structure.
No logic is implemented in this commit.
Co-authored-by: batuhanduyuler <batuhan.duyuler@firecell.io>
Co-authored-by: rmagueta <rmagueta@allbesmart.pt>
Refactor the RRC processing timer to be a generic "transmission
interrupt" timer, and use NR_timer_t for it. Also,
depending on the kind of RRC processing (see 38.331 table 12.1-1),
timing requirements might be different. However, the DU does not always
know which RRC processing is ongoing, and does not get this information
via F1. Hence, introduce a "worst case" delay time, which aligns with
the spec (it says these times are "minima") and is accepted by COTS UE.
The gNB MAC might need to stop transmission either for some time (RRC
processing), or continuously (transmission stop requested by CU). Those
can be handled in one common timer implementation. The continuous case
will be used in a follow-up commit.
Co-authored-by: Luis Pereira <lpereira@allbesmart.pt>
CI: remove unused code, clean up imports
* Remove pyshark, matplotlib imports, as they are not used
* Remove stats_monitor.py, as the CI does not use it
* Clean up many warnings shown by pyflakes regarding includes that we don't use
Adapt as code above offending line to not overflow array. Avoids UBSan
error
openair1/SCHED_UE/phy_procedures_lte_ue.c:2983:36: runtime error: index 8 out of bounds for type 'int [8][1]'
The IES_DECODE_U16 macro loads a 16 bit integer from an arbitrary
address; this can lead to reads from misaligned addresses, and undefined
behavior sanitizer warns, like, e.g., so:
openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c:62:5: runtime error: load of misaligned address 0x7f3c24032c01 for type 'uint16_t', which requires 2 byte alignment
To fix this, first use memcpy() to load to a 16-bit aligned address,
then do the actual decoding.
- rename as_nas_info_t member data to nas_data to have a uniq name to
trace between complex malloc/free of this pointer
- fix, maybe not perfect, these pais od malloc/free
- remove typedef name changes across transmission of these as_nas_info_t
over itti, as name changing makes it even more confusing
- remove globals that are likely possible races
- in as_message_decode() fix memcpy size, it is hard to understand the
initial idea, likely the author beleives a struct of struct makes a
intermediate pointer
- in network_api.c remove globals (static but used globally)
- remove casts that are there to hide gcc warnings on probable unaligned
access
- remain a weird mix of packed/unpacked versions of the same typedef,
but gcc is happy
pyflakes warns about various errors, addressed here. For cls_cluster.py,
remove (unknown) sys.exit and replace through Exception, as sys.exit()
has the unwanted effect that the CI script would stop. Instead, raise
an Exception that would show the problem in the HTML, and ensures that
the script runs until the end.
These are the warnings flagged by pyflakes.
cls_cluster.py:297:4: undefined name 'sys'
cls_containerize.py:39:1: 'subprocess' imported but unused
cls_containerize.py:41:1: 'threading' imported but unused
cls_containerize.py:43:1: 'multiprocessing.Process' imported but unused
cls_containerize.py:43:1: 'multiprocessing.Lock' imported but unused
cls_containerize.py:43:1: 'multiprocessing.SimpleQueue' imported but unused
cls_containerize.py:49:1: 'cls_cluster as OC' imported but unused
cls_containerize.py:50:1: redefinition of unused 'cls_cmd' from line 42
cls_module.py:28:1: 'os' imported but unused
cls_module.py:29:1: 'sys' imported but unused
cls_module.py:34:1: 'subprocess' imported but unused
cls_module.py:35:1: 'datetime.datetime' imported but unused
cls_module.py:211:11: undefined name 'sshconnection'
cls_oaicitest.py:37:1: 'pexpect' imported but unused
cls_oaicitest.py:47:1: 'cls_cluster as OC' imported but unused
cls_oaicitest.py:54:1: 'matplotlib.pyplot as plt' imported but unused
cls_oaicitest.py:55:1: 'numpy as np' imported but unused
cls_oai_html.py:34:1: 'sys' imported but unused
cls_oai_html.py:41:1: 'multiprocessing.Process' imported but unused
cls_oai_html.py:41:1: 'multiprocessing.Lock' imported but unused
cls_oai_html.py:41:1: 'multiprocessing.SimpleQueue' imported but unused
cls_physim.py:37:1: 'multiprocessing.SimpleQueue' imported but unused
cls_static_code_analysis.py:39:1: 'time' imported but unused
cls_static_code_analysis.py:40:1: 'multiprocessing.Process' imported but unused
cls_static_code_analysis.py:40:1: 'multiprocessing.Lock' imported but unused
cls_static_code_analysis.py:40:1: 'multiprocessing.SimpleQueue' imported but unused
epc.py:41:1: 'multiprocessing.Process' imported but unused
epc.py:41:1: 'multiprocessing.Lock' imported but unused
epc.py:41:1: 'multiprocessing.SimpleQueue' imported but unused
main.py:60:1: 'pexpect' imported but unused
main.py:66:1: 'datetime' imported but unused
main.py:68:1: redefinition of unused 'subprocess' from line 63
main.py:70:1: 'multiprocessing.Process' imported but unused
main.py:70:1: 'multiprocessing.Lock' imported but unused
main.py:70:1: 'multiprocessing.SimpleQueue' imported but unused
provideUniqueImageTag.py:2:1: 'os' imported but unused
Integration: `2024.w42`
Closes#547, #853, #854, #858, #859, #862, #844, and #746
See merge request oai/openairinterface5g!3053
* !3047 Resolve compilation warnings on ARM
* !3052 Optimize T_ID() macro.
* !3045 CI: Reduce tested DL throughput on Aerial
* !3039 fix for Other SI reception when BWP start != 0
* !2997 websrv regression
* !3041 Update NR SA Tutorials
* !3042 Update TESTBenches.md to reflect current testbench
* !3004 Hotfix to remove an unwanted TX power reduction when using multiple TX antenna ports.
* reduce ssPBCH_BlockPower in gNB config of FHI7.2 pipeline
* !3046 A testsuite and a benchmark for RLC AM mode
* !3038 Various bugfixes for gNB stability, cleanup
* !3051 PUCCH2 DTX detection
* nr_psbchsim: fix segv by providing correct get_nrUE_params()
* !3049 Improve PUSCH and PUCCH SNR stability
* !3054 Allocate and add sD to DRB NSSAI in case sD != 0xffffff
Currently, sD has not been allocated, so the octet string is empty. Fix the
allocation to correctly write&read NSSAIs in UE context setup/modification
request messages.
When running, nr_psbchsim, we get this UBsan error:
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c:79:16: runtime error: member access within misaligned address 0x0ff4278c791c for type 'struct nrUE_params_t', which requires 8 byte alignment
The problem is that the corresponding definition of
get_nrUE_params() in psbchsim.c does not actually return the UE params,
but void, so we might or might not get something that resembles valid
data in nr_adjust_synch_ue.c. Fix this by including nr-uesoftmodem.h
(that provides the correct declaration) and define it correctly. Due to
type mismatches, also adapt downlink_frequency, uplink_frequency_offset,
and openair_cfg (which might result in the same type of bugs).
This adds DTX detection in PUCCH 2 receiver. This is detected by MAC
already which will drop PUCCH 2 indications that are detected as DTX.
For the moment this uses the same pucch0_dtx_threshold value indicated
in L1 section of the configuration file. The feature firstly reduces
unnecessary logging on stdout and the use of invalid CSI measurements in
the MAC scheduler.
Closes: #547
- Fixes#853, #854, #858, #859, #862
- handle repeated NGAP Initial context setup requests, thereby fixing assert:
Assertion (!ue_p->as_security_active) failed!
In rrc_gNB_generate_SecurityModeCommand() /home/eurecom/raymond/openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
logic error: security already activ
- A lot of cleanup: remove almost all use of protocol_ctxt_t in 5G RRC and use
existing pointers instead
Introduce two tests for NR RLC AM entity:
- test_nr_rlc_am_entity
- benchmark_nr_rlc_am_entity
The benchmark can be used to verify processing time improvements for NR RLC AM
entity. The benchmark creates two entities and creates an unbalanced
communication channel between them with 10% loss packet loss and 100:1 PDU sent
ratio. This allows the lists in RLC to build up and triggers RLC AM code
related to looking through the segment/pdu lists.
Example benchmark output:
ubuntu@zeus:~/bpodrygajlo/openairinterface5g/cmake_targets/build$ ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
[LOG] init aborted, configuration couldn't be performed
log init done
CMDLINE: "./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity"
[CONFIG] debug flags: 0x00400000
2024-10-16T14:58:20+02:00
Running ./openair2/LAYER2/nr_rlc/tests/benchmark_nr_rlc_am_entity
Run on (8 X 4700 MHz CPU s)
CPU Caches:
L1 Data 48 KiB (x4)
L1 Instruction 32 KiB (x4)
L2 Unified 1280 KiB (x4)
L3 Unified 12288 KiB (x1)
Load Average: 0.48, 0.27, 0.20
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
--------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------
BM_nr_rlc_am_entity/100 50096 ns 50097 ns 13101
BM_nr_rlc_am_entity/256 140386 ns 140387 ns 4868
BM_nr_rlc_am_entity/1024 536323 ns 536311 ns 1309
BM_nr_rlc_am_entity/4096 2084464 ns 2084385 ns 338
BM_nr_rlc_am_entity/16384 8309318 ns 8309458 ns 81
BM_nr_rlc_am_entity/20000 9843792 ns 9843774 ns 68
This hotfix removes division by num_antenna_ports in PDSCH precoding matrix generation.
These matrices are defined for CSI reporting in this way but here we are using them for
transmission and this results in an unwanted 10*log10(num_antenna_ports) reduction in
transmit power (3dB for 2 antenna ports, 6dB for 4 antenna ports, etc.)
- Update links for the latest Ubuntu 24.04 LTS iso file
- Update docker install to the latest instructions on the official website
- Update UHD to v4.7.0.0 and update dependencies for Ubuntu 24.04
Test configuration: Tested SIB19 reception on SCS120 Khz + 50Mhz bw
config file used:
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf
+ NTN config commands used
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf --sa --rfsim -d
sudo ./nr-uesoftmodem --band 261 -C 27533280000 -r 32 --numerology 3 --ssb 72 --sa --rfsim -d --ue-scan-carrier
The Issue is that SIB19 is not being received because of CRC error, only
SIB1 was being received.
This changes the way T_IDs are defined. The T_ID macro was using a
integer to pointer cast in order to provide type safety. This trick
disables some compiler optimizations, as explained here:
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
This MR aims to address warnings raised when compiling for ARM ( tested
with cross compilation, not directly on ARM hardware ). The addressed
warnings are as follows:
- An unused variable in file oai_dfts_neon.c
- Wrong printf format specifier related to oai_cputime_t
- Wrong parameter type in qam64_qam64 call
This MR closes issue #844
Also, correctly set the pkg-config search path for libraries for the
target system. Also closes: #746
A UE might send a ULInformationTransfer without the actual content present
(intentionally or not). Check this and handle appropriately to avoid
a segfault when reading the empty NAS message.
Closes: #862
Pass UE context pointer directly. In the switch, do not return to not
create memory leaks (after the switch, memory is freed). Move the
function up to make it appear before the use of the function.
Pass UE context, without protocol_ctxt_t, for cleanup. Remove the return
from within the switch, as this would lead to memory leaks; nothing is
executed after the switch statement (except for freeing memory).
The existing check for the initialization of GTP is wrong; GTP returns
-1 if it could not initialize. Correct this, such that the DU will stop
if GTP cannot be initialize.
If we continue, the DU is requested to set up a GTP tunnel; because GTP
is not initialized, it assumes it is in monolithic/no F1, and does not
set up a tunnel. The F1 UE Context setup response encoder then fails
with this assertion:
Assertion (tnl->teid > 0) failed!
In DU_send_UE_CONTEXT_SETUP_RESPONSE() ../../../openair2/F1AP/f1ap_du_ue_context_management.c:415
Exiting execution
../../../openair2/F1AP/f1ap_du_ue_context_management.c:415 DU_send_UE_CONTEXT_SETUP_RESPONSE() Exiting OAI softmodem: _Assert_Exit_
Aborted
Closes: #853
A UE might send a MeasurementReport without the actual IEs present
(intentionally or not). Check this and handle appropriately to avoid
assertion
Assertion (measurementReport->criticalExtensions.present == NR_MeasurementReport__criticalExtensions_PR_measurementReport && measurementReport->criticalExtensions.choice.measurementReport != ((void*)0)) failed!
In rrc_gNB_process_MeasurementReport() ../../../openair2/RRC/NR/rrc_gNB.c
Closes: #859
A UE might send a UE Capability Information without unsolicitatedly
(intentionally or not). Check this and handle appropriately to avoid
assertion
Assertion (UE->xids[xid] == RRC_UECAPABILITY_ENQUIRY) failed!
In handle_ueCapabilityInformation() ../../../openair2/RRC/NR/rrc_gNB.c
Closes: #858
A UE might send a rrcReestablishmentComplete without the actual IEs
present (intentionally or not). Check this and handle appropriately to
avoid assertion
Assertion (reestablishment_complete->criticalExtensions.present == NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) failed!
In handle_rrcReestablishmentComplete() ../../../openair2/RRC/NR/rrc_gNB.c:1364
Closes: #854
Prior to this commit, if we receive an Initial Context Setup Request for
a UE that has AS security set up, the gNB asserts with
Assertion (!ue_p->as_security_active) failed!
In rrc_gNB_generate_SecurityModeCommand() openairinterface5g/openair2/RRC/NR/rrc_gNB.c:2590
logic error: security already activ
However, TS 38.413 says:
> The AMF may initiate the Initial Context Setup procedure if a
> UE-associated logical NG-connection exists for the UE
(I interpret this as "it might happen anytime")
> store the received Security Key in the UE context and, if the NG-RAN
> node is required to activate security for the UE, take this security key
> into use.
(I interpret this as "do not set up AS security again")
In this commit, handle if we receive an Initial Context Setup Request
for an existing UE context. As said in the spec, we store the keys. If
security is not active, we trigger RRC Security Mode Command. If it is
active, we skip Security, and directly set up a PDU session. If there is
also no PDU session, we simply forward the NAS message, and acknowledge.
If there was no AS security, after security, the gNB would trigger the
setup of PDU sessions (if any), and then forward any NAS PDUs, which is
stated in the if block if AS security is already active.
This changes the way T_IDs are defined. The T_ID macro was using a integer to pointer cast in
order to provide type safety. This trick disables some compiler optimizations, as explained
here: https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html.
Removing the type cast reenables the compiler optimizations.
Prior to this commit, the include path for some libraries found through
pkg-config when cross compiling is not correct:
$ grep include CMakeCache.txt
blas_INCLUDEDIR:INTERNAL=/usr/include/x86_64-linux-gnu
...
This is because we did not tell pkg-config to search in the right path.
Since for cross-compilation, we install packages in parallel in the
system, override the primary directory where the .pc files located, in
the cross-compilation toolchain file for cmake.
Closes: #746
Since long long is the bigger type ( 8 bytes ) of the two used ( long long and uint32_t ),
and long long is also available on ARM, change this parameter to always have this type.
This allows to always use format specifier '%lld' in the logs that use TICK_TO_US, which would otherwise return long long or uint32_t depending on architecture.
Set a maximum SNR value using the "-S" option to ensure that nr_dlsim
or nr_ulsim is executed only for a given SNR. This approach allows us
to verify the success of the encoding/decoding process at the specified
SNR. Check if the test succeeds is not yet implemented (currently we
only retrieve an information about encoding/decoding processing time).
To be implemented in the separate MR.
Always execute all the nr_dlsim/nr_ulsim tests even if one of them
fails. Each test takes around 5s, so we can execute them all to get
results for all the test scenarios.
which will drop PUCCH 2 indications that are detected as DTX. For the
moment this uses the same pucch0_dtx_threshold value indicated in L1
section of the configuration file.
rrc_gNB_process_security() does not only set (process) the security
algorithms, but also checks for those. However, we don't use the check.
Simplify the function, to reintroduce the check later. Rename to
set_UE_security_algos() to better reflect what the functions do.
- remove Sphex UE - not used anymore
- remove RAN-L2-Sim-Test-5G from a list of pipelines - currently disabled
- 4G RFSim was moved to cacofonix
- minor cleanup
Integration: `2024.w41`
See merge request oai/openairinterface5g!3032
* !3006 Fix some sizeof and switch-case issues
* !3028 Add CMakePresets.json
* !3011 Aerial: cleanup unused code, avoid superfluous memcpy(), avoid L1 structures
* !3022 NR CSI-RS L1 refactoring → check CI
* !2935 Improvements in handling the beamforming procedure via FAPI
* !3026 NR ULSCH scheduler fix when using transform precoding
* !3031 CI: Increase test bitrates for 100 MHz scenario in SA-2x2 pipeline
* !3017 Fix SRS
* !2731 Implementation of 2-Step RA
* !3027 Add dockerized include what you use tool
3GPP 38.331: If absent, the UE applies the SCS as derived from the prach-ConfigurationIndex in RACH-ConfigGeneric (see tables Table 6.3.3.1-1, Table 6.3.3.1-2, Table 6.3.3.2-2 and Table 6.3.3.2-3, TS 38.211 [16]).
This procedure for msg1_SubcarrierSpacing NULL is not implemented, so we aplly the same value of UL SCS.
Introduce CMakePresests.json which is a simple way to perform incremental build using cmake
New configure resets were added:
- default: Configure compilation with default options
- tests: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON
New build presets were added:
- 5gdefault: Build the software for NR rfsimulator test
- default: same as 5gdefault
- 4gdefault: Build the software for LTE rfsimulator test
- tests: build all unit tests
To configure using configuration preset:
`cmake --preset <preset_name>`
To build using a build preset:
`cmake --build --preset <preset_name>`
Modify the UL/DL UDP iperf test cases to use a higher requested bitrate
for the scenario with 100 MHz bandwidth in the SA-2x2 pipeline. Adjust
gNB config file to allow for higher UL throughput.
Resolve error:
nfapi/oai_integration/aerial/fapi_nvIPC.h:56:16: error: unknown type name ‘nvipc_params_t’
56 | int nvIPC_Init(nvipc_params_t nvipc_params_s);
By including the header. Also, move the definiton of the struct to the
MAC, where it is actually stored, and out of the radio common_lib.h,
since this is not a radio (split 7/8) parameter.
When compiling aerial, we compile without CUDA support (see e.g.,
docker/Dockerfile.gNB.aerial.ubuntu22). Hence, do not check for it in
aerial for the moment, we won't use it for the foreseeable future.
In Aerial bindings (FAPI-Aerial), the NFAPI mode must be
NFAPI_MODE_AERIAL (otherwise, we would not be executing this code).
Hence, the switches don't make sense. Remove them.
The check can more easily be checked with
git show <commit> --ignore-all-space
As is visible at the top of the patch, for compiling aerial_lib (the
binding FAPI-Aerial), we always add ENABLE_AERIAL. Thus, all the code
within ENABLE_AERIAL will be compiled; we can also simply take it out.
We can directly read from buffers, so the memcpy() only takes time.
Also, limit the scope of the variables for the unpacking of
RX_DATA.indication.
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
These functions look up the numerology, and code can be harmonized:
- ssb_index_from_prach()
- find_SSB_and_RO_available()
- schedule_nr_prach()
The next commits also need to look up the numerology from the
UplinkConfigCommon. This provides the common implementation to be used
in follow-up commits.
Integration: `2024.w40b`
See merge request oai/openairinterface5g!3021
* !2890 F1AP encoding/decoding library
* !2969 Time domain samples scope for NR UE & gNB
* !2998 warmup RF board in UE
* !3009 Fix the ratio of PDSCH EPRE to DM-RS EPRE
* !2965 Refactoring of prepare_scc in gNB config
* !3002 CI: Change frequency used by AW2S pipeline
* !3007 Enable gNB configuration through YAML file
* !3001 Minor ue fixes
* !2971 Use getaddrinfo() when connecting to rfsimulator
the code creates a sink to read all traced packets and drop it. but
this works only if we send to a local address and if there is not
another sink (like if we trace both UE and gNB in the same machine).
this sink's purpose is only to prevent to get automatic packets back
from the kernel saying "no listener". So, instead of killing the trace
when we can't create the sink (as done previously), we now just let the
trace in operation.
Integration: `2024.w40`
Closes#756 and #849
See merge request oai/openairinterface5g!3014
* !2886 (doc): Added a new doc on hardware requirements
* !2955 dockerized clang-format error detection tool
* !3005 Fix symbol size in nr_dlsch_mmse
* !2930 SRS tx power
* SA-B200-Module-SABOX pipeline: improve radio
* SA-AW2S-CN5G: accept 5% ping packet loss
* !3003 Resolve "SEGFAULT in L1_rx_thread" - CI
* !3016 fix tests for log2_approx and log2_approx64
* patch to move RFsim-4G to cacofonix
It can happen that L1 gives us a TB that we interpret as receiving UL
MAC TB with LCID "UL_SCH_LCID_CCCH1". This might or might not be
correct, but currently, we observe segfaults when trying to encode the
cellgroup in send_initial_ul_rrc_message() (encode_cellGroupConfig()).
This fix prevents a segfault by not delivering a MAC SDU to RLC if CCCH
is already present. Note that in some cases, this could still happen,
e.g. Resume Request. However, we don't support this message, so ignore
it for the moment.
This fix enables a gNB to operate continuously for extended periods
(days), which is essential for real deployment scenarios.
Closes: #756
The test was actually never executed correctly (unsigned -10 is never <= 10), and log2_approx64_ref() was not accurate enough.
Therefore replace it by directly comparing one value above and one value below each rounding boundary.
To skip the test, we use the gtest command line parameter "--gtest_filter" to filter out the unwanted test.
This parameter is described as follows:
--gtest_filter=POSITIVE_PATTERNS[-NEGATIVE_PATTERNS]
Run only the tests whose name matches one of the positive patterns but
none of the negative patterns. '?' matches any single character; '*'
matches any substring; ':' separates two patterns.
In this pipeline, we frequently see losses of a single packet; we did
not find the true reason yet.
Accept 5% losses, assuming that serious packet loss would be catched by
(1) higher ping losses (2) iperf would be affected.
This commit refactors startServer to use getaddrinfo() to
prepare the socket creation. Doing so, it also adds support for
IPv6 by using AF_UNSPEC as the address family.
This commits uses getaddrinfo(3) when connecting as client to the
rfsimulator. This enables name lookups, through DNS or a hosts file.
This change makes it easier to use the simulator in a dynamic
environment like Docker or Kubernetes by only targeting the name of
the container or service.
Move h_b_f_c (or SRS power control adjustment state) to UL BWP structure. This is a per
bwp parameter so it makes sense to make its lifetime the same as BWP, even if we dont support
>1 UL BWPs.
the create_workspace.sh script checks if a branch should be merged into
what we are trying to checkount (i.e., typically develop into
feature-branch). The problem is that it uses a short-hand for an if
branch.
[ -n "${merge}"] && git merge...
If we don't request a merge, [ -n XX ] will evalute to 1, and not do the
git merge. Since it's the last command in the script, this makes the
script return 1 (failure), when it actually succeeded.
Add exit 0 to ensure we return 0 after successful end of the script. If
there is a failure, the script will terminate early. It can be tested by
e.g., giving a wrong commit ID.
Reviewed-by: Jaroslava Fiedlerova <Jaroslava.Fiedlerova@openairinterface.org>
Integration: `2024.w39`
Closes#846
See merge request oai/openairinterface5g!2990
* !2718 Added Jenkins job for Colosseum testing integration
* !2901 Fix log2_approx
* !2983 fix(docker): making tini download platform specific to support ARM64 native builds
* !2919 Add E2 SM in the target dockerfiles
* !2981 NR gNB fix PMI report evaluation
* !2979 NR-UE: Merging different UE NR SLOT FEP procedures into one.
* !2899 SIB19 initialization and scheduling on gNB
* !2953 Remove unnecessary c includes
* !2926 Fix SRS FAPI at gNB
* !2987 fix for variable power in PDSCH REs in case of 25 PRBs Bandwidth
* !2993 remove DRX from UE capabilities: not supported yet
* !2711 NR UE UL time alignment handling improvements
* !2995 some small fixes for 5G NR
* !2992 cleaner faster nr_pdcch_demapping_deinterleaving() inner loop
* !2986 NR PDCP ticks for F1 split
* !2982 CI framework cleanup
Add a new scope data source (ueTimeDomainSamples) which provides time domain samples
for antenna 0 to the scope. Add graphical representation of the data in imscope.
Removed C-define from ENABLE_IMSCOPE cmake option, the #define was unused and this way
code does not have to be recompiled when imscope enable state changes.
Currently, NR PDCP ticks are active only with monolithic gNB, triggered by the MAC scheduler in gNB_scheduler.c.
In F1 split mode, as there is no MAC, there’s no source to advance the NR PDCP timer via "nr_pdcp_wakeup_timer_thread()".
This commit introduces a dedicated thread for NR PDCP ticks in gNB-CU and CU-UP mode.
Without it, packet losses at the F1 uplink would cause indefinite buffering, as t-Reordering won't expire due to the lack of NR PDCP timer ticks.
Use a script, which can be tested independently of CI code (by running
it on the host on which it will be used), and print the directory that
has been prepared in the HTML. Also, in the description, use the
infinitive/imperative(?) of the verb to harmonize with other steps.
A lot of CI code is python mixed with bash, e.g.,
ssh = getConnection(host)
ssh.run('ls')
ssh.run('echo')
At least some of this CI code would benefit if it was written in a
simple bash script, returning error codes and potentially other
information either through stdout/stderr or files, to the calling Python
code:
ssh = runScript(host, script)
# script does: ls; echo
This commit introduces the possibility to run entire scripts. The idea
is that the executor has a script (on localhost), which is either
executed locally or on a remote host. For the remote host, the script is
not copied but piped into a remotely executed bash. In both cases,
output is either returned like the Cmd.run() function with returncode
and mixed stdout/stderr, or optionally redirected into a file on the
(remote) host, which can be treated further by the Python code in later
steps.
This reimplements the CI deployment functions, and makes them a bit more
robust. Concretely:
- Introduce a generic "deployment tag" option that can be used to
override the tag to use for specific images. By default, it is the
current "branch-commitID[0:8]" tag name (requires the change from
function ImageTagToUse() to CreateTag(), impacting also pull/push
image functions)
- Avoid sed for image names, and use an .env file that docker-compose
picks up automatically; the deployment analyzes a potentially existing
.env file and updates instead of simply overriding. For instance, some
pipelines might use -asan images for the gNB and "normal" (non-asan)
images for UE, and a simple overwriting might make the -asan image
name tag disappear for the gNB, resulting in deployment failures).
Finally, undeployment removes the .env file, so that there are no
modifications in the repository after undeployment.
- Redo the previous behavior of autodetecting asan, and use that (the
current function always uses asan, no matter what)
- Remove deployKind/displayedNewTags globals, as they are not necessary
- Make the usedImage output in HTML slimmer
- On undeployment, print service names next to undeploy analysis, and
return success/failure.
- Make the functions generally less verbose and easier to read
Note that as of and only in this commit, deployment does not work, as
all the YAML files have not been updated to work with this updated
version. The next commit adds tests for the new deployment, and updates
one YAML file (also being used in the tests). The follow-up commit then
modifies all YAML files.
The BuildeNB steps either does things that are already implemented
(created workspace), or things that we don't use (separate build_wait),
and is generally quite convoluted when all it does is calling build_oai.
Reimplement by reusing Create_Workspace, and make build_oai in a single
step. To clean up, make a new module in which this function does not
need a class instantiation. Instead, we give all necessary parameters
directly.
The next commit will use "echo -e". The problem with that is that bash
and sh differ:
- in bash: this results in "a\nb" (a+newline+b)
- in sh: this results in -e a\nb (-e a+newline+b)
The problem is that by default, commands are executed through sh, which
nobody expects. Change to bash, which is likely more aligned with what
people want to use.
After the previous commit, the CI will always do an undeployment step
even if the CI failed. Hence, these XMLs are not necessary anymore. Some
XMLs are updated to do what their "cleanup XML" counterparts did, such
as removing additional images.
Use the previous commit on returning success from each task execution
function, and implement handling of errors in the main loop. Add a
script with which this is visible using Custom_Commands.
For reasons I don't understand, the XML option reading and actual test
case execution are at different places in the code. This is problematic,
because what this led to is that options are not passed as function
arguments, but indirectly through class members. This led to a lot of
"indirect code"; it's a total mess
To improve this, move them together, so that parameters can be passed
directly as function arguments later on.
Because we reference the globals, mark them inside
ExecuteActionWithParam(). That is a Python antipattern, but necessary at
this moment. I believe that we can remove the following globals over
time:
- SSH (with new cls_cmd, which we don't need to pass)
- EPC (replaced through a class similar to ue_module, i.e., refer to
core networks on specific hosts through an ID, instead of a global)
- HTML (should use templating, where individual functions give back a
dictionary of what they want to print, and a final pass assembles the
entire HTML file)
- RAN/SCA/PHYSIM/CLUSTER/ldpc (can be replaced with stateless scripts
build/run eNB/gNB on a specific node)
Update the regex for both sender and receiver data to allow optional
bitrate unit prefixes - accepts also no prefix. Modify the patterns for
lost and total packets to accept negative values (`-?\d+`).
Add some basic unit tests to verify that Iperf/Ping work. Harmonize the
logging by only print in the "main" iperf/ping function, to avoid that
if we test with multiple UEs, the output intermixes. Also, do one common
mkdir before starting multiple pings/iperfs. Finally, harmonize the
paths so that Iperf and Ping log their files in the same place.
* added missing Transaction ID to te F1 Setup Failure message struct
* fill F1 Setup Failure transaction ID in RRC before calling the F1 Setup Failure function
Experiments did show that the time sync is less stable in terrestrial mode if the integral part of the PI controller is used.
So set it to 0.0 by default. For NTN LEO use case we can still use it by providing the command line parameter --time-sync-I 0.2 .
fixes#846
* _F1_EQ_CHECK_GENERIC can be used to check the equality of two different members of F1AP structs
and return `false` if the condition is not met.
When the condition fails, the macros will print a debug message to the standard error stream,
including the function name, line number, and the provided format string and arguments.
Add a new target f1ap_lib that groups F1AP ASN.1 encoding&decoding for
messages defined f1ap_messages_types.h. The objective is to, for each
F1AP message,
- add encoder&decoder (similar to what already exists, but without
mandatory message sending afterwards)
- eq_X() function that checks two messages for equality (to be used
mostly in tests)
- cp_X() function that deep-copies a message, e.g., to be used when
sending ITTI messages, instead of manual copying done currently
- free_X() function that frees the memory associated to a memory, to
avoid memory leaks.
Each message will be tested, notably that encoding&decoding as well as
copying yield identical messages.
The actual message encoding & decoding, tests, and their use will be
done in the forthcoming commits.
The currently used type does not cover all possibilities. While we don't
encode&decode them, it might still be good to be able to express it, so
introduce the new type.
Co-authored-by: Guido Casati <hello@guidocasati.com>
* num_SI is the size of the list of gNB-CU System Information messages
* the new struct member is an array, sized after the maximum nb
of SIB types, which contains the SI container, the container length
and the SIB type
The previously used net_ip_address_t type is limited to some bytes, but
the CU name might be longer. Use char * to allow longer DNS names.
Also, this type separates IPv4/v6, which is not necessary, as it is now
handled by the same C API (getaddrinfo()), since !2635.
Co-authored-by: Guido Casati <hello@guidocasati.com>
Integration: `2024.w38b`
Closes#839
See merge request oai/openairinterface5g!2977
* !2704 nr pdcp: add support for nea1
* !2800 UE improvements
* !2920 Receive SIB19 on nrUE
* !2975 Remove hardcoding of CPU measurements (respect option `-q`)
* !2976 Update latest SIMDE version
* !2957 T: increase max number of args
* !2916 NR UE PUSCH resource mapping optimization
* !2787 CI: increase max number of concurrent workers to 64
* !2974 fhi_72: allow to provide dpdk_mem_size to xran
* !2964 CI: Replacing the UE on Aerial setup
* !2973 CI: remove unused code and files
See e.g., egrep(1) [https://linux.die.net/man/1/egrep]:
> two variant programs egrep and fgrep are available. egrep is the same
> as grep -E. fgrep is the same as grep -F. Direct invocation as either
> egrep or fgrep is deprecated
See also the rationale of the POSIX description of grep
(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html):
> This grep has been enhanced in an upwards-compatible way to provide
> the exact functionality of the historical egrep and fgrep commands as
> well. It was the clear intention of the standard developers to
> consolidate the three greps into a single command.
Closes: #839
As of now, these seem to be the Jenkinsfiles used on Jenkins
ci-scripts/Jenkinsfile-cluster
ci-scripts/Jenkinsfile-colosseum
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-COTS-UE-Test
ci-scripts/Jenkinsfile-nrue
ci-scripts/Jenkinsfile-physim-deploy
ci-scripts/Jenkinsfile-push-registry
ci-scripts/Jenkinsfile-tmp-full-ran
ci-scripts/Jenkinsfile-tmp-multi-enb
ci-scripts/Jenkinsfile-tmp-multi-enb-nsa
ci-scripts/Jenkinsfile-tmp-ran
(gather all files in a file, then cat <file> | sort | uniq)
Remove all others.
The default values set by xran for DPDK socket memory/limit is 8192. It
is changed when the variable for the memory size, given down to xran, is
non-zero (cf also previous patch). Since the last patch, if nothing is
given in OAI configuration, OAI will pass down a size of 8192. However,
a configuration value of 0 is a valid choice (it is a pre-allocation,
DPDK will allocate dynamically), so modify the default in xran to be 0
so that all sizes, including 0, can be given to DPDK.
Note that the currently used implementation of xran will always try to
allocate this memory on NUMA node 0. If you want to use another one,
this field has to be set to 0 (no pre-allocation), and DPDK will
allocate it dynamically.
Co-authored-by: Sagar Arora <sagar.arora@openairinterface.org>
xran has a mechanism to request DPDK to allocate a configurable amount
of bytes for huge pages. We set it to 0 until now; expose this variable
through configuration, and provide a meaningful default 8192 MiB.
Provide documentation.
- refactor nr_fill_nfapi_dl_SIB_pdu to use it on both SIB1 and OtherSI
- extract tbs related calculations into function get_tbs to avoid duplicates
- moved OtherSI search space initializations to nr_mac_config_scc
Mapping of data REs in DMRS symbol depends only on number of CDM group
no data. So the special case function that depended on delta is removed
and a single function is used.
Build on ARM fails in the previous version, while the current master
(1a09d3bc) works. So let's update to a newer version to avoid problems
on ARM, and assuming x86 works.
- Better trace DLSCH decoding result
- Rename the decode result variable to separate with later ack/nack
encode of this decoding result from 3GPP (not trivial true=1 coding)
- Cleanup decodeResult usage
- Remove unused defines
Co-authored-by: Francesco Mani <email@francescomani.it>
./run_tests.sh was not functional anymore because of the introduction
of AssertFatal() in nr_rlc_entity.c
Including the .h and providing exit_function() solves the problem.
Some people needed that.
Let's stop to 19 for the time being. It's tricky enough.
We can increase later if needed. (A previous commit
made the tracers to accept up to 32 variables.)
T_MAX_ARGS was 16 and some people start to use the T machinery with
more than 16 values. So be it. Let tracers be friendly and accept 32.
(More commits to follow for full support.)
Also why is T_MAX_ARGS in T_defs.h when it's only used by event.h?
Hum?
The F1AP UE context release procedure can happen in at least two cases:
1. core requested a release of a UE
2. CU requests DU a release of a UE without a core release (e.g.,
handover)
In case 1., the CU has to fully release the UE in the CU, then ack the
NGAP message from the core, whilst in 2., nothing of that should happen
after the DU acknowledges the F1AP UE context release cmd.
cuup_notify_reestablishment() used
&ue_p->established_drbs[drb_id]
to look up a bearer, which is wrong, because it should be drb_id - 1
as in the top of the loop. Also, it used the dedicated get_drb()
function; harmonize to use only this function.
A follow-up commit refactors the filling of information of DRBs to set
up in a separate function (to be reused for handover later). Hence, we
cannot store the DRB TEID/address in the same functions, because it is
a logically separate step, and might not always be available.
In e1_send_bearer_updates(), we send the DL (DU) TEID and address to the
CU-UP. Therefore, correct the variable names to reflect that the F1-U
information pertains to the DU.
Also, move the tunnel info update function f1u_dl_gtp_update() to a more
prominent place, and take the pointer to the struct containing the
"interesting" information.
A maximum RRC buffer size of 1024 might be very small. We should
increase it, but then the 5G RRC_BUF_SIZE does conflict with other
definitions. To make it unique, also rename to NR_RRC_BUF_SIZE.
Always set the firstActive and defaultBWP in the initial
cellGroupConfig. This is necessary to make the Quectel accept the
handover RRCReconfiguration; it seems that this also works reliably in
normal connection set up, so we can add it.
Pass consistently the NR_timer_t object through a pointer. Since we have
to modify all occurrences of is_nr_timer_active(), we use that occasion
and rename that function to nr_timer_is_active() to make it consistent
with all other functions, starting with nr_timer.
Reorganize the sequence of checks done in reestablishment to make it
more logical:
- check conditions of request (correct C-RNTI)
- check conditions of DU (has MIB/SIB1, MTC)
- check the UE, and from which DU it comes
This will also help to extend it towards reestablishment coming from
different DUs in the case of handover.
Before this bug fix, when using F1, we get this warning:
Constraint validation failed: LCID: constraint failed (/home/richie/openairinterface5g/cmake_targets/ran_build/build/openair2/F1AP/MESSAGES/F1AP_LCID.c:30)
This is because (1) we don't actually store the LCID, then (2) we did
not put it into the F1 ASN.1 structures. Fix both, to make this warning
disappear.
To actually print the full error message, increase the error buffer
size. Also, for the future, to avoid guessing, print ASN.1 XML when we
encounter a failed constraint validation.
It can happen that SCTP communication is simply lost, e.g.
[SCTP] SCTP_ASSOC_CHANGE to SCTP_COMM_LOST
[SCTP] sctp_recvmsg (fd 104, len -1 ): Connection reset by peer:104
The previous code only handled the SHUTDOWN event, but in abnormal
situations, we should also handle the connection state change and signal
to RRC that the endpoint is dead, which is now implemented.
User of the SCTP module use the assoc_id for connection identification.
The previous code set the assoc_id to -1, so there is no way of telling
which connection broke. Use the assoc_id instead
The failure mode observed here was that the CU sent a release command
for a UE that the DU does not know. Given, that the outcome of the
release command (no UE) is equal to the current state (no UE), from
the DU point of view, we can safely ack the command.
This is a temporary workaround for issue with UE PHY not applying TX power
instructions from MAC. To be reverted once implementation of TX gain control
is finished.
This commit adds yaml-cpp library to required docker images and build commands. There is one workaround
in cross-compilation for apt behavior for installing libyaml-cpp-dev. Apt will uninistall previous
versions of the package whenever another one is installed. This means that installing the arm version
breaks amd version and vice versa. This makes it impossible to have both libs installed at the same
time which is required by the cross-compilation build command (it calls cmake twice, once with native
and once with target architecture)
This commit introduces a substitute module library for setting up softmodems using YAML instead of libconfig.
The softmodems should work the same with both types of files. Extra care was put to make sure the behavior
of both modules is the same.
Example yaml config files were added for the UE and gNB
pdschRxdataF_comp data source was handled incorrectly. Each symbol entire slot data was copied. This
caused pdschRxdataF_comp to mostly contain zeros. The call to UEscopeCopy was moved from symbol loop
into last symbol processing. In case imscope is used padding and unused REs are not copied to the
sink.
Added checks inside scope functions to ensure correct functionality.
A new phy scope based on ImGui and ImPlot. This scope uses a different concurrency model than previous
scopes.
The PHY thread writing the data first checks if the data is ready to be written. If its not, nothing is copied.
The GUI thread reads data if available and marks it ready to write. This makes sure that the PHY threads are not
busy copying data that would never be displayed.
Some of the scopes also have a freeze functionality that further limit the amount of data that needs to be copied
from PHY threads. If a scope is "frozen" it still allows the user to explore the data using plots zoom/pan functions
but doesn't cause PHY threads to perform extra writes on the displayed data.
A compile option was added to enable/disable the scope. Use cmake -DENABLE_IMSCOPE=ON to enable the scope.
Update CXX standard to 17; it is required by some libraries (e.g., dear imgui). The oldest gcc version in
use by a distribution supported is Ubuntu 20, which has gcc 9.4 with c++17 support.
According to the ThreadPoolExecutor documentation [1], the default
number of maximum workers min(32, os.cpu_count() + 4). The problem is
that we execute many pipelines from nano, on which os.cpu_count()
reports 4, so we can only have up to 8 concurrent workers by default.
This leads to the fact that on pipelines with many UEs (e.g.,
AW2S-AmariUE), we don't ping/iperf on all UEs at the same time.
Fix this by increasing the number of workers to 64. This should be fine,
as there is almost no real work being done in the Workers (only opening
a shell and execute programs such as ping/iperf).
[1] https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor
Create_Workspace is used used in XML files instead of directly being
executed in DeployObject(). This can be problematic if we deploy
multiple services on the same host, since a previous workspace will be
deleted. Also, it removes futile git clones.
There are other XML steps (CppCheckAnalysis, LicenceAndFormattingCheck,
BuildImage, BuildProxy, BuildClusterImage) that implicitly called
Create_Workspace. Those calls have been removed and care has been taken
to insert the corresponding Create_Workspace steps in the XML.
There was concern that someone in the future might call the function
with the wrong inputs. So, based on the discussion on the MR below
https://gitlab.eurecom.fr/oai/openairinterface5g/-/merge_requests/2916#note_132506
the SIMD for multiplying DMRS vector with amplitude is removed and is
now done with plain C (no SIMD).
The execution time for the function dmrs_amp_mult() in this commit is
10x higher that the previous commit.
It is better to write to memory that are grouped together to reduce
probability of cache miss. This simple change improved the function's
execution speed by 70%.
Removed the unnecessary memset for the buffer.
Integration: `2024.w35`
Closes#825
See merge request oai/openairinterface5g!2943
* !2181 ULSCH power computation
* !2915 benchmark for rotate_cpx_vector
* !2936 Avoid complete rebuild on cmake run with git info change
* !2855 NR UE replace phy_config_request_sent
* !2937 small fixes for rfsim
* !2925 CI: Increase tested throughput in SA 2x2 pipeline
* !2934 Run optimized parity check in ldpc encoder only on supported Zc values
* !2912 changes for multi-RU support in fhi72
* !2928 Distribution check: check for F40, remove old U/RHEL releases
* !2913 NR gNB cleanup
* !2927 Update Aerial docs to reference current version
* !2940 remove double define with nr_common.h
At least in Eurecom, there are no RHEL 7/CentOS 7+8 servers. Existing
installations will work, but we don't want to encourage people to use
these old distributions, so remove it. Also, they reached EOL
Add CentOS stream as an alternative.
In the past, it seemed that we had to add a trailing slash (/) after the
OpenShift Registry URI. Now, at least on the CI machine matix, this
makes it fail:
INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/
INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6
WARNING: command "docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6" returned non-zero returncode 1: output:
Error response from daemon: Head "https://default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/v2/oaicicd-ran/oai-gnb/manifests/develop-46a1d2a6": unauthorized: authentication required
Remove the trailing slash makes it work, like so:
INFO: oc whoami -t | docker login -u oaicicd --password-stdin default-route-openshift-image-registry.apps.oai.cs.eurecom.fr
INFO: docker pull default-route-openshift-image-registry.apps.oai.cs.eurecom.fr/oaicicd-ran/oai-gnb:develop-46a1d2a6
The docker pull succeeds.
>Direct leak of 7 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>1 0x55555819ab3c in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:938
>2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
>3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
>4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
> Direct leak of 4 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x55555819c025 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:993
>2 0x5555581a8a9f in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1295
>3 0x5555581a3078 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1215
>4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
> Direct leak of 1 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x55555819c8f7 in generatePduSessionEstablishRequest /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:987
>2 0x5555581a9b75 in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1299
>3 0x5555581a414e in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1219
>4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x55555818ef1c in generateAuthenticationResp /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:588
>2 0x5555581b0fca in nas_nrue /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1405
>3 0x5555581a3069 in nas_nrue_task /home/guido/repo/openairinterface5g/fix-ue-memory-leaks/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1213
>4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* Data buffer for NAS Registration Complete and Authentication Response is malloced in
the NAS thread and transfered with ITTI message to RRC, where needs to be freed
Direct leak of 24 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>1 0x5555572b0607 in generateAuthenticationResp /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:608
>2 0x5555572b0607 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1402
>3 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
>4 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
Direct leak of 10 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>1 0x55555729754e in generateRegistrationComplete /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:782
>2 0x555557299ad3 in handle_registration_accept /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1212
>3 0x5555572b06a0 in nas_nrue /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1411
>4 0x5555572baef6 in nas_nrue_task /repo/openairinterface5g/develop/openair3/NAS/NR_UE/nr_nas_msg_sim.c:1198
>5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
It is very possible that the operating system returns a file
descriptor bigger than the size of bridge->buf (MAX_FD_RFSIMU, which
is 250 as of now). As a minimum, let's fail if the socket file
descriptor is out of bounds.
A proper solution may be implemented later, if needed.
Updated links to latest available L1 documentation
Removal of unneeded environment variable in aerial_l1_entrypoint.sh
Removal of unneeded checkout command from doc
Reword Aerial Entrypoint script paragraph to separate in multiple sentences
New UE has been tested with Aerial setup
Change bash blocks to reflect that cuBB container no longer uses root
Add alternative instructions to obtain nvipc sources from container
Add note in Prepare the L1 image section specifying default config file and location
Co-Authored by: Reem Bahsoun <reem.bahsoun@openairinterface.org>
Before this commit, the following will trigger a complete rebuild:
- create another git name (git checkout -b test)
- run cmake again manually (cmake ..)
- run ninja again
The top-level CMakeLists.txt uses add_definitions() to add git
information to all targets; if some git information changes, this will
mark all command lines as dirty, triggering the build.
There is an easy solution: instead of passing this information on the
command line, pass it in a header. This commit uses configure_file() to
generate a file oai_version.h in the build directory with the same
information. Various sources files, e.g., main executables, use this to
output the same information as before. It is then also not necessary to
use header guards, as cmake takes care to create this file.
If cmake is re-run, it will update the header, and trigger only files
including this header will be rebuilt (which can be shown with the above
stpes). The information passed is the same as before, and updates the
information when the old method would have updated it.
This commit introduces google benchmark library and one benchmark for
rotate_cpx_vector. Also extracted common tools used in testcases for
generation and allocation of byte aligned vectors in phy_test_tools.hpp
Integration: `2024.w34`
See merge request oai/openairinterface5g!2923
* !2906 mod: Improve signal processing speed of rotate_cpx_vector function
* !2909 NR UE SIB1 free fix
* !2917 Cleanup NR UE NAS instance handling
* !2924 Fix misalignment issues in TLVEncoder macros ENCODE_U16, ENCODE_U24
* !2907 CI: add new testcases to RFSim-5G pipeline, reduce ping and iperf test time
* !2893 LEO satellite delay and Doppler simulation and adjusted NR_UE time sync
The correct order for xran seems to be first Uplane, then C plane. In
the past, we used to switch (for reasons I don't know), but let's
reverse it to the proper order.
* place all NR UE CL optional options in the same section, in a table
* add a section for common CL options
* add subsection for UE capabilities
* removed redundant text
Bypass UE log analysis when testing sidelink, as it fails due to the absence
of expected information and patterns (not present in sidelink communication).
Instead, a custom command is used to verify the success of sidelink tests by
checking for the presence of "PSBCH RX:OK" in the log of the second UE.
As we don't have SIB19 with continuously updated ta-Common and ta-CommonDrift values yet, the UE can only adapt it's UL timing according to it's DL drift.
This is required for the UE to keep UL sync with fast time drift and relatively long RTT (e.g. LEO satellite).
We should replace this with the standard compliant way as soon as we have SIB19 with continuously updated contents.
This commit resolves undefined behaviour runtime errors related
to misaligned memory access. E.g.
> openair3/NAS/COMMON/IES/FGSMobileIdentity.c:193:3:
> runtime error: store to misaligned address 0x608000021e2b for type 'uint16_t',
> which requires 2 byte alignment 0x608000021e2b: note: pointer points here 00 f1 ...
* ENCODE_U24: safely encode 24-bit values into a buffer
by using memcpy to copy 3 bytes in network byte order (big-endian).
* ENCODE_U16: safely encodes a 16-bit value into a buffer, handling
misalignment by memcpy 2 bytes to buffer in network byte order (big-endian).
- Save nas instance id in nr_ue_nas_t and use that for instance determination.
- Use correct field in itti message (destinationInstance instead of originInstance) to determine instance
- Make sure both destinationInstance and originInstance fields are correct in NAS interface functions.
While we don't have SIB19 support yet, UE gets this parameter from command line, just like --ntn-koffset and --ntn-ta-common.
We use this value to initialize the UE's time-tracking PI controller accumulator.
This allows to correctly track the time even if the delay is changing significantly (e.g. due to LEO satellite movement).
We also use it to compensate for the time drift that happenes while performing the initial sync.
This now allows to indicate "there was a new sampleShift calculation, and the actual value is 0"
additionally to "there was no new sampleShift calculation".
Integration: `2024.w33`
See merge request oai/openairinterface5g!2911
- !2784 Reworking beam structures at NR MAC gNB
- !2889 Fix delta for PUSCH DMRS type 2
- !2908 NR MAC UE CSI improvements
- !2896 Fix for llr functions reading/writing outside buffers
- !2902 nr rlc: reduce "SDU rejected" logging
- !2884 NR UE: Cleanup global variables used for command line parameter storage
- !2910 NR gNB DMRS symbol race
- CI: Update phytest-timing test threshold
This fixes out-of-bounds access: nr_ulsch_16qam_llr, nr_ulsch_64qam_llr and nr_ulsch_256qam_llr.
For 256qam this also fixes incorrect llr calculation on arm: the existing AVX code for 2 REs
case produced results not in line with the rest of the code. A testcase check_2_res_256_qam was
added to visualise the differences which can later be used to revive AVX acceleration for 2REs case.
Integration: `2024.w32`
See merge request oai/openairinterface5g!2900
* !2810 add harqid in wireshark traces, refactor the trace_pdu parameters
* !2897 nr rlc: add a lock to protect access to time variables
* !2903 remove some openair1 headers included in opeinair2 files
* !2876 Enable 32 HARQ Processes in DL, UL
* !2849 Fix UE SRS crash
* !2898 Fix memory leaks in OAI gNB and OAI UE
* In LTE there is logic that checks the thread configurtion with the
getters `get_thread_parallel_conf()` and `get_thread_worker_conf()`
in NR these getters are not used, only setters, which have no impact
* buffer is allocated but not freed after use by PDCP
> Direct leak of 192 byte(s) in 3 object(s) allocated from:
> 0 0x7ffff74b4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
> 1 0x55555775ee74 in encode_dyn_cb /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/per_encoder.c:23
> 2 0x55555774776e in _uper_encode_flush_outp /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:126
> 3 0x55555774776e in uper_encode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:36
> 4 0x555557747c91 in uper_encode_to_new_buffer /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_encoder.c:85
> 5 0x5555576c5172 in do_NR_ULInformationTransfer /openair2/RRC/NR/MESSAGES/asn1_msg.c:965
> 6 0x555556fba691 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1819
> 7 0x555556fc4d2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1717
> 8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* bcch_message is malloced by ASN.1 decoder and needs to be always freed after use along with its contents
> Direct leak of 64 byte(s) in 1 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x555557737ecd in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
>2 0x555557746f81 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
>3 0x5555577471fe in uper_decode_complete /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
>4 0x555556f8b1c9 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /openair2/RRC/NR_UE/rrc_UE.c:732
>5 0x555556fbc365 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1775
>6 0x555556fc4c2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
>7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* strdup is returning a malloced string that needs to freed after use
> Direct leak of 90 byte(s) in 1 object(s) allocated from:
>0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
>1 0x555556c7b341 in main /executables/nr-uesoftmodem.c:461
>2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
* local dl_dcch_msg shall be freed after use
> Direct leak of 384 byte(s) in 6 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x555557737ced in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
>2 0x555557746da1 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
>3 0x555556fa4b31 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1612
>4 0x555556fbb25c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1792
>5 0x555556fc4a4e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
>6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* The RRC task is freeing the ITTI message but the message members that are allocated separetely still need to be freed
> Direct leak of 470 byte(s) in 6 object(s) allocated from:
>0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>1 0x55555721f117 in itti_malloc /common/utils/ocp_itti/intertask_interface.cpp:64
>2 0x555556f2356c in deliver_sdu_srb /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:775
>3 0x555556f4e10e in nr_pdcp_entity_recv_pdu /openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c:184
>4 0x555556f278ad in do_pdcp_data_ind /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:285
>5 0x555556f278ad in pdcp_data_ind_thread /openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c:307
>6 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* strdup is returning a malloced string which needs to be freed after use
> Direct leak of 90 byte(s) in 1 object(s) allocated from:
> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
> 1 0x5555591598a3 in main /executables/nr-softmodem.c:667
> 2 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
* allocate memory in heap for the struct ue_CapabilityRAT_Container used locally for buffer encoding
* free the struct members only for the ul_dcch_msg allocated on the stack
> Direct leak of 40 byte(s) in 1 object(s) allocated from:
> 0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
> 1 0x555556f7a89f in nr_rrc_ue_process_ueCapabilityEnquiry /openair2/RRC/NR_UE/rrc_UE.c:1861
> 2 0x555556fa4d85 in nr_rrc_ue_decode_dcch /openair2/RRC/NR_UE/rrc_UE.c:1650
> 3 0x555556fbb33c in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1790
> 4 0x555556fc4b2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1716
> 5 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
* strdup() function is returning a malloced string
which must be freed after use
* replace the strdup with direct use of strings to avoid heap allocation
> Direct leak of 23 byte(s) in 1 object(s) allocated from:
> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
> 1 0x555559e36f87 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2054
> 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
> 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
> 4 0x555559155542 in main /executables/nr-softmodem.c:623
> 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
> Direct leak of 14 byte(s) in 1 object(s) allocated from:
> 0 0x7ffff745b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
> 1 0x555559e370c5 in RCconfig_nr_parallel /openair2/GNB_APP/gnb_config.c:2063
> 2 0x555559e38ea3 in NRRCConfig /openair2/GNB_APP/gnb_config.c:2097
> 3 0x555559155542 in get_options /executables/nr-softmodem.c:423
> 4 0x555559155542 in main /executables/nr-softmodem.c:623
> 5 0x7ffff5e29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
- num DL/UL harq processes, bits for harq id in DCIs, set according to IEs configured in RRC messages
- removed going through all the harq processes before triggering nr_ue_ulsch_procedures in phy_procedures_nr_ue.c
- did not remove usage of MAX_HARQ_PROCESSES in init phase
- Enabled configuration for number of dl, ul harq processes in conf file
- set "num_dlharq = 32; num_ulharq = 32;" under "gNBs" section in the conf file
- default values when not configured is 16 for DL, UL harq processes
- IEs in the RRC messages set according to the number of DL, UL harq processes configured.
- If value 32 is configured , then IEs related to num harq processes and dci bits also configured in Bandwidth parts.
- MAX HARQ PROCESSES set to 32
- for PDSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are the possible configs
- if no IES are defined then 8
- if nrofHARQ-ProcessesForPDSCH is defined then these values- {n2, n4, n6, n10, n12, n16}
- if nrofHARQ-ProcessesForPDSCH-v1700 is defined then 32
- for harq bits in DCI
- DCI 1_0 - 4 bits spec 38.212, section 7.3.1.2.1
- DCI 1_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-1-1, spec 38.212, section 7.3.1.2.2
- for PUSCH - default setting in OAI is 16, according to 3GPP rel17 38.331 these are possible configs
- if no IES are defined then 16
- if nrofHARQ-ProcessesForPUSCH-v1700 is defined then 32
- for harq bits in DCI
- DCI 0_0 - 4 bits spec 38.212, section 7.3.1.1.1
- DCI 0_1 - 4/5 bits according to IE harq-ProcessNumberSizeDCI-0-1, spec 38.212, section 7.3.1.1.2
- FOR HARQ32 , DCI 1_1, DCI 0_1 should be configured in UE dedicated search space. In OAI it is set.
Integration: `2024.w31`
See merge request oai/openairinterface5g!2894
* !2812 NR UE MAC PRACH scheduling fixes
* !2885 Fix signal_energy_nodc for lengths that are not multiples of 4
* !2888 nr rlc: fix decode_poll_byte()
* !2892 Dockerfiles: correct ENV format
* !2891 UE cmd line info: print threequarter-sampling param if used
* !2837 replacing assertions with LOG_E in UE UL locking mechanism
* !2879 style(docker): newer versions of docker require keyword as to be of same case as from
* !2832 Enable PHR reporting for NR UE
* !2880 CI: Improve error handling in Iperf3 JSON analysis functions
* !2813 Rewrite time_stats_t counters for DLSCH in NR UE.
* !2882 Automatic scaling to PUCCH2 receiver
* !2691 NR UE data inactivity timer
* !2848 Refactor network interface handling
* !2865 CI: Create FHI 7.2 pipeline
- Modify CN deployment and termination functions to include namespace and path parameters.
- Update `Module_UE` class with new attributes for namespace and CN path.
- Integrate `cnID` for OC CN deployment and termination in `epc.py`.
- Extract `cn_id` from XML configurations for CN operations.
- Update XML files to include `cn_id` tag for 5G Core initialization and
termination. (Used in OAIUE and AW2S pipeline, for OC CN deployment. This change
will not affect other CN deployments.)
Create directories for gNB deployment with VVDN and Benetel550 RUs.
Each directory includes scripts for setting up and cleaning up the
host machine running the gNB.
Handle IPv6 (and IPv4v6) PDU sessions by correctly instructing
nas_config() to set up the interface with provided IP addresses.
Note that as of now, IPv6 PDU sessions have not been fully tested.
Remove a useless assert at the gNB; to my understanding the gNB does not
care about the IP session type (at least for IP), as it just
transparently tunnels the IP packets from/to GTP.
I added a comment in the code where to change to request a PDU session
different from IPv4. Currently it is hardcoded to IPv4, and it seems
that a default OAI 5GC config would reject a PDU session type different
from IPv4.
- Read interface flags before setting status to not inadvertently
overwrite existing flags
- Set interface flag point-to-point, remove multicast (I think a UE is
not supposed to send anywhere else than to the UPF, so it seems to not
make sense to declare the interface as multicast)
These rules & route are necessary to properly send packets on oaitun_ue1
interface:
1. This forces the packets coming from a subnet different than the UE's
subnet to go back through oaitun_ue1 rather than via what the default
route defined on the system (e.g., important if ping from the
internet arrives).
2. On machines setting net.ipv4.conf.oaitun_ue1.rp_filter=1 (e.g.
RHEL), this prevents that source filtering for packets coming back is
applied and those packets be dropped. By default, many hosts have
rp_filter=2, so no strict source filtering is applied, and it would
work; on others, this rule prevents source filter dropping.
Prior to this commit, there was a global variable baseNetAddress that
could be set independently through a setter and also through the
configuration module. This baseNetAddress (16 bits IPv4) would then be
complemented with two more bytes in nas_config().
However, this is counter-productive, as not only we have a global
variable that is avoidable (we can give the entire address to
nas_config() directly), but it also would not work with IPv6. Hence,
modify to give nas_config() the entire address. A follow-up commit will
add IPv6 support.
- refactor functions to make them shorter
- provide doxygen strings
- open socket for operation once instead of in each function
- use named constant (from enum) to differentiate interface UP/DOWN
- Linux kernel defines name length as IFNAM_SIZE, so use that for
interface name length. Also, it seems no null-byte is needed.
I initially planned to entirely remove the netmask configuration.
However, in specific configurations, e.g. in 4G Rfsim with feMBMS,
routing does not seem to work anymore using these commands:
iperf -B 10.0.2.2 -s -u -i1
iperf -c 10.0.2.2 -B 10.0.2.1 -u -t 30 -b 2.00M -i1
Therefore, we simplify by hardcoding the netmask to /24, which allows
the above to work.
Remove the broadcast address from the UE, as logically, a UE has nothing
to broadcast: it can only directly talk to the core. Additionally, at
least as of now, the UE interface is shown as "POINTOPOINT", so
broadcasting is not possible.
Does the same change in the _mbms() functions as in the previous commit.
Also, simplify logic in netlink_init_mbms_tun(): directly use the id in
the interface. This requires a slight ID change in the users, which is
also done in this commit.
Instead of implicitly using a hardcoded prefix "oaitun_" interface
name, move that out to the callers of these functions to make it clear.
The ID still remains outside.
The "sister functions" nas_config_mbms()/netlink_init_tun_mbms() will do
the same change in the next commit.
Comparing both functions, it seems that nas_config_mbms_s1() sets the
same parameters, assuming that in nas_config_mbms(), we set
- (UE_NAS_USE_TUN || ENB_NAS_USE_TUN) yielding true -> should yield the
same interface name
- netmask is hardcoded to 255.255.255.0
- baseNetAddress is hardcoded 10.0
So replace the call with nas_config_mbms() by setting parameters
accordingly.
- Remove unused NAS_config(): It does most of what the highly similar
nas_config() does.
- Remove unused set_gateway()
- Remove unused blocking_NAS_config()
- Remove unused functions getNetMask()
- Remove unused broadcast functionality: functions setBroadcastAddress()
and getBroadcastAddress(), as well as global variable broadcastAddr
are not used in consumers. Remove it.
- Make functions static
I don't know about any user of the kernel modules. It is effectively
legacy code we carry around, for no good reason. Remove it for the
moment. If we ever need it, we can revert.
Remove netlink code, and the PDCP_USE_NETLINK macro, as there is no
known use, it makes the code more complicated, and is simply "technical
debt".
In 4G PDCP, a subtle change has been introduced, in pdcp_module_init()
of pdcp.c. Looking at the diff of this commit, it can be seen that there
is now a new "else-if (ENB_NAS_USE_TUN_W_MBMS_BIT)" branch that is under
what was the "if (PDCP_USE_NETLINK)" branch, while the code fragment was
actually inside the "else" branch of PDCP_USE_NETLINK. This seems to be
necessary: previously, if we did not use noS1 mode and we don't use any
TUN (i.e., the eNB), the else block would set up this interface. It is
important that this interface is brought up, because if we omit it,
RFsim will not work. It seems to me that this interface will regularly
create some traffic; without it, RFsim will be blocked, and the UE
cannot connect.
In short, it seems to be important to have the MBMS interface, which
injects traffic in the RFsim side, which will unblock RFsim. The change
in pdcp_module_init() preserves the total changes of the if-else
(PDCP_USE_NETLINK).
Tests showed that we sometimes exceed the response window. In that case,
the UE cannot connect anymore, as do-ra uses contention-free RA, and
prefills a RA process. Avoid this by giving more time in the CI test.
Remove function pointers that were used in the past to implement the
F1(-U) interface in 4G, i.e., to have different functions to handle
split/monolithic operations. As we don't have F1 in 4G anymore (see
commit 9dc2282249), we don't need the
function pointers anymore.
On that occasion, rename the 5G functions by prepending nr_ to them;
this allows to refactor the interface in 5G further (which is not the
focus of this changeset).
Integration: `2024.w30`
See merge request oai/openairinterface5g!2877
* !2830 NR feature set update
* !2868 Fix support for USRP UHD Versions => 4.5.0.0
* !2870 fix(docker): base image for target oai-gnb-aw2s shall be jammy
* !2874 Fix memory leaks in gNB PDU Session Setup Request processing
* !2866 RRC: reject PDU sessions if security is not active
* !2829 Automatic update of USRP RX gain during initial search using --agc option
* !2878 USRP: add a T trace to record the TX IQ data on antenna 0
* !2633 Handle F1 Reset at DU, and ensure state re-init on F1Setup
* !2864 Fix an assert in power control
* !2754 Introduce gold sequence cache
38.473 requires to reset UE-related contexts in F1 Setup Request, so do
it.
However, avoid resetting UE states in phy_test: it has preconfigured UE
which we should not reset. Note that if NSA/phy-test used F1, we could
likely reset the UE state here, as the F1 UE context setup would come
afterwards.
Add gold sequence cache with dynamic size, private to each thread. It
periodically reorders by call rate. To free the gold sequences after end
of life time of a thread, use the pthread API.
This assert and assumption is incorrect, according to 38.101-1 UE channel is defined only by the BWP size
and BWP size can be any value supported by the RRC parameters defining the BWP.
To determine the UE channel the smallest bandwidth supporting the BWP is selected. This is an assumption based
on references in the same document to UE channel bandwidth being equal to one of the values in set
{5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100}.
Also:
- calculated P_CMIN during BWP setup since the parameter doesn't depend on DCI.
- initiialize uniqCfg structure in test_nr_ue_power_procedures main function which enables LOG prints during tests
The next commit implements the release of all UEs following the F1 Reset
message. It uses nr_mac_release_ue(), which as of now, triggered a
release complete message automatically, which we don't want in the case
of F1 Reset.
This commit refactors the code to split UE release at MAC/RLC and
release complete message sending to allow to release UEs without sending
the complete. Corresponding users are updated.
* aper_decode allocates memory for for local pointer `pdusessionTransfer`, in `decodePDUSessionResourceSetup`
* this memory seems not to be freed but its members are by:
`ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer,pdusessionTransfer);`
which btw in its header says: "AVOID using it in the application code; Use a safer ASN_STRUCT_RESET() instead"
* the following mem leak was detected by ASAN:
```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
*0 0x7ffff74b4a57 in __interceptor_calloc /src/libsanitizer/asan/asan_malloc_linux.cpp:154
*1 0x55555cb306df in SEQUENCE_decode_aper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_aper.c:36
*2 0x55555ca9fa28 in aper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/aper_decoder.c:78
*3 0x55555b99bae6 in decodePDUSessionResourceSetup /openair2/RRC/NR/rrc_gNB_NGAP.c:273
*4 0x55555b99fec2 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:357
*5 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
*6 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
*7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```
* This commit replaces ASN_STRUCT_FREE_CONTENTS_ONLY with ASN_STRUCT_FREE, which will free the memory allocated for the entire struct and its members
* fill_DRB_configList_e1 is filling `DRB_configList->list` then passing to PDCP
* the contents of the struct are allocated but seem not to be freed
* the following mem leak was detected by ASAN
```
Direct leak of 32 byte(s) in 1 object(s) allocated from:
*0 0x7ffff74b4c38 in __interceptor_realloc /src/libsanitizer/asan/asan_malloc_linux.cpp:164
*1 0x55555caa6a3e in asn_set_add /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/asn_SET_OF.c:27
*2 0x55555c8b8bb6 in fill_DRB_configList_e1 /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:42
*3 0x55555c8be6eb in e1_bearer_context_setup /openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c:189
*4 0x55555d329668 in cucp_cuup_bearer_context_setup_direct /openair2/RRC/NR/cucp_cuup_direct.c:31
*5 0x55555b9a2c37 in trigger_bearer_setup /openair2/RRC/NR/rrc_gNB_NGAP.c:437
*6 0x55555b9b54bf in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ /openair2/RRC/NR/rrc_gNB_NGAP.c:830
*7 0x55555b936871 in rrc_gnb_task /openair2/RRC/NR/rrc_gNB.c:2428
*8 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
```
* using ASN_STRUCT_RESET to free the memory used by the members of the structure
without freeing the structure pointer which is allocated on the stack
- if search fails, keeps increasing the rx gain (set by --ue-rxgain) by
3 db until USRP max rx gain
- if initial sync is success, sets the rxgain to the value of
(TARGET_RX_POWER (50) - pbch digital power in dB/RE)
OAI 5GC seems to have a bug, and occasionally might send a PDU session
setup request without having sent a UE context setup request, resulting
in no security context activated for a UE. This lead to an assertion in
rrc_gNB_process_e1_bearer_context_setup_resp().
To prevent the gNB from stopping, check if security is active before
triggering PDU sessions. If not, the gNB will reject PDU sessions.
Integration: `2024.w29`
See merge request oai/openairinterface5g!2867
* !2854 Fix NSA test
* !2715 Aerial multi l2
* !2798 CI: Create Iperf2 unidirectional function
* !2859 Switch to BWP where RA is configured when Msg3 contains MAC CE for C-RNTI
* !2861 7.2 xran: notification generation code in ru_thread excluded from compilation
* !2853 Cleanup executables focusing on NR UE
* !2860 Fix segfault in SRS modulation when ue-nb-ant-tx (fp) does not match UE capabilities
* !2863 Add configuration for CBRS RU
* !2749 immediately reuse UL/DL HARQ ID and don't wait for feedback if disable_harq == 1
* the mismatch between UE capabilities, passed to PHY by NFAPI PDU, and --ue-nb-ant-tx
causes a segfault in SRS modulation
* issue with indexing txdataF[p_index], which fails due to an out-of-bounds access
since first dimension of txdataF is sized based on ue->frame_parms.nb_antennas_tx
* N_ap used in SRS modulation is based on the number of antenna ports
in the SRS configuration (srs_config_pdu->num_ant_ports)
sched_ul_bytes is reduced already in case the last HARQ round fails through handle_nr_ul_harq() -> abort_nr_ul_harq().
Therefore, the reduction in nr_rx_sdu() is wrong, and btw. it wrongly assumes the max. UL HARQ rounds to 4.
So simply remove this peace of code in nr_rx_sdu().
sched_ul_bytes tracks the volume of in-flight data.
When data is successfully received, sched_ul_bytes is decreased in nr_rx_sdu().
In case of reusing HARQ processes, the tb_size stored there is not correct.
Therefore use the actual SDU size instead.
Don't break after first occurence of status template (interval "0.0- 1.0 sec").
With this modification we get final result, which is at the last line of log
(for interval "0.0-30.2 sec").
Remove code related to "rfsim4g_enb_fembms" testcase from Iperf_Module() -
replaced by Iperf2_Unidir(). Use copyin() for both remote and local
commands - no need to check if running on localhost anymore.
Create directory for log collection on executor node -
used for log collection in pipelines running on localhost.
Copy the iperf3 report to the executor machine for log collection.
The report needs to be copied to two different directories to ensure
proper log collection across all pipelines. Using absolute paths
ensures compatibility with both remote and local commands.
making aerial shm prefix configurable (so we can use muliptle VNFs per PNF)
making the nvipc thread affinity configurable and using threadCreate.
removing aerial_vnf_nr_aerial_p7_start_thread
In NSA, the RA process contains the RNTI of the UE to add. The previous
implementation would not remove the RNTI in NSA/for CFRA, which is
unclear (why should it stay? RA is over). Also, we did not clear all
contents, which masked a bug, as we were reusing an RA process for a
subsequent attach, leading to a segfault on reattach. That is fixed in
this commit.
Also, we were using the RA structure after having cleared it in
_nr_rx_sdu(), which semantically makes no sense.
To harmonize handling of the preambles: completely reset the RA
processes inside nr_clear_ra_proc(). For SA, also add the initialization
of allowed preambles.
Finally, this commit fixes a memory leak: we always (also in SA) fill a
list of preambles in a dynamically allocated preamble list. Since the
total list is only up to 64 preambles of 1B each, put it directly into
the struct instead of dynamically allocating it.
Remove the secondaryCellGroup variable in RRC, as it is not used there.
Note that in the case of F1, the secondaryCellGroup entirely belongs to
the DU, i.e., MAC. Also, we don't do anything with it in RRC.
NSA is quite verbose, some messages are large and it is not very
"interesting" for the average user. The logs can be enabled on demand,
or directly seen in Wireshark instead.
The RRC UE context has the RRC UE ID. Use that instead of hardcoding
something that might be wrong (because the RRC UE ID can be reused,
whereas the counter just blindly increases).
The next commit will use that RRC UE ID to free the PDCP context for the
UE. It might be wrong on reattach otherwise, because the RRC UE ID could
again be 1.
Variable spCellConfig is only used in function rrc_add_nsa_user(). Make
it local to this function to prevent possible bugs (limit the possible
scope as much as possible).
Variable reconfig is only used in function rrc_add_nsa_user(). Make it
local to this function to prevent possible bugs (limit the possible
scope as much as possible).
Simplify code by returning an allocated object to a CG_Config. It leads
to less code and is easier to reason about, because each call will
return a new CG_Config, which can be freed, irrespective of other calls
to fill_default_reconfig().
Simplify code by returning an allocated object to an RRCReconfiguration.
It leads to less code and is easier to reason about, because each call
will return a new RRCReconfiguration, which can be freed, irrespective
of other calls to fill_default_reconfig().
get_default_secondaryCellGroup() would "sanitize" the servingCellConfig,
i.e., remove BWP that are invalid. However, it is difficult to
understand (we can do sanitization once at the beginning) and reason
(why the servingCellConfig is modified in
get_default_secondaryCellGroup(), because all we want is a new
CellGroupConfig, without modifying other data structures).
Instead, do sanitization once after reading the configuration in
gnb_config.c. Also, modify physical simulators nr_dlsim and nr_ulsim to
apply this sanitization before a call to
get_default_secondaryCellGroup(), as the latter would have done the
sanitization.
This reverts commit 4c658cdd50.
This commit was introduce to signal a known segfault. The bug has been
fixed in the last commit, so this commit can be reverted as the
AssertFatal is not necessary anymore.
Prior to this commit, upon a release of a UE at the gNB in NSA, the gNB
fails with a segv. This is because the servingCellConfigCommon is used
in the reconfigurationWithSync (through a simple pointer). At the
release, the entire secondaryCellGroup is freed, leading to a free of
the servingCellConfigCommon. The gNB then tries to use it (e.g., for
looking up the numerology), and leading to a segv.
To avoid this problem, make a "deep copy" of the ServingCellConfigCommon
so that we can safely free the UEs secondaryCellGroup, without freeing
the initial ServingCellConfigCommon.
Switch to BWP where RA is configured, typically in the InitialBWP
At this point, MAC CE for C-RNTI received at gNB, UE already switched and triggered RA in that BWP, need to do BWP switching also at gNB for that C-RNTI
Integration: `2024.w28`
See merge request oai/openairinterface5g!2856
* !2847 UE setting wrong frequency in 5G rfsimulator SA test
* !2850 NR UE MAC DCI 00 BWP handling
* !2852 \[E2 agent\] Move UE RRC_CONNECTED state signaling
* !2851 Minor code cleanup and fixes
* !2842 UE assertion for msg1_SubcarrierSpacing in RA
* !2831 PUSCH power control state
* !2838 NR UE UL FAPI PDU length fix
* !2723 add initial NTN support for NR UE
* !2764 Adding 7.2 containerfiles and docker-compose
* !2827 Increase RX_DATA.indication PDU Length to 32 bits
Correct the array by taking out a verification entry in the verification
array that led to runtime error
Assertion (numparams == (sizeof(cmdline_CheckParams)/sizeof(*(cmdline_CheckParams)))) failed!
In get_common_options() /home/richie/openairinterface5g/executables/softmodem-common.c:109
Error in arrays size (41!=42)
- Add dedicated target docker files for 7.2, both RHEL and Ubuntu
- in existing dockerfiles, update to also build E2 SMs
- for UBI images, only the entitlements are necessary, the rest can be
omitted (it is superfluous)
Signed-off-by: arora <sagar.arora@eurecom.fr>
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
The actual propagation delay should not be smaller than the one specified.
A too short propagation delay might result in too early reception of Msg1, and with that in a mis-detection of the RAPID.
Until commit d74b2bd19f, the PSS detection step size was 4, anyways.
The PSS detection step size is a compromise between detection duration and accuracy.
The most accurate detection step size would be 1, but this would lead to even longer initial sync time.
- E2SM UE ID requires guami -> therefore RRC_CONNECTED state signaling
to RIC is now done after receiving Initial Context Setup Request
from AMF, which contains the guami info
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0
This parameter `cellSpecificKoffset_r17` can be set via UE command line parameter `--ntn-koffset`.
Integration: `2024.w27`
See merge request oai/openairinterface5g!2839
* !2781 Fix several ASN.1 message related memory leaks in NR
* !2790 docker compose override files for testing with locally modified executables.
* !2835 Demote logs for NR band and duplex spacing
* !2822 security in re-establishment
* !2834 Fix CN tutorial SD value
* !2843 Delete assertion for PLMN in RRCSetupComplete
* !2771 NR UE PDSCH-CSI overlap
* !2721 T2 card: LDPC encoder/decoder TB processing
* !2828 Bugfix to TX_DATA.request PDU_Length computation, change input parameter to uint32_t
* !2841 Reduce number of LOG prints in NR UE log
* !2844 phy-test mode ULSCH schdeuler hotfix
* !2765 Fix issues blocking multiple UE in one process
* !2826 NR gNB ULSCH fixes
* !2845 Another phy-test ULSCH fix (missing TDA assignment)
* !2840 chore(build): removing dependency to libatlas3
address sanitizer fails with this error upon starting the DU:
==7==ERROR: AddressSanitizer: odr-violation (0x7f8ed2594a00):
[1] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
[2] size=4 'log_mem_write_side' /oai-ran/common/utils/LOG/log.c:78:14
These globals were registered at these points:
[1]:
#0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
#1 0x7f8ed570d47d in call_init elf/dl-init.c:70
[2]:
#0 0x7f8ed5092658 in __asan_register_globals ../../../../src/libsanitizer/asan/asan_globals.cpp:341
#1 0x7f8ed3fe3eba in call_init ../csu/libc-start.c:145
#2 0x7f8ed3fe3eba in __libc_start_main_impl ../csu/libc-start.c:379
==7==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'log_mem_write_side' at /oai-ran/common/utils/LOG/log.c:78:14
So we do as suggested and disable ODR violations to make the test pass.
A proper solution would be to link this function only once.
The total_length parameter in compute_PDU_Length being uint16_t causes
the passed value to be possibly truncated, which can cause the
PDU_Length to be incorrectly calculated.
This change prevents that truncation, since it now matches the size
of the values passed into the function where it is being called.
- r_amf->plmn_Identity was interpreted incorrectly, therefore remove it
- selected_plmn_identity selects one of the list of PLMNs; at the
moment, OAI supports only 1 PLMN ID; print a warning if it is
different, and proceed with index 0
More information in issue #801
- make it work for SRB or DRB
- adapt callers of this function
- cleanup key derivation: the User Plane keys are generated at some places
but are not used, remove the generation
Integration: `2024.w26` (part 2)
See merge request oai/openairinterface5g!2823
* !2794 Power control changes
* !2816 Fix test asan errors
* !2820 fix(T): some missing dependencies on T
* !2714 FAPI P5 Refactoring and unitary test creation
* !2819 Prevent unnecessary assertions for invalid DCI at NR UE
* !2825 Do not extract CSI report if PUCCH format 2 CRC check fails in polar decoder
* !2805 GUAMI decoding and storing in RRC UE context fixed
This fix prevents the scheduler to process a wrong CSI feedback message, for example, it avoids the scheduler to compute a wrong MCS from CQI or a wrong RI from CQI
- Introduced command line and configuration options to set up PCI address, CPU cores used by DPDK, and DPDK file prefix for T2 offload.
- Made the dpdk_dev parameter (for setting the PCI address of the T2) mandatory.
- Configure dpdk_dev in the CI test cases.
- Replaced bbdev TEST_ASSERTs with the OAI macro AssertFatal() to harmonize error handling.
- Removed unused functions and macros from nrLDPC_offload.h.
- Reworked nrLDPC_decoder_offload.c to process all segments in a TB with a single call to LDPCdecoder() or LDPCencoder().
- Perform CRC checks on the T2.
- Modified nr_ulsch_decoding (gNB decoder) to:
- Count processed segments.
- Properly perform CRC checks.
- Created a constant NR_LDPC_MAX_NUM_CB to define the maximum number of codeblocks.
- Conditional library loading:
- On gNB: Load ldpc_t2 library if offload is enabled using the --ldpc-offload-enable flag.
- On UE: Load both ldpc_t2 and ldpc libraries since only encoder offload is supported.
- General cleanup of nrLDPC_decoder_offload.c for improved readability and maintainability.
- Modified the structure of LDPC encoder/decoder/offload parameters:
- Introduced a structure for code block (CB) related parameters.
- Removed parameter E from the encoder and offload parameter structures for clarity.
- Replaced E with perCB->E_cb in the UE encoder code.
This reverts a change in commit
ccba7c875d. There is no real reason to
show this warning (the gNB will work just fine, simply not schedule
since no free HARQ) and it makes users unsure.
- come straight to point: how to clone (don't talk about git config)
- refer to contributing documentation where necessary instead of
repeating information
- CellGroupConfig is handled through DU (hence MAC)
- mention number of DUs/CU-UPs handled per CU-CP
- mention number of UEs handled
- take out BWPs, as we don't support it properly
- typos
Update instructions and CI for cross-compilation on Ubuntu 22.
Note that for the dockerfile, we use egrep -L which has changed and does
not exit with code 0 on no match. Instead, use -vqz to invert return
code (0 if nothing found, otherwise 1).
iperf2 2.0.13, used in Ubuntu 20, does not need a "back channel"; we can
therefore use it in feMBMS (which does a broadcast, without back
channel). Ubuntu 22 comes with 2.1.5, which seems to require a back
channel, or at least, we cannot use it reliably in feMBMS. Hence,
downgrade to older iperf2 version.
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This updates all images in the CI to Ubuntu 22. It also updates
corresponding documentation. Remove python(2) from the image, as it is
not needed. Update documentation.
It seems that the gcc coming in Ubuntu 22 does not like
stack-protector-strong, so remove it as well.
Since we compile Flexric, which does not support Ubuntu 22's default
gcc-11 (it hits a compile bug), switch to gcc-12 manually.
Since we update the compiler, we also need to be careful to use the right
address sanitizer version (which is bundled with the compiler version).
To avoid a reinstallation of the wrong asan version in target images, we
modify Ubuntu 22 targets to copy libasan from the base image. This is necessary
since we use update-alternative in the base image, but we don't want to
install compilers in the target images to use update-alternatives to
install the right asan version... This should be undone when switching
to Ubuntu 24 in the future, as it will have a newer default gcc version,
such that we don't need to update the compile in the first place.
Upgrade libpython in lteUE for U22 upgrade to make it compatible with
UHD.
A number of warnings appear when compiling flexric with gcc-12, which we
use in the next commit. Those have been fixed upstream. Switch to the
updated version to avoid warnings.
It seems libatlas-base-dev provided an `enum CBLAS_TRANSPOSE`, but we
don't install it anymore. Now, in Ubuntu, there is only a typedef'd
version in cblas.h; for RHEL(-derivatives), the same typedef'd version
is in cblas/cblas.h.
Ubuntu 18.04 is now in "Extended Security Maintenance", but otherwise
gets no updates. Remove it from supported distributions (regarding
installing packages); users can of course still use it.
Users are encouraged to upgrade to Ubuntu 20+.
Apart from the obvious change of adding ubuntu24.04 to supported
distributions, we need to remove liblapacke-dev as it is incompatible
with libatlas3-base. Installing both aborts with:
The following packages have unmet dependencies:
liblapacke : Breaks: libatlas3-base (< 3.10.3-14) but 3.10.3-13ubuntu1 is to be installed
It seems that we don't need it though, as liblapacke-dev installs the
right atlas library as a dependency.
Fix small issue noted when packing tlv value with tag 1 in which it would pack length*4 bytes, now calculated how many "segments" of 32 bits it needs to pack, same logic for unpacking tag value 1
Added missing support for packing/unpacking tag 0x001C (supportedMaxModulationOrderDl)
Now properly handles tag 0x0005 (NumConfigTLVsToReport) and subsequent TLVs that come after this value ( Table 3-9 SCF 222.10.02 )
Implement FAPI P5 message unpack, as well as message length check function procedure in FAPI P5 library.
Update check_nr_unpack_length in nfapi_p5.c to reference FAPI P5 message length check function.
Will be reused from other files in later commits.
Added packing/unpacking procedures for STOP.indication and ERROR.indication.
Separate a packing function for STOP.request for use in the NR FAPI library.
Expose needed (n)FAPI procedures to aerial_lib ( both P5 and P7 ) via a
header file.
Move (n)FAPI P7 packing/unpacking function interface into separate header file
Include needed headers in aerial_lib
- Phy config update and Sidelink frame parameters initialisation
- PSBCH scheduler to trigger TX PSBCH/RX PSBCH actions
- Sidelink indication with rx ind to trigger send SL-MIB to MAC
- Enable Scope for PSBCH use -d or --dqt
- Enable system testing of PSBCH for example using RFSIMULATOR:
- UE1 is a SYNCRONISATION SOURCE UE which transmits PSBCH
started using command -
sudo ./nr-uesoftmodem --sl-mode 2 --sync-ref 4 --rfsim --rfsimulator.serveraddr server
- UE2 syncs onto UE1 during sidelink search, gets the timing and continues to receive PSBCH
started using command -
sudo ./nr-uesoftmodem --sl-mode 2 --rfsim --rfsimulator.serveraddr 127.0.0.1
- In the default use case 2 Sidelink SSBs sent over 16 frames.
- In case SL-SSB configuration needs to be changed use -O option in the above command like
-O ../../../targets/PROJECTS/NR-SIDELINK/CONF/sidelink_preconfig_1txpool.conf
Integration: `2024.w24`
See merge request oai/openairinterface5g!2801
* !2789 CI: Increase iperf/iperf3 command timeout
* !2762 improve nrUE NAS security: accept NEA1,NEA2,NIA1,NIA2
* !2791 fix regressions for large physical cell id values
* !2792 Add support for MIMO 2x2 with USRP B210 at 20 MHz BW and 3/4 sampling rate
* !2748 Small UE fixes
* !2745 Add google test testcases for nr_get_Pcmax
* !2785 Update FHI 7.2 interface, test bandwidths, fix integer overflows
* the goal is to make the documentation more procedural and
descriptive and easier to understand
* added missing info in RLC-NR about reassembling of AM frames
Avoid UBSan error:
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:1524:41: runtime error: signed integer overflow: 737285888 + 1459370880 cannot be represented in type 'int'
Avoid UBSan error:
openair1/SCHED_NR/phy_procedures_nr_gNB.c:867:37: runtime error: signed integer overflow: 1744750952 + 412859840 cannot be represented in type 'int'
Avoid UBSan error:
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:246:18: runtime error: signed integer overflow: 1457321472 + 922889664 cannot be represented in type 'int'
Avoid UBSan error:
openair1/SCHED_NR/phy_procedures_nr_gNB.c:869:43: runtime error: signed integer overflow: 1546663455 + 1635930955 cannot be represented in type 'int'
Integration: `2024.w23`
See merge request oai/openairinterface5g!2788
* !2510 NR UE MAC UCI on PUSCH and aperiodic CSI reporting
* !2597 LTTng logger (CTF)
* !2751 synch the USRP time accross devices using the host clock
* !2775 Remove some global variables
* !2779 remove rb_mask_ul from permanent storage for stack local usage
* !2782 USRP: add a T trace to record the RX IQ data on antenna 0
* !2783 build_oai: fix bad options' names
* !2753 Pucch power control
* IP address of VNF shall be aerial1's one
* scripts within cubb container shall be run with sudo now
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
In some testcases, especially when iperf test duration is short (10s),
client does not report on time and report collection is interrupted.
This commit increase timeout for iperf/iperf3 commands.
Avoid UBSan error:
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c:183:22: runtime error: signed integer overflow: 2122747784 + 27403601 cannot be represented in type 'int'
avoid UBsan error:
openair1/PHY/NR_TRANSPORT/pucch_rx.c:266:21: runtime error: signed integer overflow: 2113190528 + 117251752 cannot be represented in type 'int'
avoid UBsan error:
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c:459:77: runtime error: signed integer overflo w: 2009540296 + 668087372 cannot be represented in type 'int'
xran's xran_bm_init() uses rte_pktmbuf_pool_create() to allocate DPDK
buffers. For a 1x1 configuration, the number of buffers might be too
small, and rte_pktmbuf_pool_create() might fail. This commit ensures
that we increase the number of buffers to have enough even in a 1x1
configuration. This works by chosing the next power of two, which is
recommended as per DPDK documentation.
Closes-Bug: #750
Neighbor configuration can be given by gNB.conf
get_MeasConfig function is extended as it will prepare A2 / A3 Report
Configs. Single Meas Obj is used for all.
rrc_gNB_process_MeasurementReport function is extended to process A2 /
A3 measurement events. helper functions are written to fetch neighbour
cell informations from sequence containers.
(get_neighbour_cell_information, get_neighbour_config)
- neighbour_config.conf file includes neighbour and measurement related parameters
Neighbour List:
- nr_cellid: the identity of existing cell who has neighbour
- neighbour_cell_configuration(list): includes the identity parameters
of the neighbour cell such:
- gNBID (incase of N2 Handover / to be identified from AMF)
- nr_cell_id (target gNB needs to consider)
- physical_cellId (needed for measurement reporting)
- absoluteFrequencySSB (needed for measurement reporting)
- subcarrierSpacing (needed for measurement reporting)
- plmn / tracking area code (incase of N2 Handover / needed for AMF
to identify / allow HO)
NR Measurement Configuration
- Periodical
- enable (default is 0, 1 enables the reporting)
- includeBeamMeasurements, maxNrOfRS_IndexesToReport (configurable
reporting parameters)
- A2
- enable (default is 0, 1 enables the reporting)
- threshold , timeToTrigger (configurable reporting parameters)
- A3
- cell_id (the nr_cellid of neighbour cell. So this A3 parameters
will be used for the neighbour
- [-1] means default. so it can be applied to any neighbour if
there is no specific config
- Neighbour specific A3 Threshold can be used or default can be
selected depending to the neighbour planning
- The neighbour-config.conf specifies, apply default A3 for
neighbours 3 and 4 | apply specific one for neighbour 2
- offset, hysteresis, timeToTrigger (configurable reporting parameters)
the neighbour_config.conf can be included in the gNB.conf file. Example
is given: gnb.sa.band78.106prb.rfsim.neighbour.conf
A sequence array container is used for neighbour cell configuration. RRC
structure has this container. A Measurement configuration structure is
defined. This structure has Periodical / A2 Event structures and also a
sequence container for A3 Event List.
These structures are filled during the initialization. While F1 Setup
Response is coming from DU to CU, the intra frequency / inter frequency
neighbour decision is given for the existing cell. Also new neighbours
could be added here if needed.
With the capabilities now given as part of this MR, it happens that when
checking the "docker compose config", the container_name might not be
close to the service name. Something like
service:
cap_drop:
...
cap_add:
...
container_name:
This is inconvenient, as the previous grep for the service name + 3
lines might not cover the service name. To circumvent this, give the
service name directly in "docker compose config". (no clue why it has
not been done like this from the start)
- sa_b200_gnb
- sa_aw2s_gnb
- sa_e1_b200
- sa_f1_b200
- sa_sc_b200_gnb
- nsa_b200_gnb
By default, the container has no access to /dev. Mount all USB devices
into the container to ease usability: by default, USB devices are
mounted under /dev/bus/usb using the bus ID, which is different on every
system and might change on reboots or with (un-)plugging USB devices.
Hence, mount all USB; the process has not many capabilities anyway, and
thus might not do much harm.
A proper solution would be to write a udev rule to mount a device using
its vendor and product ID, and only mount the corresponding device into
the container.
- SA 2x2 tests on 60 and 100 MHz
- N310-based OAI gNB + UE
Give SYS_NICE and IPC_LOCK for performance. On the UE side, give
NET_ADMIN (for interface bringup) and NET_RAW (for ping an TUN).
It might be desirable to run the UE without superuser rights. More
concretely, it might run without NET_ADMIN. In this case, various
corresponding operations on the TUN socket fd might fail. In this
commit,
- improve error reports to make them more clear
- do not automatically exit(1), but return from the function to ensure
continuity of the softmodem
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
Use common threadCreate() function to create P7 thread with high(er)
priority. Remove old calls to set_priority(), as this is already done
with threadCreate().
The main thread of nr-uesoftmodem (executing main()) is mostly working;
it is thus not necessary to set high priority. Instead, the threads
created with threadCreate() will receive higher priority, if possible
(as determined by the availability of SYS_NICE capability).
To inform if SYS_NICE is not present, print a warning in main().
SYS_NICE is a capability that allows a process to set thread affinity
and priority, among other things (see capabilities(7) for more info).
In this commit, add a function that allows to determine if the process
has this capability, and try to change the thread affinity and priority,
if requested. If the capability does not exist, the function will simply
not attempt to change the corresponding thread attributes.
To determine if the process has SYS_NICE, libcap can be used. However,
it might not be installed by default. To avoid requiring another
dependency, if we detect that libcap is not present, use a workaround by
try to set a real-time scheduling policy; if it's present, or can be
changed, we assume that the process has SYS_NICE (and clean up, if
relevant).
Simplify reading of capabilities
set_latency_target() attempts to set keep "low latency" by
- writing a specific latency to /dev/cpu_dma_latency
- setting manually the minimum CPU processor frequency to be the maximum
There is no functionality to undo this after stopping the softmodem(s),
and most users are probably not even aware that OAI does this. It is
generally preferable to set this beforehand using a governor or by
disabling sleep states (as outlined in the tutorial, and in a follow-up
commit in the performance tuning docs).
The previous mlockall() call, to lock memory to RAM, is retained in a
new function. There were additional mlockall() calls, which have been
replaced with lock_memory_to_ram(), where necessary.
Print a clear error if a config file does not exist (unclear previously,
when the user would get a confusing, unspecific, "file I/O error" on
line 0)
I tried to free the memory that had been allocated at that point, and
verified that using the address sanitizer. Nevertheless, the function
does too much, and is too complicated for refactoring.
Use correct baseTag for Unit Tests build in execution:
- if build_helper or othe files changed, which would trigger rebuild of
ran-base, use the corresponding ci-temp tag
- use that tag consistently afterwards
The RTT for GEO satellites is more than 500 ms.
And as the TA update interval must be greater than the RTT, we increase it to 1 second instead of 100 ms.
Should also do no harm for terrestrial networks.
According to the RRC specification, cellSpecificKoffset is:
Scheduling offset used for the timing relationships that are modified for NTN (see TS 38.213 [13]).
The unit of the field K_offset is number of slots for a given subcarrier spacing of 15 kHz.
If the field is absent UE assumes value 0
This parameter `cellSpecificKoffset_r17` can be set in the gNB conf file, in the section `servingCellConfigCommon`
A particular GCC version (v13?) used by CI machines potentially has a
bug that issues a mismatch bound warning on function array arguments.
This commit should prevent it from happening.
There is already a command line option called 'ue-scan-carrier' which
seemed to blindly look for SSB by changing the center frequency by
+/-100Hz if the previous attempt failed. This is probably copied from
LTE and is not suitable for NR. This commit uses this option to either
1. Perform initial sync on one GSCN if the SSB position if known
2. Or scan the all GSCN (if the SSB postion is unknown)
Also, the following is done for re-synchronization
1. Scan all GSCN when UE comes back from IDLE state
2. Scan one GSCN when UE does re-estabishment
Removed dependency of lte-softmodem.h in nr-softmodem.c.
CONFIG_HLP_UESCAN is declared also in lte-softmodem.h.
Changed Info to Debug because the logs are too much if large number of
GSCN scans run concurrently. Print PSS correlation peak and average
power of detected cells.
Till this commit, the UE gets the position of SSB in frequency from
command line and does the syncronization by locating the SSB in time. It
does this by generating a PSS time signal during initialization with the
SSB offset given via command line. Then PSS detection is done by
correlation.
In this commit, the UE computes a list of GSCN in the current NR band
that falls within the current bandwidth for the set center frequency.
For each GSCN in the list, the UE starts a thread and performs the
following:
1. Generate PSS time signal with SSB offset for current GSCN.
2. Detect PSS, SSS and decode PBCH (this step remains the same).
After all threads finishes, the results are collected.
For now, only the first detected PBCH is used to proceed further. So
this PBCH is indicated to MAC and UE exits initial sync.
Future work: The cell search can be standalone feature where the UE
could scan for SSB in the entire NR band. This would require changing
radio's frequency on the fly as the UE's bandwidth would not cover an
entire NR band. The cell detection can futher be imporved by looking
for SIB1 for each decoded PBCH.
Integration: `2024.w22` (Part 1)
See merge request oai/openairinterface5g!2773
* !2698 Handle division by 0 gracefully in average channel level calculation
* !2743 Demystifying 10log10(2^30) in signal energy calculations.
* !2767 NR UE imeisv fix
* !2768 Over-estimate short and long BSR for better latency and TCP throughput
* !2769 maxMIMOLayers parameter in configuration file
38.321 6.1.3.1 says: "The size of the RLC headers and MAC subheaders are
not considered in the buffer size computation" [for BSR]. However, prior
to this commit, we take the size signaled of the BSR and schedule the UE
with that amount of data, making it impossible for the UE to transmit
all its data at once (because it is the size signaled + headers).
In this commit, over-estimate the buffer status size. As we cannot know
the exact number and size of headers, we simply use "BSR size + n", as
done in function overestim_bsr_index().
* nb_re_pdsch is directly linked to nb_rb_pdsch, if the latter is 0 the
former is also 0
* compute average channel level only when number of RE for PDSCH is not 0
the average channel level will be set to 0 otherwise
* Added a log message to handle this special case, which is consequence
of other issues in the RX chain
* with this commit, the inconsistency in the RX chain will be handled
in later in nr_ue_pdsch_procedures with a demodulation failure
other minor changes:
* Improved clarity by using NR_NB_SC_PER_RB instead of hard-coded value 12 in nb of RBs calculation
* cleaned up unused variable and outdated comments
Compiling the nrUE with -fsanitize=undefined leads to a crash
because the function nas_stream_encrypt_eia1() accesses the data
as uint32_t but the data is not aligned.
Actually this function wants 64 bits (big-endian) of data, so let's
introduce a simple function to read a big-endian 64 bits value.
It may seem bad (unoptimized), but looking at the output of gcc
without -fsanitize=undefined this will be translated as just one
movbeq instruction (on the machine where I did the test), which is
actually less instructions than the previous version which was doing
too movbel plus orq.
Moreover, after the main loop we need to process the last remaining
bytes (so less than 8). The code was wrong, reading past the input
data (and also not caring about alignment). It may work, it may fail,
it depends on many things. But it's plain wrong. So this was replaced
for something better, simpler. No need for mask32bit() anymore, only
one call to U64() is needed.
And now -fsanitize=undefined is happy, so all is good.
We also restrict the input length to be multiple of 8 bits. I don't
think it's a problem. To be refined if I'm wrong. (I think RRC and
NAS messages are 8-bits aligned, so it shouldn't be a problem.)
It should not be > 0xffffff.
Normally the core network would prevent this case from happening.
Plus to reach this value means to send a lot of NAS messages, which
is very doubtful in practice.
Anyway, it's better to deal with the case.
We exit if that happens. To be refined if needed (very doubtful).
This function was very wrong, now it's just wrong.
(It does not sanitize the input properly. Some bad input may have
unexpected effects on the nrUE.)
It needs a serious rewrite.
I just wanted to "fix" it so that it processes correctly some
correct input data.
OAI core network is sending Deregistation Accept in clear, even
after security context activation.
The standards is not clear to me, so let's accept it.
To be removed if incorrect with respect to the standards.
(The core network will need to be fixed then.)
The version before this commit is wrong, taking wrong byte for msg_type
in some cases.
I don't have much time to implement a proper NAS PDU parser, so let's go
with hardcoded values.
Some later work will be done to have a cleaner solution. As of now, it's
too much work.
Get the security algorithms from SecurityModeCommand.
Restructure the code a bit: add the function handle_security_mode_command()
and adapt the code to use it.
Derive also knas_enc (not used yet).
Do the derivation for knas_enc and knas_int only after reception
of SecurityModeCommand. We need the algorithms configured by core
network to derive those keys.
Integration: `2024.w21`
See merge request oai/openairinterface5g!2757
* !2733 Remove duplicated function to reverse N bits
* !2712 rfsimulator: add support to simulate a long propagation delay
* !2695 improve polar init and polar readability
* !2709 Fix cmdline configmodule in phy simulators
* !2756 remove some enb dependencies in NR files
* !2687 bug fix ue UL payload filling randomly done in retransmissions (pointer not set)
* !2543 power/PHR normalizations for deltaMCS power adaptation
* !2719 Refactor LC handling at MAC
* !2736 Fix debug for ongoing transactions
* !2747 Fix aerial memory leak
* !2761 Use timeout command to kill hanging iperf3
* !2752 fix-dci11-type0-bitmap-setting
* !2759 Fix invalid MSG2 HARQ feedback attempt and remove accumulated_delta_PUCCH field from UE FAPI IF
* !2740 bugfix/cleanup: remove uint8_t to encode size plus some cleanup
* !2760 fix 5G NR SA FDD configs for 24 and 25 PRBs
* !2520 Documentation on coding style, workflow, and review instructions
It can happen that in the current DL slot, we cannot send an allocation
for Msg3 in a later UL slot. Up to this commit, MAC printed a warning.
However, this is not really a warning, as it will likely work in the
next or a later slot. So demote this to debug.
The starting point was the function do_NR_DLInformationTransfer() which
may deal with more than 256 bytes.
Then why not cleanup all the functions in the same file.
(And do a bit of formattting fixing while we're here.)
Then cleanup the callers of those functions.
Then, because of do_SIB23_NR() let's also cleanup in some
structures.
Not all the codebase was cleaned up, there surely remain some uint8_t
(and char/short/uint16_t) which are wrong.
In some pipelines, it happens that iperf3 is hanging on 100% CPU load.
In these cases, a simple TERM signal does not seem to be enough to kill
it; KILL is necessary.
While e.g., RemoteCmd's driver paramiko has a timeout command, the
documentation [1] is not really clear how it is trying to stop commands.
Since it effectively does not stop, we have to assume it is only sending
TERM.
To remedy this, use the timeout command to start iperf3. We use option
-v for diagnose timeouts on stderr, and send KILL after an additional 3
seconds (-k3) if TERM does not succeed. The timeout is sent to the same
duration as the overall iperf timeout.
[1] https://docs.paramiko.org/en/3.4/api/channel.html#paramiko.channel.Channel.settimeout
make sure the SSB is offset by 4 PRBs from the BW start.
Therefore, the ARFCN for the SSB center must be offset by 14 PRB from the ARFCN for the BW start.
A to-be-added UE's RA is added through nr_mac_add_test_ue() (the name is
misleading, it is not a "test UE") through its CellGroupConfig. Using
the process_CellGroupConfig() is unfortunate, because it is not really
clear what part of the CellGroupConfig gets evaluated (it is certainly
not all). Move the code for adding a new RA directly in the user-add
function, and refactor this one.
Introduce new LC configuration "priority", as specified in 38.321, and
use to sort LCs by priority. We set the priority of an SRB according to
38.331 Section 9.2.1, and for a DRB to be the minimum priority of the
QoS flows associated to this DRB.
Introduce new functions to add/release LCs without needing to go through
the intermediate CellGroupConfig. This harmonizes LC handling at the "DU
handler" to keep it consistent with RLC bearer handling.
These functions allow to group LC configuration handling, and we can
remove functions for setting NSSAIs and QoS by handling in one central
place (while adding LCs).
nr_mac_add_test_ue() is used by simulators and also in NSA mode to add a
new UE. Ideally, these users should also call the ue context setup
request handler to add a UE context; for the moment, respect the passed
list of LCs to add. Similarly, for do-ra, we require a dedicated
function to still parse the CellGroupConfig, so we keep that part of
functionality.
On reestablishment, since we do not process the CellGroupConfig from the
old UE, we need to add LCs for the new UE based on the onces from old
UE.
Use a common structure nr_lc_config_t to group LC configuration for one
logical channel. Use seq_arr for simple lookup, adding, removing of
elements without manual indexing logic.
This commit retains the previous logic of adding/releasing LCs through
the process_CellGroupConfig(), although we know while building the
CellGroupConfig if we add/release LCs. The next commit fixes this.
If we do not make this change, with the next commit, we get the
following error from gcc:
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c:299:46: error: assignment of read-only location '*(arr_ue_id.ue_info_list + (sizetype)(arr_ue_id.sz * 2444864))'
| arr_ue_id.ue_info_list[arr_ue_id.sz] = *ue;
In a later commit, we will use find_if in L2. In the case of building
with E2 agent, we link e2_agent which comes with its own implementation
of find_if_arr(), which results in a name clash. Rename the OAI
implementation, as nothing uses this, anyway.
- addition of control of deltaMCS if enabled in configuration file.
- introduce separate parameter to disable 256QAM in UL
- put min_grant_prb configuration back in pf_ul() as default prb size.
Integration: `2024.w21b`
Closes#734
See merge request oai/openairinterface5g!2755
* !2700 Fix UE PUCCH multiplexing infinite loop
* !2724 Correct PRACH preamble tx power calculation.
* !2726 NR SA Tutorials
* !2728 Use existing function for bits reversal
* !2732 CU handle F1 setup Req- TAC conversion
* !2738 Correct data offset for unscrambling in PUSCH processing
* !2742 UE: fix mutex locking verification
* !2737 rename persisted ul harq status per pid with a uniq name, make better mutual exclision of processSlotTX()
This reverts commit 0d0e111135. It was
set to UE RX to TX time to 2 as it was deemed that the UE could sustain
this time. However, we noticed a degradation of performance, so reset
the RX to TX time to something higher to ensure proper performance.
Integration: `2024.w21`
See merge request oai/openairinterface5g!2746
* !2717 Additional check on pucch_Config and srs_Config
* !2730 Fix for SSB index in function get_nr_prach_info_from_ssb_index
* !2734 add a function to reset the transmission timestamps chain
* !2741 Fix several potential segfaults in UE PUCCH tx power determination.
Correctly compute the offset of data to unscramble in PUSCH processing
at the gNB. Rename variables to make them easier to spot (instead of
"s"), and remove a global variable.
Closes: #734
uper_encode_to_buffer() of asn1c returns the number of BITS that have
been encoded; if we use this, we need to calculate the resulting number
of bytes (rounding up) to get the right buffer size.
Note that do_NR_ULInformationTransfer() uses
uper_encode_to_new_buffer() which returns the number of BYTES, hence, in
this similar function, we should not modify the return value.
Removed arbitrary offset of 30dB.
Changed sign for pathloss: pathloss calculated in compute_nr_SSB_PL is the difference between transmitted and received power.
Transmission power for preamble should compensate the pathloss, therefore power should increase with pathloss.
Add the option `--rfsimulator.prop_delay` to specify the simulated receive-path (gNB: UL, UE: DL) propagation delay in ms.
This option can be used e.g. to simulate a simple GEO satellite channel by specifying `--rfsimulator.prop_delay 238.74` to both, the gNB and the UE.
This is part of the work developed by Fraunhofer IIS within the ESA-funded project 5G-GOA (https://connectivity.esa.int/projects/5ggoa).
Integration `2024.w18`
See merge request oai/openairinterface5g!2713
* !2705 Fix CRC check in UE DCI detection
* !2708 Adding few more NR bands to the list of supported ones
* !2701 gNB archi fixes
* !2203 DL-MMSE
* !2684 remove asserts on min RX/TX, set the RX/TX shift as 2 in the UE
* !2594 F1AP refactoring to align with O-RAN.WG5.C.1-v11
Taking the example of the AMF Set ID, the previous version of the macro
used another macro to encode the number, then marked the last 6 bits in
the bit string (of length 16/2 bytes) as unused. This is wrong, because,
assuming AMF Set ID=3, it basically truncates the number by encoding all
16 bits and cutting off the last 6, like this:
------------------- encode 16 bits
0000 0000 0000 0011
------------ take these 10 bits
So what remains is these bit positions of the number:
(16,15,14,13,12,11,10,9,8,7) -- the last 6 bits are cut (and the first 6
are either 0 or garbage, because they don't exist).
Instead, manually encode bits (10,9,8,7,6,5,4,3) in the first byte, and
(2,1) in the second byte of the bit string, like so:
------------ encode 10 bits
0000 0000 1100 0000
------------ take these 10 bits
Do the same with the pointer.
The AMF Region ID above is correct, as it is exactly 8 bits.
In the case of PDU sessions in the NG UE context setup request, we first
have to set up security. Hence, in this commit, implement the "delayed"
set up of theses PDU sessions, and acknowledge the setup request after
reconfiguration, as requested by O-RAN.WG5.C.1-v11.
Trigger UE ctxt setup response for the case of "registration request"
(no PDU sessions in UE Context setup response), as mandated by
O-RAN.WG5.C.1-v11.
As of this commit, since we now send the UE security command as a DL NAS
message, there is no F1 UE Context setup request. Hence, instead of
sending a UE context modif request, send the UE context setup request
after the E1 bearer setup response (which logically also makes more
sense, as the E1 setup procedure comes before the F1 setup procedure).
This reverts commit 0f100a6e94, which
introduced a hack to possibly wait with a PDU session setup at the RRC
in case a RRC UE capability transaction (requesting UE capabilities from
a UE) was ongoing. This happened, as we delayed the UE capabilities to
after the first RRC reconfiguration; in that case, certain UEs were
requesting the next PDU session, and if RRC did not delay the new PDU
session (as requested from the core), this procedure might occur while
UE capability enquiry was ongoing, leading to failures in these
transactions.
The default RRC reconfiguration was previously sent after the security
mode command as a "first" RRC reconfiguration. However, it is simply not
needed, as it will be triggered through a subsequent reconfiguration
that also sets up DRBs.
Move the Measurement Config to the "other/dedicated" RRC
reconfiguration.
This reconfiguration would have forwarded a NAS PDU (typically a
registration accept). This is now done by a dedicated forwarding of NAS.
This reverts commit 4a7d7975ce.
Trigger the UE capability right after security mode complete, as
specified in O-RAN WG5.C.1-v11. Also, there is no "need" for the
"default" RRC Reconfiguration (it will come once PDU sessions are
requested), so remove this as well.
Previously, the CU sent the Security Mode Command as part of a UE
context setup request. This was done "because it was possible", not
because there was an inherent need to do this. However the LiteOn DU
does not like this, as it expects to also have a DRB in the UE context
setup request procedure, which is not always the case.
Hence, send the Security Mode Command in a normal DL RRC msg transfer
over F1. As of this commit, there is not UE context Setup Request (so it
might not work with all DUs), but the OAI DU is cool and does not care,
so RFsim still works.
This also aligns the CU's behavior with O-RAN.WG5.C.1-v11.
Finally, as of this commit, we do not trigger a UE context setup
request, so we cannot handle PDU sessions inside the initial UE context
setup request at the same time as the security mode command (which was
done previously before reaching this point). This will be fixed in a
later commit.
In the DU, read slice information from the DU config file. Handle
multiple slices within the F1 Setup Request structure representation,
and forward it via F1 to CU. The DU slice information is stored in the
setup request structure.
This reverts commit eaf28414ca.
This assertion was introduced as we (wrongfully) thought we needed to
calculate the SSB ARFCN at the CU. Since PBCH might carry one bit, which
is not available at the CU, only certain SSB ARFCNs would have been
possible.
With the availability of the SSB ARFCN through the
MeasurementTimingConfiguration, this is not necessary anymore.
MeasTimingConfig may not come with F1 Setup Request: some DUs send it
with the DU configuration update. Handle this gracefully by checking for
MTC before using it.
Use the correct MIB data structure, MIB_t. This is required by 38.473,
and the LiteOn DU sends only that. So our CU needs to handle it, so
align the OAI DU as well.
Integration `2024.w17`
See merge request oai/openairinterface5g!2702
* !2659 NR bandwidth index fix
* !2693 Harmonize frequency range structures
* !2699 Add support for USRP X410 to run with 200 MHz bandwidth in FR2 at 120 kHz SCS
* !2692 Fix for the overflow issue while processing GPS based timestamp from RU
* !2665 NR UE improvements in handling RRC Release
* !2682 dci11type0
* !2686 CI: Maintenance, fixes, improvements
* !2677 NR UE trigger RA for SR failure
* !2683 Ue small fixes
* !2668 Refactor PDCP Reestablishment and introduce PDCP Suspend at gNB
* Add rhel9.4 to the list of OAI supported distributions
* !2673 speedup integrity computation
* !2706 doc: Update of CI testbenches
- according to 5.3.7.4 of TS 38.331: 1> re-establish RLC for SRB1;
- gNB:
1) re-establish RLC for SRB1 in nr_rlc_update_id
2) re-establish RLC for remaining RBs concurrently with RRCReconfiguration
issue: gNB) in nr_rlc_update_id the gNB is re-establishing RLC for all
RBs at the same time when receiving RRCReestablishmentRequest
from UE
UE) according to the specs, the UE is re-establishing RLC for
SRB1 with RRCReestablishmentRequest the other RBs are
re-established during RRCReconfiguration (in our case in
nr_rrc_ue_process_RadioBearerConfig) when receiving
reestablishRLC IE in rlc_BearerToAddModList
RLC TX) this leads to RLC counters mismatch after re-establishment:
control PDUs discarded until max nb of retx is reached
and then UL failure occurs
By using a struct we may have warnings at compilation time in some
cases if the type is not used properly.
The type definition becomes a bit weird, so we need to properly
comment.
If too strange, we can revert to the classical "void" definition.
- rename "lib_ctx" to "mac_implementation" which is what is stored because
of previous commit
- rename "mac" to "mac_context" to be clearer with what is stored in this
variable too
The main work of this commit is to rewrite cipher_aes_128_cbc_cmac()
which was too slow and created issues when running the 4G eNB on some
machines (LLL when using a b210).
Instead of creating the security context, use it, and delete it, all in
cipher_aes_128_cbc_cmac(), we introduce the function init_aes_128_cbc_cmac()
to create it, and we change cipher_aes_128_cbc_cmac() to just use it,
and we also adapt free_aes_128_cbc_cmac(). The function aes_128_cbc_cmac()
is removed, it does not follow the new init/use/free API.
Doing so, on the primary test machine used to do this work (a powerful
and fast machine where it is possible to set the CPUs' frequencies)
it was possible to limit the CPUs' frequencies to 500 MHz (it was not
possible to go lower) without any LLL (using a b210, quectel UE in
idle, no data traffic, only periodic measurement reports). Before this
commit, it was necessary to set a frequency of at least 1.8 GHz
otherwise some LLL would appear.
Then we need to adapt the rest of the code to take into account those
changes.
A notion of security container (stream_security_container_t) containing
ciphering and integrity contexts is introduced.
And the code is harmonized for, hopefully, better readability.
The (opaque) type stream_security_context_t is introduced, used by
both integrity and ciphering contexts. The idea is to use a
init()/use()/free() API for all the security procedures, identical for
all the ciphering and integrity procedures.
These functions enables (un)deployment of the OAI CN v2.0.1, increase
reliability and speedup overall CN (un)deployment compared to current
implementation.
Use "--wait" helm option to wait for deployment/undeployment of the CN.
Wait for pods to be in a ready state before marking the release as
successful. If not deployed/undeployed before timeout, marked as
unsuccessful.
Hardcode path for OC CN5G deployment/undeployment
- Remove unused AmariUE config file, replace by new one - for PLMN 00102
- Change frequency of AW2S pipeline - Move center frequency by 40 MHz to avoid interferency with other setups
in the lab. Set center frequency to ~ 3450 MHz.
The absslot_tx overflow issue observed during integration testing of AW2S
RU with GPS as the source for the clock synchronization. Causes the gNB
not to start the TX thread and stops the processing.
Integration `2024.w16`
See merge request oai/openairinterface5g!2689
* !2680 CI: Modification of log collection in UndeployObject()
* !2681 remove a useless copy and specific buffer for all UE UL payload
* !2685 Clang: make executable run, fix clang warnings, fix memsan warnings
* !2690 Remove hardcoding of 5G-S-TMSI on nrUE
After the recent update of matix, collected logs contain color codes
and we did not find the way to switch them completely off.
Replacement of "docker compose logs" by "docker logs" resolves this
issue. This commit includes changes related to "docker logs" usage.
Reset all the circular buffer to zero; this ensures that we cannot read
uninitialized data. Since this is RFsimulator, performance is not a
problem here either (and zeroing out happens only once).
Memsan complains that uninitialized reads originate because of these
warnings. Most of the corresponding variables are actually read into
through by libconfig; nevertheless, initializing them should not have a
bad side-effect (because the initialized value is overwritten).
We access G_N at indexes that are not necessarily 32-byte aligned,
leading to segfaults. Use simde_mm256_loadu_si256() to load from memory
at an unaligned memory address to avoid the segfault.
Discovered using clang; it is unclear why gcc did not encounter the same
segfault.
-rdynamic is necessary for clang as well to properly link shared
executables. Add furthermore an option to ignore unused command line
arguments, to suppress warning
clang: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
This is likely because -rdynamic is only relevant for the linker, but
the corresponding option add_link_options() is only available starting
cmake 3.13, while we are still at 3.12 (for Ubuntu 18, to my
understanding).
- remove PDCP reestablishment for DRBs from RRCReestablishment message generation
- do PDCP reestablishment and CUUP notification calls after reception or RRCReestablishmentComplete
- this is necessary to make it consistent with the RRCReconfiguration message that contains
RadioBearerConfig with the list of bearers to add/release
which is followed by PDCP re-establishment at UE
- SRB1 shall be re-established at the time of RRCReestablishmentRequest
according to 5.3.7.4 of 3GPP TS 38.331
- SRB2 shall be re-established when creating srb-ToAddModList
according to 5.3.5.6.3 of 3GPP TS 38.331
Integration `2024.w15`
Closes#727, #765, #776
See merge request oai/openairinterface5g!2676
* !2561 CI - add T2 tests to timing pipeline
* !2620 Fix cppcheck errors
* !2624 NR UE MAC SR improvements
* !2647 NR UE mixed fixes
* !2671 Reduce stack memory size for layer mapping
* !2669 CI: create SA 2x2 pipeline
* !2660 fix for 3072 fft size when using 80 MHz and -E
* !2539 CI: Add channel emulation in one test
* !2635 SCTP problems: allow to bind separate F1-C/F1-U interfaces; allow to use DNS
* !2438 PSBCH RX,TX and SLSS SEARCH procedures
* !2675 (doc): Update benetel firmware version and configuration files
* Update of O-RAN 7.2 gNB configuration file for Benetel 650
Unlike the previous commit, in noS1, we cannot use Attach(), as noS1
automatically brings up an interface, no matter whether the connection
succeeded or not. Therefore, consistently wait a bit longer to increase
the chance that the radio is really up.
For various reasons, the UE might take longer to connect to the eNB. A
simple sleep might not be enough; instead, use Attach() to actively wait
that the UE gets an IP address. The added bonus of this function is that
it will also stop&restart a UE if it did not attach, i.e., it will try
multiple times to attach the UE.
The code (author) confused MCE_PARAMS_DESC and MCE_NETPARAMS_DESC and
tried to read the MCE name from MCE_NETPARAMS_DESC when in reality it
should come from MCE_PARAMS_DESC. This commit fixes to use the right
array.
In a previous commit, the functionality of handling IPv6 (and DNS names)
as part of the IPv4 was introduced (in IPv4 field for backwards
compatibility). This commit now removes superfluous configuration
fields:
- IPv6: handled by IPv4 field
- active: users can just remove an entry
- preference: not needed
- Update the configuration for benetel 650 and 550 for new firmware version
- Remove the old firmware configuration file and description in the document
- Add a new RU configuration section
- Add How to get support from the OAI Community to clarify the support procedure.
Rewrite sctp_create_new_listener() to use getaddrinfo() to look up
IPv4/IPv6 addresses via a common interface. This allows to use e.g. DNS,
and enables the SCTP library to listen on IPv6 ports.
To support the above, the corresponding message is changed to not take
an IPv4 address on 4 bytes (and separate IPv6), but a single name that
will be resolved via getaddrinfo()
The previous init message used to allow multiple IPv4/IPv6 addresses;
since this is not used anywhere, remove the corresponding functionality.
Modify all uses of this ITTI message to copy te SCTP init bind addr into
ITTI message.
Use getaddrinfo() to look up IP (v4/v6) addresses. The old
interface of separately specifying IPv4 and IPv6 addresses is
preserved, but both fields allow to specify types of addresses, and we
will remove one field in the future.
After the last commit, it is not possible to bind on separate interfaces
for F1-C and F1-U. In other words, it is for instance not possible to
have the F1-C on one subnet on one physical interface, and F1-U on
another subnet on another physical interface. This commit introduces a
second option MACRLCs.[0].local_n_address_f1u to allow to bind F1-U on
an alternative address; if it is not specified, the interface of F1-C is
reused.
The above only works for the DU; no corresponding option exists for the
CU. For the CU, use separate CU-CP and CU-UP.
Use it in the CI.
This reverts commit 284116522b.
The problem is that (1) we don't really support multi-homing, but (2) on
some system, if the other IP addresses that the operating system
considers part of the multi-homed connection are HEARTBEAT'ed (e.g.,
docker), they answer with SCTP ABORT, which breaks the entire
connection.
In other words, force single-homing by binding. For F1-U uses, another
option will be introduced that allows to bind to a separate interface
for F1-U (separate from F1-C), if necessary.
Closes#727
- adding a new test case
- the test case simulate a DL radio channel with noise and runs Iperf test with such channel conditions
- use CustomCommand class to send commands to a Telnet server
- switched from netcat’s unsupported -N option (OpenBSD) to --send-only (Ncat 7.94) for compatibility with CI
re-sync CI test in F1 RFSIM
- to be used in the future, for CI of RRCReestablishment in RFSIM
- adding four new test cases (040021, 040022, 040023, 040023) to the RFSIM F1 configuration
- the test cases simulate a disruption of the radio channel, verify UE sync loss and resync
and restore the original channel conditions
- use CustomCommand class to send commands to a Telnet server
temp xml
- this change simplifies the enum definition and makes it easier
to add, remove, or modify states in the future
- the states are now defined in the NR_UE_L2_STATES macro,
and the enum members are generated automatically from this macro
Add ulsch decoding measurements, which are reported by nr_ulsim. Start ulsch_decoding_stats measurement before
nr_ulsch_decoding is called and stop it after collection of all decoder tasks from Tpool. In the context of nr_ulsim,
ULSCH_id is allways == 0, testing is performed per one TB, therefore measurement is started and stopped only once per trial.
Reported ulsch decoding statistics show the mean ulsch decoding time over x trials (specified by -n command line option of nr_ulsim).
This measurement does not provide valid information in case of nr-softmodem, when the loop is done over multiple ULSCH IDs -
start of the measurement is done multiple times and stops only once in this case.
For unitary physical simulators, ULSCH processing loop is executed only once
- the max number of PUSCH is set to 1. This ensures exactly one start and stop
of the ULSCH decoding time measurement per processed TB.
Note: ulsch decoding statistics reports average time of segmentation, rate matching, interleaving and decoding of the TB
- Enable both nr_ulsim and nr_dlsim test with Run_T2Test
- Introduce time threshold variable for T2/CPU LDPC tests
- Set threshold individually for each test - T2 encoding/decoding and CPU encoding/decoding
- Check if encoder/decoder processing time is below the threshold
- Remove NOK return option - keep only OK (processing time below threshold) or KO (proceesing time beyond threshold)
- Rename function to run and check results of CUDA ldpctest
- Use new SSH class in function for check T2 test results, use f-strings
Integration `2024.w14`
Closes#775 and #773
See merge request oai/openairinterface5g!2663
* !2411 Simple and generic trx_write support of out of time order requests
* !2532 moving decision on DCI format type to UE MAC
* !2565 improvements in security of nrUE
* !2656 remove stored G in UE DL, not needed and creating issues with DCI format 11/type0
* !2658 Fix sleeping ue at synchro
* !2649 NR SRS RRC assrtion removal
* !2662 Avoid concurrent write while filling RX/CRC.indication
* Remove obsolete "version" parameter from yaml files used on avra
* !2664 Remove duplicated NAS message send, already done above
* !2605 Improve performance polar encoder i.e., 3GPP 38.212 5.3.1.2 function
* !2629 Msg2 and Msg3 at gNB: check allocation before committing to Msg2
* !2657 replace transient malloc by stack allocation, add defense code on block size
* !2631 chore(ci): some docker improvements
* !2654 Pucch2 polar rx dynamic range fix
* !2666 [E2 Agent] Fix E2 Setup Request for ASan
* !2661 CI: iperf/iperf3 UDP analysis function fix → review in progress, review to be completed
Simplification of the code by replacing iperf_opt by target_bitrate (returned from Iperf_ComputeModifiedBW) - no need to repeat the steps to retrieve information about requested bitrate from iperf_opt. Compute iperf bitrate performance as receiver bitrate over requested (target) bitrate.
Fix an issue with misdetection of missing report line - "result" was defined 2x in the function. With this MR, result can be only None or stores output of re.search() for matching the report line pattern, which ensure proper detection of the report line as well as presence off all required components in the report line.
Sender bitrate is not always equal to the requested bitrate (set by "-b" iperf option) in iperf3 (v3.9) UDP tests, so we have to compture bitrate performance of UDP iperf3 test as receiver over requested bitrate. Bitrate performance then express percentage of requested bitrate, which is received on the receiver side.
For iperf3 (version 3.9) UDP, sender bitrate is not always equal to requested bitrate (defined by '-b' option). We need to retrieve information about the requsted bitrate from iperf command line options specified for each UDP testcase. This parameter is then used in UDP analysis functions for proper evaluation of the test results.
Prior to this commit, it might happen that the gNB used TDA 0 (Start 0
len 13) for mixed slot, in which case the UE could not send msg3
(because a mixed slot has less than 13 symbols).
fixes the overflow issue in the PUCCH2 RX with 4+ RX antennas and 12+
bits (polar code format). The fix scales the polar decoding LLR
computation according to the number of RX antennas. The issue was clear
for 100 MHz 4 RX antennas. Even
nr_pucchsim -s -5 -q 8 -P 2 -b 12 -R 273 -z4 -n1000
doesn't converge to 0 BLER with increasing SNR. The issue didn't appear
in CI because of the bandwidth and antenna count limitations.
- docker on CI machine avra was updated to version 26.0.0, which reports
parameter "version" as obsolete
- this additional log causes fail of the container undeployment to stage
We observe these asserts while running concurrent UL traffic on many
UEs:
Assertion (crc->rnti == rx->rnti) failed!
In handle_nr_ulsch() ../../../openair2/NR_PHY_INTERFACE/NR_IF_Module.c:193
mis-match between CRC RNTI 7221 and RX RNTI 35cf
CRC and RX indication need to be pairwise for one UE, when here we have
each for different UE. However, investigation seemed to indicate that
both arrays for CRC and RX indication contained only one PDU; it seemed
the RNTI changed while writing the CRC/RX.indication messages in
nr_fill_indication().
In this patch, we change the logic to mark a ULSCH free AFTER calling
nr_fill_indication(). It is difficult to say if this makes the assertion
disappear, but preliminary tests did not exhibit the same failure
states.
Closes#773
Move decision of Msg2 allocation time instant from instance we receive
RA indication (only containing preamble time information) to actual RA
scheduler (containing current DL slot time). This has the advantage:
- if Msg2 cannot be sent, we might try in a later slot
- no timing-based problems were a RACH.indication FAPI message might
come late, we calculate a Msg2 frame/slot, but this instant has
already passed in the DL scheduler
- no assumption about slot_ahead (an L1 constant)
The previous code calculated and verified an SSB index; I am not sure
this code is correct or used. I leave the function
ssb_index_from_prach() (hence the gcc attribute), but remove any checks.
Similarly, the beam association list might be wrong. I deleted the
corresponding code.
Add an API to allow out-of-order writes to a radio interface, unlike the
current interface.
this function is called in UE in this commit, even if the tx might
still be in order.
Later, i plan to improve UE pulti-threading, that will lead to out of
order tx. also, the gNB will benefit of this new function to replace
several specific pieces of code that reorder tx with over complex and
slow systems
Introduce the structure nr_pdcp_integrity_data_t and adapt code to use it.
Note: in nr_pdcp_sdu_t we keep the 'count' variable (which is also present
in nr_pdcp_integrity_data_t). They represent the same value, but 'count'
in nr_pdcp_integrity_data_t is to be specifically used for integrity while
the other one has other uses, so it's better to keep it.
The case securityModeFailure didn't seem to be implemented
properly, so I just removed it entirely.
The variable 'securityMode' did not make much sense, removed as well.
Plus for integrity, there was: securityMode |= 1 << 5 for nea1
and << 6 for nea2, which does not seem correct (I would expect << 4
and << 5 respectively), so it was properly incorrect.
'securityModeCommand->criticalExtensions.choice.securityModeCommand'
was accessed before checking that
'securityModeCommand->criticalExtensions.present'
is 'NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand',
which is wrong.
The tests 'securityMode >= NO_SECURITY_MODE' and 'securityMode != 0xff'
don't make sense/are unclear, so removed too.
So let's simplify this function, wrong in several places. And put
some AssertFatal() so that the code won't do weird things. The
AssertFatal() can be removed later and the function improved later
if needed. The case securityModeFailure can also be handled later,
but I think there is more work to do than just encoding the message
and send it to the gNB, so it's not bad to remove it for the moment.
The use of security_mode_completed in the PDCP entity was a hack.
Plus it was not working at all with the deregistration request
when nea2 is used, sent when doing ctrl+c in the nrUE.
So let's remove it.
And let's handle activation of integrity and ciphering more in
accordance with what 38.331 says. SecurityModeComplete has to
be sent integrity protected, but not ciphered. Only after should
the ciphering be activated. (See 38.331 5.3.4.3.)
Integration `2024.w13`
Closes#696 and #762
See merge request oai/openairinterface5g!2653
* !1911 Preparatory work for NR DL 4-layer MIMO at gNB
* !2610 fix ug on pilot 2 in nr_pbch_dmrs_correlation() that is lacking signal...
* !2639 NR gNB PUCCH2 CQI workaround
* !2642 NR UE demoting to LOG_D another log that cause flooding
* !2644 NR UE prevent segfault at detach
* !2645 add error code for pdu session reject in the ue
* !2600 Handle Msg3 with SRB1 RRCReestablishmentComplete and MAC CE C-RNTI
* trigger RF-sim E1+F1 test without asan
* !2636 Fix various F1 problems
* !2641 NR DL and UL channel estimation fix
* !2652 Provide additional troubleshooting documentation for QtScope
* !2646 NRUE fix asn_sequence_del to clear a list
* !2504 CI: use iperf3, refactor Iperf_Module
* !2617 use UE ID instead of RNTI internally in NR RLC
* !2619 Minor PDCP fixes
* !2648 Minor CI fixes, stack protection, fix E1+F1 Quectel test, L2sim5G test
From 3GPP TS 38.321 Section 5.4.3 Multiplexing and assembly, we need to process the highest priority subPDUs first:
- MAC CE for C-RNTI is the one with higher priority
38.473 section 8.2.3.1 says that upon F1 Setup Request, UE associated
signalling should be erased. In this commit, we trigger a release of all
UEs that were still connected to a DU when we received the SCTP
shutdown, i.e., when the DU disconnects.
- Four mounting of files, we need the absolute path. Even if the script
gets relative paths, realpath will give the absolute path
- Correctly recognize and handle gNB images with AW2S support
- no need to specify "single-ue" profile when running iperf test for 1 UE only
- default profile "balanced" can be used instead, computes BW for 1 UE correctly
Integration `2024.w12`
See merge request oai/openairinterface5g!2637
* !2640 Fix UPF crash at startup after latest Docker and Ubuntu updates
* !2579 Add telnetsrv_rrc for triggering RRCRelease
* !2613 NR UE fix for procedure after T300 expiry
* !2625 Changes to support 32 UEs in the gNB.
* !2632 NR fix for initialization of gold sequences for DMRS
* !2588 fix(doc): add ptp4l service configuration file in 7.2 documentation
* !2630 Move BladeRF config to right subfolder
* !2626 On RFsimulator end, close open connections
* !2628 NR UE fix double sync
* !2634 feat(phy-test): disable CQI and RSRP errors when running in phy-test mode → review to be addressed
* !2621 CI: set memory limit for docker build cache
* !2604 NR UE BSR improvements → waiting for final changes
* !2638 NR UE data scrambling fixes
* !2602 [E2 agent] KPM & RC SMs improvements
- RAN Function Definition implemented
- ran_func_kpm.c - use function pointers based on the matching condition,
and node type
- ran_func_kpm_subs.h/c - for measurement collection within
MAC/RLC/PDCP layers; for CU-UP node only PDCP included (otherwise,
we would get undefined reference to MAC/RLC)
- use mutual E2SM UE ID file
In phy-test, the scheduler has a hardcoded UE allocation; if CQI and RSRP
are not evaluated, there is no change in the scheduler function. Also,
this avoids misleading error messages if no UE is connected.
- The DL MCS adapted based on the BLER for the minimum number of
DL(numd_sched) grants for the UE in the pre_configured number of frames.
The current threshold value is set to be >9 for 16 UE capacity.
- With increased number of UE to 32 and when all the UEs are DL data active
the num_dl_sched is not meeting the threshold value. Due to whcih the MCS
of all the UEs are stuck with MCS 10-12 in good channel condition.
- The threshold value is adjusted to support 32 UE capacity increase.
- Added the limit as MAX_DCI_CORESET for max_sched_ues in DL/UL scheduler.
This is needed because gNB crashes when tested with 100MHz cell as the
scheduler tries to schedule 11 UEs in a slot and the DCI informaiton is
corrupted due to the limitation in NFAPI interface because of
MAX_DCI_CORESET size.
Use the correct function in order to close open RFsim connections,
instead of a simple close(). If this is not done correctly, it might
happen that the softmodem closes, but an L1 thread might still read
samples (bug in higher layers). Then, RFsim tries to read a socket
(because it has an open connection), but the actual connection had been
close()d. This commit fixes this behavior.
Integration: `2024.w11`
See merge request oai/openairinterface5g!2623
* !2435 Add a sequence container in OAI
* !2552 NR UE RRC re-establishment
* !2611 RRC: ignore random value during RRC Setup Request
* !2587 NR UE RRC handle MeasConfig
* !2616 NR UE remove unused phy_config_ind queue
* !2580 Improve function that map ro to ssb in the UE: make dynamic smaller memory...
* !2614 F1AP: move GTP from enc/dec to logic handlers
* !2622 gNB LOG with UE command line parameters
* !2595 remove 5G dependency on 4G mac.h include, separate RA state enums between 4G/5G and UE/gNB
* !2615 Enhancements to traffic flow in SW architecture documentation
The F1AP message encoders and decoders should do only that, encoding and
decoding messages. For the actual logic handling, including set up and
teardown of bearers, we should use the handlers.
In this commit, delete GTP tunnel handling from encoders/decoders. For
the CU, this happens already in the CU-UP/E1 handlers in
cucp_cuup_handler.c. For the DU, add it in the handlers in
mac_rrc_dl_handler.c.
From the spec, it does not seem to be mandated to check that the random
identity needs to be unique within a cell. Also, from experience we see
that this only happens when the same UE "comes back"; so since one UE
can only have one connection, the other RRC UE contexts (with the same
identity) should be removed at some point, anyway, leaving only one with
the same identity.
Integration: `2024.w10`
See merge request oai/openairinterface5g!2608
* !2427 Scan build: Result of operation is garbage or undefined
* !2477 cleanup of nfapi_nr_interface.h and more
* !2523 CI: AW2S pipeline - test with 16 UEs including RAN code fixes
* !2530 Rework of MAC UE handling of DAI
* !2583 Small-bug-from- cdb18d38bfa6aee288a68d9e8881615a48addd83-and-one-gcc-warning
* !2592 NR DMRS RX comments
* !2599 Log module small cleaning
* CI: mark as failed if UE log analysis fails
* !2465 NVIDIA Aerial Integration
* !2409 Ue rework keep sync in frame
* !2603 tx_timestamp computation doesnt count slots from rx timestamp, and a small...
* !2607 preventing negative RX absolute slot in NR softmodem
* !2606 Instructions on how to debug using container images and core dump of CI
* !2609 Upgrade Open Cells Project UICC/SIM programming tool and rename FR2 SA configuration file
* fixup after merge of Aerial
Some places (e.g., 4G eNB/UE nfapi mode) use numbers for the FAPI mode,
directly mapping to an enum. Aerial being in the middle messes up these
numbers. Put it at the end to limit possible problems.
nr_fill_indication() fills CRC and RX requests, to be sent from L1 to
L2. Before this commit, nr_fill_indication() is called when
- we finally decoded LDPC (or not)
- low signal on PUSCH
This might happen at the same time, i.e., nr_fill_indication() might try
to fill both CRC and RX, in the same list, from different threads. This
can lead to this assertion:
Assertion (crc->rnti == rx->rnti) failed!
In handle_nr_ulsch() ../../../openair2/NR_PHY_INTERFACE/NR_IF_Module.c:190
mis-match between CRC RNTI e071 and RX RNTI 5e3b
e.g., e071 is low energy, and while 5e3b related message are filled in
one thread, e071 is being put into the message structure as well.
At least that is my understanding. I could not actually reproduce this
assertion; to be seen if it still happens.
Do not assert if the list of phy statistics is full; instead return
NULL.
In most places, this is handled appropriately (we do not store anything
if we can't). In nr_decode_pucch0(), the return value of get_phy_stats()
is used a little bit all over the function, and a constant
if (uci_stats)
uci_stats->variable++;
would look ugly, so make uci_stats point to the stack if we cannot store
in the phy_stats.
the uci_stats variable (pointing to per-UE statistics for UCI) is used
in function nr_decode_pucch0() to store information which is important
beyond statistics, e.g., uci_stats->pucch0_thres as a threshold (which
comes from somewhere else)
This commit refactors to use original or intermediate variables to not
mix uci_stats usage with actual processing.
Also, group uci_stats a bit more.
They use 4G NUMBER_OF_UE_MAX, which is not supposed to be present in 5G.
Further, the mutex and variable are global state; for Paging, we should
use F1.
We can only support up to 30 UEs for SRS. In this commit, we change:
- if the total number of UEs is > 32, throw error during compilation to
raise awareness (32 so that a multiple of two still works, everything
else is confusing, see also next point)
- during runtime, handle gracefully if UID is 30 or 31 to not abort (we
can simply not allocate SRS resources)
Also, refactor config_srs() to always give back new memory; the code is
shorter and clearer. Rename to get_contig_srs() to make it explicit.
SCF 222.10.02, Table 3-35: the PDUSize parameter of a DL_TTI.request PDU
includes the 4 bytes required for PDUType and PDUSize parameters (each 2
bytes), not 2.
This is required for the Aerial interoperability.
- use new ssh class
- do proper logging from multiple services
- use yaml dir
- Use splitlines(), minor modifs of syntax
- check that services are running
- Check all copyin() operations, not only last
- switch to docker compose:
with the use of the new ssh class, we cannot (easily) use the old
docker-compose anymore (which was an alias to docker compose). Switch to
"docker compose".
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Set ulimit of core to -1 enable core dumps for file-based core dumping.
Note that it is not necessary for e.g., systemd-coredumpd, but put it
for completeness.
- Return code says if copying succeeded
- Improve handling of the recursive code paths, which copy files or
directories recursively into another directory
- both for RemoteCmd/LocalCmd
Some CI users (OAI developers) expressed that the warning of the `docker
volume prune` before starting RFsim is confusing. To avoid the warning in
the HTML, force the removal; if the volume does not exist, no warning is
emitted.
To still catch possible problems, do not do this in the `terminate.xml`
so we might still see if there are other problems.
The original UL max MCS of 9 was chosen for performance reasons. In the
meantime, machines became faster, and the ULSCH decoding faster. Improve
UL max MCS to be 28 by default to use the complete range of possible
MCS.
Doing only 5 LDPC iterations by default leads to a poor reception
performance, and correspondingly many retransmissions. Increase to 8 as
the new default to improve user experience.
Ensure that the UE has an IP address before continuing the test.
Otherwise, it might happen we ping before the UE is connected.
Do not do this in do-ra and phytest, as they use --noS1, which implies
statically assigned IP address, so IP address check always succeeds(!).
Make RFsim start up faster by starting core and RAN start at the same
time. This speeds up because we do not wait for "healthy" containers
serially, but parallely.
For the RAN, it is safe to start gNB and UE at the same time in SA mode
(as the UE will only attach once the radio, and hence the full gNB, is
ready).
We do not start in parallel in do-ra and phytest, as in these modes the
gNB first has to write a UE-specific configuration file. If we start
both gNB and UE at the same time, the UE might try to read the file
before it is written, leading to a failure.
- PDCP reestablishment on CUCP (DRBs) triggering Bearer Context Modification procedures over E1
- Performing PDCP reestablishment for requested DRBs on CUUP
- Introduced function to notify re-establishment to CU-UP
- removed call to PDCP reestablishment for the DRBs on CUCP (it's done on CUUP)
cuup_notify_reestablishment:
- to fetch PDU session to setup in E1 following logic as in e1_send_bearer_updates
- fill bearer context modification request with stored F1-U tunnel information
during E1 reestablishment, otherwise it would initialized to 0 by default
- update GTP tunnel with the stored configuration after E1 reestablishment
The following ASSERT is tirggered while testing 16 UE setup.
Assertion (NPRB>0 && (NPRB + RBstart <= BWPsize)) failed!
In PRBalloc_to_locationandbandwidth0() /home/ran/common/utils/nr/nr_common.c:286
Illegal NPRB/RBstart Configuration (1,48) for BWPsize 48
Corrected the get_start_stop_allocation calculation to fix the issue.
The implementation was wrong. The rbstop shall be the last rb that could
be allocated. Also the following two conditions are taken care
rbStart needs to be strictly smaller than rbStop
rbStart+rbSize needs to be smaller or equal to rbStop
The problem was that we confounded both conditions, so rbStart could
be equal to rbStop, which then leads to one PRB being allocated at the end.
Setting rbStop to BWPsize - 1 and making sure the above two conditions are
true does not make it lead to wrong allocations anymore.
The previous code removed the "secondary UE" data (about DU association,
DU UE ID, associated CU UP), and only filled the F1-related data. In
other words, the associated CU-UP was lost. This commit reworks this
piece of code to retrieve old data, and update the relevant data without
destroying other.
- many structs and definitions are overlapping between the two different E1 procedures
- introduced naming specific to E1 Bearer Context Modification to improve readability
- grouped SDAP and PDCP configuration IEs for better reusability and readability
- introduced functions to set and get default PDCP config (DRBs and Bearer Contexts)
find_or_next_pdu_session:
- find_or_next_pdu_session refers to the E1 Bearer Context Modification Request
-- therefore it has to return pdu_session_to_mod_t* and takes in input e1ap_bearer_mod_req_t *
see !MR2545 for more context
- according to specs, in NR there are 4 SRBs
- in OAI the relevant define is used in the RRC procedures
- this commit harmonizes code by removing redundancy
- triggered by RRC reconfiguration events according to clause 5.3.5.6.5 of TS 38.331
- This procedure does QoS flow to DRB mapping according to clause 5.3.1 of TS 37.324
- QoS flows to DRBs to be released are also handled
CI: Integration Branch 2024 week 08
See merge request oai/openairinterface5g!2585
* !2540 NR UE max MIMO layers from UEcap
* !2554 NR UE RRC minor improvements
* !2563 Add missing backtick for proper code style in README.md
* !2567 Avoid integer overflows, buffer overflows, in channel levelling
* !2574 NR UE fix for configuring coreset0 and SS0
* !2575 NR UE fix init PDCP phy-test
* !2551 NR UE improvements for contention resolution timer
* !2570 CI: Replace nrmodule2 by up2
UBsan fails with errors without this commit. The commit changes:
- avoid two possible integer overflows in nr_dlsch_channel_level() and nr_dlsch_channel_level_median()
- nr_dlsch_channel_level_median() is simplified
- use MAX_ANT in avg to handle more than 4x4 config
- deleted: ../../../executables/rfsim.c
- removed unused command line options to set SINR and SNR
- removed unused functions to get SINR and SNR
- removed unused RFSIM struct members
for FR2 offsetToPointA is expressed in terms of 60 kHz SCS and k_SSB expressed in terms of the subcarrier spacing provided by the higher-layer parameter subCarrierSpacingCommon
Fix for CI runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fix for CI runtime error: left shift of 128 by 24 places cannot be represented in type 'int'
Integration: 2024.w06
Closes#733 and #732
See merge request oai/openairinterface5g!2564
* !2490 reworking configuration of LogicalChannelConfig at MAC UE
* !2548 NR UE MSG3 buffer
* !2556 Support RC SM aperiodic subscription for "UE RRC State Change"
* !2557 fix duplicate call of RCconfig_NR_L1
* !2550 use pointer to structure instead of module_id inside MAC
* address #733
* !2560 chore(ci): force rebuild of ran-base for integration branches
* !2495 Sidelink configuration passed from RRC->MAC
* !2220 L1 tx thread
* !2559 FH 7.2 improvements
* !2566 Provide right E1 instance when creating E2 agent in CU-UP
* !2513 Update NR SA tutorials
CUuniqInstance is also used for GTP module identification, which
uses the UDP server socket as its ID. This leads to arbitrary IDs (>0),
which is wrong.
- Phy configuration will be prepared by MAC
- Sidelink preconfiguration parameters passed from RRC->MAC
- Only 1 SSB TA allocation used
- psbch payload prepared by MAC after receiving the tx slss req
PUSCH decoding is started multiple times in nr_ulsch_procedures() for
each ULSCH segment, and stopped once inside
phy_procedures_gNB_uespec_RX(). Not only is it not clear if that works
with the API, it also might measure more than just PUSCH decoding.
Remove the PUSCH decoding, it is misleading. Check L1 RX processing
instead.
The CI would only detect a deviation from the normalized value based on
a configurable threshold, typically 1.25 (so we would tolerate a 25%
increase). However, it often happens that a timing gets shorter (e.g.,
forgot to put the timing measurements). This commit introduces a
"Deviation Threshold" (smaller than 1) to not only check that we exceed
1.0 + "Deviation Threshold" (as before), but also that are not below 1.0
- "Deviation Threshold".
In other words, assuming a maximum divergence of 25%, instead of just
checking if val > 1.25, we now also check if val < 0.75 (and flag
error).
This commit introduces a separate thread (l1_tx_thread) that processes
gNB DL/TX slots. It receives a message from the ru_thread when a new
slot started, and starts processing.
The DL part of the scheduler is run in the l1_tx_thread. Therefore,
only call UL indication (for scheduler) in UL slots. The UL indication
previously triggered the DL scheduler -- hence, it had to be called in
every slot. Now, since the DL scheduler is moved into the DL thread, we
don't have to call the scheduler in every slot anymore.
The reorder thread is removed, as reordering with this scheme is not
necessary anymore.
The main advantage of this version is that the TX can be scheduled
earlier (sl_ahead). Further, there can no longer be race conditions in
the TX path, since the scheduler/L2, TX L1 processing and the RU tx
function are all execute in the same thread (L1_tX_thread).
Also, the scheduler prepares PRACH/PUSCH/PUCCH FAPI PDUs. As of this
commit, the scheduler runs in the TX processing chain, whereas these
PDUs are destined for RX processing. Thus, too avoid data races,
instead of triggering the RX processing at the same time as TX
processing in the RU thread, this commit changes the code to trigger RX
processing after the scheduler has been run in TX processing to avoid
data races.
Finally, we synchronize RU and L1 threads. This is important for
rfsimulator, since unlike most radios, rfsimulator can run slower or
faster, depending on I/O and CPU (it does not have a stable "tick").
Co-authored-by: kiran <saikiran@iitj.ac.in>
The UL_INFO_mutex is used in only one place, and therefore useless.
Also, the scheduler uses a lock internally to prevent concurrent access.
Hence, the UL_INFO_mutex is not needed.
Remove kill_gNB_proc(), as it is now dead code.
The next commit introduces a separate gNB TX processing thread. To
properly separate DL scheduler (for scheduling decisions) from UL
indication handling (for UL packets), this commit introduces a slot
indication "tick" to run the DL scheduler which will be put into the gNB
TX processing chain instead of the UL indication.
For different reasons, the frame/slot numbers might jump (e.g., gNB and
RU machines not properly synced). The scheduler would assert for PUCCH
allocations. Handle this gracefully by printing an error message, and
resetting the PUCCH structure.
Disable DPDK telemetry to skip creation of one/two threads (depending on
DPDK version). To force users to do this, bump the version of the patch
checked by cmake.
More information on DPDK telemetry:
https://doc.dpdk.org/guides/howto/telemetry.htmlCloses: #732 (suggestion 2)
Suggested-by: Andrew Sergeev <andrew.sergeev@adtran.com>
Force the CPU affinity for ru_thread explicitly to ru_thread_core. It is
already done via threadCreate(), but force again as per change request.
Delete commented 7.2 code that did the equivalent. We cannot set it in
the driver, as we don't have access to variable ru->ru_thread_core.
Closes: #732 (suggestion 2)
Suggested-by: Andrew Sergeev <andrew.sergeev@adtran.com>
system_core is the core reserved for DPDK control threads. It was
hardcoded to 0, but it seems that one some systems, CPU 0 cannot be
reasonably isolated from kernel threads. Make it therefore configurable
(default: 0)
Closes: #732 (suggestion 1)
Suggested-by: Andrew Sergeev <andrew.sergeev@adtran.com>
The main goal of this tutorial is to get 5G end-to-end connectivity as simple and fast as possible. For advanced topic the user should search for specific documentation.
No need to pull every single image independently, we can pull all the images with the corresponding tag that is in the 'docker-compose.yaml' with the 'docker compose pull' command
This tutorial aims to achieve end-to-end connectivity as simple as possible. Let's remove this complex topic from here.
Also, if a user copy-paste the section as it was, nrUE gets a segfault because there is no imeisv here, tutorial is out-dated.
- create hash table to save ric_req_id (key) and array of ran_param_id(s) (values), per each subscription
- create RB tree to store list of ric_req_id(s) for each ran_param_id
=> when the async event occurs, it is easier and faster to search per ran_param_id and send the indication message to all xApps (ric_req_id(s)) subscribed to the same ran_param_id
- it is important to mention that both data structures need to be maintained, especially when unsubscription occurs (free_aperiodic_subscription)
Integration: 2024.w05
See merge request oai/openairinterface5g!2549
* !2537 Fix for UE PUSCH scheduler DURATION_RX_TO_TX assertion
* !2538 Fix for UE MAC PDU LCID handling
* !2542 Fix L1_SSB_CSI_RSRP table mapping and check validity
* !2544 NR UE RRC timers improvement
* !2546 Correcting the location of packages
* !2493 Fix for computing SSB subcarrier offset
* !2496 MCS for retransmission fix in case of dci failed detection at NR UE
* !2503 Handle PDU Sessions in NG Initial UE context Setup and forward 5G-S-TMSI to core
* enable caching in the docker build of the CI build steps
* !2541 Fix RA bug, improve overall logging
We used to trigger the UECapabilityEnquiry right after
SecurityModeComplete, and before the RRCReconfiguration (which we call
"default" reconfiguration). However, 38.401 tells us that we should send
the RRCReconfiguration right after the SecurityModeComplete. In fact,
even though we get the UE capabilities, we cannot use them during this
reconfiguration, as we would first need to update the DU with a UE
Context Modification Request, which we cannot, as we just sent the UE
Context Setup Request, and the DU relies on first getting the
RRCReconfiguration.
Since we rely on a subsequent reconfiguration anyway, we can safely
trigger the UECapabilityEnquiry after RRCReconfigurationComplete.
(38.331 also says we can send UECapabilityEnquiry at any point.)
To cater for the possibility that there might not be any reconfiguration
coming afterwards, we check if a DRB has been set up. If not, we assume
a reconfiguration will come, and do not trigger one only for the UE
capabilities (this is what we do before this commit). If we already have
DRBs set up, they might have been set up during the "default" RRC
Reconfiguration, and another reconfiguration might not follow soon; in
this case, we trigger the reconfiguration by sending the UE capabilities
to the DU right away.
The next commit moves the UE Capability Enquiry after the first
reconfiguration. This has the effect that for some UEs (e.g., iPhone),
the Setup Requests come too close to each other, triggering RRC
Reconfigurations while previous transactions are ongoing.
I think the "true" solution would be to implement some tracking of
transactions across RRC, F1AP, E1AP, but this might require many
changes. For the moment, limit to delaying PDU session resource setups
to prevent above problem. Delaying is done using ITTI timers (to be able
to serve other UEs), waiting 10ms each time, up to 20 times (to not
deadlock the transaction -- after all, if the UE is unhappy, it will
drop the connection).
This commit allows the gNB to handle PDU sessions that the core requests
to setup during the NGAP Initial UE Context Setup. Previously, we only
managed them as part of PDU Session Resource Setup Request.
The RRC will, depending on whether a PDU session is in the NGAP Initial
UE Context Setup, either directly trigger the Security Command, or first
do a bearer setup at the CU-UP. Some asserts have been lifted, as now
the PDU sessions might be present before the RRC Connection is fully
established.
Implement the correct forwarding of the bearers in an F1 UE Context
Setup Request message.
This solves bug #672.
Prior to this commit, the handling of DRBs is complex: first the RRC
"guessed" a DRB ID when setting up DRBs via E1AP (in
rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ()), and later chose one for
real in fill_DRB_Configlist() (called in
rrc_gNB_generate_dedicatedRRCReconfiguration()).
To simplify, remove fill_DRB_Configlist(), and instead allocate the DRB
using generateDRB() before sending the message via E1AP, in
rrc_gNB_generate_dedicatedRRCReconfiguration(). The rest of the logic is
the same.
For PDU sessions, always mark PDU sessions as "done" to match pdu
session state logic.
It might happen that a UE has no CU-UP (e.g., never requested a PDU
session). When triggering a release, we previously and implicitly
associated a CU-UP in that case. That is not good, and confusing.
This commit adds a function to look up if the UE has an associated
CU-UP. We only send a release if it is the case.
The function get_existing_cuup_for_ue() now instead verifies that a
CU-UP exist, and does not implicitly create an association (which might
be unwanted, see above).
The function rrc_gNB_process_RRCReconfigurationComplete() does almost
nothing, we can delete it.
The variable name ue_reconfiguration_after_reestablishment_counter is
misleading, as it counts all reconfigurations; rename to make it clear.
The drb_active array keeps track of active DRBs. However, it only
replicates some of the information in established_drbs, and could lead
to a reuse of DRB IDs when two bearers are to be set up. Consider the
following:
1. trigger first DRB creation at RRC
2. DRB ID chosen from free drb_active entry
3. trigger second DRB creation at RRC
-> The first reconfiguration has not been acknowledged
-> drb_active is not marked as DRB_ACTIVE
4. The second DRB ID is chosen from a free drb_active entry, which is
the same as in 2.
By reusing established_drbs everywhere, this cannot happen, as we
1. select the DRB to be used using next_available_drb() and then
2. use generateDRB(), which marks the DRB used
all from within fill_DRB_configList, which gives a new DRB.
The logic is still overly complex, though.
If there are no active bearers, the function previously returned an
empty list. Return NULL if there are no bearers, so it is safe to call
this function even when no bearers are present. We can also pass it
every time to do_RRCReconfiguration(), which will not add an empty list
for DRBs.
Create a single function to activate an SRB. This function derives the
corresponding keys, triggers the setup in PDCP, and marks the SRB as set
up, instead of doing all of this common functionality in individual
steps. Use it at the corresponding places.
- show MAC bytes in one line
- add MCS table idx
- show ulsch errors before ulsch DTX (as in DL)
- show if UE in-sync/out-of-sync
- show CU UE ID next to RNTI to stats
Since we modify the format of the statistics, fix the format in the retx
checkers of the CI.
This commit implements retrieval of 5G-S-TMSI from Parts 1&2, or the
entire 5G-S-TMSI, depending on what the UE sends. Further, if it has
been retrieved, print a log of all constituent parts of it.
The UE-specific variable ng_5G_S_TMSI_Part2 is not needed, as we compute
the full 5G-S-TMSI as soon as we have Part2 (and 1).
The correct forwarding to the core is implemented in the following
commit.
We did not give a cause value, and therefore NGAP's "PDU sessions
failed" encoding failed. Give a cause value in all cases, so that this
cannot happen anymore.
To prevent against this, put an AssertFatal() into the encoder that
stops if an internally sent message does not have a correct cause value
(we can at least select a default).
Print an info message for all failed PDU sessions.
In rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(): if a PDU session is
already established, don't count it as failed.
If we are in one of these procedures, we basically must be in SA mode,
everything else is illogical. It also does not seem plausible to check
for this, as it is not apparent why only these couple of calls should
not be executed if not in SA. Hence, remove.
This implementation might work, but it simply triggers RRC setup on the new
DU when we might send a RRC reestablishment speeding up the whole
connection setup. For this:
- we should send the F1 UE context setup to the new DU
- we should still do the reestablishment, containing the reestablishment message
The latter should be sent once we received the F1 UE context setup
response. We don't need a new context. send a release to the old DU (and
don't release our own context!!).
We might also send the reestablishment to the UE encapsulated with the
F1 UE context setup response. Need to investigate if this is feasible
(because if the DU rejects [can that happen here?], the UE will still
send reestablishment complete -- what then?).
Also, we would need to send the E1 bearer context modification to the
CU-UP.
Keeping track if AS security is activated. This is important for a later
commit, where we use this to decide if we send a F1 UE Context Setup Req
with security command after receiving the E1 bearer context setup
response. The corresponding AssertFatal() removed in the same commit
implementing PDU session handling in NGAP Initial UE Context Setup.
38.401 Sec 8.1 asks for sending the Initial Context Setup Response after
a reconfiguration happened. Therefore, we can never send this message
directly from the handler in the Initial Context Setup Request
38.133 table 10.1.6.1.1 specifies dB for RSRP measurements. On the
"edges", the choice of INT_MIN/INT_MAX is poor, as it can quickly lead
to integer overflow/underflow for the wrong values. Instead, set proper
min/max RSRP values.
If we cannot send Msg.2, then basically the RA process is dead (because
the UE expects it at a fixed time). Hence, cancel the RA process, so
that we do not pick it up again after 1000 frames.
Integration: 2024.w04
See merge request oai/openairinterface5g!2535
* !2522 Integration of O-RAN 7.2 FH using OSC xRAN library
* !2416 fix-ue-scheduler-multi-thread-storage-list-mutex-protection
* !2488 LDPC T2 card encoding: rate matching and interleaving on the T2 card
* !2497 Read NoS1 bearer configuration from gNB-generated file
* !2518 Extension of E1AP procedures
* !2533 This limits PUCCH payload to 11 bits, 7 CSI + 3 ACKNACK + 1 SR maximum.
* !2526 prepare MSG3 in advance at RRC UE
* !2451 MAC procedures to handle DLSCH allocation type 0
* !2525 NR UE fix for function to find PUCCH resource set
* !2536 Improve Precoding Matrix computation taking in consideration the DCI format
* some documentation+config file updates for 7.2
* !2501 Improvements for NR implementation of timers
* !2531 Fix unit test build and build unit tests in CI
- Rate matching performed by card
- Due to rate matching on card, small TBs are encoded correctly, so the
limitation of encoding small TBs in CPU can be lifted (all TBs encoded
on T2), see a later commits
- CU-CP replying to the CU-UP with a Setup Failure message in case of unsuccessfull E1 Setup Request
- message is decoded by the CU-UP, and stops the process
Subsequent pipelines can/might use the ran-base image. Further, before
building a new ran-base image, we delete it. Hence, it suffices to only
delete the image when necessary (before building a new one), and
otherwise leave the current (develop, ci-temp) ran-base image.
Using AssertFatal() has the drawback that it requires the definition of
an exit_function() (which is typically declared in OAI main
executables). We don't want to pull in such dependency for every
consumer. Hence, use c stdlib's assert() instead.
This commit removes nr_rrc_mac_config_req_ue_logicalChannelBearer and handles configuration of logical channel bearers at MAC in nr_rrc_mac_config_req_cg.
This also avoids to configure LCs before resetting them again nr_rrc_mac_config_req_cg().
- update library location
- correct information for ioWorker
- disable HT on servers
- add local/lib trick for Fedora-based OS. Also clean-up on line terminations
- add another pkg-config trick.
- Proper version(s) of DPDK
- Support for both Bronze and E releases
- Minor fixes on E-patches and build system
- fixed a few typos and better explanation of the CPU allocation scheme
Co-authored-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Co-authored-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Co-authored-by: Robert Schmidt <jaroslava.fiedlerova@openairinterface.org>
- Add the O-RAN 7.2 FHI library, interfacing with OSC xRAN library (E
release)
- Add Findxran.cmake to detect the library and headers, including
version information
- Test for numa and DPDK presence
- Add patch for OSC xRAN to make interworking possible
- Add sample config files for LiteOn, Benetel, and VVDN units.
Documentation is provided in the next commit.
Co-authored-by: Raymond Knopp <raymond.knopp@eurecom.fr>
Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Manish Kumar Singh <manish1.kumar@amd.com>
Co-authored-by: thamizhselvan.k <thamizhselvan.k@vvdntech.in>
Co-authored-by: rajeshwari.p <rajeshwari.p@vvdntech.in>
Co-authored-by: Hongzhi Wang <hongzhi.wang@openairinterface.org>
Co-authored-by: Sofia Pison <Sofia.Pison@eurecom.fr>
For the initialization of the xran library (split 7.2), we need some
parameters such as PRACH or frame config. However, to date,
initialization of split at level 7 use the split 8 openair0_config
structure, which does not have the necessary information.
Hence, add a single structure that contains that information.
* make a single call to various function
* make fill_rf_config() static, it is only used in this file
* do not initialize the number of antennas in openair0_cfg in
init_NR_RU(), as it is already done in fill_rf_config()
Harmonize the call to openair0_transport_load(), by putting it in a
single place instead of multiple calls
Further, delay the call to ru_thread, for two reasons:
1) it is somewhat "symmetric" with local RF, which is done there as well
2) for the xran library, we need to read some parameters such as PRACH,
frame format, etc. At the RU, the corresponding FAPI config request
parameter structure is copied from the gNB to RU at the beginning of
the ru_thread, so we have to wait for that to happen.
Reformat code to properly copy memory if we skip precoding.
precoding_stats timing is not part of ru->feptx_ofdm, but
ru->feptx_prec, so always print it.
Previously, in order to speed up processing if precoding is disabled, we
just copy the pointer from txdataF to txdataF_BF, as opposed to do a
full memcpy() to duplicate the data. The same happens if we cannot have
precoding, i.e., in SISO. This has implications such as memory leaks,
which is why this is not being done. However, the code comment is
intentionally placed there.
For 7.2 FH, some RUs do phase compensation, whereas for others, the DU
does it. In fact, this can be "negotiated" using the M plane. Since we
don't have the M plane yet, add a configuration option to set where
phase compensation is performed.
For certain processing, e.g., in the case of FH 7.2, we need to ensure
that critical L1 processing happens fast. Try to force speedy processing
with this high priority.
Integration: 2024.w03
See merge request oai/openairinterface5g!2524
* !2519 fix(build): migrating rocky dockerfiles to Rocky-linux-9 to ease maintenance
* !2508 NR UE PDCP RLC indexing
* !2511 chore(ci): updating 5G RF / L2 simulator scenarios to release v2.0
* !2486 E2 agent: Use FlexRIC release v2 and add to CU-UP
* !2453 Liteon DU integration
* !2516 remove ASAN_OPTIONS: detect_leaks=0 from SA rfsim CI tests
* !2199 NR precoding matrix generation at MAC
RRC Version is a required IE. Hence, implement the encoder and decoder
for this message. At the DU and CU, read the RRC Version we use and fill
the corresponding field.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
In NSA, we don't have SIB1. However, the DU system information requires
both MIB and SIB1, but is itself optional. So, in NSA, don't fill the DU
system information.
For LiteOn DU, we do not receive the MIB/SIB1 in the F1 Setup Request.
This is not a problem in itself, but it might happen that certain
procedures are executed without MIB/SIB1. Check for it and handle
appropriately:
- During normal connection establishment, we might not be able to
calculate measurement config
- During reestablishment, we might not be able to calculate ARFCN SSB
and cannot do reestablishment; do RRC setup instead.
read_version() takes a version string in format "x.y.z" with x being
major, y minor, and z patch number. It transforms reads them into
separate numbers, and outputs in the correspondingly named variables.
- e2_ran_func library divided into e2_ran_func_cuup (CU-UP only) and e2_ran_func_du_cucp_cuup (DU, CU, CU-CP and gNB-mono)
- GTP SM is not yet implemented in CU-UP -> CU-UP doesn't store PDU session information
- PDCP SM support for gNB-mono, CU and CU-UP
- KPM SM support for all node types (DU, CU, CU-UP, CU-CP and gNB-mono)
Integration: 2024.w02
See merge request oai/openairinterface5g!2514
* !2506 NR UE MAC config fixes
* !2478 Moving computation of base graph for LDPC at MAC in the UE
* !2481 fix UE RX/TX thread several bugs in synchronisation of events, add LOG_E and...
* !2494 Fix for building rach occasions in case of multiple BWPs
* !2498 Fix security header type for PDU session establishment, and update sqn, counters
* !2509 Fixed typos in init_ru
* !2512 Null pointer in nr generate msg3 retransmission
* !2505 USRP doc: Include b205-mini, improve markup
While testing the OAI 5G RAN in SA mode, it appears that the PDU session
establishment request is using the wrong security header type.
The current used header is: "Integrity protected and ciphered with new
5G NAS security context".
However, according to TS 24.501, Table 9.3.1, this header can only be used
by the "Security mode complete" procedure.
Changes:
- Hence, the new security header has been changed to "Integrity protected
and ciphered", which will use the security context generated during the
"Security mode complete".
- Sequences numbers and NAS counters have been updated to reflect that
change.
Integration: 2024.w01
See merge request oai/openairinterface5g!2502
* !2482 Trigger UL Failure if Ack of Msg4 not received and implement RA Contention Resolution timer in gNB
* !2484 function to harmonize handling of NAS registraction accept
* !2487 Rework PUCCH codec with c16_t type and functions to make readable code
* !2491 improvements for NR UE detaching
* !2499 Update L1sim and RFsim documentation
* !2500 Fix FAPI CoreSetType enumeration options after the fix on the description made by SCF
* !2489 NR UE improvements RRCSetup
- update explanation for noS1
- better help for nr-uesoftmodem options
- consistent writing of name "RFsimulator"
- remove LDPC section at end, is already referenced in doc/README.md
- Add TOC
- Better describe what RFsim does
- Remove misleading, wrong, unnecessary information
* It is futile to mention --phy-test or other modes, RFsim works with
all
* Explaining how to ping is not the task of the RFsim documentation
(that is what tutorials are for)
* Remove useless/outdated build log information
- Add some more information on which flags to run
- Improve formatting, and minor clarifications
SCF FAPI 222.10.02 had a bug on the description of CoreSetType:
0: CORESET is configured by the PBCH or SIB1
(subcarrier 0 of CRB0 for DMRS mapping)
1: otherwise (subcarrier 0 of CORESET)
That was fixed in SCF 222.10.04:
0: CORESET is configured by the PBCH or SIB1
(subcarrier 0 of the CORESET)
1: otherwise (subcarrier 0 of CRB0 for DMRS mapping)
That wrong description created a misunderstanding, to overcome it we "wrongly" added a third value. This commit fixes that and aligns the CoreSetType with FAPI 222.10.04
- Do not list L1sim as a way of running OAI: it is untested, and might
not work
- Reword the tutorial where necessary, remove outdated/wrong information
(e.g., we don't test this mode AFAIK)
The UE will trigger new RA either with MAC CE C-RNTI or with new RRCSetupRequest:
- MAC CE C-RNTI: The ul_failure_timer will be reset
- RRCSetupRequest: New UE will be created and the previous one will be deleted
Integration: 2023.w51
See merge request oai/openairinterface5g!2483
* !2221 NR UE going to IDLE state
* !2464 move common .h file in common directory, remove mem_block_t
* !2479 CI: test with 2 UL layers in AW2S pipeline
* !2468 LDPC T2 card: fix and doc update
* !2480 Enabling multi-ue support in the open-source L2 proxy
* !2476 Fixes for multi-DU/CU-UP and CI test
* !2482 Trigger UL Failure if Ack of Msg4 not received
* !2484 function to harmonize handling of NAS registraction accept
The 5G-RFsim F1 test tested multiple DUs at one CU. This
functionality is retained in the new F1+E1 test.
The 5G-RFsim E1 test tested a single CU-UP at a single CU-CP. Here, we
extend to use multiple CU-UPs, one for each DU. The associated is
ensured by using three different F1-U transport networks, one for each
DU/CU-UP pair.
- Test only one DU at the CU (3 DUs is tested in F1+E1)
- Harmonize IP configuration to make it simpler to reuse in the F1+E1
test
- Speed up the test by reducing the number of steps to deploy core/RAN
- Add traffic test
binding the local address for SCTP is pointless, because we don't really
care through which interface SCTP traffic goes. Actually, we even might
want to set the DU remote_n_addr and the the local_n_addr to addresses
in different networks, because we might want to have GTP traffic go
through a different interface than SCTP, as done in the CI test for E1.
MR-2401 changed the argument to the init_nrUE_standalone_thread
to be zero instead of the ue_id_g. This causes every port to be
opened for multiple UEs to have the same value, therefore only
allowing one UE to be connected to the proxy. If the ue_id_g
global is an issue, we should open a new ticket for a proper fix.
We set the RFsim TCP socket to non-blocking. Thus, it may happen that we
cannot write() to the socket when the kernel cannot handle the request,
in which case we wait some time before trying again. This is the
correct/expected behavior.
Since this is *normal*, an error message is not justified; we did not
even print a message in this case before commit 21790f9c4f introduced it.
When setting up bearer(s) through F1, the corresponding F1 message has
QoS fields for the DRB(s) to be set up, as well as for all flows
associated to this DRB. In this commit, set the DRB QoS field to be
equal to the first flow (it is unclear/unspecified how it should be set
up, based on the flows), which was not set before and therefore
contained unitialized data.
The F1 module uses this data, and in split mode, F1 message generation
failed due to uninitialized data.
We reuse RRC UE IDs at the RRC. Previous to this commit, we did not
release a UE at the CU-CP's PDCP (for SRBs). Thus, when reconnecting a
UE, the PDCP might not be in a good state, since we did not release the
previous PDCP UE context.
Integration: 2023.w50
See merge request oai/openairinterface5g!2474
* !2460 bugfix: initialize TX and RX antennas separately
* !2471 fix a useless computation done in case we activate LOG_D
* !2417 PDSCH precoding optimization
* !2436 Fix the DoS vulnerability in RA procedure
* !2472 (ci): adding new packages in cuup dockerfiles
* !2463 NR UE RRC MAC configuration improvements
* !2475 Fix gNB RA procedures when Msg4 Ack not received
remove several unused files
remove mem_block_t that is never used in a different way than a simple heap buffer
move up IP address type and remove duplications of the same struct declaration
When the gNB does not receive PUCCH with Ack for Msg4 we have to consider Msg4 received by the UE, so we need to apply the CellGroupConfig sent to the UE.
There are two scenarios:
1 - The UE never decoded PDSCH for Msg4, the RA will fail because RA Contention Resolution timer, the UE will come with a new RA with new RRCSetupRequest
2 - The UE decoded PDSCH for Msg4, and if SR does not work and no resources for PUSCH, it will trigger RA with MAC CE C-RNTI in Msg3 (so, gNB must be ready for it)
Integration: 2023.w49
See merge request oai/openairinterface5g!2470
* !2264 Improvements in f1ap for qos
* !2377 Store allowed NSSAIs from NAS message
* !2462 Hotfix: swap UIDs after RRCReestablishment
* !2449 Improve performance of polar initialization
* !2469 handling configuration of MAC-CellGroupConfig at UE
* !2395 `nr_generate_pdsch()` clean up and little performance improves
* !2461 CI: add FDD test to SA B200 pipeline
* !2424 Improvements in SDAP RRC management
to use faster code
- replaced hundreds mallocs by either local arrays or by the OAI multi-dimensionalarray (G_N_tab array)
- made in SIMD a one bit per byte packing function to packed (ordinary) bits in bytes
The CellGroup is created considering UID, for example:
'pucchres0->startingPRB = 8 + uid;' and since we keep the CellGroup from
the previous RNTI/UID we should keep also the previous UID.
Considering the scenario where a UE did successful RRCReestablishment,
it was getting uid = 1, and uid = 0 was removed.
When another UE connected, it was getting UID = 0 (because 0 was already
free), and so the PUCCH 0 resource was conflicting with the first UE.
On that occasion, also correct the comment that describes the code, as
it was wrong/misleading.
- new cu and du config files for testing in band 1
- modification of yml file for CU DU deployment - with new config files
- modification of xml file for SA F1 testcase
See merge request oai/openairinterface5g!2459
* !2419 chore(ci): running 5G RF simulator scenarios with address sanitizer
* !2455 Remove mac_LogicalChannelConfig from RLC (handled at MAC)
* !2456 Setting uniform periodicity for CSI-RS and measurement report
* !2429 LDPC encoding/decoding offload to the T2 card
* !2447 E2 agent: build in CI, fix slice support, add gNB-DU and gNB-CU-UP IDs
* !2452 Include sample advance option in UE tutorial
* !2430 bugfix: nr-ue: set first_tx=1 at first transmission of a harq process
* !2457 Fix scaling for FR2
Position of SSB from Point A depends on offsetToPointA and Kssb, and for both, the unit for RB is expressed as 15KHz for FR1 and 60 KHz for FR2, so scaling must be 4 for FR2 frequencies
- Implement: Extend the F1 encoding and decoding with Qos
- Implement: E1 decoding for QoS
- Fix: Modify the UE_MODIFICATION_REQUEST_MSG towards DU to contain QoS info based on E1AP context response
- Fix: Modify the E1AP and F1AP message structures
- Fill the Qos configuration to send to MAC
The macrlc_has_f1 (static) variable was introduced to signal when we use
F1 in the configuration. It is superfluous: the node_type already passes
this information in a unique manner; hence, remove.
Correctly match UEs based on the NSSAI in MAC and RRC. There is a
convenience function capture_sst_sd() that extracts SST and SD (which
form the NSSAI). Because a previous version used integers to convey the
slice identifier, this function gracefully handles this case, although
it is not spec-compliant.
Prior to this commit, the RAN function for KPM is leaking memory: it
allocates using calloc() but never frees it.
The fix consists of not allocating this memory on the heap in the first
place, but on the stack. Therefore, there are changes to pass in a
pointer to various functions to the structure on the stack, instead of
passing the "container" for the heap memory by value.
Further, the MAC was allocating an excessive amount of memory (N times
sizeof(NR_UE_info_t)). Instead of copying the entire struct, the present
code stores a pointer to the MAC UE container (NR_UE_info_t *). For the
RRC, there is a similar simplification that consists in not storing the
entire struct f1_ue_data_t (which is not required), but only the RRC UE
ID.
Note that both MAC and RRC might suffer from race conditions. For the
MAC, we should lock the scheduler for the time we read statistics. For
the RRC, the problem is more delicate as no mutex exists; the RRC
assumes everything is executed synchronously in the ITTI task loop. In
both cases, this commit does not address this problem
Filtering UEs by NSSAI is broken, so remove it. A later commit will
reestablish this functionality.
Simplify the code: we only handle one condition, so we can check for it
upfront.
This commit introduces an additional (implicit) option that signals if
the E2 agent is to be activated or not. When reading the configuration,
we now check if all fields are set, and activate the E2 agent only if
this is the case. If not, we only print a warning and start the gNB
without the agent.
Note that previously, if not all fields are set correctly, the gNB
stopped.
To implement this behavior, it is necessary to change the defaults of
the RIC IP and the directory for SMs to a (non-NULL) default value.
Otherwise, the configuration system would not consider the field to be
set to the default, and wrongly assumes the field is set, even though it
is not; at least, this change is necessary to make config_isparamset()
return NULL if the configuration is not set.
3GPP has the concept of a gNB-CU-UP ID and a (separate) gNB ID (for gNB,
CU-CP). This commit introduces the gNB-CU-UP as a separate ID that has to be
set in the configuration file when running as a CU-UP. For the
CU/monolithic gNB, it is optional (but needs to be the same as the
gNB-ID if specified).
The CU-UP ID is necessary, as some entities, e.g., the e2 agent, need to
signal both IDs, e.g., to reconcile a CU-CP and (multiple) CU-UP(s)
belonging together.
3GPP has the concept of a gNB-DU ID and a (separate) gNB ID (for gNB,
CU). This commit introduces the gNB-DU as a separate ID that has to be
set in the configuration file. It is necessary, as some entities, e.g.,
the e2 agent, need to signal both IDs, e.g., to reconcile a CU and
(multiple) DU(s) belonging together.
* Dockerfile argument is now a generic BUILD_OPTION for any build_oai available option
* docker-compose files are only modified at deployment time. Not needed for undeployment
* fixes for oai-nr-cuup
* cleaner section for the private registry push
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
See merge request oai/openairinterface5g!2450
* !2440 hotfix: set PDCP t-reordering to 100ms
* !2439 rfsimulator: ignore PIPE signal
* !2441 minor: documentation: advertise correct default value for --ssb
* !2446 chore(ci): displaying the ASN1C commit
* !2443 CI documentation: updates and how to reproduce
* !2355 NR UE improve handling of MSG4 feedback in default PUCCH
* !2408 NR UE MAC config improvements
* !2431 T: isolate generated .h files when using make
* !2442 nr pdcp: rework reestablishment
* !2448 lte: switch to RRC release 16.13.0
* !2088 Implementation of logical channel prioritization at UE
* correctly read timing advance option `-A` in gNB
* set sample advance for OAIUE test to make it more stable
* set gain for OAIUE test to make it more stable
* !2445 Correctly allocate SCC n_TimingAdvanceOffset
* !2454 bugfix: fix NSA CI test
A COTS UE is sending UE capabilities with accessStratumRelease "rel16"
which is not decoded by our RRC. Switching to RRC 16.13.0 lets our RRC
accept these capabilities (and as a positive side effect lets this
particular UE work nicely in NSA fr1).
cleanup means:
- typo: susbend -> suspend
- call nr_pdcp_manager_unlock() where needed
- simplify LOG_XX (remove __FILE__, __LINE__, __FUNCTION__)
note:
nr_pdcp_release_srb() and nr_pdcp_release_drb() don't use
nr_pdcp_release_drb() because they modify the arrays, so
it does not make sense to "abstract" the accesses to
->srb and ->drb.
Security part needs to be checked, may fail to work.
But if it fails, it was probably not working before either.
This commit also contains adding 'static' to nr_pdcp_entity_release()
and nr_pdcp_entity_delete() (it was too complicated to do a separate
commit for this).
We also update stats in free_rx_list() (again, too complicated for
a separate commit).
openair2/RRC/NR/rrc_gNB.c probably needs some more work, it is a
bit ugly to reestablish all the drbs without checking if they
exit. It will generate warnings at runtime. I didn't do it because
I don't know the proper way.
The function generateDRB() sets the value to 100ms but the function
rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ() sets it to 0ms.
So what happens is that the UE gets the value 100ms in the
RRC Reconfiguration but the gNB creates the PDCP entity with 0ms.
Let's create it with 100ms instead, to be aligned with how we configure
the UE.
And also avoid some PDCP warnings at runtime when some packets
are retransmitted but rejected because of the 0ms timer. This is
the warning:
[PDCP] discard NR PDU rcvd_count=68469, entity->rx_deliv 68481,sdu_in_list 0
This is just a hotfix. A real solution is to have the RB creation in
only one place. And we should also have those parameters configurable.
Work for later.
- Reorder the logical channels based on priority
- Handling of configuration and release of logical channel bearer
- Add changes in the implementation of lcp procedure for equal priority logical channels
- Restructure the lcp parameters as a separate structure
- Further code clean up
Closes#685 and #698
See merge request oai/openairinterface5g!2425
* !2404 NR UE MCS for retransmission v2
* !2420 Scan build: Argument with 'nonnull' attribute passed null
* !2422 Fix AssertFatal when using NR band n1
* !2418 NR UE resynchronization fix
* !2376 Save NSSAI params of PDU session coming from AMF
* add `build_oai` option for thread sanitizer
* update 60 MHz 2x2 phytest-timing threshold
* !2423 Free F1 UE data struct only on UE release
* !2428 Prevent CU-UP UE ID management if integrated CU
* !2390 NR PTRS improvements
* !2291 Pass config object instead of using implicit global
* !2421 Change UL_TTI.request PRACH PDU beamforming pack/unpack handling
* !2406 CI:AW2S - test with 10 AmariUEs
* !2401 ue-rrc-coarse-cleaning
* !2366 Remove F1 BWP switching logic
* !2426 F1: support multiple DUs per CU
* !2432 Remove cblas dependency for 5G targets
This commit follows the previous one and adds a dependancy for the
generated .h files so that when we change T_messages.txt to add a
T trace, the compilation succeeds when using ninja in
cmake_targets/ran_build/build.
When using the make system to generate T files, if you change
T_messages.txt you may have problems compiling the gnb with ninja.
If you want to see the problem:
First run: cd cmake_targets; ./build_oai --ninja --gNB
Then: cd common/utils/T
edit T_messages.txt, add a trace, for example:
---
ID = ENB_PHY_UL_TOCK
DESC = eNodeB uplink tick - one tick per ms at start of uplink processing
GROUP = ALL:PHY:GRAPHIC:ENB
FORMAT = int,eNB_ID : int,frame : int,subframe
---
then run: make
then: cd cmake_targets/ran_build/build; ninja nr-softmodem
You should have an error looking like this:
---
[3/81] Checking validity of VCD files
FAILED: common/utils/T/CMakeFiles/check_vcd /tmp/develop/cmake_targets/ran_build/build/common/utils/T/CMakeFiles/check_vcd
cd /tmp/develop/cmake_targets/ran_build/build/common/utils/T && /tmp/develop/cmake_targets/ran_build/build/common/utils/T/_check_vcd /tmp/develop/common/utils/T/T_messages.txt /tmp/develop/common/utils/T/../LOG/vcd_signal_dumper.h
error: VCD_FIRST_VARIABLE is not correct in T_defs.h
You probably added a VCD trace (variable or function) but you did not
update T_messages.txt and/or T_defs.h in common/utils/T/
[...]
---
Let's first isolate the generated T .h files when using make because
we have two versions of T_IDs.h and T_messages.txt.h when mixing
make/cmake.
A next commit will regenerate T_IDs.h and T_messages.txt.h when
T_messages.txt chages for the cmake system, because this commit
does not solve the problem.
- PRACH Configuration Index = 98 is not suSpported by the Amarisoft UE simulator, as a number of PRACH occasions within the PRACH slot is > 1
- for PRACH Configuration Index = 100, number of time-domain PRACH occasions within a PRACH slot is 1
Multiple DUs host cells, whose cell ID cannot match (to identify them
uniquely). Hence, don't check for equality with CU, because otherwise,
we can never connect multiple DUs.
This is a workaround for a problem described in #706. In short, we
cannot reuse the cu_add/remove_f1_ue_data() functions if we are in an
integrated CU-UP/CP ("CU"), but then we can also not reliably use
different UE IDs in CU-UP and CU-CP (except if using even more hacks).
An assoc_id of 0 is used to mark UEs whose DU is "offline" (not
connected). In this patch, if a DU disconnects, we go through all UEs
and set their assoc_id to 0 if they belong to a UE that just went
offline.
This code printed BW masks (what is this) and number of MIMO layers. It
was dependent on the current DU, and only showed the information for the
current DU config (SCS, band). On DU disconnect, it leads to segfaults
to this dependency, and IMO is not useful in itself (it could rather be
printed when receiving the UE capabilities, for all bands etc.).
To allow to send F1 messages to multiple DUs from the CU, we need to
send these messages via different assoc_id (SCTP association ID,
basically akin to a file descriptor). Currently, the assoc_id is stored
in a context at the F1 module and retrieved in
f1ap_itti_send_sctp_data_req().
To facilitate a later change towards indicating (from the RRC) to which
assoc_id (hence, DU) to send a message, we refactor all
CU_send_*()/DU_send_*() functions to take the assoc_id as a parameter to
which to send messages. In this commit, we then pass the assoc_id from
the context. A later commit changes this (at the CU) to pass the
assoc_id from the message to be sent.
Previous to this commit, the CU creates an F1 instance and initializes
GTP after a successful connection establishment, and tears the F1
instance down after the DU disconnects. This does not work when trying
to connect multiple DUs, or have them reconnect, as e.g., GTP
re-initialization fails (socket already bound).
This commit makes the CU F1 instance creation and GTP init at CU task
init (only once), and also frees the F1 instance only after the CU task
exits, which is at termination of the application, typically.
Remove dead code, result of 2136ceec0d: we
cannot connect() in GTP on multiple remotes (as then only packets of one
host might be received), but might need to send to multiple remote
sockets.
The DU UE capability printing depends on data on SCS and band, which
currently is only stored with the DU. To avoid any assert, we check
that the DU is present. A follow-up commit will rework this.
Before this commit, as visible in the handler of an F1 UE release, it
can happen that we forward the RRC Release message to a UE and start the
release timer, while also removing the F1 UE data (containing e.g., the
CU UE ID). This can lead to asserts, since there might still be
subsequent traffic for such UE during a short time, while the DU does
not have the secondary UE ID stored anymore.
This commit changes the logic. It introduces function
nr_mac_release_ue() that removes the UE at MAC and RLC, frees the F1 UE
data (if applicable), and sends the complete, after timing expiry. If
the UE is out of sync, this function is used to free the UE immediately.
This fixes#685 and #698.
integration_2023_w43
See merge request oai/openairinterface5g!2415
* !2407 hotfix: UE DCI format 11: only 1 dl_config instead of 2
* !2372 chore(ci): testing up to 10 UEs in 5G RF simulation
* !2396 Add optimized function to count the number of bits set in uint64_t variable
* !2383 E1: implement release bearer, handle multiple CU-UPs
* !2413 Assigned value is garbage or undefined reported by scan-build
* !2387 Small fixes for UE stability and introduction of ITTI "no-thread" mode (separate bug fixes and ITTI changes?)
* !2410 Fix CellGroupConfig-related memory problems
* !2414 fix doxygen
- Set the correct QoS flow ID to associate a correct QoS flow to the
bearer: the UE would misassociate otherwise
- Set the DRB as the default: the handler applies bool with true==1, so
use bool value
Introduce a --no-itti-threads command line option to disable threading
in ITTI, and call message handlers in the current thread. This is being
introduced in order to increase repeatability when testing the nrUE with
the IQPlayer. Without this feature, runs with the IQPlayer will end up
differently, depending on the timing of ITTI threads, mostly when
sending messages to RRC and NAS.
Before this commit, the DMRS_UplinkConfig was stored in a separate
DMRS-related structure, although it is always referenced in the
PUSCHConfig of the current UL BWP.
Through certain code paths (e.g., retransmission), it could happen that
an old DMRS_UplinkConfig was accessed that was freed (through new
CellGroupConfig).
In this commit, we always look up the DMRS_UplinkConfig in the current
PUSCH config, which should always be up to date.
Until this commit, the SIB1's PDCCH_configCommon was set (via a pointer,
i.e., an indirection) to the one of the ServingCellConfigCommon (SCC).
Afterwards, the SIB1 code further populated this PDCCH configCommon,
indirectly populating the one of the the SCC, on which code later
depends.
Not only did this create possibilities for double-frees (since freeing
the memory of SIB1, then SCC would free the PDCCH configcommon twice),
but also it makes it harder to track where certain structures are
populated. Hence, this commit solves both issues:
- The SCC is correctly populated on initialization of the SCC
- The SIB1 makes a deep copy of the SCC' PDCCH configCommon
This resolves the two issues above.
This allows to communicate with multiple remote hosts. A further
improvement would be to refactor this piece of code into a function and
call it only when necessary, i.e., when we know the remote host, or want
to add one to a list of hosts.
This commit introduces the capability to handle multiple CU-UPs. It uses
a RB tree and puts the CU-UPs into the tree. Upon the connection, it
associates UEs to CU-UPs in a round-robin fashion.
A later commit will introduce an RB tree to manage multiple CU-UPs. The
RB tree implementation relies on some macros that generate RB tree
functions. Functions using the RB tree implementation will be grouped in
this file.
The E1AP Setup Request contained the network configuration (IP address,
ports) as well as the actual E1AP Setup Request application data
(Supported PLMNs, ...). This has the drawbacks that
- The E1AP Setup Request is stored to retrieve IP addresses in the E1AP
module, which is confusing as the Setup Request, per standard, has no IP
info
- The CU-CP received an E1 Setup Request for configuration during start
up, but it did not actually receive such Setup Request, but merely the
IP configuration to set up the socket
This commit splits the E1AP Setup Request into a "real" Setup Request
for application data, and creates a new type e1ap_net_config_t to group
all IP configuration data. Further, a new ITTI message type
E1AP_REGISTER_REQ is introduced to group both types. What happens is
- RCconfig_NR_CU_E1() reads both E1AP application-level data and IP
configuration, as previously
- The data is sent to the CU-CP. It discards the E1AP Setup Request
data, and only uses the network configuration to set up the socket
- The data is sent to the CU-UP. It uses the network configuration to
connect to the CU-CP, and then sends the E1AP Setup Request to the
CU-CP.
Currently, the CU-CP still stores the Setup Request locally, which will
be changed in the next commit to send it to the RRC.
The DRBLists inside E1AP message are for E-UTRAN. We don't support that
with our CU-CP/UP yet, so remove it to reduce ambiguity and complexity.
For the same reason, we remove the CN Support, which for us is always
"NR".
Integration Branch 2023.w42
See merge request oai/openairinterface5g!2403
* !2368 NR UE SRB0
* !2399 build_oai: Auto-detect if terminal supports colors
* !2398 Correctly load channel models
* !2365 Change PDU_Length and tlv length calculation to be inline with SCF 222.10.02
* !2402 chore(ci): enabling the ARM cross-compilation pipeline
* !2397 fix(ci): improve for parallelism issue in Groovy
* !2405 Clean IDE files and remove old documentation
* properly formatted the finalizeSlaveJob function
* explained the reason and gave an explicit name to the global variable
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This enables build_oai to detect if the output terminal supports colors.
If it does, it will use colors in its output. If it does not, it will
just print the text, without color codes, improving legibility.
PDU Length is as per SCF 222.10.02: The total length (in bytes) of the
PDU description and PDU data, without the padding bytes. From
TX_DATA.request we get 8 (2 bytes PDU_Length + 2 bytes PDU_Index + 4
bytes num_TLV ) and from each TLV we get 4 + value size ( 2 bytes tag +
2 bytes length + value size without pading)
Therefore, add function to compute PDU_length() value for
TX_Data.request, taking into account how many TLVs there are.
compute_PDU_length() does not rely on access to `nfapi_nr_pdu_t`.
Put it into nr_mac_common.c to avoid introducing dependencies.
integration_2023_w41
See merge request oai/openairinterface5g!2394
* !2389 Remove global variable rx_spatial_power
* !2364 NR UE PUCCH2 sanitize errors
* !2352 Break DCI processing function into smaller pieces
* !2391 Remove calloc from L1 at CSIRS_PDU conversion function
* !2393 Fix UE assertion due to PUCCH resource lookup all BWPs
* !2307 Improve documentation for L2sim Readme
* !2310 doc(websvr): how to install properly the dependencies
- Remove calloc from convert_csirs_pdu function, change return value
from 'nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *' to
'nfapi_nr_dl_tti_csi_rs_pdu_rel15_t' to not require call to 'free()'
- Set parameter pointer as const as it's not modified
- Remove cast to fapi_nr_dl_config_csirs_pdu_rel15_t in csi_rx.c as
ue->csirs_vars[gNB_id]->csirs_config_pdu is already of type
fapi_nr_dl_config_csirs_pdu_rel15_t.
- Remove casted parameter in call to convert_csirs_pdu and replace with
csirs_config_pdu obtained earlier from
ue->csirs_vars[gNB_id]->csirs_config_pdu.
integration_2023_w40
See merge request oai/openairinterface5g!2381
* !2345 fix bug for IE cause in pdu session accept
* !2361 Fix Msg3 MAC CE C-RNTI
* !2371 fix(ci): printing the warning and error lines for CI purposes
* !2374 Fix SSB ARFCN: wrong ARFCNs in FDD
* !2379 fix the selection of DCI candidates at UE
* !2369 Add bwp_size and bwp_start fields to CSI_RS PDU struct at NR UE
* !2349 E2AP Version 1,2,3 and KPM version 2, 3
* !2375 increase the max fd of rfsim, that have been shorten to tightly for cpu saving
* !2367 chore(ci): improve GitLab <-> Jenkins contributor experience
* !2378 F1AP: correct message handling
* !2370 NR PDCP RB suspend
* !2107 Compute RI based on SRS up to 4
* !2339 PUCCH power computation
* !2382 Remove dead code in NR UE
* !2229 PUSCH LLR 128/256 SIMDe routines for ARM/x86
The RRC container is to be handled by the msg handler in
mac_rrc_dl_handler.c. Therefore, don't forward the RRC message, but copy
it into the message so the handler can take the action.
Create function to obtain nfapi_nr_dl_tti_csi_rs_pdu_rel15_t from fapi_nr_dl_config_csirs_pdu_rel15_t without bwp_size and bwp_start.
Replace previously problematic cast with call to created function.
Before this MR, openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c:
nr_ulsch_qam64_qam64():
xmm3 = simde_mm256_max_epi16(bit_met_m5_p1, bit_met_m5_p1);
Should be instead:
xmm3 = simde_mm256_max_epi16(bit_met_m5_p1, bit_met_m7_p1);
integration_2023_w39
See merge request oai/openairinterface5g!2363
* !2142 Fix packing/unpacking procedures for P7 messages
* !2253 Parallelize the Compensation, LLR, layer de-mapping, and unscrambling with symbol
* !2319 Fix NR UE init RA
* !2343 Reverse bits in UCI message when using polar encoding/decoding
* !2348 Resolve "SIGSEGV in nr-softmodem @ 100MHz on USRP"
* fix phytest-timing thresholds after merge of !2253
* !2320 Reduce ITTI log message volume when queues full
* !2360 nr rlc: minor: fix tests
* !2359 nr rlc am: bugfix: correct usage of tx_next
* !2356 Const return values
* !2357 Fix compile error when --build-e2 option included
* !2340 Resolve "gNB build on ubuntu 22.04 fails with dpkg error"
* !2362 Implement F1 bearer release and add telnet module
* !2324 Refactor gNB ULSCH decoding
* fix for SSB ARFCN in RRC MeasConfig
The UE should measure on the SSB, otherwise it does not see anything.
Hence, this commit fixes the meas-config to request the UE to measure
on the right frequency.
tx_next was increased only when all segments of an SDU were sent to
lower layers. This may lead to a situation where the receive entity
transmits a control PDU that is rejected because it sets its ACK to
tx_next+1 (if all segments were not transmitted when the control PDU
is sent).
What is done now is to increase tx_next as soon as we send the first
segment of an SDU to lower layers. A control PDU received from the
receive entity is now accepted and processed.
Specifications (38.322 5.2.3.1.1) say to increase tx_next when the
RLC entity receives an SDU from upper layers. But for us, since the
buffering of SDUs is done in the RLC layer and since the buffer size
may be big, we may increase tx_next too much. The choice has been
made to increase it only when we transmit an SDU to lower layers.
We may change this logic if needed. (But it won't be simple.)
Creation and usage of packing/unpacking functions for DCI payload
Update Proxy commit id for CI
Apply formatting on changed functions and fix pull/push return value checking
- avoid the finction duplication
- add the transform predoding to the nr_rx_pusch_tp
- add the MMSE for 2 layer which modulation greater than 16 qam
- can support to 256 qam for 1 layer and 2 layer
integration_2023_w38
See merge request oai/openairinterface5g!2354
* !2296 rfsimulator optimization
* !2344 NR UE DCI config small fixes
* !2342 Fix for PBCH decoding
* !2347 Handle NAS registration accept inside NAS downlink
* !2350 Tutorials: upgrade UHD version to 4.5.0.0
* !2351 NR UE HARQ fix
* !2304 Use F1 internally: F1 Setup
* !2306 nr_ulsim and nr_dlsim logging and help modifications
* !2305 NR UE RRC bearers management
* !2353 Fix documentation references to "telnetsrv"
- store the assoc ID of a UE at the RRC
- if F1 receives an SCTP shutdown, it removes the endpoint
- F1 will also send an "F1 Lost Connection" message to the RRC
- it is not yet possible to reconnect a DU after it had already been
connected at the CU, since the CU F1AP task will try to rebind GTP,
which fails
- MAC creates CellGroupConfig and sends to RRC
- the RRC does not manually update the CellGroupConfig
- MAC handles the RRC processing timer
In this commit, any updates to the CellGroupConfig previously done at
the RRC don't work. In other words, MIMO etc don't work; this is
implemented in the next commit.
Note that the change to take out spCellConfig during reestablishment is
because after reestablishment, as per spec (38.331 5.3.7.2), the UE
should drop the spCellConfig, which we generate by default on the first
UE connection.
Furthermore, add a new variable apply_cellgroup to signal if, after RRC
processing timer, we wish to apply the CellGroup. In some situations,
e.g., Msg.4 ack, we do not want to apply the CellGroup, because for
instance in reestablishment, we await for a reconfiguration of cellgroup
that would be triggered too early.
!SIB1 is not correctly filled! This commit does not work with COTS UEs!
The next commit fixes this.
- Move radio config (e.g., minRXTXTIME, SIB1 TDA, do_SRS, etc) down to
MAC.
- Some parameters in MAC are redundant: delete them.
- Remove call to nr_mac_config_scc() from RRC and simulators, the MAC
initialization routine calls it implicitly
Previously, filling of F1 Setup Request depended on reading the RRC;
hence, for timing reasons, we only initialized and sent the F1 Setup
Request once the MAC and RRC are ready.
After moving SCC, SCD, MIB, and SIB1 to MAC, the MAC does not depend on
an RRC being present anymore, and hence, the F1 Setup Request does
neither. In this commit, we read the F1 Setup Request after initializing
the MAC.
The MasterInformationBlock is handled at the DU and sent to the CU in
the F1 Setup Response. Hence, move it down to the MAC. Furthermore:
- Change type because MIB_PDU_t is 4G type
- Simplify schedule_nr_mib()
Note: the reestablishment is broken, and a later commit fixes it.
The ServingCellConfigCommon is an inherently radio-related
configuration. As such, it should be handled by the DU, not the CU.
Therefore, move it "down" to the MAC.
- send F1 Setup using callback
- store f1 setup req locally for reference
- check F1 Setup Req against RRC data structures:
* if matches: send F1 Setup Response using callback
* if not matching: send F1 Setup Failure using callback
- don't send CU config update by default, we don't need this
- if the Setup Response does not contain a cell, don't activate. It is
possible the CU sends a gNB-CU configuration update, which will
initialize the structures
Use a struct to initialize the RRC at the beginning, and remove the
NRRRC_CONFIGURATION_REQ. This message is not necessary; the RRC/CU
should be initialized from the F1 Setup Request, coming from the DU.
Before this commit, we did not read the ServingCellConfigCommon (SCC)
completely at start; rather, we read most (but not all) of it, then also
the minRXTXTIME, and at RRC initialization in
openair_rrc_gNB_configuration(), we filled the
pusch-TimeDomainAllocationList into the SCC, depending on the
minRXTXTIME.
The reason might be that we read part of the SCC, use that to fill the
NRRRC_CONFIGURATION_REQ, read also the minRXTXTIME (part of the RRC
config), and then we have all we need to "finalize the SCC". Since we
move everything to the MAC, I avoid too much upfront code changes,
hardcode the minRXTXTIME (and check with an assert), and undo this in a
later commit when the "RRC config" relevant for radio parameters, e.g.,
minRXTXTIME, is moved to MAC.
I verified the equality of the SCC before (at the end
openair_rrc_gNB_configuration()) and after (at the end of
get_scc_config()) this commit manually using a printf, assuming that
after RRC initialization, we didn't do any further modifications to the
SCC. But in fact, I cannot know that we don't do it...
This branch series implements the usage of the F1 Setup Request
internally at the gNB, even if CU and DU run in the same process. Until
now, the F1 Setup Request contained struct fields to pass IP
configuration to the F1AP module; this information is not necessary in
monolithic, nor should it be relevant when passing the information in
F1 Setup Request.
Therefore, this commit moves all IP connection-related information out
of the F1 Setup Request and into a separate structure instead. In order
to give the F1AP module the necessary connection information, the
DU_REGISTER_REQ message is introduced that combines the F1 Setup Request
and IP configuration, such that the F1AP module can setup the SCTP
connection and then send the F1 Setup Request message.
In a later commit, there will be a callback for F1 Setup Request at MAC
to simply register the DU at the CU. The monolithic callback will simply
forward the F1 Setup Request The F1AP callback will look up the IP
configuration and create DU_REGISTER_REQ message containing IP
configuration and F1 Setup Request, which is then handled by the F1AP
module. To this end, a separate function in gnb_config.c allows to read
IP information from configuration.
Instead of storing the F1 Setup Request implicitly in F1 context, we
provide the F1 Setup Request message to be encoded explicitly to the
encoding function.
In the case of MIMO, we reused memory to point to the same PUCCH
resource. This is problematic, since ASN_STRUCT_FREE() would try to free
this resource twice.
This commit changes to create distinct memory for the PUCCH resources,
while putting the same configuration to still use the same PUCCH
resource from a radio configuration point of view.
integration_2023_w37
* !1909 Rework for aarch64 support after SIMDe integration
* !1995 Fix packing/unpacking for nFAPI P5 messages
* !2228 TDLA, TDLB and TDLC channel models in DLSIM
* !2327 Bugfixes and some rewrite for nr rlc am control PDU reception
* !2331 NR UE HARQ improvements to handle more than 4 per PUCCH
* !2286 Service Models integration - KPM v03.00, GTP, MAC, RLC and PDCP
* !2336 fix(ci): HTML reporting for Ubuntu build fix
* !2338 nr-softmodem: fixed invalid length calculation, leading to segfault
* !2326 Tutorials: Update NR SA Tutorials to be compliant with OAI CN5G pre-2.0 release
* !2334 NR UE DL channel estimation fix
* !2325 Compute ULSCH TB CRC
Laurent noticed it on one of his MR and confirmed with him:
-- Volumes have be created the 1st time they ran on avra on July 7th
-- Volumes were created with not only the raw files but also the nr-softmodem executable
Solution: two-fold:
1. using the `docker-compose down -v` syntax, the volume is deleted automatically
2. I added redundancy with the custom command to remove the used volume
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
- Fix 4G and 5G discrepancy in TLV padding requirements: 4G does not
need padding, whereas 5G needs, so make separate set of function for
padding for NR
- Fix packing/unpacking for (n)FAPI PARAM and CONFIG.request/response
messages
- Handle message padding to next 32-bit boundary, as per SCF
specification in packing and unpacking functions
- Account for message header size upon receiving message in PNF and VNF
Testing on Neoverse N1 (Ampere 3GHz). Tested only on a subset of phy-simulators.
- Changes:
- use SIMDE consistently
- adaptations of LDPC decoder generator for ARMv8 performance
- SIMDe modifications of Intel CRC to allow for aarch64 build.
optimizations for 128-bit to improve performance of LDPC encode/decode
on aarch64 (Neoverse 1)
- added BG2 files for 128-bit ldpc encoder (aarch64)
- testing on Xeon
- testing on x86
- minor changes to build/run on x86
- change in crc.h after returning to aarch64
- removed some warning in ldpc decoder generator for x86_64
- char
- Delete irrelevant constants
- Correctly declare variables
- Define stdbool for all architectures
- Remove definition of _MM_SHUFFLE and use SIMDE_MM_SHUFFLE
- Remove commented code
- Fix CMakeLists.txt
- Include SIMDE avx2 functions in tools_defs.h
This improves the RFsimulator code to reach a ~40% E2E throughput
improvement (depending on the machines).
Changes:
- reduce ring buffer size
- code cleanup for readability
- set TCP kernel parameters
integration_2023_w36
See merge request oai/openairinterface5g!2333
* !2185 DL delay compensation
* !2255 Add condition to call or not the function nr_mac_prepare_ra_ue()
* !2301 NR UE handling MCS for retransmissions
* !2308 Heap Allocation issue: Removed Dynamic allocation
* !2317 bugfix: don't force an UE to support en-dc, respect its capabilities
* !2318 Set security for all active SRBs after NR_RRCReestablishment
* !2321 Use appropriate CMake flags to link to UHD
* !2332 T tracer: add a trace for NR SIB1
* !2322 Remove small races in ue
* !2323 NR UE fix DCI candidates
* !2328 Add SRB1 and SRB2 received bytes to statistics
integration_2023_w34
See merge request oai/openairinterface5g!2316
* !2283 going back to sync mode when cell is barred in MIB
* !2290 fix gtp delete. we should not delete all bearer in case of dedicaded bearer release
* !2299 fix-mem-overflow_64qam
* !2288 NR UE avoid crashes upon renewal of SIB1
* !2279 web server enhancement and doc link fix
* !2302 Tutorials: update links for Open Cells SIM Card programming tool and Ubuntu 22.04 LTS
* !2303 NR gNB limit on PUCCH bits to be scheduled
* !2207 Use F1 internally: UE Context Modification Required
* !2315 Fix LCID to RB association, allow more than 8 LCIDs in the UE
- Add O-RAN KPM SM with DRB.RlcSduDelayDl, DRB.UEThpDl and DRB.UEThpUl measurements
- Add L1M.PHR1.BinX KPM meas
- Add comments for all KPM meas; deleted few outputs (but added in xApp)
- Add DRB.PdcpSduVolumeDL and DRB.PdcpSduVolumeUL KPM meas
- Delete unnecessary rnd functions in ran_func_kpm.c -> path set to
flexric submodule
- Add GOL-delay and AVG-soujour
- Correct the types of/measurement the tx/rxsdu_bytes and tx/rxsdu_occ_bytes
- Update txsdu_avg_time_to_tx value only when measurements activated
Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
fix the 64QAM modulator case, that process 192 bits per iteration, then 24 bits per iteration of the tail bits, then added the last two symboles processing (no odd number of symbols case)
integration_2023_w33
See merge request oai/openairinterface5g!2300
* !2247 Fix cppcheck warnings related to nullPointerArithmeticRedundantCheck
* !2250 Fix cppcheck warnings related to negativeIndex
* !2281 avoid NR UE stalling if SIB not decoded
* !2273 NR_UE: fix limited UL data throughput in do-ra mode
* !2295 hack: see Bye. message when quitting gnb running with aw2s
* !2298 mapping LCID to RBID to index RLC entities
* !2267 Make read-only global variables const, additional fixes
* !2297 nr rlc: change retx logic
* !2230 Readme correction
* Lower scheduler PF averaging constant
This time constant plays a major role in how long a UE has to wait
maximally before it might be scheduled. For instance, if a UE had a lot
of traffic, the average traffic will be high, pushing the PF coefficient
down. If another UE with no traffic in the past becomes active with
heavy traffic, the first UE might not be scheduled for an extended
period of time.
In the AW2S-Amarisoft UE CI test pipeline, we sometimes see that the
maximum number of RLC retransmissions was reached. While this might not
be the (only) cause, scheduling a UE more often might prevent such
situations, and we saw an improved stability.
After removing RA.crnti, there is no need to use a separate function
nr_generate_Msg3_dcch_dtch_response() to generate Msg.4 (yes, the
function mentions Msg3 but it does Msg3 response == Msg.4).
Also, using nr_generate_Msg4() has the advantage that it waits until we
have the reconfiguration available in RLC to be sent to the UE. Finally,
we can delete the old nr_generate_Msg3_dcch_dtch_response() as we don't
need it anymore.
When t_poll_retransmit expires we need to consider an SDU for
retransmission.
We used to take the first SDU (which could be a segment, not a full SDU)
of the wait list and put it in the retransmit list.
When testing with some UE (Amarisoft UE) a bad behavior was detected.
This is what happens for the SDU with SN 6 (for illustration purpose).
The gNB is sending an SDU in several pieces (it is segmented).
slot n: rlc sn 6 [1 .. 119[ p=0 RECEIVED
slot n+x: rlc sn 6 ]120 .. 180[ p=0 RECEIVED
slot n+x+y: rlc sn 6 ]181 .. 210] p=1 not RECEIVED
Then when t_poll_retransmit expires rlc retransmits only the PDU of
slot n (with p=1 this time) and the UE replies with ack 6. So nothing
happens on the gnb side.
(We would have expected ack 7 + nack 6 181..end.)
Then after t_poll_retransmit expires again rlc retransmits only PDU
of slot n and the UE still replies with ack 6.
This goes on forever (or some other timeout occurs.)
The logic is now changed.
When t_poll_retransmit expires we transfer all the SDUs in the wait list
having the same SN as the head of the wait list into the retransmit list.
Testing with Amarisoft UE, it seems to work properly.
The RA.crnti field is marked as being used by NSA mode, but it is not.
OTOH, it is used in the case of RA with Msg.3 with C-RNTI MAC CE. The
latter does not necessarily need it, though, as we can change the RNTI
of the RA process when we receive C-RNTI MAC CE.
This introduces a slight complication, though, as we cannot remove the
MAC UE Context (generated when receiving Msg.3) directly when parsing
the C-RNTI MAC CE. Previously, we had both rnti and crnti in the RA
struct, and when sending Msg.4 after Msg.3 with C-RNTI MAC CE, we would
remove the UE context (this is changed in the next commit). Therefore,
we employ nr_mac_trigger_release_timer() which releases the UE after
60ms, circumventing this complication.
The RRC should not trigger RLC bearer establishment: this should be done
only via F1, and in the remaining code (removed here), this principle
was violated.
Further, this code was doubly wrong, as it used the CU UE ID for the
RLC, setting up bearers with IDs 1,2,3 etc instead of the RNTI.
The MAC_NR target is not needed; every dependent target also links
L2_NR. Therefore, this target just creates double compilation. We can
remove it without problems.
integration_2023_w32
See merge request oai/openairinterface5g!2293
* !2061 Rel16 NR PRS improvements
* !2113 handle TDD pattern2 at UE
* !2266 Use cmake3 command if on RHEL
* !2287 Initialize OAIgraph before usage
* !2285 Fix alignment of Tpool user data to 32 bytes
* !2284 USRP driver: Make it compile for UHD < 4.0.0
* !2214 Use F1 Internally: switch to CU UE ID in CU
This commit repairs the reestablishment after the introduction of the CU
UE ID in the CU, different from the DU UE ID. Now, the CU uses an
identifier different from the RNTI, used in the MAC, to refer to UEs.
To repair the reestablishment, a number of changes needed to be
introduced:
- Handle old_gNB_DU_UE_id in MAC
The MAC handles the old_gNB_DU_UE_id field in the DL RRC Message. The
commit adds encoding/decoding of the field. The MAC will drop the old
UE, but retain the CellGroup of the corresponding UE(!). Because a UE
releases the spCellGroup on reestablishment, the MAC does the same; it
needs to reapply the old configuration after a reconfiguration. For the
latter, introduce new variables to keep a "future" CellGroupConfig to be
applied (reconfigCellGroup) and a flag (expect_reconfiguration) that
applies the CellGroupConfig if a DL RRC Message transfer on DCCH, which
is assumed to be the reconfiguration.
- Add RNTI change in RLC
The RLC needs to reuse the old UE context. Hence, we simply change the
RNTI in the old context, and delete the new one.
- No PDCP UE ID change
The previous implementation of the PDCP used the RNTI; hence, the ID
needed to be switch (as above for the RLC). Since the PDCP now also uses
the CU UE ID, no identifier change is needed, and we remove all
corresponding code.
- No MAC modifications/update from CU
As foreseen by the spec, the CU does not modify or change the
cellGroupConfig in the RRC during reestablishment. This change will be
generalized in the future to all of the RRC. Also, the
nr_rrc_mac_remove_ue() function has been removed: the MAC handles any UE
changes autonomeously, without being triggered from the RRC explicitly.
- Remove reestablish_rnti_map
The RRC does not use RNTIs for UE identification. Hence, a
reestablish_rnti_map to link two UEs to each other is not necessary
anymore.
After a reestablishment, the PDCP sequence number counters have to be
reset. Implement an API to allow the RRC to reset the sequence numbers
for a particular UE in the case of reestablishment
The RRC gives its own RRC UE ID. It won't intervene if DUs assign the same RNTI to different UEs: it simply does not care what the DUs do with the RNTI.
- Use the same CU-UP in E1 as in CU-CP: we don't have a separate entity
to allocate IDs, and we just use the same as the CU-CP
- Correct gNB CU-UP/CP UE IDs in E1AP message types to 32bit
- Set CU UP UE ID explicitly for clarity
- Remove RNTI from E1 messages, E1 does not know what an RNTI is
The UE had a list of known UEs. With the introduction of a separate
module for F1 UE ID handling that is also used in monolithic (to
separate CU UE ID from DU UE ID), this functionality is not needed, and
deleted in this commit.
Previously, the F1AP handler called various functions directly, instead
of sending an ITTI message to the RRC thread. This has two drawbacks:
- it can lead to data races if the RRC task uses functionality that is
being accessed by the F1 task through this function
- no homogeneity: all other handlers send an ITTI message, so this one
should too
- The CU/DU UE ID is used in DL RRC Message Transfer
- Note: The CU UE ID currently is still the RNTI
- on every DL RRC Message, the DU verifies that the UE exists
- Refactor RRC: common function to forward protected SRB PDUs
The RRC uses gNB_ue_ngap_id as its primary ID; the following commits
will introduce the usage of the (F1) gNB CU UE ID. This commits renames
the gNB_ue_ngap_id to rrc_ue_id to better reflect its usage as the RRC's
primary UE ID.
It will be used as the NGAP and F1 (CU) UE IDs.
for reusing the old UE Context after reestablishment: we have to free a
UE context, but that also free's the RA process that we still need.
Remove here
Is this necessary?
The thread pool provides user data to be stored by (pre-)allocating the
necessary memory. A previous attempt was made to have this user data
aligned on a 32 byte boundary (e.g., to prevent segfault with SIMD
instructions, or avoid inefficient data access); the current
implementation, however, leads to unaligned memory access.
This patch attempts again to implement user data to be 32 byte aligned.
First, use memalign() to allocate the actual job on a 32 byte boundary.
Second, use alignas(32) to align the pointer to the user data to be
aligned to 32 bytes. Since it is the last member of the struct, this
ensures that user data, which is allocated right behind it, will be
aligned to 32 bytes as well.
Newer GCC releases warn about the scope being uninitialized:
openair1/PHY/TOOLS/nr_phy_scope.c:1076:20: error: ‘graph.text’ is used uninitialized [-Werror=uninitialized]
This is correct, as we don't initialize the scope. This commit correctly
initializes the scope.
Config options --reconfig_file and --rbconfig-file have been introduced
to modify the filenames of reconfig.raw and rbconfig.raw (e.g., in the
case of multiple UEs). These filen*ames* were to be prepended with
--rrc_config_path to set the path. In summary, three options were
necessary, when two are sufficient.
In this commit, change to the options --reconfig-file and
--rbconfig-file (slight change for harmonization with other options,
which mostly use dashes) to give the full path to the corresponding
files, and avoid to surprise users who would not expect to have three
options.
--rrc_config_path has been deprecated and an error will be printed if a
user attempts to use it.
integration_2023_w31
See merge request oai/openairinterface5g!2282
* !1932 Introduce basic unit testing framework, cleanup
* !2259 NR_UE: improve NFAPI_NR_DMRS_TYPE1_linear_interp()
* !2271 Draft: Make asn1c debug traces functional
* !2274 remove NR UE RRC sub state
* !2278 CI: AW2S - update of AmariUE commands
* !2004 Fix gNB LLR plot view
* !2265 chore(ci): adding back LTE-UE Radio tests
* !2268 fix for PDCCH unscrambling at UE
* !2269 fixes for PUCCH F1 at UE
* !2258 pdcp_config_req_asn1 bug fix
* !2263 UE ServingCellConfigCommon cleanup
* !2275 Fix RRC UE timers based on frames and not slots
* !2280 handle scheduling of DLSCH with DCI10 in common search
* !2277 CI: no Jenkins mail, iperf refactor, add Quectel E1 test
* !2260 Preparation of release v2.0.0
- throughput test in DL
- UL throughput: 30s is enough
- increase bidir test time for more reliable measurement
- increase retx thresholds: 1% for first round is too low
The results of individual UEs (e.g., ping) is listed vertically, like
so:
| ping results | UE1 |
| | UE2 |
| | UE3 |
Where UE1, UE2, ... represents an entire box with results for UE 1, 2,
... For many UEs, this results in considerable need for vertical space. This
commit changes to something like the following to save space:
| ping results | UE1 UE2 UE3 |
For a single UE, this commit has no major impact (the boxes are not
stretched to width anymore).
A side effect of the previous commit's refactoring is that we mark the
pipeline as failed if a (packet loss/bitrate) threshold is violated.
Previously, the HTML would contain a "Perf not met" hint, but be marked
as successful.
This commit introduces more realistic thresholds for various pipeline
runs. The values are arbitary, following the performances in pipelines
that were marked as successful, but actually had performance problems.
They allow, though, a pipeline to pass following the normal performance
we saw the last weeks.
Jenkins is programmed to send e-mails, but most people don't use it:
- the mail has all results in the attachments, but it is clumsy to
navigate between mail reader and browser, and CSS is not correct
- there is no link to the actual results
- everybody gets a notification from Gitlab, since we also post it there
Also, everybody who I asked told me they don't like this mail. Let's get
rid of it.
As specified in TS 38.211 Section 7.3.2.3, c_init is the result of a mod
2^31. Before this commit, the code assumed a wrong, implicit mod 2^32,
even though the comment says otherwise.
As described in common/utils/config.h, it is possible to hook into the
asn1c tracing mechanism to print logs.
This commit fixes a regression to print theses traces properly in OAI.
Above-mentioned file explains also how to reduce the amount of logs,
e.g., for single code blocks.
There is already common/utils/config.h. This file(name) is hardcoded as
it is included into asn1c, and cannot be renamed. To avoid a name clash
and confusing, we rename T's config.h/c to configuration.h/c.
The T trace names need to match the logging system names (apparently).
In commit 5f5b8f2914, we renamed the
logging system group to avoid a name clash, but omitted the T trace
names.
This is corrected in this commit to make everything compile nicely.
By using oai_exit in log.c, LOG depends on being compiled into an
executable that defines such symbol, which is not always the case (nor
does it make sense).
oai_exit is only used in a loop to optionally write out memory. The
loop could relatively easily be aborted by setting a variable:
Some distributions, e.g., CentOS8 or RHEL8, ship with an old cmake
(v2.8). To provide a newer, they have a separate cmake3 package, where a
recent cmake version is in program cmake3. To be agnostic, build_helper
detects the distribution and choses the cmake program to use.
This commit uses the correct cmake, which is provided in the environment
variable $CMAKE.
integration_2023_w30
See merge request oai/openairinterface5g!2272
* !2233 Draft: CI: test of SC-FDMA with Quectel UE
* !2256 fix typo in nr_slot_fep_init_sync()
* !2262 NR RRC: send "init context setup resp" after receiving reconfig from ue
* !2198 fr2: GPIO configuration for Interdigital Radio Unit
* !2222 NR Sidelink Pre-Configuration
* !2235 improve handling of default SIBs
* !2246 NR UE SIB1 detection outside of initial synchronization
* !2243 Resolve "Wrong name in the logs for ASN1"
* !2224 Ci attach detach
* !2270 bugfix: put constants in correct file
* demote PRS config "error" to info
* switch CI license check and cppcheck to new SSH class
PRS is not fully supported (NRPP missing, from my understanding), so not
that many people will use it. On the other hand, these error messages
confuse people. So put it to info.
In case of noS1-mode, we initialize the 'logicalChannelBearer_exist' array element for the pre-configured DRB0 in function 'nr_l2_init_ue()'.
That array is indexed with the LCID.
For DRB0, the LCID is 4.
Unfortunately, the code incorrectly used the array at index 0.
Therefore, the UE sent neither scheduling requests nor buffer status reports, what resulted in extremely poor UL throughput.
For FR2 and including analog beamforming, we control the beams via GPIO
on radio units.
In this commit, introduce a configuration option to switch the GPIO
control for different devices: "generic" is the current GPIO control,
"interdigital" configures the GPIO configuration to be used with an
InterDigital device.
There is a conflict with some E2AP definitions that put ASN as a
preprocessor definition. To avoid this conflict, and since ASN1 is more
descriptive than ASN, we change the logging mechanism name from ASN to
ASN1.
The RLC tests were not compiling because of the include of
openair2/RRC/NR/rrc_gNB_radio_bearers.h
by
openair2/LAYER2/nr_rlc/nr_rlc_entity.h
which does not seem correct/necessary to start with.
The only thing needed by nr_rlc_entity.h from rrc_gNB_radio_bearers.h
is MAX_DRBS_PER_UE which can be defined in common/platform_constants.h
like NGAP_MAX_PDU_SESSION.
integration_2023_w29
See merge request oai/openairinterface5g!2254
* !2159 chore(ci): adding back part of old IF4.5 LTE legacy tests
* !2236 Remove crypt dependency
* !2238 Fix cppcheck warnings related to uninitialized variables
* !2239 incorrectStringBooleanError CPPCheck warnings fix
* !2241 nrUE: quick fix for compatibility with Open5GS
* !2244 Fix support for NR band n40 accordingly with 3GPP TS 38.101-1 V15.22.0
* add timeout to Jenkinsfiles to prevent long hangs in CI
* !2168 NR FR2 undefined behavior sanitize (segfault in one test)
* !2212 make common code for data copy to the scope
* !2242 Fix out-of-bound array accesses in PUCCH2 decoder
* !2245 Fix warnings emitted by gcc 13
* !2226 CI: modifications in CI scripts - usage of f-strings, constants
* !2251 T GUI tools: guard with cmake option, default off
* !2252 UE PHY: remove dead code
* update timing thresholds
* !2249 Fix bug in scheduler locking mechanism
These timings shifted slightly in an MR recently. Since it is only
micro-seconds, and these thresholds are much higher in the 60 MHz (1x1
and 2x2) tests, it is safe to increase.
This function is used during initial synchronization, only.
This typo leads to wrong computation of the OFDM symbol start within a slot, after PBCH decoding.
The result is a time offset and therefore a rotation in frequency domain for the initial PDCCH and PDSCH (SIB1) reception.
The T tools offering a GUI use libxft as a dependency. By default, we
try to limit the amount of dependencies, but libxft comes with X11.
Put the GUI tools behind cmake option T_TOOLS_GUI (default: off) to only
build on demand with a cmake option.
nr_mac_prepare_ra_ue() is called with the scheduler being locked via
NR_SCHED_ENSURE_LOCKED(), but if there is no free RA process, it
unlocks the scheduler via NR_SCHED_UNLOCK(). This is commit fixes this.
In short, when calling nr_mac_prepare_ra_ue(), the scheduler is locked,
and should always return with the scheduler being locked.
integration_2023_w28
See merge request oai/openairinterface5g!2232
* !2190 Reduce compilation time of OAI using ccache
* !2209 T: don't use execute_process, integrate in cmake
* !2210 only cleaning, not change
* !2219 NR UE decode other SI
* !2223 Fix rfsimulator build
* !2225 Add XnAP ASN.1 definitions
* !2131 Polar coding according to the standard
* !2160 Add memory sanitizer flag to build_oai and fix some bugs
* !2206 Bugfix tx rf burst
* !2227 Remove commented code, fix CI issues
- Add CMakeLists.txt to build all T tracer user tools
- Previous Makefiles are retained in common/utils/T: you can do
$ cd common/utils/T/tracer
$ make # all executables are there
or also
$ mkdir build && cd build
$ cmake .. -GNinja
$ ninja T_tools # all executables are in build/common/utils/T/tracer
We disable for two reasons:
- in the CI, with clang, it did not build once, but I cannot reproduce
locally (even with clang)
- we want to maintain to be able to build without T tracer, so in one
pipeline, we have to build without it. What a lucky coincidence!
* New folder named XNAP created inside openair2
* Added ASN File(38423.asn) for XNAP and .cmake(38423.cmake) for the same inside XNAP.
* CMakeLists.txt files changed to support .C and .H file generation for XNAP
commit ddf549b1f3 moved the CMakeLists.txt
for building radio libraries down to radio/. Previously, each option
would also declare a constant (e.g., OAI_USRP for USRP). With the
definition being below radio/, the executables don't have that define.
This commits removes the couple of defines that were in place:
- one that only shows a log, but it also applies for e.g., rfsimulator.
It is also missing in the CI. Simply put it back
- two other places guard a commented(!) function call, which can go out
entirely
Instead of using ninja/make directly, there is a cmake command option to
trigger the build using whatever build tool has been configured. Use it;
if there is a mismatch, there will also be a clearer cmake error.
Remove build_oai's --build-coverity: we don't use it, and it can
trivially be added if required (probably, most users would run it by
hand anyway).
Add an error if the compilations function is not called with the right
noumber of arguments.
If it was one, build_oai without parameters would attempt to build the
ethernet library. However, this is unexpected, and will lead to an error
(as it is by default off in CMake). Set it to off, and build it where
required.
- move following radios: AW2S, BladeRF, IRIS, LMSSDR, RFsimulator, USRP
- move following transports: Ethernet, benetel4g, benetel5g
- for each: create independent cmake variable to switch compilation
on/off, in order: OAI_AW2S, OAI_BLADERF, OAI_IRIS, OAI_LMSSDR,
OAI_SIMU, OAI_USRP, OAI_ETHERNET, OAI_BENETEL4G, OAI_BENETEL5G
- Remove RF_BOARD variable, allows to compile multiple boards at once
- where applicable: remove USERSPACE/LIB in path, i.e., move files up to
directories, as all are userspace libraries
Note that with the above, it is now mandatory to enable a radio
implementation before compiling it, e.g., for USRP:
./build_oai -w USRP
cmake .. -DOAI_USRP=ON && ninja oai_usrpdevif
Including sources in targets makes that file being compiled multiple
times. Instead, define an OBJECT library (i.e., it is only compiled, but
not linked), and link it into each target that uses it.
Instead of using the adhoc code for checking and including (globally!)
BLAS/LAPACKE, use PkgConfig to correctly identify libs (see deleted
comment: "Hope this gets fixed in future!" -- you are welcome). Next,
only link into those libraries that need it (PHY_UE, SIMU). Note that
only RHEL also needs cblas, so it is a non-REQUIREd dependency that is
only linked in if available. Further, take out linking into all other
modules, as they don't need it.
In the source code, take out preprocessor directives to correctly
include headers -- that is cmake's job, which it does just fine now.
First, we do not include openssl globally using `include_directories()`,
as most modules don't need it. Further, it is linked into SECURITY, and
removed from all other targets (they don't need it, only SECURITY).
Finally, remove a header include in NR PDCP that is not needed
- LINUX: option to optionally set a sighandler for certain simulators,
no practical relevance
- LINUX_LIST: not used anywhere
- DEBUG_DLSCH: referenced in the code, but those files have a separate
(commented) line `#define DEBUG_DLSCH`; probably never used
- LINK_ENB_PDCP_TO_IP_DRIVER, LINK_ENB_PDCP_TO_GTPV1U: commented in
cmake, although they are referenced. It is likely that code behaves
unexpected if re-enabled; we therefore remove these options to avoid
future problems
- Remove some more commented code
ENB_MODE is a cmake option to swap the order of include directories.
This has historical reasons; before OAI used cmake, it was very
sensitive to the order of includes. Nowadays, the order does not matter.
Remove this option, and fix the compilation issues that arise while
doing so.
integration_2023_w26
See merge request oai/openairinterface5g!2202
* !2081 Nonlinear ML receiver
* !2188 Bugfix for FR2
* !2189 Bugfix for getting band and numerology from command line for OAI UE
* !2192 Fix bugs in F1 implementation found with UBSan
* !2194 moving handling of RA success for reconfigurationWithSync at RRC
* !2031 Adding new sidelink (SL) variables
* !2148 NR MAC UE further improvements for DCI configuration
* !2164 Enable T304
* !2197 chore(ci-cn): Transition to YAML configuration scheme
Implement the #define variables required for synchronization: These
variables include offset and payload size values that vary from the Uu
interface, in relation to the PSS, SSS and PBCH elements. We also
introduce the new sl_mode command line flag, which is used to switch
between the Uu interface and SL interface. This will allow us to modify
exisitng PSS and SSS functions, without copying complete 5G functions
and only changing a few lines to support sidelink mode.
Fixing formatting for softmodem-common.h
* A common YAML file shall be mounted
* Currently SPGWU-TINY is still using the old configuration scheme
- But a new UPF is soon to be released
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
integration_2023_w25
See merge request oai/openairinterface5g!2184
* !2162 NR UE MAC and RRC handling of RLM
* !2175 no sanitize on generated ldpc code
* !2176 using rotation functions also at UE
* !2177 nr sib1: add mandatory fields for FDD
* !2178 fixing a typo in band 41 sync raster matrix
* !2169 NR CSI-RS configured per BWP
* !2180 bugfix in RAR time domain allocation
* !2187 Avoid segmentation fault when optional IE nAS_PDU is NULL
* !2179 Tutorials: Update docker install to the latest instructions on the official website
integration_2023_w24
See merge request oai/openairinterface5g!2171
* !2108 Fix reconfigurationWithSync
* !2138 check if SSB is on the sync raster for SA
* !2149 Fix for physCellId different from 0 for CU DU
* !2157 e1: fix security
* !2161 asn1: properly initialize variables for uper_decode() and aper_decode()
* !2143 PUCCH UE F0 and F1 refactoring and fixes
* !2170 bladerf: have it functional (lte only, no nr)
* !2102 Adding Sidelink (SL) carrier frequency
* !2096 remove generic thread pool abort and use 3GPP CRC to detect the segment is decoded
* !2158 NR UE adding flag for activation of AS security
1. Adding a "SL" frequency for Sidelink mode. The
importance of this variable is to ensure that
when we are in mode 1 (UE+UE+gNB), that the slot
configuration and frequencies do not overlap. This
SL frequency is important for rotation and allows
us to utilize the OFDM modulation and demodulation
functions that already exist in OAI.
2. Adding sl_mode to the command line for proper UE
deployment when in SL mode. sl_mode can be set to 0,
1, or 2. sl_mode 0 indicates no-Sidelink at all,
mode 1 is gNB, UE, and UE (3GPP defines mode numbers).
sl_mode 2 indicated UE to UE communications with no
gNB at all.
3. New functions for calculating the carrier frequency
for SL mode.
At Eurecom now we only have Nuand bladeRF 2.0 (bladerf2) and those
calibration calls fail, so let's remove them. Maybe they are needed
for other boards, but we can't test at Eurecom. In case of problems
with other boards, contact us.
integration_2023_w23
See merge request oai/openairinterface5g!2156
* !2115 Enable 100MHz on USRP X310
* !2118 Cleanup code in PSS/SSS procedures
* !2123 improving NR UE RRC handling of timers and constants
* !2150 Fix type0_pdcch_ss_mux_pattern for FR2
* !2153 Fix UE DURATION_RX_TO_TX assertions
* !2155 chore(ci): saw a little missing version on HTML report
* !2117 remove some dead code
CI only: integration_2023_w23_ci
See merge request oai/openairinterface5g!2154
* !2139 Draft: chore(ci): porting the old IF4.5 LTE baremetal test to docker
* !2146 CI: Ensure termination of AmariUE in AW2S pipeline
* !2147 Build RHEL9 images on Openshift Cluster
* !1976 Mount all docker config files, remove sed-based templating of config files
- AmariUE WebSocket remote API tool sometimes fail to terminate UE process and hang, to be killed if this happens
- Add timeout to the API tool command for UE process termination
@@ -5,24 +5,26 @@ We want to make contributing to this project as easy and transparent as possible
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112).
1. Sign and return a Contributor License Agreement to OAI team.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up) if you do not have any.
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_up)
if you do not have any.
- We recommend that you register with a professional or student email address.
- If your email domain (`@domain.com`) is not whitelisted, please contact us (mailto:contact@openairinterface.org).
- If your email domain (`@domain.com`) is not whitelisted, please contact us
(mailto:contact@openairinterface.org).
- Eurecom GitLab does NOT accept public email domains.
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
3. Provide the OAI team with the **username** of this account to
(mailto:contact@openairinterface.org) ; we will give you the developer
rights on this repository.
4. The contributing policies are described in the [corresponding documentation
page](doc/code-style-contrib.md).
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account.
It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge
request from a forked repository.
* This decision was made for the license reasons.
* The Continuous Integration will reject your merge request.
- All merge requests SHALL have `develop` branch as target branch.
- All merge requests SHALL have source branch names that SHALL not contain the `/` character.
* We are using a `docker` registry scheme and the image names are based on the source branch name.
## Coding Styles ##
# License #
There are described [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/guidelines/guidelines-home).
## License ##
By contributing to OpenAirInterface, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.
By contributing to OpenAirInterface, you agree that your contributions will be
licensed under the license described in the file [`LICENSE`](./LICENSE) in the
├── openshift : OpenShift helm charts for some deployment options of OAI
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, ...
└── targets : Some configuration files; only historical relevance, and might be deleted in the future
├── radio : Drivers for various radios such as USRP, AW2S, RFsim, 7.2 FHI, ...
├── targets : Some configuration files; only historical relevance, and might be deleted in the future
└── tools : Tools for use by the developers/ci machines: code analysis and formatting
```
# How to get support from the OAI Community #
You can ask your question on the [mailing lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList).
Your email should contain below information:
- A clear subject in your email.
- For all the queries there should be [Query\] in the subject of the email and for problems there should be [Problem\].
- In case of a problem, add a small description.
- Do not share any photos unless you want to share a diagram.
- OAI gNB/DU/CU/CU-CP/CU-UP configuration file in `.conf` format only.
- Logs of OAI gNB/DU/CU/CU-CP/CU-UP in `.log` or `.txt` format only.
- In case your question is related to performance, include a small description of the machine (Operating System, Kernel version, CPU, RAM and networking card) and diagram of your testing environment.
- Known/open issues are present on [GitLab](https://gitlab.eurecom.fr/oai/openairinterface5g/-/issues), so keep checking.
Always remember a structured email will help us understand your issues quickly.
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.