]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix sibling device config check
authorMichael Baum <michaelba@nvidia.com>
Mon, 14 Feb 2022 09:34:52 +0000 (11:34 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 21 Feb 2022 10:36:32 +0000 (11:36 +0100)
commitdcbaafdc8f70987c6b610af7d43817b560fb646b
tree27390a57576f21827c99e8dbac2e41e6ca71ba11
parenta4ba773679231264e4077824358260c6583cc874
net/mlx5: fix sibling device config check

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")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/windows/mlx5_os.c