Skip to content

Commit 495cd38

Browse files
lrw514raslandarawsheh
authored andcommitted
net/mlx5: fix invalid queue index handling
When failing to allocate a meter HW resource, PMD may use an invalid index to release the job. Fixes: 4359d9d ("net/mlx5: fix sync meter processing in HWS") Cc: [email protected] Cc: [email protected] Signed-off-by: Rongwei Liu <[email protected]> Acked-by: Dariusz Sosnowski <[email protected]>
1 parent 4fde3b5 commit 495cd38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/mlx5/mlx5_flow_hw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,8 @@ flow_hw_meter_mark_compile(struct rte_eth_dev *dev,
19341934
aso_mtr = flow_hw_meter_mark_alloc(dev, queue, action, job,
19351935
true, error);
19361936
if (!aso_mtr) {
1937+
if (queue == MLX5_HW_INV_QUEUE)
1938+
queue = CTRL_QUEUE_ID(priv);
19371939
flow_hw_job_put(priv, job, queue);
19381940
return -1;
19391941
}

0 commit comments

Comments
 (0)