|SUCCESS| [2/2] vdpa/mlx5: fix RQT attributes memory leak

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sun Oct 25 09:47:19 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-25

# DPDK Patch Review

## Patch 1/2: vdpa/mlx5: fix RSS flow leak on steering update failure

### Errors

None identified.

### Warnings

None identified.

### Info

None identified.

---

## Patch 2/2: vdpa/mlx5: fix RQT attributes memory leak

### Errors

None identified.

### Warnings

None identified.

### Info

None identified.

---

# Summary

Both patches address resource leaks introduced by the same commit (9f09b1ca15c5).

**Patch 1/2** fixes a leak of software-steering objects (matcher, TIR, TIR action, flow) when `mlx5_vdpa_rss_flows_create()` fails partway through and is called from `mlx5_vdpa_virtq_enable()`. The fix correctly adds cleanup (`mlx5_vdpa_rss_flows_destroy()`) on the error path within `mlx5_vdpa_steer_update()` itself, ensuring all callers are covered. The cleanup function is safe to call on partially initialized objects (checks each for NULL), so the existing `steer_unset()` call in `steer_setup()`'s error path remains a no-op and does not introduce a double-free.

**Patch 2/2** fixes a memory leak where `mlx5_vdpa_rqt_prepare()` allocates RQT attributes with `rte_zmalloc()` but returns early without freeing them when no enabled receive queue is found. The fix adds `rte_free(attr)` before the early return, correctly releasing the allocation.

Both patches:
- Target stable (appropriate for bug fixes)
- Have clear commit messages matching the code changes
- Make minimal, focused changes to fix the identified leaks
- Do not introduce new issues

Review-Result: CLEAN


More information about the test-report mailing list