diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2018-05-31 11:16:18 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-06-27 01:26:29 +0300 |
commit | 0efc8562491b7d36f6bbc4fbc8f3348cb6641e9c (patch) | |
tree | a90ddb33dfba78270d7292955185b3eb2bfc08f1 /include/linux/mlx5/eswitch.h | |
parent | 8ffd569aaa818f2624ca821d9a246342fa8b8c50 (diff) | |
download | linux-0efc8562491b7d36f6bbc4fbc8f3348cb6641e9c.tar.xz |
net/mlx5: E-Switch, Avoid setup attempt if not being e-switch manager
In smartnic env, the host (PF) driver might not be an e-switch
manager, hence the FW will err on driver attempts to deal with
setting/unsetting the eswitch and as a result the overall setup
of sriov will fail.
Fix that by avoiding the operation if e-switch management is not
allowed for this driver instance. While here, move to use the
correct name for the esw manager capability name.
Fixes: 81848731ff40 ('net/mlx5: E-Switch, Add SR-IOV (FDB) support')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Guy Kushnir <guyk@mellanox.com>
Reviewed-by: Eli Cohen <eli@melloanox.com>
Tested-by: Eli Cohen <eli@melloanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5/eswitch.h')
-rw-r--r-- | include/linux/mlx5/eswitch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h index d3c9db492b30..fab5121ffb8f 100644 --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h @@ -8,6 +8,8 @@ #include <linux/mlx5/driver.h> +#define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager) + enum { SRIOV_NONE, SRIOV_LEGACY, |