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