• Robert Schmidt's avatar
    Merge remote-tracking branch 'origin/rrc-pdu-session-release' into integration_2025_w46 (!3684) · 1948858c
    Robert Schmidt authored
    PDU Session Release
    
    This MR implements end-to-end PDU Session Release functionality
    according to 3GPP TS 38.413 and TS 38.331 specifications.
    
    Reason for Change Previous implementation had incomplete and wrongly
    places tunnel cleanup during PDU session release. UP cleanup shall be
    done at CUUP, RRCReconfiguration shall be sent after retrieval of
    updated CellGroupConfig from the DU. This implies F1 and E1 exchanges
    during PDU session release procedure.
    
    Major Changes:
    
    1. RRC PDU Session Release: DRBs and PDU session teardown in NGAP PDU
       Session Release Response callback
      - Helper Functions: Introduced rm_pduSession,
        find_drb_by_pdusession_id and rm_drbs() helpers to locate and clean
        up DRBs linked to a specific PDU session
      - Targeted Cleanup: RRC PDU Session and per-session DRB removal in
        rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE()
      - Status Cleanup: Removed unused PDU_SESSION_STATUS_RELEASED status
    2. RRC PDU Session Release: Refactor
       rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND
      - Any PDU session in the pdusession_release_params list that is
        present in the RRC list can be set to release, regardless of its
        status
      - Function Signature Update: Updated function signature and other
        minor changes
      - Response Handling: rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE is
        sent upon completion of RRCReconfiguration
    3. RRC PDU Session Release: add missing procedures E1AP Integration:
      - Populates E1AP Bearer Modification for each to be released session
      - PDCP Enhancement: Added nr_pdcp_release_drbs() to remove all DRBs
        linked to a given PDU session in CUUP
      - GTP-U Cleanup: GTP tunnel teardown handled in CUUP
        e1_bearer_context_modif() using correct F1 or N3 GTP instance
    4. NR PDCP/GTP:
      - Enhanced Tunnel Deletion Logic: Separate handling for N3 tunnels (1
        per PDU session) and F1-U tunnels (1 per DRB)
      - New PDCP API Function: Added nr_pdcp_get_drb_ids_for_pdusession()
        function to retrieve all DRB IDs associated with a specific PDU
        session
    5. RRC PDU Session Release: F1AP-based UE Context Modification:
      - Replaced direct RRC message transfer with F1AP UE Context
        Modification Request for proper retrieval from DU
      - Cell Group Configuration: handling of updated CellGroupConfig from
        DU ensures DRB release at CU
    6. Docs and testing:
      - Added PDU session add/remove test cases to 25 PRB RFSIM pipeline
      - Documentation: Added PDU Session Release sequence diagram
      - Telnet Commands: Added ci command to trigger NGAP PDU Session
        Release and ciUE command to trigger establishment of a new PDU
        Session
    7. Additional fixes:
      - UE RLC Management: ensure release of RLC entities
      - Unify NG delay control before calling the RRC NGAP handler, for both
        Setup and Release
    8. Code Cleanup: Cleaned up unused GTP teardown functions.
    
    Closes #867
    1948858c
nr_sdap_entity.c 28.6 KB