Commit Graph
10115 Commits
Author SHA1 Message Date
Robert Schmidt 73e8db7fb2 Merge remote-tracking branch 'origin/nr-rlc-fix-tx-next' into integration_2023_w39 2023-10-02 17:34:34 +02:00
Robert Schmidt 03c8502e5e Merge remote-tracking branch 'origin/nr-rlc-fix-tests' into integration_2023_w39 2023-10-02 14:21:30 +02:00
Robert Schmidt 1bc08b652d Merge remote-tracking branch 'origin/NR_fix_init_RA_UE' into integration_2023_w39 2023-09-28 20:14:47 +02:00
Cedric Roux 8aea710a6c nr rlc: minor: fix tests
delete() has changed its name
2023-09-28 10:52:55 +02:00
Cedric Roux 82e83bc6a6 nr rlc am: bugfix: correc usage of tx_next
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.)
2023-09-28 10:40:11 +02:00
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
Robert Schmidt d16c4c370e Merge remote-tracking branch 'origin/int-f1-setup' into integration_2023_w38 2023-09-24 17:41:48 +02:00
Robert Schmidt 00acfe3049 Merge remote-tracking branch 'origin/NR_UE_harq_fix' into integration_2023_w38 2023-09-22 12:32:44 +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 d94a4e545d Free scheduler 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 fb72b7b9e5 Add parameter verification to force simplified configuration files 2023-09-22 08:22:15 +02:00
Robert Schmidt 325ac4f8e2 Restructure config read: first PLMN info, then SIB1, then F1 Setup request
In NSA case: do not send SIB1
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 67d5f56a3c Read F1 Setup Req at MAC initialization
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.
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 eaf28414ca kssb < 16 or we cannot do reestablishment: add assert in DU 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 a23a702acb Setup response handler decoder no SI 2023-09-22 08:18:28 +02:00
Robert Schmidt f670cc6749 Bug fix F1 Setup Response encoder: check if SIs present 2023-09-22 08:18:28 +02:00
Robert Schmidt 89f3ea3dd0 Wait for F1 Setup Response before unblocking cell
The F1 Setup Response contains the cell(s) to activate. Hence, prevent
the radio from starting by waiting for the F1 Setup Response before
continuing.
2023-09-22 08:18:28 +02:00