net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 3 Dec 2020 04:39:46 +0000 (20:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:40:27 +0000 (10:40 +0100)
commit2598dd80b80142f9d89c12f770d0c52ee2f68ce2
treec59744ce0f7be4727ab53ac9206874d5e95bc76a
parent8f92330b08735e9a75ef1a8f6721c8ac51d03afb
net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering

[ Upstream commit d421e466c2373095f165ddd25cbabd6c5b077928 ]

STEs format for Connect-X5 and Connect-X6DX different. Currently, on
Connext-X6DX the SW steering would break at some point when building STEs
w/o giving a proper error message. Fix this by checking the STE format of
the current device when initializing domain: add mlx5_ifc definitions for
Connect-X6DX SW steering, read FW capability to get the current format
version, and check this version when domain is being created.

Fixes: 26d688e33f88 ("net/mlx5: DR, Add Steering entry (STE) utilities")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
include/linux/mlx5/mlx5_ifc.h