Commit Graph
408 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 5c42004e21 RRC: switch to NGAP UE ID as CU UE ID 2023-08-11 17:38:12 +02:00
Robert Schmidt eca89e20b0 Remove F1 module UE handling
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.
2023-08-11 17:38:12 +02:00
Robert Schmidt 7c2c01727e Send ue ITTI Release Complete message
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
2023-08-11 17:38:12 +02:00
Robert Schmidt f48d86d7c5 UE Ctxt Release Req/Cmd/Complete 2023-08-11 17:38:12 +02:00
Robert Schmidt d24454ce9a UE Context setup and modif 2023-08-11 17:38:12 +02:00
Robert Schmidt d220ee23e2 UL RRC Message has CU/DU UE IDs 2023-08-11 17:38:12 +02:00
Robert Schmidt 0943891005 Use CU/DU UE ID in DL RRC Message Transfer, manage at DU, refactor
- 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
2023-08-11 17:38:12 +02:00
Robert Schmidt 0a0f6b7952 Initial UL RRC Message: manage DU UE ID at CU 2023-08-11 17:38:12 +02:00
Robert Schmidt af545c07b7 Hashtable for F1 UE IDs and add test 2023-08-11 17:38:12 +02:00
Robert Schmidt 4574a19fc9 Rename primary RRC UE ID gNB_ue_ngap_id to rrc_ue_id
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.
2023-08-11 15:20:47 +02:00
Robert Schmidt c5b9962954 Remove unnecessary dl_rrc_message_transfer_direct() 2023-08-11 15:20:47 +02:00
Robert Schmidt 4ae73af46f Merge remote-tracking branch 'origin/cmake-refactor' into integration_2023_w27 2023-07-08 13:29:55 +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
Robert Schmidt f2bdb6bb93 Merge remote-tracking branch 'origin/NR_UE_timers_and_constants_functions' into integration_2023_w23 2023-06-08 18:24:16 +02:00
Robert Schmidt 3ff394490a Merge remote-tracking branch 'origin/fix-du-config-update' into integration_2023_w22 2023-06-02 17:29:36 +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
Robert Schmidt 48f82a63aa F1: do not assert on unknown F1 message
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.
2023-05-30 13:48:50 +02:00
Robert Schmidt 20e986be7d Reduce F1AP logging output that is not an error 2023-05-26 08:31:45 +02:00
Robert Schmidt 62ca311a1a Handle GTP for DL in F1AP message encoder 2023-05-26 08:31:45 +02:00
Robert Schmidt 3d352b0dd8 Stubs for F1 UE Context Modification Req+Resp messages 2023-05-26 08:09:56 +02:00
Robert Schmidt 820ec995a4 Introduce separate F1AP types f1ap_ue_context_modif_req_t and f1ap_ue_context_modif_resp_t 2023-05-26 08:09:34 +02:00
Robert Schmidt 69bfe7fe87 Implement basic F1 release procedure using F1 internally 2023-05-25 22:16:19 +02:00
Robert Schmidt 8b7b9271ee Add stubs for F1 UE Context Release Req+Cmd+Cplt messages 2023-05-25 18:43:46 +02:00
Robert Schmidt c4448e49d3 Rename to clearer f1ap_ue_context_release_complete_t type 2023-05-25 18:38:30 +02:00
Robert Schmidt e5b4ab230d Reduce logging verbosity 2023-05-25 18:20:45 +02:00
Robert Schmidt cfbeaf68c9 F1AP: handle UE Context Release Request 2023-05-25 18:20:45 +02:00
francescomani 527c016421 tick for timing at RRC 2023-05-18 10:07:28 +02:00
Robert Schmidt d236d92a3a Add SRBID to Release Command and encode/decode for F1AP 2023-05-12 18:54:39 +02:00
Robert Schmidt b2cc750587 Merge remote-tracking branch 'origin/fix-f1-duname' into integration_2023_w18b 2023-05-05 14:45:06 +02:00
Robert Schmidt 10b996f5db Stubs for F1 UE Context Setup Req+Resp messages 2023-05-03 13:40:22 +02:00
Robert Schmidt 38ec30559e F1 Setup Request DUname is optional 2023-05-02 11:30:46 +02:00
laurent b339460666 cleanup only 2023-04-28 16:25:24 +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
Robert Schmidt b3ff033e29 Do not decode RRC Container in DL RRC message
The RRC container is transparent for the DU. Hence, we should not decode
it.
2023-03-20 16:57:58 +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
laurent a853a0873e free memory to reduce the memory leaks 2023-03-13 11:59:31 +01:00
laurent 36783a3a79 Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into rework-ngap 2023-03-13 11:58:56 +01:00
Robert Schmidt 8263ac09ec Merge remote-tracking branch 'origin/dead-code-f1-removal' into integration_2023_w10b 2023-03-10 15:13:08 +01:00
Robert Schmidt 8b0ad24dcd Merge remote-tracking branch 'origin/f1ap-minor-fixes' into integration_2023_w10b 2023-03-10 14:47:29 +01:00
Robert Schmidt 9826c81808 Make F1AP-related log messages less verbose 2023-03-09 19:06:07 +01:00
francescomani 2385bc364a fixing most warning when compiling nr-softmodem 2023-03-09 19:01:46 +01:00
laurent 61f49be3eb dead-code-f1-removal 2023-03-09 17:03:41 +01:00
laurent 585eb1d357 verified rfsim with splits, and quectel 2 sessions (no split) 2023-03-09 14:52:26 +01:00
laurent 14caab46dd fix multi-UEs, and partially confusion rnti versus 5GC UE id 2023-03-08 22:08:53 +01:00
Robert Schmidt 8a15fb7c63 RC: forward declarations and link physims better
The simulators have been changed: due to linker errors that would arise
otherwise, a lot of functions are defined in them to avoid such errors.
Some functions are also defined in header files; in this commit, we
define most functoins in nr_dummy_functions.c, which is compiled in, not
by including the C file, but by adding it to the target in
CMakeLists.txt

- nr_dlsim+nr_ulsim need NR_IF_Module_init(), so it cannot be in
  nr_dummy_functions, but the others need it
- Link correcr NR_IF_Module_init() into these simulators, and reduce
  overall link list
- Correctly link remaining simulators
2023-03-06 20:04:38 +01:00