|SUCCESS| net/mlx5: fix HWS meter ASO SQ leak on multi-port init

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sun Oct 18 11:28:01 CEST 2026


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

_AI Code Review_

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

# DPDK Patch Review

## ERRORS

None.

## WARNINGS

None.

## INFO

### Pre-existing Code Observations

**Resource cleanup asymmetry** (pre-existing, not introduced by this patch):

The comment added in `mlx5_flow_meter_uninit()` correctly notes that `pools_mng->sq` is shared across ports and must not be destroyed when one port closes. However, the corresponding creation path in `mlx5_aso_mtr_queue_init()` does not have a reference count or similar mechanism to track how many ports are using the shared queue.

This means:
- If `mlx5_aso_mtr_queue_init()` fails after creating the shared `pools_mng->sq` but before completing initialization, the error path may not properly clean up the queue
- The queue lifetime is tied to the shared context `mlx5_aso_flow_mtrs_mng_close()` as documented, which is correct for the happy path

Consider adding a comment in `mlx5_aso_mtr_queue_init()` near the `pools_mng->sq` creation noting that cleanup on error is handled by the shared context teardown, or add explicit error handling if partial initialization is possible.

This is informational only--the patch correctly fixes the leak it targets and does not make the error handling worse.

Review-Result: CLEAN


More information about the test-report mailing list