[PATCH 20.11] net/mlx5: fix sibling device config check

Luca Boccassi bluca at debian.org
Mon Mar 7 21:17:42 CET 2022


On Mon, 2022-03-07 at 20:29 +0200, Michael Baum wrote:
> [ upstream commit dcbaafdc8f70987c6b610af7d43817b560fb646b ]
> 
> The MLX5 net driver supports "probe again". In probing again, it
> creates a new ethdev under an existing infiniband device context.
> 
> Sibling devices sharing infiniband device context should have compatible
> configurations, so some of the devargs given in the probe again, the
> ones that are mainly relevant to the sharing device context are sent to
> the mlx5_dev_check_sibling_config function which makes sure that they
> compatible its siblings.
> However, the arguments are adjusted according to the capability of the
> device, and the function compares the arguments of the probe again
> before the adjustment with the arguments of the siblings after the
> adjustment. A user who sends the same values to all siblings may fail in
> this comparison if he requested something that the device does not
> support and adjusted.
> 
> This patch moves the call to the mlx5_dev_check_sibling_config function
> after the relevant adjustments.
> 
> Fixes: 92d5dd483450 ("net/mlx5: check sibling device configurations mismatch")
> Fixes: 2d241515ebaf ("net/mlx5: add devarg for extensive metadata support")
> 
> Signed-off-by: Michael Baum <michaelba at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 53 +++++++++++++++++---------------
>  1 file changed, 29 insertions(+), 24 deletions(-)

Thanks, applied and pushed.

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list