[PATCH 1/2] vdpa/mlx5: fix RSS flow leak on steering update failure
Maxime Coquelin
maxime.coquelin at redhat.com
Tue Nov 10 15:58:04 CET 2026
On Sun, Oct 25, 2026 at 9:17 AM Maayan Kashani <mkashani at nvidia.com> wrote:
>
> mlx5_vdpa_steer_update() calls mlx5_vdpa_rss_flows_create() which, on
> failure, leaves behind any RSS steering objects (matcher, TIR, TIR
> action, flow) it managed to create before the error, relying on the
> caller to release them.
>
> mlx5_vdpa_steer_setup() honors that contract by calling
> mlx5_vdpa_steer_unset() on its error path, but mlx5_vdpa_virtq_enable()
> only logs a warning and continues when mlx5_vdpa_steer_update() fails.
> As a result, every failed steering update triggered from the virtq
> enable/disable path leaks the partially created software-steering
> objects. Over many reconfiguration cycles this exhausts the kernel
> software-steering (DR) resources and later probes fail with
> "Failed to create Rx domain".
>
> Free the partial RSS flows in mlx5_vdpa_steer_update() itself so that
> all callers are covered regardless of how they handle the return value.
> mlx5_vdpa_rss_flows_destroy() checks each object for NULL, so the
> subsequent steer_unset() on the steer_setup() error path stays a safe
> no-op.
>
> Fixes: 9f09b1ca15c5 ("vdpa/mlx5: recreate a virtq becoming enabled")
> Cc: stable at dpdk.org
>
> Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> ---
> drivers/vdpa/mlx5/mlx5_vdpa_steer.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied to next-virtio/for-next-net.
Thanks,
Maxime
More information about the dev
mailing list