OSDN Git Service

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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 19:18:36 +0000 (11:18 -0800)
commitd421e466c2373095f165ddd25cbabd6c5b077928
tree4164f2fd5710f5189491f05f97bb010814dd8d25
parentb336e6b25e2d053c482ee4339787e6428f390864
net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering

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>
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