|SUCCESS| net/mlx5: fix HWS sample action table leak on quit

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sun Aug 16 10:42:06 CEST 2026


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

_AI Code Review_

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

# DPDK Patch Review

## Summary
This patch fixes a resource leak in the mlx5 PMD's HWS (Hardware Steering) sample action cleanup path. The issue occurs when destroying mirror actions on port close: releasing clone destinations before destroying the composite dest_array action can lead to firmware flow table leaks.

## Findings

### Errors
None.

### Warnings
None.

### Info

**Code comment clarity:**
The added comment is helpful and explains the resource ordering requirement. However, the phrase "sample action" in the commit subject doesn't match the code, which deals with mirror actions. The commit subject says "HWS sample action table leak" but the function is `mlx5_hw_mirror_destroy()` and the fixed issue is in mirror action cleanup. Consider aligning the terminology between commit message and code context for clarity.

**Correctness verification:**
The fix appears correct. The reordering ensures that:
1. The composite `dest_array` action (which holds references to clone destinations) is destroyed first
2. Clone destinations (including JUMP targets that may hold the last reference to group tables) are released second
3. This prevents the scenario where destroying a clone drops a table reference while `dest_array` still points at it

The comment accurately describes why this ordering matters.

## Conclusion
The patch correctly fixes the resource leak by reordering cleanup operations. The implementation is sound. Only minor comment: the commit subject mentions "sample action" while the code deals with "mirror action" - consider terminology consistency for future reference, though this doesn't block the patch.


More information about the test-report mailing list