Commit Graph

59 Commits

Author SHA1 Message Date
Guido Casati
1edb0a09bb fix (sdap): select RX/TX SDAP headers on per-DRB RRC role
A DRB may have an uplink SDAP header but no downlink header (valid TS 38.331).
The old entity->enable_sdap flag was true if either direction had a header, so UE
downlink wrongly read byte 0 as QFI. IPv4 payloads start with 0x45 -> bogus QFI 5
and dropped traffic before the TUN (PR !158).

Header presence must follow TS 37.324 §5.2.1/§5.2.2 per DRB and direction, not a
single PDU-session-wide enable-sdap.

Also, store the default DRB as a `qfi2drb_t` mapping in the SDAP entity and use
it directly for fallback paths.

Changes:
- Add nr_sdap_drb_lookup() to return first qfi2drb_table row for a DRB
- nr_sdap_rx_entity(): parse QFI only when the receiving direction has a header,
  drop if the DRB has no table row
- nr_sdap_tx_entity(): UL/DL TX header bits from qfi2drb_map() (drb_id + entity_role),
  including default-DRB fallback
- nr_sdap_qfi2drb(): const qfi2drb_t *, remove SDAP_MAP_RULE_EMPTY
- nr_sdap_map_ctrl_pdu(): handle NULL from qfi2drb_map
- nr_sdap_qfi2drb_map_update(): sync entity_role on
  all QFIs for the DRB. At most one DRB when both headers absent.
- nr_sdap_entity_update_qos_flows(): keep per-DRB role from nr_sdap_drb_lookup(),
  skip update when DRB has no row
- Cleanup entity->enable_sdap
- nr_sdap.c: remove TUN-thread QFI drop, tx_entity owns unmappable-QFI handling
- replace default_drb with qfi2drb_t default_drb in SDAP entity and init
  default DRB id+role at SDAP entity creation

Refs:
- PR #158
- TS 37.324 §5.2.1, §5.2.2, §6.2.2.1
- TS 38.331 SDAP-Config (sdap-HeaderUL / sdap-HeaderDL)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 12:21:03 +02:00
Guido Casati
294599d327 Add useful log lines
- Add a LOG_I to 'nr_sdap_add_entity' to inform the user
  a SDAP entity is being created
- Add LOG_W to `nr_sdap_get_entity` to warn about
  empty SDAP entity list

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
8d2895463b Paging UE (SDAP): reattach TUN after idle reset
UE paging can recreate the AS-side SDAP entity while NAS still keeps the
PDU session established. Per TS 38.304 clause 7.1 and TS 24.501 clauses
5.6.2.2.1,5.6.1.2 paging/service request restores user-plane resources
for an established PDU session, it does not imply deleting the UE IP/TUN
interface.

Deleting the UE TUN with SDAP entity teardown breaks user-plane continuity
after re-attach. We need SDAP entity lifetime and UE TUN lifetime to be
decoupled. This commit keeps a UE/PDU-session TUN registry outside the
SDAP entity lifetime. When a UE SDAP entity is recreated, reattach it
to the preserved TUN socket and restart the reader thread. On first PDU
session setup, NAS registers the TUN before attaching the reader.

The sequence is the following: (1) NAS register the iface
(2) sdap entity attaches to the iface (3) UE goes IDLE, SDAP
entity is destroyed, iface is deatched and brought down (4)
UE Service Request, SDAP entity is created (5) iface reattaches
to the SDAP entity and is brought up

UE reattach assumes the PDU session TUN interface was registered
before the SDAP entity is recreated.

DL/UL data is intentionally dropped when SDAP is not yet attached
or QFI is unavailable, rather than queued in this layer.

Changes:
- `nr_sdap.c`: keep a UE/PDU-session TUN registry, duplicate the stored
  socket into each SDAP entity, and add attach/detach/destroy helpers.
- `nr_sdap_entity.c`: detach SDAP entities from their TUN reader on
  deletion, preserve UE TUN interfaces across idle cleanup, and destroy
  gNB TUN interfaces when the gNB entity is removed. Drop downlink SDUs
  if the UE SDAP entity is not attached to a TUN socket yet.
- `openair3/NAS/NR_UE/nr_nas_msg.c`: set QFI before UE TUN creation so
  first attach can pick up cached QFI.
- `common/utils/tuntap_if.c`: add `tuntap_set_up`/`tuntap_set_down` helpers
  for UE interface state reflection and initialize `flags` in `tuntap_destroy`
  to avoid maybe-uninitialized build failures.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Guido Casati
74decfcf30 PDU Session Modify: complete E1AP/RRC integration with DRB lifecycle management
This commit extends PDU Session Modify handling with E1AP Bearer Context
Modification integration for QoS flow add/modify/release and DRB lifecycle
updates (setup, modification, removal).

E1AP Bearer Context Modification - DRB Setup Support:
- Extend CU-UP handler (e1_bearer_context_modif) to process DRBs to setup/to remove:
  create F1-U tunnels, create/release PDCP-SDAP resources, and update QoS flow mappings
- Extend CU-CP response handler to process DRBs to setup: save F1-U tunnel info,
  mark PDU sessions for RRC reconfiguration, and trigger F1 UE Context
  Modification Request with both setup and release DRBs
- Update rrc_gNB_process_e1_bearer_context_modif_resp to collect DRBs to
  setup/release from E1 response, send F1 UE Context Modification when needed,
  and otherwise trigger direct RRC reconfiguration or NGAP modify response.
- Populate the E1AP Bearer Context Modification request with DRB-To-Setup and
  DRB-To-Modify lists derived from QoS flow processing. For CP->UP E1 Bearer
  Context Modification, Flow Mapping Information in DRB-To-Modify carries
  the QoS Flow QoS Parameters List for that DRB: per TS 38.463, when present,
  CU-UP replaces the previous mapping for that DRB, and this behavior is now enforced.

RRC PDU Session Modify - QoS and DRB Management:
- Add nr_rrc_apply_qos_add_modify() to process QoS add/modify and map flows to
  existing or new DRBs
- Add nr_rrc_apply_qos_release() and nr_rrc_apply_pdusession_modify() to
  process QoS release, build E1 DRB setup/modify/remove lists, and prepare
  bearer-context modification.
- Refactor nr_rrc_update_qos() processing for QoS add/modify,
  with DRB mapping to existing or new DRBs through the modify path helpers
- Extend nr_rrc_update_pdusession() with helpers for QoS
  add/modify/release, building E1 DRB modify/setup/remove lists, and
  sending bearer-context modification.
- Integrate E1 Bearer Context Modification into PDU Session Modify flow to
  propagate DRB changes to CU-UP
- Update default DRB in SDAP configuration after QoS changes
- Add `nr_sdap_entity_update_qos_flows` to replace DRB flow
  mappings from E1 flow information and clear stale SDAP role/mapping
  state when QFIs are removed.

Code Refactoring:
- Add find_or_add_pdu_session_mod() to create/reuse session entries
  in the E1 Bearer Context Modification request while building message.
- Add nr_rrc_send_e1_after_qos_update() to detect DRBs left without mapped
  QoS flows, remove them from UE state, and append them to E1 DRBs-to-remove.
- Use rrc_gNB_generate_dedicatedRRCReconfiguration instead of
  rrc_gNB_modify_dedicatedRRCReconfiguration, drop the old function

End-to-End PDU Session Modify Flow:

1. AMF -> CU-CP: NGAP PDU Session Resource Modify Request (QoS add/modify/release)
2. CU-CP (RRC): Process QoS flows -> map to DRBs (reuse existing or create new) ->
   populate E1AP Bearer Context Modification Request (DRBs to setup/modify/remove)
3. CU-CP -> CU-UP: E1AP Bearer Context Modification Request
4. CU-UP: Create F1-U tunnels for new DRBs -> create/release PDCP-SDAP
   resources -> update DRB/QFI mapping information
5. CU-UP -> CU-CP: E1AP Bearer Context Modification Response (F1-U tunnel info)
6. CU-CP: If DRB setup/release exists, send F1 UE Context Modification Request
7. CU-CP: Else if QoS/NAS requires it, send direct RRC Reconfiguration
8. CU-CP: Else complete modify directly with NGAP PDU Session Resource Modify Response
9. UE -> CU-CP: RRC Reconfiguration Complete
10. CU-CP -> AMF: NGAP PDU Session Resource Modify Response

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:28 +02:00
Guido Casati
c8b99ce011 GTPU: move QFI handling to send path and update tunnel API usage
Refactor GTP-U tunnel and send APIs so QFI is handled when sending packets,
not stored in tunnel creation state. Update SDAP and CU-UP integration to
use PDU-session keyed N3 mappings and explicit QFI-marked sends.

This commit clarifies layering ownership: GTP-U stays transport-only (TEID
lookup, decapsulation, extension parsing, callback dispatch), while SDAP
owns QoS semantics (QFI handling, QoS-flow-to-DRB policy, default DRB behavior,
and mapping updates); GTP-U does not perform runtime QFI-to-DRB mapping or
synthesize QFI.

Changes:
- remove `outgoing_qfi` from `gtpv1u_gnb_create_tunnel_req_t` and stop storing
  QFI as tunnel creation metadata; `newGtpuCreateTunnel(...)` now carries only
  transport/tunnel identity parameters (incoming_bearer_id, outgoing_bearer_id,
  outgoing_teid, remote address, callbacks)
- add `gtpv1uSendDirectWithQFI()` and pass QFI into `_gtpv1uSendDirect`
  to build UL PDU Session Container extensions
- shift QFI handling from tunnel provisioning to per-packet TX APIs: QFI is passed
  explicitly only when sending (`gtpv1uSendDirectWithQFI(...)`) and is absent from
  non-SDAP/F1 sends (`gtpv1uSendDirect(...)`)
- align N3 tunnel request semantics with session-level keys by setting incoming_rb_id
  to PDU session ID on N3 paths, while F1 paths keep DRB ID
- keep `gtpv1uSendDirect()` and `gtpv1uSendDirectWithNRUSeqNum()` on
  `NO_QFI`, and enforce non-SDAP RX callback path only when QFI is absent
- update `nr_sdap_rx_entity` to extract/validate QFI from SDAP UL headers,
  send UL data with `gtpv1uSendDirectWithQFI`, and use non-QFI send when
  SDAP header is disabled
- add disabled-SDAP safety checks in SDAP entity setup/mapping to enforce
  single-DRB and single-flow constraints per PDU session
- extend `test_gtp.cpp` with a `multi_qos_flows` scenario and QFI-aware send calls
- update `nr-cuup-load-test.c` bearer setup fields and tunnel creation calls
  to match the new API
- update tests/nr-cuup/nr-cuup-load-test.c to set explicit PDU session and
  QoS/SDAP parameters (sessionType, qosFlows[0], SDAP header flags), and to
  migrate both N3 and F1 tunnel creation calls to the new newGtpuCreateTunnel(...)
  signature (without outgoing_qfi)

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
835c80b39d SDAP: fix PDU session ID range validation logic
Replace incorrect mathematical range check with explicit bounds
validation in nr_sdap_delete_entity(). The previous condition
(pdusession_id) * (pdusession_id - NR_MAX_NB_PDU_SESSIONS) > 0
was mathematically incorrect and could fail to properly validate
PDU session IDs.

PDU session ID validation now correctly rejects values outside
the valid range [0, NR_MAX_NB_PDU_SESSIONS]

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Guido Casati
4b5d5c1ae6 Platform constants: consolidate PDU session limit constants
Replace NGAP_MAX_PDU_SESSION and E1AP_MAX_NUM_PDU_SESSIONS with
shared NR_MAX_NB_PDU_SESSIONS constant. The value (256) is consistent
with both TS 38.331, TS 38.413 and TS 38.463

All protocol layers (NGAP, E1AP, RRC, SDAP) now use a single
shared constant for maximum PDU sessions per UE, ensuring
consistency across the codebase

E1AP_MAX_NUM_PDU_SESSIONS (was 4) is removed from e1ap_messages_types.h

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-04 12:03:27 +02:00
Robert Schmidt
8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00
Robert Schmidt
1e5c28279e Rename tun_if.{c,h} => tuntap_if.c{c,h}
The next commit introduces functions to also manage TAP interfaces.
2026-01-20 11:11:36 +01:00
Robert Schmidt
2557df87f5 Hardcode (noS1) PDU session ID to 10
Defacto, the PDU session ID for noS1 modes is already hardcoded, as
starting the nr-softmodem with --noS1 --default-pdu-id 1 leads to

    Assertion (entity != ((void *)0)) failed!
    In start_sdap_tun_gnb_first_ue_default_pdu_session() openair2/SDAP/nr_sdap/nr_sdap.c:163

Further, the --default-pdu-id parameter will be deactivated in a later
commit, and we cannot rely on it. Therefore:

- hardcode noS1 PDU ID (also used in --do-ra/--phy-test modes) to 10 and
  use in gNB&UE
- pass the PDU session ID used in SDAP entity initialization down to
  start_sdap_tun_gnb_first_ue_default_pdu_session() to always use the
  correct one
2026-01-20 11:11:36 +01:00
Robert Schmidt
1948858c35 Merge remote-tracking branch 'origin/rrc-pdu-session-release' into integration_2025_w46 (!3684)
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
2025-11-15 21:05:46 +01:00
Guido Casati
a58cf178ed RRC PDU Session Release: end-to-end DRB and PDU session release
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: rmagueta <rmagueta@allbesmart.pt>
2025-11-15 21:04:17 +01:00
Guido Casati
7274e7c434 SDAP: guard RX header parsing with enable_sdap and init per-entity
!3519 refactored the SDAP to use the QFI from the header rather
than pass it to the rx function and got rid of the initialization
of QFI to -1.
However, entity roles are stored into the drb2qfi table, and the
indexing implies that the QFI is known. While in TX it is not an
issue since packets are forwarded based on the QFI, in RX the QFI
can only be parsed from the heaedr, therefore if headers are
disabled (--enable_sdap) the QFI is not there and it is wrong to
access the header (`buf[0]`) and looking for it.

This commit adds `enable_sdap` to `nr_sdap_entity_t` and initialize
it in `nr_sdap_add_entity()` from `sdap->role`
(disabled when `NO_SDAP_HEADER`). In `nr_sdap_rx_entity()`, only
parse `buf[0]` for QFI and derive `sdap_ul_rx`/`sdap_dl_rx` when
`enable_sdap` is true; otherwise, keep `offset=0` and forward
payload unchanged.
2025-11-06 19:33:46 +01:00
Guido Casati
a416db39ba Pass SDAP config by pointer
sdap_config_t is more than 1kB large. Avoid excessive copying by passing
it by reference.
2025-10-30 08:04:39 +01:00
Robert Schmidt
91b3ca77f6 QFI 0 is a valid QFI
QFI 0 is a valid QFI: don't check for qfi <= 0, as uint8 cannot be
negative. Also, correctly use SDAP_MAP_RULE_EMPTY for a DRB ID (which
need to be larger than 0).
2025-10-30 08:03:17 +01:00
Guido Casati
27be4e26a9 refactor: improve SDAP entity add/update flow management
This commit refactors the SDAP entity QoS flow to DRB mapping functionality
to improve code organization and enhance maintainability.

Key changes:
- Split nr_sdap_qfi2drb_map_update into focused functions:
  * nr_sdap_add_qos_flows_to_drb: handles QFI addition to DRB
  * nr_sdap_rm_qos_flows_from_drb: handles QFI removal from DRB
  * nr_sdap_ue_control_pdu_config: handles UE control PDU generation
- Consolidate add/modify logic into reusable nr_sdap_addmod_entity function
- Remove entity existence checking and updating from new_nr_sdap_entity:
  this function should only add SDAP entities
- Improve function separation of concerns: do SDAP entity add or update
  separately and improve modularity by splitting operations in self
  contained functions
- At SDAP creation, do only add of QFI to DRB mapping
- rename new_nr_sdap_entity to nr_sdap_add_entity for function naming consinstency
2025-10-24 11:55:25 +02:00
Guido Casati
0348aa08b9 Remove rb_id parameter from SDAP TX entity - QFI determines DRB mapping
- Remove rb_id parameter from nr_sdap_tx_entity() function signature
- Update tx_entity function pointer
- Remove rb_id parameter from sdap_data_req() function signature
- Remove unused rb_id variable from sdap_tun_read_thread

The rb_id parameter was redundant since SDAP determines DRB ID
from QFI mapping via entity->qfi2drb_map(entity, qfi). This
simplifies the interface.
2025-10-24 11:55:25 +02:00
Guido Casati
d760a16827 SDAP TX: explicit check on qfi2drb_map output
Each QFI should always be mapped to a DRB. If that is not the case, we
have an undefined behavior. This should not occur. This commit prints
an error in tx_entity and returns.
2025-10-24 11:55:25 +02:00
Guido Casati
8207a4c352 SDAP refactoring: replace legacy (LTE) type rb_id_t with int 2025-10-24 11:55:25 +02:00
Guido Casati
823340a2e2 Refactor handling of DL/UL SDAP header in the SDAP entity
The TX/RX entity should have different behavior according to
5.2.1, 5.2.2, 3GPP TS 37.324, depending on whether it is UL and DL.

The gNB can play a role both as UL RX entity and DL TX entity, while
the UE can play a role both as UL TX entity and DL RX entity.

The goal of this commit is to extend the information stored in the
SDAP entity as the current code is just marking the entity as TX/RX.
The commit introduces a bitmap to store the role of the
entity, which can be DL RX, DL TX, UL RX and UL TX. Based on this
the TX SDAP entity knows whether a DL/UL PDU should be build, and
the RX SDAP entity knows whether a DL/UL PDU should be processed.

See also Figure 4.2.2-1.

SDAP headers are present only if enable_sdap option is used.
2025-10-24 11:55:25 +02:00
Guido Casati
3efaafa633 Refactor QFI to DRB mapping logic
nr_sdap_qfi2drb_map_update function pointer should
process QFIs to add and release from the entity mapping, therefore
a new function pointer for QFIs to add was introduced and
the function pointer to release the QFIs was called in the same function.

Now the nr_sdap_qfi2drb_map_update is:
(1) looping through the QFIs to add/update and store in the qfi2drb_table
(2) looping through the QFIs to release and delete from qfi2drb_table

Also:

* Update the function signature to use sdap_config_t and nr_sdap_entity_t
* log error when the update fails
* limit the scope of the function
* clang-formatted
* removed limit on table entries set by AVLBL_DRB, replaced with MAX_DRBS_PER_UE
2025-10-24 11:55:25 +02:00
Guido Casati
bae1de16d6 Refactor SDAP UL: QoS flow to DRB Mapping configuration and end-marker control PDU mapping
The function nr_sdap_ue_qfi2drb_config should do UL QoS flow to DRB mapping configuration
for a SDAP entity has already been established according to TS 37.324, 5.3 QoS flow to
DRB Mapping, 5.3.1 Configuration Procedures. It should handle both mapping rules to add and to remove.

To this purpose:

* Simplify function signature by passing the sdap config.
* Improve readability of the function.
* Move handling of sdap.mappedQFIs2ReleaseCount (in nr_reconfigure_sdap_entity)
  inside the function.
* Simplify end-marker control PDU mapping function by removing unused
  DRB ID input parameter (the function is fetching the DRB ID based on the input
  map type)
* use int instead of legacy rb_id_t
* limit scope of functions whenever necessary
2025-10-24 11:55:25 +02:00
Guido Casati
7376c9545c Refactor nr_sdap_qfi2drb_map
The goal of this function is to return the DRB ID mapped to the input QFI, for both DL and UL.
The function looks up the DRB that is mapped to the QFI, if no mapping rule exists
returns the default DRB. Returns 0 If no mapping and no default DRB exists for that QFI

The function should not update the stored mapping rules, that is done when receiving
a new SDAP configuration. In this function it was removed.

See TS 37.324, 5.2.1 Uplink
> If there is no stored QoS flow to DRB mapping rule for the QoS flow as specified in the subclause 5.3,
> map the SDAP SDU to the default DRB else, map the SDAP SDU to the DRB according to the stored QoS flow to DRB mapping rule.
2025-10-24 11:55:25 +02:00
Guido Casati
7b42a65ac7 Refactor new_nr_sdap_entity to use sdap_config_t and always update mapping rules
* change function signature: pass the sdap_config_t
* update qfi2drb mapping when receiving a configuration for an already existing SDAP entity
* always update mapping rules, not only for default DRB
2025-10-24 11:55:25 +02:00
Guido Casati
68a3a849bc refactor: Use centralized get_sdap_Config in nr_reconfigure_sdap_entity
Replace inline parameter extraction with get_sdap_Config() function call to:
- Eliminate code duplication in SDAP configuration handling
- Streamline QFI release processing with structured config object
- Ensure consistent SDAP configuration extraction across all SDAP operations
2025-10-24 11:55:25 +02:00
Guido Casati
70d23e43df Fetch sdap configuration from sdap-config and store in new struct sdap_config_t
This function is processing the NR_SDAP_Config_t received (from RRC) and
is storing the SDAP configuration in a structure of type sdap_config_t.
2025-10-21 16:50:44 +02:00
Guido Casati
ae1de1aeaa Refactoring: fix inconsistency in nr_sdap_delete_entity
The function was printing a "not found" error message even in the case
the return value was set to "true". Return directly true/false.

This is relevant in PDU Session Release procedures.
2025-09-24 14:37:32 +02:00
Guido Casati
729b0eb348 Print errno in nr_sdap_rx_entity 2025-05-15 11:20:10 +02:00
Robert Schmidt
8a7987812a Stop SDAP/noS1 interface in all cases reliably 2025-05-04 09:34:42 +02:00
Robert Schmidt
94443aefde Save in SDAP context if is UE or gNB
sdap_tun_read_thread needs to know if we are gNB/UE. Previously, we
passed this into the thread, but the next commit also needs to for
interface termination, where this info is not available. So, for noS1
mode, pass this in.
2025-05-04 09:34:42 +02:00
Bartosz Podrygajlo
1ab8a58a2f Refactor TUN Interface Management and Move to SDAP Layer
This commit refactors the TUN interface management by moving its creation
and configuration from the PDCP layer to the SDAP layer for UE.

Key changes include:

- Introduced `tun_generate_ue_ifname` and `tun_destroy` functions for better
  TUN interface lifecycle management.
- Added support for creating and destroying UE-specific TUN interfaces in SDAP.
- Refactored `nr_pdcp_module_init` to remove TUN-related logic and moved it
  to SDAP.
- Updated NAS and SDAP layers to handle PDU session-specific TUN interface
  creation and configuration.
- Enhanced SDAP entity management to include TUN socket handling and thread
  lifecycle.
- Updated NAS message handling to initialize default PDU session TUN
  interfaces in NOS1 mode.
- Use a single SDAP thread function for gNB and UE
- Allow noS1 mode also in SA on gNB

These changes improve modularity by isolating TUN interface management within
the SDAP layer, aligning with the 3GPP architecture, and simplifying the PDCP
layer.

Co-Authored-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2025-04-16 15:03:18 +02:00
francescomani
cea4412b3b do not include LTE defs_common into 5G code 2025-04-01 18:53:09 +02:00
Robert Schmidt
3c5e999f6d SDAP: Use GTP direct API instead of ITTI
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
2024-12-11 10:31:52 +01:00
Guido Casati
bfe7b803fe Refactor includes in SDAP and PDCP API
* used open source IWYU tool + manual review
2024-11-18 11:25:02 +01:00
Guido Casati
edb2dd7d6d SDAP Entity reconfiguration at UE according to TS 37.324
- triggered by RRC reconfiguration events according to clause 5.3.5.6.5 of TS 38.331
- This procedure does QoS flow to DRB mapping according to clause 5.3.1 of TS 37.324
- QoS flows to DRBs to be released are also handled
2024-02-27 09:47:26 +01:00
Guido Casati
bc0cab7a08 Minor fixes and clang formatting in SDAP procedures
- added descriptive comments to the code
- removed redundant function prototype
- removed unused function argument
2024-02-27 09:47:24 +01:00
Guido Casati
4a8815a41e Introduced function to check whether it is a transmitting or a receiving SDAP entity 2024-02-27 09:45:28 +01:00
Robert Schmidt
8ec4279613 Release SDAP when releasing UE over E1 2024-02-03 11:24:41 +01:00
francescomani
82e323eed4 using instance to identify PDCP at UE 2024-01-19 11:33:27 +01:00
francescomani
6dc9ec7733 various improvements and fixes 2023-12-20 11:30:25 +01:00
francescomani
d24a3d1a98 SDAP release DRB 2023-12-12 05:56:09 +01:00
Cedric Roux
a20bfc9695 remove NGAP_MAX_DRBS_PER_UE, replace by MAX_DRBS_PER_UE 2023-07-28 14:03:26 +02:00
Angelo Athanassopoulos
7a2790ba68 NR SDAP - Bugfix for entity deletion
This commit fixes the implementation for removing either a single SDAP entity or all the SDAP entities of a UE.
2023-07-05 23:31:34 +02:00
luis_pereira87
62d33ce523 Add function to remove all SDAP entities for a UE 2023-07-03 09:42:06 +01:00
luis_pereira87
57a3f9fe2f Bugfix when deleting a SDAP entity that is not the first one on the list and prevents segfault when removing the last one on the list
Fix delete entity function, a SDAP entity is a combination of a UE and PDUSession, we cannot just simply delete the first entity for a UE
2023-07-03 09:42:06 +01:00
Robert Schmidt
0f43c2c713 PDCP DL handling: unlock PDCP before forwarding PDU
nr_pdcp_entity_recv_sdu() processes PDCP SDUs, and forwards the PDU at the
end of the function, while having the PDCP lock. This can lead to
deadlocks, e.g., when another thread goes through RLC and tries to
access the PDCP while the PDCP tries to lock the RLC.

This commit changes the logic: instead of having recv_sdu() forward the
PDU directly, it fills a buffer with the PDU (thus the name change to
process_sdu()), and returns. We then unlock the PDCP, before forwarding
the PDU, thus eliminating potential deadlocks.
2023-03-27 16:47:46 +02:00
Robert Schmidt
2ac2a7f074 Make separate header for nr_pdcp instead of using 4G pdcp
Creates function that have nr_pdcp_ prepended to their name, and change
the signature of some functions for the 5G PDCP:

- nr_pdcp_layer_init()
- nr_pdcp_data_req()
- nr_pdcp_remove_UE()
- nr_pdcp_config_set_security()
- nr_pdcp_remove_UE()
- Make separate functions for nr_pdcp_data_req_srb/drb()
2023-03-27 16:39:24 +02:00
laurent
c4538995db continue code and take review comments 2023-03-06 00:37:23 +01:00
Laurent Thomas
553f1d1a52 Add basic E1 functionality
With contributions from
* Sakthivel Velumani <velumani@eurecom.fr>
* Robert Schmidt <robert.schmidt@openairinterface.org>

Squashed commit of the following:

commit e8488acbcdaef6ee1688dc233c9e48e85b0fbfc8
Merge: f09468eb13 5d58645a85
Author: laurent <laurent Thomas>
Date:   Sat Jan 21 15:03:40 2023 +0100

    merge develop

commit f09468eb13f729c49830786150918b03ae2d7524
Author: laurent <laurent Thomas>
Date:   Fri Jan 20 10:43:51 2023 +0100

    continue e1AP development

commit 76545cfbfc7ec5031633b1b0ec599c3560c1e5a7
Author: laurent <laurent Thomas>
Date:   Wed Jan 18 14:18:47 2023 +0100

    fix regressions after merge develop

commit 7071c480a6c433eb94501c49f4a7694ba77f4f6d
Merge: 569b9fc5f3 214aa50595
Author: laurent <laurent Thomas>
Date:   Mon Jan 16 15:51:50 2023 +0100

    merge develop

commit 569b9fc5f37b9947b722885e423572a211d658da
Author: laurent <laurent Thomas>
Date:   Wed Jan 4 17:07:01 2023 +0100

    fix srb2 addition, simplify and remove dead code, fix one race

commit 9fa89151c0f9b4a16a79d0685cc04d8cf2adfa44
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Jan 4 20:02:05 2023 +0530

    Bearer context release decoder and encoder

commit 7011cb518ed6df015ace536e9a08b2d1865188d9
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Jan 4 13:43:58 2023 +0530

    Update documentation

commit 3e8899fc962cb16fc1ded49590ca5dddede54978
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Jan 4 10:14:11 2023 +0530

    Fix function arguments and warnings

commit 989ad183a8d66961facaa6719fa7793b9d40d5b4
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jan 3 20:18:31 2023 +0530

    Moved E1-design.md to doc/

commit 04a8633dd509d9525755c5f3abfad976a1ba704e
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jan 3 20:13:46 2023 +0530

    Make libraries lower case in CMakeLists

commit 033ec174c1f48a0e745a2a2e1c367aa361f5ae76
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jan 3 17:55:25 2023 +0530

    Renamed and updated cucp cuup config files

commit f76a6913352bd8b2bb73ac25f225140cf05f93f2
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jan 3 13:31:19 2023 +0530

    Removed CU-UP checks from nr-softmodem

commit ae70afe44c84ac16b977b388c63e80e24803c43c
Author: laurent <laurent Thomas>
Date:   Mon Jan 2 13:01:45 2023 +0100

    fix for gcc version hat doesnt accept declarations in switch

commit 6a7a01043bf1e6e0ee9ac40b4d85ced7cdf6dcf4
Author: laurent <laurent Thomas>
Date:   Tue Dec 27 15:59:28 2022 +0100

    first functional commit standalone cu-up

commit 0caa4690f9e1acbe578d4de5a82ba62f45444a12
Merge: 3619f9550e 1a0c0cd1c9
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Dec 23 14:21:00 2022 +0530

    Merge remote-tracking branch 'origin/develop' into e1-implementation-wip

commit 3619f9550e4d3e78815334150ff8443db914f738
Merge: 1bcf8d5e00 cfe698eb70
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Dec 21 15:47:40 2022 +0530

    Merge remote-tracking branch 'origin/develop' into e1-implementation-wip

commit 1bcf8d5e00a9b9ce440d825f83ddc1b48086daa8
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Sep 13 02:10:34 2022 -0400

    Fix GTP rnti to ue_id after rebase

commit 23075ff8b7ef5d56df844c05e0a7100fe7bd35de
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Sep 6 00:32:12 2022 -0400

    Added documentation

commit 28f6e507f74d3fb069441e05da523378dee0f6ed
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Mon Sep 5 15:02:02 2022 -0400

    Header cleaups and unitary simulators build fixes

commit e665dbab28c49327066cff72aed22e1de7797b59
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Sep 1 17:52:07 2022 -0400

    Common interface between CUCP & CUUP for E1 and non E1 modes

commit 5dcc1bf59a37ed87d7d32a617cfcd663d6415757
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Sep 1 13:53:49 2022 -0400

    Allocate stack where ever possible
    Free memory after ASN encode

commit 793a5379539a3a2b6c42cd327d8cef79fe21fb55
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Sep 1 10:41:50 2022 -0400

    Fixes for build issues

commit 0d3564f25a0d8746b0fc550ed371ce21e08cd05a
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 31 20:57:14 2022 -0400

    Fixed uesoftmodem linkage error

commit 34adf865820f09900a5efed693ada1ccf6f0f1ad
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 31 19:31:50 2022 -0400

    Removed RRC thread from CUUP

commit 536741910aff90a86ba3a60612f943b412c5ab40
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 31 14:21:31 2022 -0400

    Add header guard in one of E1AP header

commit 22e9d9b6dea5d84d259ee2dc1aaa7cb943e55b08
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 31 14:00:47 2022 -0400

    Fix bug in PDCP ue_id

commit 4c65339b07d347003ed89d5e00f49a62e9b21483
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 30 18:04:59 2022 -0400

    Linked E1AP lib to L2_NR target
    E1AP builds for nr-softmodem

commit 014fe30ac93c84d810e0209bc7f0d3b7a1bbaee3
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 30 15:49:27 2022 -0400

    Remove xer prints from e1ap
    and gcc warning fixes

commit 71f0c9126bbb91bc595b66d57e1e91db676d3b9d
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 30 15:42:30 2022 -0400

    Fixed bug in integrity protection config

commit 4e393ef9528c2b14d670a341b52fc63262abf894
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 30 14:34:37 2022 -0400

    GTP init with only local address
    IP traffic works both directions in Mono, F1 and E1

commit ec3bde2c5deb99f554afc2053e351b9f79525e96
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 30 00:16:03 2022 -0400

    Fix bug in pdcp config and GTP instance
    UL iperf still not works. Can see packets in wireshark.

commit be8df4435eeae0a0755e2ac658f33caa2a3e3c94
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sat Aug 27 20:15:04 2022 -0400

    Fixes in node config after rebase

commit 6f42ff88de7f1615f87c46771fd6617a5fdfc48f
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sat Aug 27 01:38:21 2022 -0400

    Added N3 tunnel address in config params
    fixed bug in address length feild

commit b5e132041994344ebb5c2c59ca392612a32658fd
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Aug 26 20:38:47 2022 -0400

    Send UL UP address via F1 UE cxt mod msg

commit ecfd0fe260aee6aad78c291368c246f88b6bffcf
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Aug 26 15:08:53 2022 -0400

    Update GTP remote address from response message
    Modified GTP tunnel update function accordingly
    Put GTP tunnel update out of F1AP
    F1 split works

commit 14a37e414de3d653f25ccef1a790bc5b08fc7dc2
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sat Aug 20 01:17:36 2022 -0400

    Moved GTP tunnel creation out of F1AP message sending

commit cdd58ab96e84f48cc8ab8f0fe6b3133081ff02f7
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Aug 19 17:40:43 2022 -0400

    Moved DRB config out of RRCReconfig complete
    Monolithic and F1 split works

commit 61d66e490a1b61aa2b6ce18d993bb90d112d6374
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Aug 11 01:30:10 2022 -0400

    Allow CUUP to have RRC inst without error

commit dd7ae889372bb9fdf9e96be87c28eed0d9461d7f
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Aug 11 01:29:21 2022 -0400

    Added missing IEs in bearer cxt response handler

commit a6f1fe5fd254ccb36a54ede5b652161cb5e542e8
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 10 21:02:30 2022 -0400

    Unified bearer context message transfer for E1 and non-E1 mode
    compiles, to be tested

commit f245ace285632edcc28d669123746b9bf458bc38
Author: laurent <laurent Thomas>
Date:   Tue Aug 9 17:46:52 2022 +0200

    remove log_i() of fatal errors

commit d2a0f3c8620981f3b65a136f0169e3be9c549742
Author: laurent <laurent Thomas>
Date:   Fri Aug 5 15:01:39 2022 +0200

    fix rnti/ue_id for ue

commit 7b52c6cd9e675c28cb9d6347d122f77234ec6542
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Aug 4 19:14:46 2022 -0400

    Created separate functions in PDCP for E1 mode

commit 46680d2b3d221e675c3aeb675137f45318e31acb
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Aug 4 19:13:10 2022 -0400

    Bug fixes in bearer context setup response

commit 3d091bfd31b7aba625e4ba4b4f0f337cf2c1f6db
Author: laurent <laurent Thomas>
Date:   Thu Aug 4 15:42:11 2022 +0200

    add missing file from previous commit

commit 21838572196dec947da99f350f20c4d9408c3c17
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed Aug 3 16:59:16 2022 -0400

    Minor bug fixes

commit 34eb73fbc6f9d33098850d62b4808e54c80bb4ca
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 2 23:16:47 2022 -0400

    Added config files for testing
    To be renamed or removed later

commit a7e9c6fb9332295ad42585eb4338a6f9ff0ae7c0
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 2 23:15:21 2022 -0400

    Made rrc_gNB_get_ue_context_from_ngap_ids() non static

commit 028f0407571466ff24cf72b5c3814e42c346ae81
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 2 23:12:16 2022 -0400

    Completed bearer context setup cycle
    To be tested: Handling of bearer context setup response and subsequent UE context modifition msg to F1AP task

commit 4481d11324b13efa73ab0b5f4f156012485661ae
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Aug 2 23:01:50 2022 -0400

    Fixed E1AP PPID (wireshark fixed)

commit 7a22573f3e7e16960e3310609dea2783ddf404a2
Author: laurent <laurent Thomas>
Date:   Fri Jul 29 13:03:31 2022 +0200

    fix compile issues, simplify gtp send function

commit 0209011aa75a16e4c9c1eb36ebcf4fe0ff93aba2
Author: laurent <laurent Thomas>
Date:   Thu Jul 28 11:51:18 2022 +0200

    restore compilation capability, gtp replacement of rnti by ueid

commit ce3b886fd7f11322a8d37b924d1752e6a6adf777
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Jul 22 08:35:31 2022 -0400

    Included missing IEs in bearer cxt setup message

commit 1208ae0d6fe4b25341c9036dde111fd4d00fd6e9
Author: Cedric Roux <cedric.roux@eurecom.fr>
Date:   Tue Jul 19 10:53:35 2022 +0200

    replace rnti by ue_id in pdcp

    some sdap and gtp files had to be touched, the work is not finished in there

    some changes in nr_pdcp_oai_api.c simply assume ue_id is indeed rnti
    (will functions in this file be used by cu-up?)

commit e67d1c88c786267458194e4de516919d0b5d1002
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jul 19 10:08:39 2022 +0200

    Replace RNTI with UE ID in GTP files
    (half done. Laurent to change ctxt_t)

commit 7a141e8e941e5c2624a47da7c764531c03b8f617
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jul 19 10:04:15 2022 +0200

    Added RRC handler for bearer cxt setup in CUUP

commit fe2106676bf9144347f30969a1bfd351136f536a
Author: laurent <laurent Thomas>
Date:   Mon Jul 11 13:30:30 2022 +0200

    fix race in startup procedure (config before starting threads that use the config)

commit 3197baab60e53459928da30cea7a4e0514a074e3
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sun Jul 10 11:30:31 2022 +0200

    Fixed bugs in bearer creation

commit 26be61167dec9068e572e08a21ddc96a0f2a7731
Author: laurent <laurent Thomas>
Date:   Sun Jul 10 10:50:57 2022 +0200

    fix a race, add asn1c debug method

commit 26750d1818aa206c4c56ada6dbed9bb66dfe3811
Author: laurent <laurent Thomas>
Date:   Wed Jul 6 22:34:10 2022 +0200

    e1ap bearer setup encoding invalid

commit d092788aa3f8229eb5c938a41534dfb318955135
Author: laurent <laurent Thomas>
Date:   Wed Jul 6 14:18:39 2022 +0200

    fix regression with F1, some basic cleaning in NGAP

commit 41a135734a33b284808d4c5049c431dbc0ff1c46
Author: laurent <laurent Thomas>
Date:   Wed Jul 6 11:24:52 2022 +0200

    fix some ngap regressions

commit 460acd840dd58fd46a995219cb9da8fda103668e
Author: laurent <laurent Thomas>
Date:   Tue Jul 5 21:19:13 2022 +0200

    build, run in F1 mode until UE connect but pdu session still fails

commit 7c067095df287cc7a542be53e9a1471c11ec5af8
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sat Jun 25 22:45:46 2022 +0530

    Populate PDU and DRB paramenters from NGAP

commit c4ada56a8c31b4c07fc1498e15b0954d9b1ad2f6
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue Jun 7 22:16:58 2022 +0530

    setup resp decoding success

commit a2f41597c7438934a203ccf3cced35b6b65e8cee
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Sat Jun 4 13:50:55 2022 +0530

    Fixed bugs in E1 setup procedure
    E1 setup request decoding successful

commit 6106207ba74c74579b5f375d572930a609abe3a9
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu May 26 20:13:14 2022 +0530

    Fixing build issues

commit 67235fac01aaca4c17da13bf658144ffe6bd12df
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Mon May 23 12:04:22 2022 +0200

    Make nr-softmodem depend on E1AP module

commit 391cee938e8250c355b6b914e747f2004c795817
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Mon May 23 11:57:15 2022 +0200

    Fix ITTI errors in E1AP target

commit db4146e4a0432b7e3759d71efbeb450754c1f0d3
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Wed May 18 06:59:03 2022 +0530

    CP UP task created

commit 3058d2fc445acf5681a09f70409023718294d093
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue May 10 08:12:19 2022 +0530

    Bearer context setup response message

commit b911e9db2a4d0a35eb9a449ef02acefff30b558f
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Tue May 3 16:52:49 2022 +0530

    Bearer context setup c structs

commit d0f4d5f3539803253b9a995a90a47b3d825ea0ca
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Apr 28 02:21:50 2022 +0530

    Bearer context setup message

commit 489a5358fa0e199314254561a2d52c1a93f7803e
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Thu Apr 21 10:11:03 2022 +0530

    Started with CUUP task

commit b416061f5a237cbabbe09c6d81fe92df9e33fd72
Author: Sakthivel Velumani <velumani@eurecom.fr>
Date:   Fri Apr 15 18:46:27 2022 +0530

    Setup request and response messages

commit faca4b97dba92be857bd8442193365fc2c8ed122
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Mon Apr 11 15:01:48 2022 +0200

    Fixup for cmake execution

commit ecfd9f7608a5820ae85278939e9bbaf7f1245dd6
Author: Robert Schmidt <robert.schmidt@eurecom.fr>
Date:   Tue Nov 24 21:39:20 2020 +0100

    Move CMakeLists.txt into root

commit 9f41f7c52b3c7a185e5e34bb1591b0eb66459837
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Tue Apr 12 12:07:18 2022 +0200

    Remove hwlat refs in build_oai: targets don't exist anymore

commit e666cf5eedc67695febd33de1397331d6b7b2320
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Mon Apr 11 14:37:32 2022 +0200

    Create CMake E1AP_RELEASE variable from E1AP_VERSION

commit 1f8413361c1b99ea46ee613da035803a1387f65c
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Sun Apr 10 14:25:38 2022 +0200

    Add E1AP lib

commit 7465cea49243fd6eb9869035b18860dface57098
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Sun Apr 10 14:48:40 2022 +0200

    Add E1AP Grammar and build ASN.1 lib at build time

commit cde22f83032a199387ae1eae6b702f44ed154f3e
Author: Robert Schmidt <robert.schmidt@openairinterface.org>
Date:   Fri Apr 22 13:42:51 2022 +0200

    Accept higher vers. nums in make_version/MAKE_VERSION

commit d5127b23608240374a439d1d9c2ff6d53c4b527c
Author: Robert Schmidt <robert.schmidt@eurecom.fr>
Date:   Tue Nov 24 21:39:20 2020 +0100

    Move CMakeLists.txt into root
2023-02-11 12:32:34 +01:00
Cedric Roux
698122d6d2 bugfix: fix sdap
There was a problem testing accelleran cu + oai du + oai ue + rfsim
because accelleran cu configures sdap header for UL but not for DL
and our sdap implementation deals with either "no sdap header at all"
or "sdap headers for both UL and DL".

The code has been modified to deal with the other cases
("sdap header for UL but not DL" and "sdap header for DL but not UL").

has_sdapDLheader and has_sdapULheader have been removed, has_sdap
too, replaced by has_sdap_rx and has_sdap_tx, which makes the code
independant of ue or gnb and is, I think, clearer.

With this work, accelleran cu + oai du + oai ue + rfsim works. We
also have oai gnb + oai ue + rfsim functional for all cases of sdap
header configuration (this won't happen for users, the code of gnb has to
be modified to have sdap header for only ul or only dl). It also works
with a COTS UE for all cases of sdap configuration (again, this won't
happen for users, only "no sdap header" and "sdap headers for both
UL and DL" exist in oai gnb with the current code).

To have other cases, you can edit openair2/RRC/NR/rrc_gNB_radio_bearers.c
and search for NR_SDAP_Config__sdap_HeaderDL_present in there.

To enable sdap, run the gnb with the command line argument
--gNBs.[0].enable_sdap 1
2023-01-22 00:09:22 +01:00