From patchwork Fri Apr 30 16:54:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Walukiewicz, Miroslaw" X-Patchwork-Id: 95915 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3UHGmpr009725 for ; Fri, 30 Apr 2010 17:16:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740Ab0D3RM6 (ORCPT ); Fri, 30 Apr 2010 13:12:58 -0400 Received: from mga09.intel.com ([134.134.136.24]:7839 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932725Ab0D3RMk (ORCPT ); Fri, 30 Apr 2010 13:12:40 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 30 Apr 2010 09:53:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.52,303,1270450800"; d="scan'208";a="617893605" Received: from cmsutil001.isw.intel.com ([10.237.237.10]) by orsmga001.jf.intel.com with ESMTP; 30 Apr 2010 09:54:19 -0700 Received: from gkslx010.igk.intel.com (gkslx010.igk.intel.com [172.28.168.161]) by cmsutil001.isw.intel.com (8.12.11.20060308/8.12.11/MailSET/Hub) with ESMTP id o3UGsTpr023629; Fri, 30 Apr 2010 17:54:29 +0100 Received: from gkslx010.igk.intel.com (localhost [127.0.0.1]) by gkslx010.igk.intel.com (8.13.6/8.12.8/MailSET/client) with ESMTP id o3UGsTis001835; Fri, 30 Apr 2010 18:54:29 +0200 Subject: [PATCH 1/2] RDMA/core: add support for iWarp multicast acceleration over IB_QPT_RAW_ETY QP type To: rdreier@cisco.com From: miroslaw.walukiewicz@intel.com Cc: linux-rdma@vger.kernel.org Date: Fri, 30 Apr 2010 18:54:29 +0200 Message-ID: <20100430165348.1386.77503.stgit@gkslx010.igk.intel.com> In-Reply-To: <20100430165249.1386.73960.stgit@gkslx010.igk.intel.com> References: <20100430165249.1386.73960.stgit@gkslx010.igk.intel.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 30 Apr 2010 17:16:49 +0000 (UTC) diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index a7da9be..b5023f2 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -887,9 +887,17 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) { if (!qp->device->attach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) - return -EINVAL; + switch (qp->device->node_type) { + case RDMA_TRANSPORT_IB: + if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) + return -EINVAL; + break; + case RDMA_TRANSPORT_IWARP: + if (qp->qp_type != IB_QPT_RAW_ETY) + return -EINVAL; + break; + } return qp->device->attach_mcast(qp, gid, lid); } EXPORT_SYMBOL(ib_attach_mcast); @@ -898,9 +906,17 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) { if (!qp->device->detach_mcast) return -ENOSYS; - if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) - return -EINVAL; + switch (qp->device->node_type) { + case RDMA_TRANSPORT_IB: + if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) + return -EINVAL; + break; + case RDMA_TRANSPORT_IWARP: + if (qp->qp_type != IB_QPT_RAW_ETY) + return -EINVAL; + break; + } return qp->device->detach_mcast(qp, gid, lid); } EXPORT_SYMBOL(ib_detach_mcast);