Commit Graph
3551 Commits
Author SHA1 Message Date
Robert Schmidt f5cc51b4a8 Merge remote-tracking branch 'origin/NR_UE_RRC_manage_RLC_PDCP' into integration_2023_w38 2023-09-24 17:42:58 +02:00
francescomani cf1baafd75 fixing release according to review 2023-09-22 11:52:24 +02:00
francescomani e7c626a79e release RB entities 2023-09-22 11:40:49 +02:00
francescomani 18892963a9 cleanup and fixes 2023-09-22 11:40:49 +02:00
francescomani 3d824e3958 handling release of RLC entity 2023-09-22 11:40:49 +02:00
francescomani f8464b9e91 MAC configuration of logical channel identities 2023-09-22 11:40:49 +02:00
francescomani 0982bf2683 correctly setting SRB IDs when calling PDCP and code refactoring 2023-09-22 11:40:49 +02:00
francescomani 53348bd41d improving DRB management at RRC UE 2023-09-22 11:40:49 +02:00
francescomani b0b57402f3 managing RLC bearer configuration at RRC UE 2023-09-22 11:40:49 +02:00
francescomani d8cb2491bd improve handling of SRBs at RRC UE 2023-09-22 11:40:49 +02:00
Robert Schmidt 3f46a71157 SCTP assoc_id: Make it sctp_assoc_t, project-wide 2023-09-22 08:22:15 +02:00
Robert Schmidt f5c90ead7e Free DU at CU on lost connection, store assoc ID
- 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
2023-09-22 08:22:15 +02:00
Robert Schmidt 62fd56f904 DCCH free memory 2023-09-22 08:22:15 +02:00
Robert Schmidt 567ab39153 Free RRC UE data 2023-09-22 08:22:15 +02:00
Robert Schmidt 78290f9127 Fix memory leak in rrc_gNB_decode_dcch()
- Free the memory
- for NGAP NAS UL and NAS First request, allocate memory to avoid
  use-after-free errors
2023-09-22 08:22:15 +02:00
Robert Schmidt 6f8a222698 Free default MeasConfig 2023-09-22 08:22:15 +02:00
Robert Schmidt 1a09c6eeb0 Fix memory leak in nr_rrc_gNB_decode_ccch() 2023-09-22 08:22:15 +02:00
Robert Schmidt 885a029abc Fix memory leaks in do_NR_DLInformationTransfer() 2023-09-22 08:22:15 +02:00
Robert Schmidt a4c75620ee Fix memory leaks in do_NR_RRCRelease() 2023-09-22 08:22:15 +02:00
Robert Schmidt a3382f8faa Fix memory leaks in do_RRCSetup() 2023-09-22 08:22:15 +02:00
Robert Schmidt 1b171e798d Fix memory leaks in do_RRCReconfiguration() 2023-09-22 08:22:15 +02:00
Robert Schmidt c325c6a232 Correctly free memory in do_NR_SA_UECapabilityEnquiry() 2023-09-22 08:22:15 +02:00
Robert Schmidt c69e8b6895 Clean up do_RRCReconfiguration() 2023-09-22 08:22:15 +02:00
Robert Schmidt 3982cc2e23 Forward UE capabilities to DU and use for CellGroupConfig
- Forward UE capabilities in F1 handlers
- Store at MAC
- Update CellGroupConfig with UE Capabilities of the UE
2023-09-22 08:22:15 +02:00
Robert Schmidt 7e2487c294 Handle CellGroupConfig completely at MAC
- 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.
2023-09-22 08:22:15 +02:00
Robert Schmidt 18db5f68ac Put PLMN/TAC/CellID into SIB1, correct CellIdentity encoding 2023-09-22 08:22:15 +02:00
Robert Schmidt c930563929 Move radio configuration parameters to MAC, SIB1 not initialized!
!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
2023-09-22 08:22:15 +02:00
Robert Schmidt a62857a74d Compute SSB ARFCN to repair reestablishment 2023-09-22 08:22:15 +02:00
Robert Schmidt a44a54f3d3 Move SIB1 to MAC
The SystemInformationBlock 1 is handled at the DU and sent to the CU in
the F1 Setup Request. Hence, move it down to the MAC.
2023-09-22 08:22:15 +02:00
Robert Schmidt 5d0ae84ad2 Move MIB to 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()
2023-09-22 08:22:15 +02:00
Robert Schmidt 6142d1d74c RRC sctp_in/out_streams not used 2023-09-22 08:22:15 +02:00
Robert Schmidt 0f897b4007 Move ServingCellConfigDedicated to MAC
As with the ServingCellConfigCommon, the ServingCellConfigDedicated is a
radio-related structure to be handled at the DU.
2023-09-22 08:22:15 +02:00
Robert Schmidt 2b29531591 Move ServingCellConfigCommon to MAC
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.
2023-09-22 08:22:15 +02:00
Robert Schmidt f709ee815b Move physCellId to MAC
The PCI is given to the CU from the DU in the F1 Setup Request message.
It is a part of the DU, so move it "down".
2023-09-22 08:22:15 +02:00
Robert Schmidt b93368f46d Implement Setup Request/Response for F1AP 2023-09-22 08:22:14 +02:00
Robert Schmidt aaae82d7b4 Implement F1 Setup Request/Response to be used internally
- 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
2023-09-22 08:18:28 +02:00
Robert Schmidt 925c2d0f1e Remove NRRRC_CONFIGURATION_REQ and initalize RRC properly
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.
2023-09-21 12:49:20 +02:00
Robert Schmidt 84d8f6c272 Add stubs for F1 Setup Request/Response/Failure messages 2023-09-21 12:49:20 +02:00
Robert Schmidt 24c61fe1f9 Completely read ServingCellConfigCommon when reading conf
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...
2023-09-21 12:49:20 +02:00
Robert Schmidt ca374e86eb Refactor F1 Setup Req: sys_info is specific to each cell 2023-09-21 12:49:20 +02:00
Robert Schmidt 7456cf945d Refactor F1 Setup Req: Reorganize cellIDs_t and rename to f1ap_served_cell_info_t 2023-09-21 12:49:20 +02:00
Robert Schmidt d8276eed3e F1AP: harmonize f1ap_plmn_t type in all messages 2023-09-21 12:49:20 +02:00
Robert Schmidt 4f7ae5dd2a No double instance book keeping 2023-09-21 12:49:20 +02:00
Robert Schmidt e7b971a4af RRC: remove useless/unused variable 2023-09-21 12:49:20 +02:00
Robert Schmidt 3b8c1cd59e Fix memory leak in config_srs() 2023-09-21 12:49:20 +02:00
Robert Schmidt 15c2af2384 get_initial_SpCellConfig(): don't reuse memory
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.
2023-09-21 12:49:20 +02:00
Robert Schmidt a460794792 Delete dead code 2023-09-21 12:49:20 +02:00
Robert Schmidt a1c15da786 Merge remote-tracking branch 'origin/SRBs_set_security_after_reestablishment' into integration_2023_w36 2023-09-08 17:25:23 +02:00
Robert Schmidt f5c502670a Merge remote-tracking branch 'origin/bugfix-nsa-endc' into integration_2023_w36 2023-09-08 17:25:14 +02:00
Robert Schmidt 0226dc76cb Merge remote-tracking branch 'origin/develop-prepare-ra' into integration_2023_w36 2023-09-08 15:08:55 +02:00