Commit Graph
10250 Commits
Author SHA1 Message Date
Robert Schmidt 59a25c48ff RRC UE context lookup by RNTI: use assoc_id 2023-11-10 15:29:45 +01:00
Robert Schmidt 6520dbc95a Implement F1 Setup Failure to originate at RRC 2023-11-10 15:29:45 +01:00
Robert Schmidt 97d574229d Check PCI/nrCellID non-overlapping 2023-11-10 15:29:38 +01:00
Robert Schmidt 7c4ec50e23 PLMN check F1 Setup: cellId does not necessarily match
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.
2023-11-10 15:29:38 +01:00
Robert Schmidt c812cea143 Multiple DUs in a tree 2023-11-08 10:18:52 +01:00
Robert Schmidt e155080ece Assoc ID CU->DU 2023-11-08 10:18:52 +01:00
Robert Schmidt a377e5231c Set UE DU assoc_id to 0 on DU disconnect
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.
2023-11-08 10:18:52 +01:00
Robert Schmidt e5684d217c Assoc ID DU->CU 2023-11-08 10:18:52 +01:00
Robert Schmidt 843a1dc0a3 Introduce lookup functions for DUs 2023-11-08 10:18:52 +01:00
Robert Schmidt 1af4e81951 Paging: not fully implemented, make clear is dummy 2023-11-08 10:18:52 +01:00
Robert Schmidt 8cdb23639b Bugfix: on reestablishment, save new gNB DU UE ID, not RNTI 2023-11-08 10:18:52 +01:00
Robert Schmidt 3a5cff17d7 Combine rrc_gNB_process_initial_ul_rrc_message() and nr_rrc_gNB_decode_ccch() 2023-11-08 10:18:52 +01:00
Robert Schmidt 9a092c1433 Put rrcSetupRequest/rrcReestablishmentRequest handling in separate functions 2023-11-08 10:18:52 +01:00
Robert Schmidt 1153e62e45 Move rrc gNB DU handling to separate file 2023-11-08 10:18:52 +01:00
Robert Schmidt c00b287c60 Remove RRC UE context printing that depends on DU
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.).
2023-11-08 10:18:52 +01:00
Robert Schmidt 4c2bfe7a1f F1AP: send() functions take assoc_id
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.
2023-11-08 10:18:52 +01:00
Robert Schmidt 474c3507f1 Allow DUs to reconnect to CU
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.
2023-11-08 10:18:52 +01:00
Robert Schmidt 05aefb9aaa Correctly read PCI in F1 Setup Response 2023-11-08 10:18:52 +01:00
Robert Schmidt 808b7684a8 F1AP: Remove commented code 2023-11-08 10:18:52 +01:00
Robert Schmidt 7420de8fc9 Merge remote-tracking branch 'origin/fix-doxygen' into integration_2023_w43 2023-10-30 10:23:45 +01:00
Robert Schmidt 57f0cb134c Merge remote-tracking branch 'origin/fix-cellconfig-segv' into integration_2023_w43 2023-10-30 10:22:23 +01:00
Robert Schmidt a828da1b3f Merge remote-tracking branch 'origin/itti-no-threads' into integration_2023_w43 2023-10-30 10:22:16 +01:00
Robert Schmidt 2f7658d7b1 Merge remote-tracking branch 'origin/e1-multiple-cuup' into integration_2023_w43 2023-10-30 10:21:48 +01:00
Robert Schmidt fa5c4d3a4c Fix SDAP: correct ID, set default
- 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
2023-10-30 08:47:33 +01:00
Laurent THOMAS a198239084 Introduce no-thread mode in ITTI
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.
2023-10-27 13:02:36 +02:00
Laurent THOMAS 75cc625fe9 Use recursive mutex in PDCP to prevent deadlocks 2023-10-27 13:02:31 +02:00
rmagueta 60d867a978 Fix read servingCellConfigDedicated from config file 2023-10-27 10:52:52 +02:00
Robert Schmidt 7317efea00 Clone pusch_Config to prevent double free 2023-10-27 10:52:52 +02:00
Robert Schmidt 10a0a52604 Allocate second but same coreset to prevent double-free 2023-10-27 10:52:52 +02:00
Robert Schmidt dc88ca3b6d Read DMRS_UplinkConfig from BWP info when needed
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.
2023-10-27 10:52:52 +02:00
Robert Schmidt 90bb405e0d Deep-copy PDCCH ConfigCommon for SIB1
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.
2023-10-27 10:52:52 +02:00
Robert Schmidt d1740c9d8e Deep-copy PDSCH_ConfigCommon to prevent double-free 2023-10-27 10:36:33 +02:00
Robert Schmidt 8062af94b5 Deep-copy RACH_ConfigCommont to prevent double-free 2023-10-27 10:36:10 +02:00
Robert Schmidt d442e21f3c Deep-copy PUSCH&PUCCH_ConfigCommon to prevent double-free 2023-10-27 10:35:26 +02:00
Robert Schmidt a87cad57b7 Fix: correct SD index 2023-10-27 10:34:53 +02:00
Robert Schmidt 38a6e92fdf Deep-copy genericParameters to prevent double-free 2023-10-27 10:22:55 +02:00
Robert Schmidt d4cc2c8597 Deep-copy asn1c structures to prevent double free 2023-10-27 10:22:55 +02:00
Robert Schmidt 2dc36ffcf7 Initialize struct on stack
Not initalizing this struct makes asn1c free the memory incorrectly,
leading to a segfault.
2023-10-27 10:22:55 +02:00
Robert Schmidt eb475f7747 Remove useless warning 2023-10-27 09:07:51 +02:00
Robert Schmidt 781d01d5de Remove (almost) unused e1ap_api.h 2023-10-27 09:07:51 +02:00
Robert Schmidt 2e252dd377 Implement E1 bearer release 2023-10-27 09:07:51 +02:00
Robert Schmidt fb5b125110 Implement Bearer Context Modification Response in E1 2023-10-27 09:07:51 +02:00
Robert Schmidt ec60fd8157 E1 bearer modification: harmonize code 2023-10-27 09:07:51 +02:00
Robert Schmidt 380151faa7 E1 Bearer Context Setup Request: harmonize code
- harmonize monolithic and E1AP case
- use ITTI message to send bearer context setup response to RRC
2023-10-27 09:07:51 +02:00
Robert Schmidt 9546166ebc Create files to handle E1AP messages at CU-UP 2023-10-27 09:07:51 +02:00
Robert Schmidt 70ddc0e7fb CUUP: set F1-U remote port for GTP module 2023-10-27 09:07:51 +02:00
Robert Schmidt c5006cf4ed e1ap_common.h without E1AP ASN dependency 2023-10-27 09:07:51 +02:00
Robert Schmidt 0a6998db4b Select CU-UP based on slice 2023-10-27 09:07:51 +02:00
Laurent THOMAS bba9aac079 fix most of doxygen warnings and errors 2023-10-26 16:47:19 +02:00
Robert Schmidt e07a741ee0 Handle multiple CU-UPs in one CU-CP
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.
2023-10-25 20:22:32 +02:00