net/mlx5: fix invalid queue index handling
PATCH 1/1 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 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")
Signed-off-by Rongwei Liu <[email protected]>
--- drivers/net/mlx5/mlx5_flow_hw.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_hw.c +2 -0
@@ -1934,6 +1934,8 @@ flow_hw_meter_mark_compile(struct rte_eth_dev *dev, aso_mtr =flow_hw_meter_mark_alloc (dev, queue, action, job, true, error);if (!aso_mtr) { +if (queue ==MLX5_HW_INV_QUEUE ) + queue =CTRL_QUEUE_ID (priv);flow_hw_job_put (priv, job, queue);return -1 ; }
Signature · 1 line
2.27.0
Hi,
Quoted 10 lines · Rongwei Liu
When failing to allocate a meter HW resource,
PMD may use an invalid index to release the job.Fixes 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")Signed-off-by Rongwei Liu <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh