summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2015-06-11 14:47:30 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-11 15:55:25 -0700
commit796a27ec2d9f722ce5a08bd5b33f3c7712fb6127 (patch)
treea639230fc89fdc87a34e29ddc6fa0feb971a7191 /drivers/net/ethernet/mellanox
parentcd58c714acb98a186051dc7e620d1b7ef4843311 (diff)
downloadlinux-796a27ec2d9f722ce5a08bd5b33f3c7712fb6127.tar.bz2
net/mlx5e: Enforce max flow-tables level >= 3
The Ethernet driver requires at least 3 flow table levels to operate, enforce that. Signed-off-by: Gal Pressman <galp@mellanox.com> 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')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 9cc321a3acdf..5d480da801ce 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1663,7 +1663,10 @@ static int mlx5e_check_required_hca_cap(struct mlx5_core_dev *mdev)
!MLX5_CAP_ETH(mdev, csum_cap) ||
!MLX5_CAP_ETH(mdev, max_lso_cap) ||
!MLX5_CAP_ETH(mdev, vlan_cap) ||
- !MLX5_CAP_ETH(mdev, rss_ind_tbl_cap)) {
+ !MLX5_CAP_ETH(mdev, rss_ind_tbl_cap) ||
+ MLX5_CAP_FLOWTABLE(mdev,
+ flow_table_properties_nic_receive.max_ft_level)
+ < 3) {
mlx5_core_warn(mdev,
"Not creating net device, some required device capabilities are missing\n");
return -ENOTSUPP;