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.
message(STATUS"benchmark package not found, will download benchmark automatically. To prevent that install google benchmark on your system (libbenchmark-dev)")
result=re.search('got sync|Starting E1AP at CU UP|Starting F1AP at CU|Got sync|Waiting for RUs to be configured|cuPHYController initialized|Received CONFIG.response, gNB is ready',mySSH.getBefore())
mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done','\$',10)
These scripts are used by a Jenkins [job](../Jenkinsfile-colosseum) to trigger automated testing of OpenAirInterface (OAI) gNB and softUE on the [Colosseum](https://www.northeastern.edu/colosseum/) Open RAN digital twin.
Once a test is triggered, a new OAI LXC container at the specified OAI version will be built on Colosseum (if not already present), and gNB and softUE will perform TCP uplink and downlink connectivity test via the iPerf [tool](https://iperf.fr/).
The OAI branch to build and test can be specified through the `eNB_Branch` parameter passed through Jenkins (`eNB_TargetBranch`, which defaults to the `develop` branch, is used if `eNB_Branch` is not specified).
The Colosseum network scenario to test is specified through the `Colosseum_Rf_Scenario` Jenkins parameter, which defaults to a base Colosseum scenario without artificially added channel effects (e.g., only hardware impariments of software-defined radios, cables, and channel emulator).
Once the test ends, results are analyzed through the OAI automated test report generation tool available [here](https://github.com/ztouchnetworks/openairinterface-automated-test-reports), which builds a test report from the iPerf and OAI logs, and marks the test as successful or unsuccessful.
Results from successful tests are saved in history files and used to compare more recent tests.
A test is considered successful if the downlink throughput achieved during the test is greather than or equal to the average of the test history, which spans successful test executed since May 2024.
This is used to identify possible regressions of OAI runs executed on the Colosseum testbed.
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator :
{
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.