|SUCCESS| [2/2] net/mlx5: skip DevX Tx memory allocation for Verbs
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 20 19:07:48 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/171748
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-20
# DPDK Patch Review
## PATCH 1/2: net/mlx5: distinguish DevX availability from DevX use
### ERRORS
None identified.
### WARNINGS
None identified.
### INFO
**Code structure improvement**
The patch introduces a clearer separation between "DevX is available on the device" (`mlx5_devx_available()`) and "the port selected DevX object operations" (`mlx5_devx_obj_ops_en()`). This is a sound design that fixes a Windows port issue where DevX was available but not used due to missing Dest TIR support, yet LRO was incorrectly disabled.
**External queue allocation move**
The external queue allocation block moved from before `priv->obj_ops` assignment to after it. The new location checks `mlx5_devx_obj_ops_en(priv)` which depends on `priv->obj_ops.devx` being set. This is correct: the allocation now happens only when DevX object operations are confirmed, and the dependency order is satisfied.
**Function parameter change**
`txq_calc_wqebb_cnt()` lost its `bool devx` parameter and now calls `mlx5_devx_obj_ops_en(txq_ctrl->priv)` internally. The single call site in `mlx5_txq_new()` previously passed `!!mlx5_devx_obj_ops_en(priv->sh)` (old function, checking shared context). The new internal call checks `txq_ctrl->priv->obj_ops.devx` (per-port flag). At the time `txq_calc_wqebb_cnt()` runs, `priv->obj_ops` has been set by `mlx5_dev_spawn()`, so this is safe.
**Ordering in mlx5_dev_spawn()**
The `priv->obj_ops` assignment moved earlier (line 1800-1813 in the new code). The external queue allocation that depends on it moved to after the assignment (line 1820-1839). This is correct sequencing.
**LRO check fix**
In `mlx5_shared_dev_ctx_args_config()`, the LRO capability check changed from `mlx5_devx_obj_ops_en(sh)` to `mlx5_devx_available(sh)`. This is the core fix: LRO depends on hardware capability (DevX available), not on whether the port chose DevX operations. Windows ports can now enable LRO even when using Verbs.
---
## PATCH 2/2: net/mlx5: skip DevX Tx memory allocation for Verbs
### ERRORS
None identified.
### WARNINGS
None identified.
### INFO
**Fixes tag present**
The patch includes a `Fixes:` tag and `Cc: stable at dpdk.org`, indicating this is a backport-candidate bug fix. Appropriate for the nature of the change (allocation failure on legacy NICs).
**Allocation guard extended**
The condition in `mlx5_dev_allocate_consec_tx_mem()` added `|| !mlx5_devx_obj_ops_en(priv)` to the existing `priv->sh->config.txq_mem_algn == 0` check. This skips consecutive DevX Tx memory allocation when the port uses Verbs, letting Verbs handle memory allocation instead. Prevents allocation failure on NICs that don't support or didn't select DevX object operations.
**Series dependency**
This patch depends on Patch 1/2 introducing `mlx5_devx_obj_ops_en(priv)` and the `devx` field in `mlx5_obj_ops`. Applied alone it would fail to compile. Series ordering is correct.
---
Review-Result: CLEAN
More information about the test-report
mailing list