1276 Commits

Author SHA1 Message Date
Robert Schmidt
aff84037a7 Merge remote-tracking branch 'GuidoCasati/sdap-header-fix' into integration_2026_w28
SDAP header handling fixes (#249)

OAI SDAP treated SDAP header presence as a single PDU-session flag
(enable_sdap), so a valid asymmetric RRC config (UL header present, DL
header absent) caused the UE to parse downlink payload as an SDAP QFI
and drop traffic (e.g. IPv4 0x45 -> bogus QFI 5).

SDAP now follows RRC SDAP-Config per DRB and per direction from (TS
38.331 / TS 37.324). Header presence, QFI-to-DRB mapping, and
default-DRB fallback all derive from what RRC configured for each DRB.

In the new implementation, RRC (SDAP-Config IE) fills sdap_config_t per
DRB (role, defaultDRB, mapped QFIs), SDAP entity stores it in
qfi2drb_table + default_drb row to be used in the TX/RX data path.

Also, simplify mapping logic, improves E1 QoS-flow remap, and completes
UE reflective QoS mapping with the correct entity_role on new QFI rows.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-09 19:45:58 +02:00
Robert Schmidt
fef2154525 Merge remote-tracking branch 'Thecave3/rerere-doc' into integration_2026_w28
doc: add a Git guide (commit signing, branch management, rerere) (#202)

Adds doc/git-guide.md, a single entry point for the practical Git
knowledge needed to contribute to OAI: commit signing setup (DCO +
verified commits), branch management (including fixup commits and
--autosquash), submodules, recovering from mistakes, and reusing
conflict resolutions with git rerere.

This started as a rerere-only guide. Review discussion (@luispereira106,
@rorsc, @sgarg00) converged on a broader scope: the Git how-tos are
scattered across the documentation (signing in CONTRIBUTING.md, branch
management in code-style-contrib.md), and configuring commit signing in
particular was reported as hard to get right. This PR consolidates the
how-tos in one guide while the policy documents stay authoritative for
the rules.

Single commit (review rounds squashed per the linear-history policy):

- New doc/git-guide.md with sections on commit signing (moved from
  CONTRIBUTING.md, led by a copy-pasteable SSH recipe), branch
  management (moved from code-style-contrib.md; git switch,
  fixup/--autosquash, --fixup=amend:), submodules (unintended
  pointer-update pitfall), recovering from mistakes
  (restore/reset/reflog), and git rerere.
- CONTRIBUTING.md keeps the normative DCO/Verified requirements and
  links to the guide; code-style-contrib.md keeps the workflow policy
  and links to the guide; doc/README.md lists the guide under Developer
  tools.
- Cross-references (not moved, since they are coupled to their own
  docs): clang-format.md pre-commit hook, GET_SOURCES.md branch/tag
  model, doc_best_practices.md docs: commit prefix.
- Small typo fix in the T tracer addconsoletrace.md documentation.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
Reviewed-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-07-09 17:27:56 +02:00
Robert Schmidt
afcd77108d Merge remote-tracking branch 'karimboutiba/xran_fdd' into integration_2026_w28
xran: fixes for FDD operation (#270)

Two fixes in the xran fronthaul found while bringing up an FDD cell
(Band n1, 10 MHz).  Verified on a Band n1 FDD 10 MHz cell using Keysight
RUsim/UEsim, End-to-end UE attach and traffic work.

- Derive TTI from the configured numerology instead of a hardcoded 20
  slots per frame: xran_fh_tx_send_slot() assumed 30 kHz SCS. Compute
  slots_per_frame as 10 << mu from the fronthaul config (mu_number[0]
  for K release, frame_conf.nNumerology for F release), so the TTI is
  correct for any numerology. With the original code, PRACH was not
  working properly.
- Fix DL transmission in FDD mode: the TDD DL/guard slot check skipped
  every DL slot in FDD, where no TDD pattern exists and all slots carry
  DL. The check is now only applied when the frame duplex type is not
  FDD. Without this, no DL traffic was sent.

Reviewed-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-07-09 17:10:29 +02:00
Andrea Lacava
4bff655952 doc: add a Git guide and fix addconsoletrace typo
Add doc/git-guide.md, a single entry point for the practical Git
knowledge needed to contribute to OAI, consolidating the how-tos
that were scattered across the documentation:

- Setting up commit signing: moved from CONTRIBUTING.md, which keeps
  the normative DCO/Verified requirements and links to the guide; led
  by a compact SSH recipe, with the allowed_signers troubleshooting
  and a note on repository-level configuration for shared servers.
- Managing your own branch: moved from code-style-contrib.md, which
  keeps the workflow policy and links to the guide; mentions git
  switch and covers fixup commits with git rebase --autosquash,
  including the --fixup=amend:<commit> variant.
- Working with submodules: the update command and the unintended
  submodule-pointer-update pitfall seen in past PRs.
- Recovering from mistakes: git restore --staged, git restore,
  git reset --soft/--hard, and git reflog.
- Reusing conflict resolutions with git rerere: enabling, typical
  flow, inspecting, seeding from existing history, sharing the cache,
  and caveats, clarifying that contribution branches must keep a
  linear history while forks may carry merge commits.

The guide is referenced from doc/README.md (Developer tools),
code-style-contrib.md, and CONTRIBUTING.md. Guidance coupled to its
own document is cross-linked instead of moved: clang-format.md
(pre-commit hook), GET_SOURCES.md (branch and tag model), and
doc_best_practices.md (docs: commit prefix).

Also fix a typo in the T tracer addconsoletrace documentation.

Signed-off-by: Andrea Lacava <thecave003@gmail.com>
2026-07-09 10:43:17 -04:00
Guido Casati
14b5bcb600 doc: clarify enable_sdap as RRC SDAP header policy
Log, param help, and rrc-usage.md described enable_sdap as toggling the
SDAP layer, while it only sets sdap-HeaderUL/DL in RRC SDAP-Config.

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-09 15:04:11 +02:00
Karim Boutiba
6e1bfb2c19 doc: document nr_scs_for_raster and sl_ahead in FHI 7.2 tutorial
Signed-off-by: Karim Boutiba <karim.boutiba@openairinterface.org>
2026-07-09 13:01:57 +02:00
Bartosz Podrygajlo
6bdf1dde3d fix: Update xran version to 11.1.3
This update allows automatic discovery of target platform when building xran.

Supproted platforms: armv8 and x86_64 with avx512

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-08 15:34:05 +02:00
Robert Schmidt
35cf1c91bb Merge remote-tracking branch 'GuidoCasati/issue-963' into integration_2026_w27
NAS: refactor Identity Request handler and enforce spec-compliant security checks (#217)

Align UE Identity Request handling with TS 24.501 by checking the NAS
security header and rejecting unprotected non-SUCI requests.

Also, refactor Identity Response identity selection based on the
requested identity types, add to a helper and handle unavailable
identities in the UE context.

Closes: #82
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org
2026-07-02 14:54:04 +02:00
Guido Casati
3226e5bb34 doc (NAS): update doc/5Gnas.md
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-07-02 11:04:27 +02:00
Teodora Vladić
05af0556af Update the xran K release tag due to the PR https://github.com/openairinterface/o-du-phy/pull/3
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-07-01 13:29:10 +02:00
Robert Schmidt
f448088c8d docs: remove OAI logo due to trademark issues
Duranta is a Linux Foundation networking project and does not have
permission to display the trademarked OAI logo
(https://openairinterface.org/logo/), which belongs to the
OpenAirInterface Software Alliance (legal entity "OPENAIRINTERFACE").

Remove logo to avoid any legal problems.

Remove some superfluous text with HTML code in some documentation.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-26 11:56:30 +02:00
Robert Schmidt
47e9ad9cbd Merge remote-tracking branch 'origin/fhi72-k-version' into integration_2026_w25
[FHI72] Improve the fronthaul doc (#201)

- explicitly set the K_VERSION variable in the fronthaul doc, and update
  PTP configuration
- fix IQ decompression for ARM architecture

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-18 17:44:18 +02:00
Jaroslava Fiedlerova
3516ed3b5e Merge remote-tracking branch 'GuidoCasati/nr-paging' into integration_2026_w25
Complete NR L2/L3 Paging path from F1AP to NAS (gNB and UE) (#151)

This MR wires a 5G‑NR paging flow across the stack, from F1AP Paging on
the DU down to PCCH scheduling in MAC/RLC, RRC/ASN encode/decode, and
UE‑side NAS Service Request triggering, including the NR UE changes in
L1/L2.

It centralises paging PF/PO computation and PCCH scheduling in MAC,
using shared SSB/Type0‑PDCCH and common PDSCH helpers that are also
reused by SIB1. On the UE, it enables decoding of NR PCCH messages,
matching ng‑5G‑S‑TMSI/fullI‑RNTI, and conditionally initiating a
network‑triggered Service Request when 5GMM state allows it. The change
set includes focused refactors and ASN.1 tests to validate the new
paging encode/decode path.

Changes:
- MAC gNB common helpers: Move SSB/Type0‑PDCCH utilities from the
  BCH scheduler into shared MAC primitives and introduce a reusable 
Type0‑occasion helper and common PDSCH RB/MCS/TBS sizing
- MAC paging PF/PO responsibility: Add a dedicated PCCH scheduler module
  that implements TS 38.304 §7 PF/PO computation (defaultPagingCycle,
nAndPagingFrameOffset, Ns, SFN‑based PF formula and PO slot mapping)
and owns the “is this (frame,slot) a paging occasion for UE_ID?”
decision.
- F1AP -> MAC -> RLC PCCH path (gNB/DU): Have the DU decode F1AP Paging
  with CN UE identity, build an NR RRC Paging message (PCCH) in MAC, and
hand it to RLC as a dedicated PCCH SDU together with UE_ID (5G‑S‑TMSI
mod 1024), using per‑module PCCH storage. RAN UE paging identity
is explicitly rejected.
- Direct CU to DU paging path: Implement direct F1 Paging handling
  in the NR RRC DL direct interface for RLC PCCH storage for later 
scheduling.
- PCCH scheduling and NFAPI integration (gNB MAC): Integrate 
  schedule_nr_pcch() into the DL scheduler so that when a stored PCCH
SDU exists and the current (frame,slot) is a paging occasion, MAC 
resolves the paging search space and CORESET, selects a beam (from SSB),
allocates CCEs and PDSCH resources, builds NFAPI DL_TTI PDUs 
(PDCCH + PDSCH with P‑RNTI, DCI 1_0), and populates the matching
TX_DATA PDU, then clears the cached PCCH.
- DCI handling for P‑RNTI paging: Adjust DCI payload preparation
  to treat P‑RNTI specially, returning after setting DMRS and antenna 
ports and skipping HARQ and UE scheduling state that do not exist for
paging, so paging DCIs no longer touch UE HARQ data structures.
- PHY UE RX Chain: DCI handling for P‑RNTI on UE, monitor DCI on Paging
  Occasions, process DCI 1_0 with CRC scrambled by P‑RNTI on the paging 
search space, trigger PDSCH decoding for PCCH based on that DCI, deliver
decoded PCCH to upper layers from the PHY/MAC side
- RRC/ASN paging encode API: Replace the legacy buffer‑based do_NR_Paging 
with a nr_paging_params_t‑based API returning a byte_array_t,
supporting both ng‑5G‑S‑TMSI and fullI‑RNTI identities, and optional IEs
(e.g. accessType non‑3GPP and pagingCause v17), and encoding via 
uper_encode_to_new_buffer, with ownership and failure semantics clearly 
defined for callers.
- UE‑side PCCH reception and matching: Add UE MAC to RRC logic
  to deliver PCCH SDUs to RRC, decode NR PCCH via a new nr_pcch_decode() 
helper into an array of nr_paging_params_t, iterate PagingRecordList on 
the UE, compare M‑TMSI/fullI‑RNTI against local identity, and log whether 
a paging match was found.
- NAS integration for network‑triggered Service Request: On a UE paging
  match, send a NAS_PAGING_IND from RRC to NAS and, when the UE has a
GUTI, is 5GMM‑REGISTERED and in 5GMM‑IDLE, generate and send a Service
Request uplink NAS message
- Tests and validation helpers: Extend nr_asn1 paging tests
  to encode Paging via do_NR_Paging, decode it via nr_pcch_decode,
and verify round‑trips for multiple ng‑5G‑S‑TMSI values, accessType,
and fullI‑RNTI bit patterns, using a shared encode/decode helper that 
exercises the same decoder path used by the UE.

Notes:
Paging handling currently supports CN UE paging
identity (5G‑S‑TMSI) only. RAN UE paging identity is logged and ignored.
A paging match triggers a Service Request only when the UE has a GUTI,
is 5GMM‑REGISTERED, and in 5GMM‑IDLE. T3346 and suspend‑indication
handling are documented as future work and not implemented here.

Testing:
Tested with Open5gs. How to trigger Paging in Open5GS lab setup:

- Use gNB telnet to request NGAP UE Context Release: `rrc ctx_rel_req
  <RRC_UE_ID>`
- Wait until AMF reports CM-IDLE (for example gNB-UEs is now 0).
- Generate downlink data from the Linux host to the UE IP: `ping
  <UE_IP>`
- Host-originated downlink data will trigger paging.

Closes #74

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-by: Francesco Mani <email@francescomani.it>
2026-06-18 15:43:27 +02:00
Guido Casati
5d309b93d1 doc: update FEATURE_SET.md, 5Gnas.md, rrc-dev.md
- added Paging documentation
- updated to latest NGAP, F1AP, E1AP, NAS status
- fixed spelling errors

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-06-17 23:54:46 +02:00
Sagar Arora
a52883c051 [doc FHI72]: update ptp configuration for verion 4.4
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-06-17 11:31:50 +02:00
Teodora Vladić
4b767c3ab1 [FHI72] Set the K_VERSION explicitely in the doc
Shall be always up to date according to the cmake variable.

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-06-17 11:31:50 +02:00
Rúben Soares da Silva
37cef0e2cb Change ambigous language in Aerial_FAPI_Split_Tutorial.md note on CN core allocation.
Signed-off-by: Rúben Soares Silva <rsilva@allbesmart.pt>
2026-06-17 09:19:21 +01:00
Shubhika Garg
29be39948c ci: protect deployment/build files and update maintainer contact
- Add ci-approval protection for docker/, charts/, openshift/,
    and build_oai and build_helper files
  - Update oai email contact to `oaicicdteam@openairinterface.org`
  - Change GitLab to GitHub in `GET_SOURCES.md`

Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-10 10:15:45 +02:00
Robert Schmidt
de00110649 fix: update GET_SOURCES with Duranta workflow
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Jaroslava Fiedlerova
867cb7f7d0 CI: Reflect build pipeline renaming (#2) in TESTBenches.md
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
f8ecc3befa doc: contrib: update release strategy
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
01fb12cfbd doc: clarify the role of AI coding assistants
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:41 +02:00
Robert Schmidt
55e0693beb doc: Improve style guide with function and variable declaration hints
Reported-by: Laurent THOMAS <laurent.thomas@open-cells.com>
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
b4c9f67b30 doc: add information on git commit trailer, including mandatory -s
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
ef35085329 doc: remove outdated/inexistant pipeline from test bench overview
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
165ceb983b doc: Update labels in Test bench overview
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
438de535fa doc: make clone instructions/issues/mailing lists/tags point to Github
- make internal links relative where applicable
- delete link to the wiki, as the documentation is in the main repo, not
  the wiki
- remove some "example in oai code" as the examples either don't exist,
  or are not in that place, and we can reasonably expect people to grep

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
00e7cd49fa doc: contrib: update for Duranta
Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-06-05 17:16:40 +02:00
Shubhika Garg
1bf3fd674e doc: Update contributing guidelines for GitHub
Signed-off-by: Shubhika Garg <shubhika.garg@openairinterface.org>
2026-06-05 17:16:40 +02:00
Robert Schmidt
e36edd047e Merge remote-tracking branch 'origin/aperiodic_SRS' into integration_2026_w22 (!3723)
Support for aperiodic SRS at gNB

Add support for aperiodic SRS, which currently, if activated, is
hardcoded to be periodically scheduled every 160 TTIs. The configuration
file has been changed, and instead of

    do_SRS = 0/1

is now

    do_SRS = "none"/"periodic"/"aperiodic"

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
Reviewed-By: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-29 08:53:56 +02:00
Robert Schmidt
38e508d9e9 Merge remote-tracking branch 'origin/7.2-tutorial-update' into integration_2026_w22 (!4153)
doc: update 7.2 tutorial hardware and os configuration and add a doc to list supported hardware and OS

1. The hardware details in the tutorial were very old; now we are using
   some new systems
2. There is no need now to mention the old kernel version and firmware
   version
3. I removed the configuration with tuned-adm, as it is confusing
   sometimes. So it is better to use just GRUB. I have an OAI tuned
   profile ready, but I will do it on another MR. I will check if it
   works well on kernel 7.X before pushing
4. Add a document to list the tested/supported hardware on which we have
   tested OAI. In another MR I will use that document as reference for
   other tutorials as well.

Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 16:47:50 +02:00
Sagar Arora
15b888158c doc: update 7.2 tutorial hardware and os configuration
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-05-28 16:41:00 +02:00
Sagar Arora
2184d96033 doc: add new doc to maintain OAI supported/tested hardware and OS
Signed-off-by: Sagar Arora <sagar.arora@openairinterface.org>
2026-05-28 16:23:06 +02:00
Robert Schmidt
94f9ed5cab Merge remote-tracking branch 'origin/fhi-cusm-comp-hdr' into integration_2026_w22 (!4138)
[FHI72] [M-plane] Implement dynamic compression

- CUS: dynamic compression type implemented -> tested end-to-end with
  Benetel RU.
- CUSM: use compression parameters explicitly via gNB config file (if
  set) for RU configuration via M-plane -> DL C/U-plane packets are
  good. However, not tested with Benetel RU since not supported.

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-28 09:10:36 +02:00
Teodora Vladić
588adc46f8 [FHI72][M-plane] Implement dynamic compression
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-27 17:35:11 +02:00
Teodora Vladić
a9881ab560 [M-plane] Optionally use IQ bitwidth from the config file
* use uint8_t instead of int16_t for `iq_width` (the value cannot be
  negative)
* move <compression-type> outside the if condition since it's a mandatory
node
* use <compression-method> node

Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-27 17:21:40 +02:00
Sakthivel Velumani
304252784a doc: update beamforming documentation
Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
2026-05-26 15:06:35 +00:00
francescomani
a95211a4b2 improvements in aperiodic/periodic configuration using a string as input of do_SRS
Signed-off-by: francescomani <email@francescomani.it>
2026-05-24 10:16:29 +02:00
Robert Schmidt
c2e43c025d Merge remote-tracking branch 'origin/u26-f44' into integration_2026_w21 (!4122)
Add Fedora 44/Ubuntu 26 to list of supported distributions

See commits for more details. Includes a minor cleanup. What I tested
for U22/U24/U26 and F44 is

    ./build_oai --ninja -c -I -w USRP --gNB --nrUE

Reviewed-By: Luis Pereira <lpereira@allbesmart.pt>
2026-05-21 17:33:24 +02:00
Robert Schmidt
076c722eb9 build_oai UHD source installation: default to UHD v4.8
Use the current OAI CI default UHD version. Update the documentation to
show how to install a recent version.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:21 +02:00
Robert Schmidt
19e3cbd66a Extend UHD patch to v4.9/v4.10, remove sed
The existing patch (generated through sed) works also in UHD versions
beyond 4.8, so allow to use that.

Further, since sed is confusing, store the patch directly. Update the
dockerfiles so that docker copies the right file for UHD 4.8.

Signed-off-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-21 15:21:20 +02:00
Robert Schmidt
8698186d47 Merge remote-tracking branch 'origin/dl-scheduler-refactor' into integration_2026_w21 (!3902)
Refactor DLSCH/ULSCH scheduler: extract proportional fair policy behind function pointer interface

Motivation

The current `pf_dl()` is a ~600-line monolithic function that mixes
infrastructure concerns (UE iteration, HARQ management, CCE allocation,
MAC PDU generation) with the scheduling policy (PF priority, RB
allocation, MCS selection). This makes it hard to modify the scheduling
strategy, test alternatives, or offload scheduling to a GPU (cuMAC).

This MR refactors the DL and UL schedulers into a clean separation
between **infrastructure** and **policy**, using function pointers for
beam allocation and scheduling decisions. The data structures
(`nr_dl_candidate_t`, `nr_dl_sched_params_t`) are also designed to map
directly to cuMAC's
`cumacCellGrpUeStatus`/`cumacSchdSol`/`CumacCellGrpPrms`, to make future
integration smooth.

Changes

Goodput tracking fix

`dl_thr_ue` now tracks actual goodput in bps (EWMA of SDU byte deltas
per frame) instead of accumulating raw byte counts per slot, which are
not as straightforward to interpret (due to variations in TDD patterns
mostly). The new calculation matches closely with the throughput
measured with e.g. iperf.

Helper extraction from `pf_dl()` and `post_process_dlsch()`

- `find_first_available_rbs()` — first-fit contiguous RB allocation
- `setup_dl_harq_process()` — HARQ process management
- `generate_dl_mac_pdu()` — MAC CE + RLC data + padding
- `fill_dl_tx_request()` — FAPI TX_req filling

New scheduling interface

- **`nr_dl_candidate_t`** — per-UE flat struct with all immutable inputs
  (buffer status, BLER, MCS limits, beam, BWP) and outputs (scheduled,
  rbStart, rbSize, MCS). Kept relatively minimal for now, but it should
  be easy to add more input metrics in the future.
- **`nr_dl_sched_params_t`** — per-beam cell-level context (VRB map,
  available RBs, slot bitmap)

Function pointers (DL)

| Pointer | Default implementation | Role |
|---------|----------------------|------|
| `dl_ri_pmi_select` | `nr_dl_ri_pmi_select_default` | Rank/PMI selection |
| `dl_beam_select` | `nr_dl_beam_select_default` | Beam direction assignment |
| `dl_tda_select` | `nr_dl_tda_select_default` | Time-domain allocation |
| `dl_mcs_select` | `nr_dl_mcs_select_default` | MCS from BLER/SINR |
| `dl_rb_alloc` | `nr_dl_proportional_fair` | PRB allocation (PF policy) |

Function pointers (UL)

| Pointer | Default implementation | Role |
|---------|----------------------|------|
| `ul_ri_tpmi_select` | `nr_ul_ri_tpmi_select_default` | Rank/TPMI from SRS feedback |
| `ul_beam_select` | `nr_ul_beam_select_default` | Beam direction assignment |
| `ul_tda_select` | `nr_ul_tda_select_default` | Time-domain allocation |
| `ul_mcs_select` | `nr_ul_mcs_select_default` | MCS from BLER/SINR |
| `ul_rb_alloc` | `nr_ul_proportional_fair` | PRB allocation (retx first, then PF-sorted new-tx) |

All default implementations are in `gNB_scheduler_dlsch.c` (DL) and
`gNB_scheduler_ulsch.c` (UL).

MCS selection flow

The old `get_mcs_from_bler()` entangled two concerns: updating the BLER
estimate from HARQ feedback and deciding the MCS. These are now split:

- **BLER tracking is infrastructure's job**: `collect_dl_candidates()`
  calls `update_dl_bler_stats()` which updates the BLER estimate from
  HARQ round statistics.
- **MCS selection is the policy's job**: the proportional fair policy
  calls `select_mcs_from_bler()` internally to adapt MCS based on the
  BLER value. A different policy could use an entirely different MCS
  strategy (e.g. cuMAC has its own `mcsSelectionLUT` + OLLA, one could
  decide to opportunistically lower the MCS while increasing the PRB
  allocation for reliability in some cases, etc).

For retransmissions, MCS/number of PRBs are passed as hints so the
policy can use them as-is if desired, but we don't enforce it (adaptive
HARQ possible too: the standard requires us to maintain TBS but in
theory it could be achieved via changing the MCS and number of RBs if we
wanted to).

Refactored flow

`nr_dl_schedule()` (formerly `pf_dl()`):

```
collect_dl_candidates()     → build candidate array from UE list
schedule_dl_ues()           → beam alloc + per-beam policy calls
  for each scheduled candidate → CCE/PUCCH/TBS validation + post_process
```

Beam allocation and scheduling policy are two separate function
pointers, allowing each to be developed and tested independently (with
the goal in the future to add a parameter in the config file for each,
and telnet commands to hotswap).

`schedule_dl_ues()` wraps both into a single function: it first calls
beam allocation to assign candidates to beams, then iterates over beams
and calls the scheduling policy for each one. cuMAC performs joint beam
+ PRB allocation on the GPU, so when integrating later it will replace
`schedule_dl_ues()`.

Future work

- Channel matrix H from SRS on candidates for beam-aware scheduling
- Per-RB channel magnitude derived from SRS on candidates
- Config file parameters and telnet commands for hotswapping policies
- cuMAC integration via `schedule_dl_ues()` replacement

Reviewed-By: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-20 19:10:44 +02:00
Guido Casati
2d05db4819 Cleanup conflict leftover in doc/SW_archi.md
Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
2026-05-19 18:07:20 +02:00
Maxime
0c782e3ee3 Add scheduler architecture documentation
Assisted By Claude Code:Opus-4.6

Signed-off-by: Maxime Elkael <m.elkael@northeastern.edu>
2026-05-18 16:44:20 -04:00
Jaroslava Fiedlerova
328c4bc5fa Merge remote-tracking branch 'origin/ci-test-mplane' into integration_2026_w19 (!4078)
[M-plane] Improvements, fixes + Add CI M-plane pipeline

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Robert Schmidt <robert.schmidt@openairinterface.org>
2026-05-07 15:28:57 +02:00
Jaroslava Fiedlerova
3b8f5c7191 Merge remote-tracking branch 'origin/rrc-qos-handling' into integration_2026_w19 (!3810)
Multi-QoS Handling and PDU Session Modify

This MR implements comprehensive QoS flows handling and PDU Session
Modify procedures in the RRC layer, enabling full support for multiple
QoS flows per DRB and dynamic QoS management per 3GPP specs. Key
changes:

1. Multi-QoS Flows Support

- Multiple QoS flows per DRB: Support for multiple QoS flows mapped to a
  single DRB
- Intelligent QoS-to-DRB mapping: Implements resource-type-aware
  multiplexing based on 3GPP TS 23.501 Table 5.7.4-1
  - DC-GBR flows (5QI 82-90): Dedicated DRB, max 1 flow per DRB
  - GBR flows (5QI 1-4, 65-67, 71-76): Max 2 flows per DRB
  - Non-GBR flows (5QI 5-11, 69-70, 79-80): Max 5 flows per DRB
  - Aggregate cap: Maximum 5 flows per DRB
- 5QI validation: Early validation of standardized 5QI values (1-9,
  65-90) during QoS flow setup/modify

2. PDU Session Modify Procedures

- Complete E1AP/RRC integration: Full Bearer Context Modification
  support with DRB lifecycle management
  - DRB To Setup/Modify/Remove lists: Complete support for all DRB
    operations in Bearer Context Modification
- QoS flow operations: Support for QoS flow add, modify, and release
  operations
  - QoS flow mapping: Proper handling of QoS flow modifications in
    DRB To Modify List
- Automatic DRB management: DRB setup, modification, and removal
  based on QoS flow changes. Reuse existing DRBs if the incoming QoS
  flow is compatible.
- Delayed transactions: PDU Session Modify added to delayed
  transactions list for proper sequencing

3. GTP-U Tunnel Refactoring

- Architecture alignment:
  - N3 tunnels: 1 per PDU session with QFI marking, container for
    multiple bearers, supporting multiple QoS flows
  - F1-U tunnels: 1 per DRB without QFI marking
- SDAP ownership of QoS: move QoS management to be fully owned by
  SDAP

4. QoS Enhancements

- Dynamic5QI support: Full support for Dynamic5QI with packet delay
  budget and packet error rate
- GBR QoS flows: Support for Guaranteed Bit Rate QoS flows with
  GFBR/MFBR parameters
- DRB QoS aggregation: DRB-level QoS computed from all mapped QoS
  flows using ARP priority (not 5QI priority)
- QoS priority level refactoring: Proper type definitions per 3GPP
  TS 23.501 (QoS Priority Level: 1-127, ARP Priority Level: 1-15)

Technical Changes

RRC Layer

- Refactored `nr_rrc_add_bearers()` to support intelligent QoS-to-DRB
  mapping
- Added `nr_rrc_update_qos()` for QoS flow add/modify with automatic DRB
  assignment
- Implemented `nr_rrc_update_pdusession()` for QoS flow release and DRB
  cleanup
- Consolidated F1 UE Context Modification Request handling
- Simplified PDU status tracking by removing intermediate states
- Added QoS flow and DRB removal utilities
- Updated RRC bearers tests with comprehensive multi-QoS testing
- Adapted `nr-cuup-load-test.c` to new GTP design

NGAP Layer

- Extended PDU Session Resource Modify Request Transfer with QoS
  add/modify/release lists
- Added proper type definitions (`pdusession_mod_req_transfer_t`,
  `qos_flow_to_release_t`)
- Fixed NGAP PDU Session Modify transfer encoding

GTP-U Layer

- Refactored tunnel creation API: scalar fields instead of arrays
- Split tunnel creation into `n3_gtpu_create()` and
  `f1_drb_gtpu_create()`
- Added bearer-to-QFI mapping structure (`gtpv1u_rb_t`)
- Implemented QFI de-duplication and one-to-one QFI-to-bearer mapping
- Reduced inter-dependencies between LTE and NR

SDAP Layer

- Fixed default DRB tracking: Only one default DRB per SDAP entity per
  PDU session (TS 37.324)
- Set default DRB to first DRB added when creating bearers

F1AP Layer

- Added GBR QoS Flow Information IE handling in CU
- Implemented DRB QoS aggregation from multiple QoS flows
- Extended F1AP test cases to support multiple QoS flows

Code Quality Improvements

- Improved error handling throughout the stack
- Enhanced logging and debugging capabilities
- Added comprehensive unit tests for multi-QoS scenarios
- Improved type safety and validation

Testing

The code was validated with Open5gs v2.7.6, OAI CN5G and COTS UE.

How to reproduce with Open5gs:

1. Start Open5gs
2. From the Open5gs web UI: add multiple QFIs to the same DNN.
3. Restart Open5gs
4. Run gNB and UE

The user will see the following:

1. QoS flows arrive via NGAP PDU Session Setup/Modify requests, each
   with a QFI and 5QI.
2. The gNB assigns each flow to a DRB, creating a new DRB or reusing an
   existing one based on 5QI compatibility (compatible flows, i.e. same
   5QI characteristics, share a DRB)
3. At the SDAP layer, packets are tagged with QFI headers; at the GTP-U
   layer, uplink packets include QFI in the PDU Session Container for
   core network mapping.

Documentation

- Added comprehensive QoS flows handling documentation with 3GPP
  standards references
- Updated PDU Session Modify sequence diagrams

Note

* This implementation aligns with:
  - 3GPP TS 23.501 (QoS framework)
  - 3GPP TS 38.413 (NGAP)
  - 3GPP TS 37.324 (SDAP)
  - 3GPP TS 38.463 (F1AP)
  - 3GPP TS 29.281 (GTP-U)
  - 3GPP TS 38.331 (RRC)
* Multi-QoS and PDU Session Modify are both added to this MR since QoS
  flows update is triggered by PDU Session Modify in some scenarios
  (e.g. with Open5gs, used for validation).
* Core functional changes introduced by commits with prefix "QoS
  Handling" or "PDU Session Modify"
* This MR replaces the old !2703.
* This MR adopts relevant CU changes from !2836, namely:
  * Adds new shared QoS types
  * Add standardized 5QI table and helper
  * Dynamic5QI support + validation
  * Computation of DRB QoS (aggregate QoS) and priority/GBR
  * F1AP DRB-level QoS
* Closes #541 (5QI validation)
* Closes #1075 (Optional NAS-PDU in PDU Session Setup Request)

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
Reviewed-by: Rakesh Mundlamuri <rakesh.mundlamuri@openairinterface.org>
2026-05-07 14:52:10 +02:00
Jaroslava Fiedlerova
c42928773b CI: Add RAN-SA-FHI72-MPLANE-CN5G into CI doc
Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
2026-05-07 14:05:31 +02:00
Teodora Vladić
695cdb4b38 Update RU FW versions
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:05:31 +02:00
Teodora Vladić
9050b3eb3c Update Benetel FW to the latest stable
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:05:31 +02:00
Teodora Vladić
4ab102c680 [M-plane] Add new Benetel FW supported and reference the new CI pipeline
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-05-07 14:00:09 +02:00