1. 15 Nov, 2025 7 commits
    • Guido Casati's avatar
    • Guido Casati's avatar
      Telnet: add ci command to trigger NGAP PDU Session Release · 653c0fd6
      Guido Casati authored
      This commit introduces a new telnet server command `pdu_session_release` to
      manually trigger the NGAP PDU Session Release Command message from the telnet ci shell.
      This is useful for integration testing of PDU session teardown behavior.
      
      Details:
      - Added `trigger_ngap_pdu_session_release()` to send NGAP_PDUSESSION_RELEASE_COMMAND
        to the RRC task, targeting the specified `gNB_ue_ngap_id`.
      - The command currently releases PDU session ID 10 (hardcoded).
      - Hooked into telnet shell with command: `pdu_session_release [gNB_ue_ngap_id]`
      
      Usage example:
      telnet > pdu_session_release 1
      653c0fd6
    • Guido Casati's avatar
      RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU Session... · 3cfe2e26
      Guido Casati authored
      RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU Session Release Response callback
      
      We need to keep PDU sessions and DRBs in list until the NGAP PDU Session Release Response is sent.
      
      * Introduced find_drb() and remove_drbs_by_pdu_session() helpers to locate
        and clean up DRBs linked to a specific PDU session
      * Targeted per-session DRB removal in rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
      * Ensures DRBs for unaffected PDU sessions remain intact
      * Remove unused PDU_SESSION_STATUS_RELEASED status: keeping this status is no longer relevant
        since the PDU sessions are effectively removed from the RRC lists
      
      Closes #867
      
      Also, refactor rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
      
      3GPP TS 38.413 8.2.2 PDU Session Resource Release says:
      
      > upon reception the NG-RAN node shall execute the release of the requested PDU sessions.
      > For each PDU session to be released the NG-RAN node shall release the corresponding
      > resources over Uu and over NG, if any.
      
      Therefore, any PDU session in the pdusession_release_params list that is
      also present in the RRC list can be set to release, regardless of its status.
      
      The function signature was also updated along with other minor changes.
      3cfe2e26
    • Guido Casati's avatar
      gtpu: cleanup unused newGtpuDeleteTunnels() · 7d5e20fd
      Guido Casati authored
      The partial-tunnel deletion API was buggy and redundant:
      * e.g. It erased entries from globGtp.te2ue_mapping but never erases
        the corresponding entries from inst->ue2te_mapping[ue].bearers
      
      All current use cases are already covered by:
      * newGtpuDeleteOneTunnel() for targeted deletion
      * newGtpuDeleteAllTunnels() for full cleanup
      
      Call sites should explicitly loop over newGtpuDeleteOneTunnel()
      if multiple tunnels need removal.
      7d5e20fd
    • Guido Casati's avatar
      RRC PDU Session Release: end-to-end DRB and PDU session release · a58cf178
      Guido Casati authored
      This commit implements proper PDU Session Release handling across
      RRC, PDCP, F1AP, E1AP to ensure clean resource cleanup when
      a PDU session is terminated.
      
      Key changes:
      
      NGAP:
      
      In `rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND()`:
        * Populates E1AP Bearer Modification for each released session
        * If a CU-UP is connected, triggers `bearer_context_mod()` for PDU teardown
      
      PDCP:
       * Added `nr_pdcp_release_drbs()` to remove all DRBs linked to a given PDU session
       * Called from `e1_bearer_context_modif()` for correct clean-up during session release
      
      F1AP UE Context Modification:
      
        Replace direct RRC message transfer with F1AP UE Context Modification Request
        to properly handle PDU session release according to 3GPP TS 38.331.
      
        3GPP TS 38.331 `5.3.5.6.4 DRB release` says: whether or not the RLC and MAC entities associated
        with a PDCP entity are reset or released is determined by the CellGroupConfig. Thus,
        updated CellGroupConfig needs to be received by the UE. This has to be retrieved by CUCP
        from the DU. Therefore:
      
        After receiving an NGAP_PDUSESSION_RELEASE_COMMAND, the CUCP shall:
        1) forward (store for later) the NAS PDU to the UE, if present as per 3GPP TS 38.413, and
        2) send a UE Context Modification to the DU with the list of DRBs to release
           and the RRC container (RRCReconfiguration with NAS PDU)
      
        After reception of UE Context Modification Response, the list of drbs to release
        is prepared based on PDU session status PDU_SESSION_STATUS_TORELEASE
        in rrc_gNB_generate_dedicatedRRCReconfiguration and then encoded
        in drb_ToReleaseList for a new RRCReconfiguration with the new cellGroupConfig.
      
        Key changes:
        * rrc_gNB_generate_dedicatedRRCReconfiguration_release() now uses F1AP UE Context
          Modification Request instead of direct RRC transfer
        * Only DRBs to be released are now added to the list.
        * The ASN.1 memory allocation is entirely done in build_RRCReconfiguration_IEs
        * No longer needed to store ASN1 struct in UE context
      
      GTP-U:
        * Previous implementation had incomplete tunnel cleanup during PDU session release
          - Missing distinction between N3 (PDU session level) and F1-U (DRB level) tunnels
          - Lack of proper DRB identification for F1-U tunnel deletion
        Major Changes:
        * GTP tunnel teardown now handled in `e1_bearer_context_modif()` using the correct
        F1 or N3 GTP instance (`newGtpuDeleteOneTunnel()`)
        * Enhanced Tunnel Deletion Logic (cucp_cuup_handler.c):
         - Separate handling for N3 tunnels (1 per PDU session) and F1-U tunnels (1 per DRB)
         - Added proper DRB identification for F1-U tunnel cleanup
         - Improved error handling with detailed logging for each tunnel deletion
         - Enhanced logging to distinguish between N3 and F1-U tunnel operations
        * New PDCP API Function (nr_pdcp_oai_api.c/h):
         - Added nr_pdcp_get_drb_ids_for_pdusession() function
         - Enables retrieval of all DRB IDs associated with a specific PDU session
         - Supports proper F1-U tunnel cleanup by providing DRB identifiers in CUUP
        * Enhanced GTP Interface (gtp_itf.cpp/h):
         - Modified newGtpuDeleteOneTunnel() to accept tunnel_type parameter
         - Improved logging to distinguish between PDU session and DRB tunnel types
         - Better error messages for tunnel deletion failures
         - Enhanced debugging information for remaining tunnels
      
      Clean-up:
      * Ensured xid tracking works consistently between PDU Session Establishment (with NAS PDU)
        and dedicated RRCReconfiguration
      * Add function to release GTP-U tunnel in Bearer Context Modification Request handler
      * Do not send rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE when no PDU session are to
        be released: it is sent upon completion of the RRCReconfiguration and needs to contain
        released PDU Sessions (mandatory IE), therefore it is no necessary to send it in case
        there is no PDU session to release.
      
      Related to #867
      Co-authored-by: default avatarrmagueta <rmagueta@allbesmart.pt>
      a58cf178
    • Guido Casati's avatar
      Add FOR_EACH_SEQ_ARR to .clang-format · a9ad90a2
      Guido Casati authored
      a9ad90a2
    • Guido Casati's avatar
      PDCP: Increase upper DRB ID limit · f5239f49
      Guido Casati authored
      f5239f49
  2. 14 Nov, 2025 3 commits
  3. 13 Nov, 2025 2 commits
  4. 06 Nov, 2025 8 commits
  5. 05 Nov, 2025 10 commits
  6. 04 Nov, 2025 2 commits
    • alexjiao's avatar
      NR UE: fix PDCCH LLR indexing for different search space RB sizes · 7655604d
      alexjiao authored
      When multiple search spaces have different CORESET configurations
      (different number of RBs), the LLR buffer stride must be calculated
      based on the maximum RB size across all search spaces, not the
      current search space's RB size.
      
      The LLR buffer is allocated with size based on get_pdcch_max_rbs(),
      but the demapping function was using coreset_nbr_rb (current search
      space) for symbol stride calculation, causing incorrect LLR extraction
      when search spaces have different RB configurations.
      7655604d
    • Chieh-Chun Chen's avatar
      Bugfix: save old tunnel info to remain the user plane connection while rolling... · 579d263a
      Chieh-Chun Chen authored
      Bugfix: save old tunnel info to remain the user plane connection while rolling back to source DU due to F1 handover failure
      579d263a
  7. 03 Nov, 2025 8 commits
    • Robert Schmidt's avatar
      CI test runner: handle SIGINT · f7eaafa8
      Robert Schmidt authored
      Handle SIGINT and mark any subsequent steps as failed. Receiving SIGINT
      a second time will abort the script immediately (as is the case before
      this commit).
      
      Note that Python seems to relay the signal to the "controlled" process
      (e.g., Ping), which would return immediately with an error. So some
      steps like Ping will abort immediately, others (e.g., IdleSleep) will
      finish their step, and then the present logic will mark subsequent steps
      as failed.
      f7eaafa8
    • Laurent THOMAS's avatar
      move all antennas comon code of begining of nr_pdcch_channel_estimation to... · ab14e3ad
      Laurent THOMAS authored
      move all antennas comon code of begining of nr_pdcch_channel_estimation to prepare the future move of the antenna loop above the serial call of functions to decode pdcch
      ab14e3ad
    • Laurent THOMAS's avatar
    • Laurent THOMAS's avatar
      fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not... · 032fc5e9
      Laurent THOMAS authored
      fix bugs in scope for pdcch, and optimize cpu cost of pdcch decoding by not processing useless samples in one symbol
      032fc5e9
    • Robert Schmidt's avatar
      Bugfix: "or None" is useless · 19c6d20b
      Robert Schmidt authored
      "or None" would assign if the first term is false-y. But not specifying
      it would already lead to the variable being set to None.
      19c6d20b
    • Robert Schmidt's avatar
      Centralize node for all XML steps · b0106f27
      Robert Schmidt authored
      All XML steps take a single node. We can thus "centralize" reading this
      parameter in the main loop and pass it to ExecuteActionWithParam().
      b0106f27
    • Robert Schmidt's avatar
      Simplify node management in CI · 9e0540fb
      Robert Schmidt authored
      Some CI tasks/commands like Iperf(), Ping() get multiple nodes (via XML
      parameter "nodes") to potentially run UEs on different nodes (hosts) at
      the same time. However, I argue that this is not good:
      
      - we don't actually use this -- where we specify multiple UEs, it's
        always "localhost localhost..."
      - it is inconsistent, as we typically have a single "node", not nodes,
        and there is a possibility to harmonize (see also next commit)
      - if we needed it, there would be better ways to achieve the same.
        First, for hardware-based UEs, the ci_infra.yaml can specify different
        UEs. For simulated UEs, it would be feasible to have multiple XML
        steps run in parallel, e.g., in the XML <parallel> tag, which would
        clarify that multiple UEs on different hosts run in parallel
      - it reduces code.
      
      Hence, make a single <node> for these XML steps.
      9e0540fb
    • Robert Schmidt's avatar
      CI: Remove unused code · a5689f5b
      Robert Schmidt authored
      a5689f5b