aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2013-03-06 22:46:52 -0500
committerDavid S. Miller <davem@davemloft.net>2013-03-07 15:52:03 -0500
commit3fb817f1cd54bedd23e8913051473d574a0f1717 (patch)
treebc57e481e8a5b661294c642d99497e7cccdac6ed /drivers/net/ethernet/mellanox
parent43b18db8a27fcd28c2bd290adf031ca04ea573ce (diff)
net/mlx4_core: Disable mlx4_QP_ATTACH calls from guests if the host uses flow steering
Guests kernels may not correctly detect if DMFS (device-enabled flow steering) is activated by the host. If DMFS is activated, the master should return error to guests which try to use the B0-steering flow calls (mlx4_QP_ATTACH). Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> 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/mlx4/resource_tracker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 083fb48dc3d7..2995687f1aee 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2990,6 +2990,9 @@ int mlx4_QP_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
2990 u8 steer_type_mask = 2; 2990 u8 steer_type_mask = 2;
2991 enum mlx4_steer_type type = (gid[7] & steer_type_mask) >> 1; 2991 enum mlx4_steer_type type = (gid[7] & steer_type_mask) >> 1;
2992 2992
2993 if (dev->caps.steering_mode != MLX4_STEERING_MODE_B0)
2994 return -EINVAL;
2995
2993 qpn = vhcr->in_modifier & 0xffffff; 2996 qpn = vhcr->in_modifier & 0xffffff;
2994 err = get_res(dev, slave, qpn, RES_QP, &rqp); 2997 err = get_res(dev, slave, qpn, RES_QP, &rqp);
2995 if (err) 2998 if (err)