From patchwork Wed Oct 3 15:38:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jackm X-Patchwork-Id: 1542361 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BA473DFF71 for ; Wed, 3 Oct 2012 15:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964809Ab2JCPjH (ORCPT ); Wed, 3 Oct 2012 11:39:07 -0400 Received: from eu1sys200aog116.obsmtp.com ([207.126.144.141]:58524 "HELO eu1sys200aog116.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932574Ab2JCPjG (ORCPT ); Wed, 3 Oct 2012 11:39:06 -0400 Received: from mtlsws123.lab.mtl.com ([82.166.227.17]) (using TLSv1) by eu1sys200aob116.postini.com ([207.126.147.11]) with SMTP ID DSNKUGxcFJpnWxcGG81/Xdpor/U7BWmhEWB7@postini.com; Wed, 03 Oct 2012 15:39:05 UTC Received: from r-vnc04.lab.mtl.com (r-vnc04.lab.mtl.com [10.208.0.116]) by mtlsws123.lab.mtl.com (8.13.8/8.13.8) with ESMTP id q93FcwLw025972; Wed, 3 Oct 2012 17:38:59 +0200 From: Jack Morgenstein To: roland@purestorage.com Cc: linux-rdma@vger.kernel.org, yevgenyp@mellanox.com, ogerlitz@mellanox.com, Jack Morgenstein Subject: [PATCH] net/mlx4_core: Adjust the flow steering attach wrapper so that VFs work under SRIOV/IB Date: Wed, 3 Oct 2012 17:38:48 +0200 Message-Id: <1349278729-3284-1-git-send-email-jackm@dev.mellanox.co.il> X-Mailer: git-send-email 1.7.8.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 Signed-off-by: Or Gerlitz --- .../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: