1. 06 Feb, 2024 1 commit
    • Robert Schmidt's avatar
      Merge branch 'integration_2024_w05' into 'develop' · ff1cc7b3
      Robert Schmidt authored
      Integration: 2024.w05
      
      See merge request oai/openairinterface5g!2549
      
      * !2537 Fix for UE PUSCH scheduler DURATION_RX_TO_TX assertion
      * !2538 Fix for UE MAC PDU LCID handling
      * !2542 Fix L1_SSB_CSI_RSRP table mapping and check validity
      * !2544 NR UE RRC timers improvement
      * !2546 Correcting the location of packages
      * !2493 Fix for computing SSB subcarrier offset
      * !2496 MCS for retransmission fix in case of dci failed detection at NR UE
      * !2503 Handle PDU Sessions in NG Initial UE context Setup and forward 5G-S-TMSI to core
      * enable caching in the docker build of the CI build steps
      * !2541 Fix RA bug, improve overall logging
      ff1cc7b3
  2. 05 Feb, 2024 6 commits
  3. 03 Feb, 2024 33 commits
    • Robert Schmidt's avatar
      Send RRC UECapabilityEnquiry after reconfig, trigger UE update if necessary · 4a7d7975
      Robert Schmidt authored
      We used to trigger the UECapabilityEnquiry right after
      SecurityModeComplete, and before the RRCReconfiguration (which we call
      "default" reconfiguration). However, 38.401 tells us that we should send
      the RRCReconfiguration right after the SecurityModeComplete. In fact,
      even though we get the UE capabilities, we cannot use them during this
      reconfiguration, as we would first need to update the DU with a UE
      Context Modification Request, which we cannot, as we just sent the UE
      Context Setup Request, and the DU relies on first getting the
      RRCReconfiguration.
      
      Since we rely on a subsequent reconfiguration anyway, we can safely
      trigger the UECapabilityEnquiry after RRCReconfigurationComplete.
      (38.331 also says we can send UECapabilityEnquiry at any point.)
      
      To cater for the possibility that there might not be any reconfiguration
      coming afterwards, we check if a DRB has been set up. If not, we assume
      a reconfiguration will come, and do not trigger one only for the UE
      capabilities (this is what we do before this commit). If we already have
      DRBs set up, they might have been set up during the "default" RRC
      Reconfiguration, and another reconfiguration might not follow soon; in
      this case, we trigger the reconfiguration by sending the UE capabilities
      to the DU right away.
      4a7d7975
    • Robert Schmidt's avatar
      Delay PDU session resource setup request if necessary · 0f100a6e
      Robert Schmidt authored
      The next commit moves the UE Capability Enquiry after the first
      reconfiguration. This has the effect that for some UEs (e.g., iPhone),
      the Setup Requests come too close to each other, triggering RRC
      Reconfigurations while previous transactions are ongoing.
      
      I think the "true" solution would be to implement some tracking of
      transactions across RRC, F1AP, E1AP, but this might require many
      changes. For the moment, limit to delaying PDU session resource setups
      to prevent above problem. Delaying is done using ITTI timers (to be able
      to serve other UEs), waiting 10ms each time, up to 20 times (to not
      deadlock the transaction -- after all, if the UE is unhappy, it will
      drop the connection).
      0f100a6e
    • Robert Schmidt's avatar
      RRC transaction IDs: clean up · d6dd87ae
      Robert Schmidt authored
      - Put consistently transaction IDs
      - Remove transaction IDs when transaction finished, or in places that do
        not trigger an RRC transaction
      d6dd87ae
    • Robert Schmidt's avatar
      d2cd7c86
    • Robert Schmidt's avatar
      8302a060
    • Robert Schmidt's avatar
      RRC transactions: mark "no action" · 62200cde
      Robert Schmidt authored
      62200cde
    • Robert Schmidt's avatar
      c643abd8
    • Robert Schmidt's avatar
      Implement PDU session estab through NGAP Initial UE Context Setup · 6642b467
      Robert Schmidt authored
      This commit allows the gNB to handle PDU sessions that the core requests
      to setup during the NGAP Initial UE Context Setup. Previously, we only
      managed them as part of PDU Session Resource Setup Request.
      
      The RRC will, depending on whether a PDU session is in the NGAP Initial
      UE Context Setup, either directly trigger the Security Command, or first
      do a bearer setup at the CU-UP. Some asserts have been lifted, as now
      the PDU sessions might be present before the RRC Connection is fully
      established.
      
      Implement the correct forwarding of the bearers in an F1 UE Context
      Setup Request message.
      
      This solves bug #672.
      6642b467
    • Robert Schmidt's avatar
      c818e9b5
    • Robert Schmidt's avatar
      59b69e24
    • Robert Schmidt's avatar
      Simplify RRC DRB handling code · f81ec9c2
      Robert Schmidt authored
      Prior to this commit, the handling of DRBs is complex: first the RRC
      "guessed" a DRB ID when setting up DRBs via E1AP (in
      rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ()), and later chose one for
      real in fill_DRB_Configlist() (called in
      rrc_gNB_generate_dedicatedRRCReconfiguration()).
      
      To simplify, remove fill_DRB_Configlist(), and instead allocate the DRB
      using generateDRB() before sending the message via E1AP, in
      rrc_gNB_generate_dedicatedRRCReconfiguration(). The rest of the logic is
      the same.
      
      For PDU sessions, always mark PDU sessions as "done" to match pdu
      session state logic.
      f81ec9c2
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      Provide means to look-up if UE has a CU-UP · 2800203e
      Robert Schmidt authored
      It might happen that a UE has no CU-UP (e.g., never requested a PDU
      session). When triggering a release, we previously and implicitly
      associated a CU-UP in that case. That is not good, and confusing.
      
      This commit adds a function to look up if the UE has an associated
      CU-UP. We only send a release if it is the case.
      
      The function get_existing_cuup_for_ue() now instead verifies that a
      CU-UP exist, and does not implicitly create an association (which might
      be unwanted, see above).
      2800203e
    • Robert Schmidt's avatar
      4c7080ec
    • Robert Schmidt's avatar
      E1 bearer ctxt setup handler: correct AssertFatal() · ce4ec296
      Robert Schmidt authored
      The number of tunnels corresponds to number of DRBs, so correctly
      compare tunnels and DRBs.
      ce4ec296
    • Robert Schmidt's avatar
      Remove unused variables · 2494a7bc
      Robert Schmidt authored
      2494a7bc
    • Robert Schmidt's avatar
      Remove unused variables in RRC · 5258acbf
      Robert Schmidt authored
      5258acbf
    • Robert Schmidt's avatar
      Remove superfluous function, rename variable · d5257ca8
      Robert Schmidt authored
      The function rrc_gNB_process_RRCReconfigurationComplete() does almost
      nothing, we can delete it.
      
      The variable name ue_reconfiguration_after_reestablishment_counter is
      misleading, as it counts all reconfigurations; rename to make it clear.
      d5257ca8
    • Robert Schmidt's avatar
      Remove drb_active array · 1c2e4c71
      Robert Schmidt authored
      The drb_active array keeps track of active DRBs. However, it only
      replicates some of the information in established_drbs, and could lead
      to a reuse of DRB IDs when two bearers are to be set up. Consider the
      following:
      1. trigger first DRB creation at RRC
      2. DRB ID chosen from free drb_active entry
      3. trigger second DRB creation at RRC
         -> The first reconfiguration has not been acknowledged
         -> drb_active is not marked as DRB_ACTIVE
      4. The second DRB ID is chosen from a free drb_active entry, which is
         the same as in 2.
      
      By reusing established_drbs everywhere, this cannot happen, as we
      1. select the DRB to be used using next_available_drb() and then
      2. use generateDRB(), which marks the DRB used
      all from within fill_DRB_configList, which gives a new DRB.
      
      The logic is still overly complex, though.
      1c2e4c71
    • Robert Schmidt's avatar
      37929dca
    • Robert Schmidt's avatar
      3d0a7ecf
    • Robert Schmidt's avatar
      createDRBlist(): return NULL if no active DRB · 4b3b6b1e
      Robert Schmidt authored
      If there are no active bearers, the function previously returned an
      empty list. Return NULL if there are no bearers, so it is safe to call
      this function even when no bearers are present. We can also pass it
      every time to do_RRCReconfiguration(), which will not add an empty list
      for DRBs.
      4b3b6b1e
    • Robert Schmidt's avatar
      Add function to activate SRBs in gNB RRC · 34b5e592
      Robert Schmidt authored
      Create a single function to activate an SRB. This function derives the
      corresponding keys, triggers the setup in PDCP, and marks the SRB as set
      up, instead of doing all of this common functionality in individual
      steps.  Use it at the corresponding places.
      34b5e592
    • Luis Pereira's avatar
      NR MAC stats: make more compact, update CI checker · 04c6c34d
      Luis Pereira authored
      - show MAC bytes in one line
      - add MCS table idx
      - show ulsch errors before ulsch DTX (as in DL)
      - show if UE in-sync/out-of-sync
      - show CU UE ID next to RNTI to stats
      
      Since we modify the format of the statistics, fix the format in the retx
      checkers of the CI.
      04c6c34d
    • Robert Schmidt's avatar
      RRC: forward 5G-S-TMSI for NGAP Initial UE Message · f9a84985
      Robert Schmidt authored
      Only fill the 5G-S-TMSI if if is present, and set the bit in the
      presenceMask.
      f9a84985
    • Robert Schmidt's avatar
      Store 5G-S-TMSI from UE if received · 1ee89735
      Robert Schmidt authored
      This commit implements retrieval of 5G-S-TMSI from Parts 1&2, or the
      entire 5G-S-TMSI, depending on what the UE sends. Further, if it has
      been retrieved, print a log of all constituent parts of it.
      
      The UE-specific variable ng_5G_S_TMSI_Part2 is not needed, as we compute
      the full 5G-S-TMSI as soon as we have Part2 (and 1).
      
      The correct forwarding to the core is implemented in the following
      commit.
      1ee89735
    • Robert Schmidt's avatar
      Fix NGAP encoding of PDUsession failed · 642b6429
      Robert Schmidt authored
      We did not give a cause value, and therefore NGAP's "PDU sessions
      failed" encoding failed. Give a cause value in all cases, so that this
      cannot happen anymore.
      
      To prevent against this, put an AssertFatal() into the encoder that
      stops if an internally sent message does not have a correct cause value
      (we can at least select a default).
      
      Print an info message for all failed PDU sessions.
      
      In rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(): if a PDU session is
      already established, don't count it as failed.
      642b6429
    • Robert Schmidt's avatar
      8a5a1f2d
    • Robert Schmidt's avatar
      NGAP initial context setup: store NSSAI · 3371b53f
      Robert Schmidt authored
      3371b53f
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      ba5c34c1
    • Robert Schmidt's avatar
      Demote multiple non-error logs to warning in RFsim · 52bfd463
      Robert Schmidt authored
      In all these cases, we simply continue with processing; it therefore
      seems that these are more warnings than errors.
      52bfd463
    • Robert Schmidt's avatar
      a205ba7e