|SUCCESS| [v14, 23/23] doc: update release notes with NXP DPAA changes

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Aug 20 17:12:09 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/168146

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-20

# DPAA Patch Series Review

Reviewing 23 patches in series for DPDK DPAA driver against coding standards and contribution guidelines.

---

## Patch 01/23: net/dpaa: fix device remove

**Findings:**

### Errors
None.

### Warnings
None.

### Info
The patch fixes device remove logic by checking `eth_dev` and `state` before attempting close. The old code called `dpaa_eth_dev_close()` twice unconditionally, which could attempt to close an already-closed or non-existent device. The new logic is correct: check if the device exists and is not already unused, then close once and release. The removal of the never-read `ret = dpaa_eth_dev_close(eth_dev);` assignment eliminates a dead store. No issues.

---

## Patch 02/23: net/dpaa: fix free port resources on close

**Findings:**

### Errors
None.

### Warnings
None.

### Info
The patch fixes a memory leak by freeing `dpaa_intf->tx_conf_queues` in `dpaa_eth_dev_close()` and on error in `dpaa_dev_init()`. The allocation occurs unconditionally in `dpaa_dev_init()` but was never freed. The patch also fixes the early return logic for offline/ONIC ports: instead of `return 0` before the cleanup section, it uses `goto clean_1`, ensuring that common cleanup (freeing `fc_conf`, congestion groups, and now `tx_conf_queues`) still runs. The cleanup is correctly gated per resource (e.g., `cgr_rx` freed only if non-NULL). No issues.

---

## Patch 03/23: bus/dpaa: fix FQD dest wq channel decoding

**Findings:**

### Errors
None.

### Warnings
None.

### Info
The patch corrects the bitfield extraction of `dest_wq`: previously it extracted bits 0..2 as channel and 3..15 as wq, but the hardware layout is wq=bits 2..0, channel=bits 15..3. The new helpers `qm_fqd_get_chan()` and `qm_fqd_get_wq()` extract the correct fields. The pool-channel range check is updated in a later patch; this patch only fixes the decoding. The fix is correct. No issues.

---

## Patch 04/23: bus/dpaa: refine fman naming

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Renames `ccsr_map` to `memac_map` and `bmi_map` to `rx_bmi_map` for clarity. The names now reflect that these map MEMAC and Rx BMI register spaces respectively, not generic CCSR or both Rx and Tx BMI. The renaming is mechanical and correct. No functional change. No issues.

---

## Patch 05/23: bus/dpaa: scan max BPID from DTS

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Reads the pool channel range from the device tree (`fsl,bpid-range`) and stores the start and count in `bman_pool_max`. Validates that the property has exactly two items. Initializes `bman_ccsr_map` by finding and mapping the `fsl,bman` node. Error paths are handled correctly (returning -ENODEV or the ioctl error code). No issues.

---

## Patch 06/23: drivers: add process-type guards for secondary process

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds `rte_eal_process_type() != RTE_PROC_PRIMARY` checks to `dpaa_qdma_init()` and `rte_dpaa_remove()` so that secondary processes skip hardware initialization. The guards prevent segfaults when secondary processes try to access hardware registers that are only mapped in the primary. The return logic is correct: secondary processes return 0 (success) from `dpaa_qdma_init()` after doing nothing, and return the result of `rte_eth_dev_release_port()` from `rte_dpaa_remove()`. No issues.

---

## Patch 07/23: drivers: shutdown DPAA FQ by fq descriptor

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Changes `qman_shutdown_fq()` to accept a `struct qman_fq *` instead of a raw `fqid`, allowing it to use the FQ's associated portal (`fq->qp`) for channel-affine portals. Introduces `qman_shutdown_fq_by_fqid()` wrapper for callers that only have an fqid. The `rx_queue_setup` call site is updated to use the wrapper and check the return value. No issues. (One call site uses the wrapper but does not propagate the error; it logs and continues, which is acceptable for a "try to clean up stale FQs" case.)

---

## Patch 08/23: drivers: add DPAA cgrid cleanup support

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds `qman_pending_fq_by_cgrid()` to find FQs still attached to a CGR, allowing the driver to shut down stale FQs before releasing the CGRID. The function queries the CGR's `i_bcnt` to skip the scan when the CGR is idle. The `dev_close()` path is updated to call `dpaa_cgr_stale_fq_cleanup()` for each CGR, then `qman_release_cgrid_range()` after deleting all CGRs. The `dev_init()` error path is updated to delete any created CGRs and release the CGRID range on failure. The counters `nb_rx_cgr` and `nb_tx_cgr` track how many were successfully created so that only those are deleted on error. The boolean flags `rx_cgrid_allocated` and `tx_cgrid_allocated` track whether the CGRID range was reserved (so it is released only once, even if zero CGRs were created). The cleanup logic is correct and avoids double-release or dangling CGR pointers. No issues.

---

## Patch 09/23: bus/dpaa: improve FQ shutdown with channel validation

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Replaces the hardcoded pool channel range check with DTS-derived values (`dpaa_get_qm_channel_pool()` and `dpaa_get_qm_channel_pool_num()`). The old code checked `channel >= qm_channel_pool1 && channel < qm_channel_pool1 + 15` but always failed because `qm_channel_pool1` is a `static u16` in `qman_driver.c` and the comparison was against a stale default. The new code reads the actual pool channel start and count from the device tree (`pool-channel-range` property), validates it, and uses those values in `qman_shutdown_fq()`. The logic for pool-channel FQs is updated: instead of checking portal affinity (which could never succeed), the code simply subscribes to the pool channel via SDQCR, drains the queue, and restores the portal's original SDQCR. The drain loop now checks `found_fqrn` returned by `qm_mr_drain()` instead of a manually set flag. The restored SDQCR is written unconditionally, not gated on the channel type. The patch is correct. No issues.

---

## Patch 10/23: drivers: add BMI Tx statistics

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds Tx BMI statistics counters (`fmbm_tfrc`, `fmbm_tfdc`, `fmbm_tfledc`, `fmbm_tfufdc`, `fmbm_tbdc`) to `fman_if_bmi_stats_get_all()`, `fman_if_bmi_stats_reset()`, and `fman_if_bmi_stats_enable()`. Extends `dpaa_xstats_strings[]` with the new Tx BMI entries. Adjusts `DPAA_BMI_XSTATS_COUNT` to match the new total. The functions that read/write BMI registers now check if the register block is mapped (either `regs` or `tx_regs` may be NULL depending on port type) and report zero for unmapped blocks. The loop indices in `dpaa_dev_xstats_get()` and `dpaa_xstats_get_by_id()` are updated to use `DPAA_BMI_XSTATS_COUNT` instead of the hardcoded `bmi_count - 1` calculation. The static assert verifies that the count matches the structure sizes. No issues.

---

## Patch 11/23: net/dpaa: optimize FM deconfig

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Consolidates FM deconfiguration to a single location in `dpaa_eth_dev_close()`. The old code called `dpaa_fm_deconfig()` twice: once before releasing congestion groups and once after. The new code calls it once, after the port-shared check but before releasing FQs. The `fc_conf` is also set to NULL after freeing to avoid potential use-after-free. The VSP cleanup is moved to run before the CGR/FQ cleanup. The re-ordering is safe because the FM port must be disabled before cleaning up its queues. No issues.

---

## Patch 12/23: net/dpaa: optimize FMC MAC type parsing

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Replaces the MAC type and port number parsing logic in `dpaa_port_fmc_port_parse()` with a call to `dpaa_port_fmc_get_idx_from_name()` that extracts the index directly from the FMC port name string (`MAC/N` or `OFFLINE/N`). The old code checked `pport->type` and computed `num = pport->number + START_IDX`, but on LS1046A MAC9/MAC10 can have varying types (10G/2.5G/1G) depending on SerDes config, making the type-based approach fragile. The new code parses the numeric suffix in the name string using `strtol()` with proper error checking (end pointer, errno, remaining characters). After extracting the index, the function validates the MAC type matches the port type (e.g., `fman_mac_1g` must be `e_FM_PORT_TYPE_RX`). The match is done by comparing `fif->mac_idx` (the numeric index from the device tree) against the parsed index from the FMC port name. The logic is correct and handles the ls104xa multi-rate MAC case. No issues.

---

## Patch 13/23: drivers: release DPAA bpid on driver destructor

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Tracks allocated BPIDs in a static per-BPID flag table (`s_dpaa_bpid_allocated_flag[]`) and registers a driver destructor (`dpaa_mpool_finish()` at priority 104) that releases any BPIDs still marked as in use at process exit. When a mempool is created, the BPID and flags are recorded in the table; when freed, the entry is cleared. The destructor also frees `rte_dpaa_bpid_info` (the shared hugepage memory) once at process teardown instead of per-mempool, avoiding leaving secondary processes with dangling pointers. The `bman_free_bpid()` helper is added to encapsulate the BPID release (clearing thresholds if needed, releasing the BPID to the allocator). The mempool cache flush threshold is tuned to `DPAA_MBUF_MAX_ACQ_REL` so buffers are returned to hardware in optimal burst sizes. No issues. (The comment in `dpaa_mbuf_free_pool()` correctly explains why `rte_dpaa_bpid_info` is not freed there.)

---

## Patch 14/23: dma/dpaa: add devargs for SG and errata workaround

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds four device arguments to control existing driver features at runtime: `dpaa_dma_err_check` (already existed), `dpaa_dma_sg_disable` (disables scatter-gather batching), `dpaa_dma_data_validation` (enables post-DMA read-back-and-compare validation), and `dpaa_dma_pci_read_disable` (skips the ERR050757 read-transaction-type and stride programming when built with `RTE_DMA_DPAA_ERRATA_ERR050757`). The scatter-gather, validation, and ERR050757 features are all pre-existing in the driver; this patch only makes them configurable. The SG disable logic is correct: when `s_sg_enable` is false, `fsl_qdma_enqueue_desc()` submits each pending descriptor individually instead of batching. The ERR050757 programming is gated on `s_pci_read`. The data validation is gated on `s_data_validation`. The `dma_pool_alloc()` change to accept NULL `phy_addr` is safe (the caller in this patch does not pass NULL, but future callers may). The documentation is updated to describe the new devargs. No issues.

---

## Patch 15/23: net/dpaa: support Rx/Tx taildrop threshold devarg

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds `drv_rx_taildrop` and `drv_tx_taildrop` device arguments to configure the frame queue taildrop thresholds at device probe time. The existing `DPAA_TX_TAILDROP_THRESHOLD` environment variable is still supported as a fallback. The devarg parsing helper `dpaa_get_devargs_int()` correctly uses `rte_kvargs_parse()` and `rte_kvargs_process()` to extract the integer value. The value is clamped to `UINT16_MAX` if too large. The default Rx threshold (`CGR_RX_PERFQ_THRESH`) is used if the devarg is absent. The Tx threshold defaults to 0 (disabled) unless set via devarg or env var. The logic is correct. No issues.

---

## Patch 16/23: net/dpaa: support fmcless rxq number as devargs

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds `drv_fmcless_rxq` device argument to set the number of Rx queues in FMCLESS mode (when no FMC configuration is present). The old default was `rte_lcore_count()`, the new default is `DPAA_MAX_NUM_PCD_QUEUES`. The value is validated: must be >= 1 and <= `DPAA_MAX_NUM_PCD_QUEUES`. The devarg parsing reuses the same `dpaa_get_devargs_int()` helper. The FMC case is unchanged. The logic is correct. No issues.

---

## Patch 17/23: net/dpaa: support non fmX-macY type of shared Ethernet name

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Adds `drv_sh_if_name` device argument to provide the kernel Linux interface name for a shared MAC when it differs from the `fmX-macY` style name used by DPDK. The devarg parsing helper `dpaa_get_devargs_str()` is implemented analogously to the integer version: it uses `rte_kvargs_parse()`, `rte_kvargs_process()`, and a custom `parse_str_devarg_handler()` that stores the string pointer. The value is copied into the caller's buffer via `rte_strscpy()` to ensure bounds. The `dpaa_eth_dev_configure()` path reads the devarg (if present) and uses it as the interface name for the `ioctl()` call; otherwise it falls back to `dpaa_intf->name`. The devarg value is not persistent (it is only used during configure). The logic is correct. No issues.

---

## Patch 18/23: bus/dpaa: optimize DPAA multi-entry buffer pool operations

**Findings:**

### Errors
None.

### Warnings
None.

### Info
Replaces the hardcoded `8` with `FSL_BM_BURST_MAX` when acquiring buffers from the buffer pool. Adds a


More information about the test-report mailing list