Currently, the Infiniband stack does not support flow steering at the
verbs level. As a result, the only usage of flow steering in the
IB driver is for L2 multicast attaches. Thus, we need to add the IB case to
procedure mlx4_QP_FLOW_STEERING_ATTACH_wrapper() to allow IPoIB to work on
VFs over ConnectX3 when flow steering is enabled.

Currently, the IB case in mlx4_QP_FLOW_STEERING_ATTACH_wrapper()
is missing, so the procedure returns -EINVAL and IPoIB on VFs fails to operate.

Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
---
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Commit 7fb40f87... "net/mlx4_core: Add security check / enforcement for flow 
steering
rules set for VMs" left a hole which causes failures on multicast attaches done 
by SRIOV/IB
VFs over ConnectX3 when flow steering is enabled.  When it was submitted, 
SRIOV/IB was
not yet in the upstream kernel.

Additionally, the V2 patch set was submitted before 7fb40f87.., hence that 
commit needs
an adjustment for SRIOV/IB VF multicast attach support. 

diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c 
b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index ba6506f..926c911 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -3094,6 +3094,8 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev 
*dev, int slave,
                if (validate_eth_header_mac(slave, rule_header, rlist))
                        return -EINVAL;
                break;
+       case MLX4_NET_TRANS_RULE_ID_IB:
+               break;
        case MLX4_NET_TRANS_RULE_ID_IPV4:
        case MLX4_NET_TRANS_RULE_ID_TCP:
        case MLX4_NET_TRANS_RULE_ID_UDP:
-- 
1.7.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to