diff options
author | Saeed Mahameed <saeedm@mellanox.com> | 2015-12-01 16:03:19 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-03 17:08:46 (GMT) |
commit | 495716b191f607b2cb2175f7499966daef79f663 (patch) | |
tree | 1dd6be22aafd57d6be6b86c67f620d40f8cb1b02 /drivers/net/ethernet/mellanox/mlx5/core/fw.c | |
parent | 073bb189a41d7bbad509b576a690611c46c4858f (diff) | |
download | linux-495716b191f607b2cb2175f7499966daef79f663.tar.xz |
net/mlx5: E-Switch, Introduce FDB hardware capabilities
Define needed hardware structures and capabilities needed
for E-Switch FDB flow tables and read them on driver load.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fw.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fw.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c index 9335e5a..bf6e3df 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c @@ -160,6 +160,19 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev) if (err) return err; } + + if (MLX5_CAP_GEN(dev, vport_group_manager) && + MLX5_CAP_GEN(dev, eswitch_flow_table)) { + err = mlx5_core_get_caps(dev, MLX5_CAP_ESWITCH_FLOW_TABLE, + HCA_CAP_OPMOD_GET_CUR); + if (err) + return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_ESWITCH_FLOW_TABLE, + HCA_CAP_OPMOD_GET_MAX); + if (err) + return err; + } + return 0; } |