Commit Graph
1110 Commits
Author SHA1 Message Date
Laurent THOMAS 206aa36a47 Make read-only globals const, additional fixes
- Global variables that are never written to are marked const
- Remove some EXTERN declaration
- Remove unused `log_mem_multi` from logging module
2023-08-18 14:20:37 +02:00
Robert Schmidt 7a298e73cd Repair reestablishment and make it work via F1
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.
2023-08-12 11:48:17 +02:00
Robert Schmidt 9966a24a22 Merge remote-tracking branch 'origin/ue-compatible-with-open5gs' into integration_2023_w29 2023-07-20 17:28:49 +02:00
Robert Schmidt d989760d1f Merge remote-tracking branch 'origin/incorrectStringBooleanError_cppcheck_fix_on_w27_2023' into integration_2023_w29 2023-07-20 17:28:43 +02:00
Cedric Roux 149ca8e190 nrUE: quick fix for compatibility with Open5GS 2023-07-18 15:01:11 +02:00
mir 91a7dc806f First commit to remove crypt dependency 2023-07-17 12:47:30 +02:00
Vaibhav Shrivastava ae751e13ca incorrectStringBooleanError CPPCheck warnings fix on W27 2023-07-12 17:43:05 +05:30
Robert Schmidt 4ae73af46f Merge remote-tracking branch 'origin/cmake-refactor' into integration_2023_w27 2023-07-08 13:29:55 +02:00
Robert Schmidt ddf549b1f3 Move radio CMakeLists.txt to subdirectory
- 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
2023-07-07 08:35:28 +02:00
Robert Schmidt 7ebdaf35c5 Remove cmake ENB_MODE option
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.
2023-07-07 08:35:28 +02:00
Robert Schmidt 26a69234b2 Fix UB problems in F1: right TEID conversion, which is unsigned 2023-06-26 11:22:58 +02:00
luis_pereira87 7a4dc63575 Avoid segmentation fault when optional IE nAS_PDU is NULL 2023-06-23 08:43:04 +01:00
Robert Schmidt 3258d4e883 Merge remote-tracking branch 'origin/docker-config-changes' into integration_2023_w23_ci 2023-06-07 13:59:43 +02:00
Robert Schmidt 46b91ed38e Merge remote-tracking branch 'origin/use-asn1c-mouse' into integration_2023_w22 2023-06-02 17:29:16 +02:00
Dhanuja Elizabeth Thomas db087b3532 USIM conf for lteue
1. Rename ue_sim_ci.conf to lteue.usim.conf
2. Adding generic usim conf for lteue
3. Changed the location of ue_sim_ci config
2023-06-02 15:08:24 +02:00
Robert Schmidt fdb2abebd0 Add cmake option to select asn1c, and test asn1c parameters
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.
2023-06-02 10:42:02 +02:00
Cedric Roux c0c3a737ed asn1c: use better version of asn1c
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.
2023-06-01 18:26:00 +02:00
Vijay Chadachan 836469e849 CPPCHECK fixes for printf issues
Fix for following CPPCheck warnings
- invalidPrintfArgType
Rebased with latest develop branch w21.
Reverted modifications unrelated to printf issues.
2023-06-01 12:07:26 +02:00
Robert Schmidt 5be3dcf341 Merge remote-tracking branch 'origin/int-f1-ue-ctxt-release' into integration_2023_w21 2023-05-26 16:48:19 +02:00
Robert Schmidt 3af208c8c7 Merge remote-tracking branch 'origin/merge_secu_osa' into integration_2023_w21 2023-05-26 16:48:10 +02:00
mir c9012298de OSA SECU harmonization 2023-05-26 12:35:33 +02:00
Robert Schmidt d6fb5c2e31 Handle UE release request at CU, and trigger at DU at UL failure 2023-05-25 22:16:19 +02:00
Robert Schmidt 1a5cb8a6e2 UE NAS: Add timeout before shutting down UE to RLC Ack the PDU 2023-05-25 18:20:45 +02:00
Laurent THOMAS 27f9d6cc60 fix pdu session release bug 2023-05-22 15:26:43 +02:00
laurent 5cbd83c4e6 add macro for UINT32 2023-05-05 19:28:35 +02:00
Robert Schmidt 5ee44e015a Merge remote-tracking branch 'origin/simplify-pdu-session-management' into integration_2023_w18b 2023-05-05 18:20:58 +02:00
laurent b339460666 cleanup only 2023-04-28 16:25:24 +02:00
laurent 84fa481e72 remove pdu session duplicated structs 2023-04-28 15:55:12 +02:00
laurent b735f8bec6 ubsan fixes 2023-04-19 22:12:08 +02:00
francescomani ffe0630d93 addressing a couple of review comments 2023-04-14 13:52:16 +02:00
Robert Schmidt 8d07275496 Write-only variable: suppress warning, as we decode NAS message 2023-04-14 13:52:16 +02:00
francescomani e49c6db2bf final round of warning fixes to compile nr softmodems 2023-04-07 15:52:16 +02:00
francescomani 3ca0f39088 new round of clang warning fixes 2023-04-07 15:52:16 +02:00
Robert Schmidt 22db2d613f Correctly allocate GUTI in NAS UE structures 2023-04-04 08:40:48 +02:00
Robert Schmidt 51fe9b84dd Merge remote-tracking branch 'origin/pdcp-callbacks-simplify' into integration_2023_w13 2023-03-31 18:03:40 +02:00
Robert Schmidt 8e6554bdf3 Print log on receiving deregistration accept, on CONN Release stop nr-uesoftmodem 2023-03-31 17:22:59 +02:00
Robert Schmidt d1fc95a8a1 GTP: when creating a tunnel, tell which functions to use
The GTP module is common for 4G and 5G. It hardcodes the functions to
call when creating S1U and NGU tunnels. The S1U case is both applicable
for LTE and NR (NSA), which until now was not a problem as the PDCP data
forwarding functions where called pdcp_data_req. The issue is that in this
branch, the NR PDCP functions have changed to nr_pdcp_data_req_drb().

When setting up a GTP tunnel, we now pass the PDCP data forwarding
functions into GTP, since the caller knows whether it is in 4G or 5G,
but GTP itself does not.
2023-03-31 11:53:52 +02:00
Robert Schmidt 1880ede547 Check for GUTI 2023-03-28 14:12:05 +02:00
Robert Schmidt 4700dde2ae Trigger deregistration 2023-03-28 14:12:05 +02:00
Robert Schmidt a0318fb413 Implement NAS Deregistration Type message 2023-03-28 14:12:05 +02:00
Robert Schmidt 77e61425e0 UE NAS: Add counter for NAS messages 2023-03-28 14:12:05 +02:00
Robert Schmidt 4642a7c0f5 Correctly fill GUTI in NAS if available 2023-03-28 14:12:05 +02:00
Robert Schmidt 6e01a62838 Decode Registration Accept to receive GUTI 2023-03-28 14:12:05 +02:00
Robert Schmidt e35401efde NAS refactor: no moduleID, group UICC and security in one context 2023-03-28 14:12:05 +02:00
Robert Schmidt 223fd28bb2 Refactor NAS: separate code into functions 2023-03-28 14:12:05 +02:00
Robert Schmidt 528025e9a6 Fix decoding of Mobile identity 2023-03-28 14:12:05 +02:00
Robert Schmidt 2ac2a7f074 Make separate header for nr_pdcp instead of using 4G pdcp
Creates function that have nr_pdcp_ prepended to their name, and change
the signature of some functions for the 5G PDCP:

- nr_pdcp_layer_init()
- nr_pdcp_data_req()
- nr_pdcp_remove_UE()
- nr_pdcp_config_set_security()
- nr_pdcp_remove_UE()
- Make separate functions for nr_pdcp_data_req_srb/drb()
2023-03-27 16:39:24 +02:00
laurent 563421b4dc merge develop 2023-03-15 11:33:46 +01:00
laurent 03d3e1a5db code review comments 2023-03-14 14:48:09 +01:00
laurent 474f662337 merge develop 2023-03-13 12:45:32 +01:00