From patchwork Mon Sep 24 23:55:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Hefty X-Patchwork-Id: 186614 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A3C4E2C00C4 for ; Tue, 25 Sep 2012 09:55:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751900Ab2IXXzl (ORCPT ); Mon, 24 Sep 2012 19:55:41 -0400 Received: from mga03.intel.com ([143.182.124.21]:31881 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624Ab2IXXzh convert rfc822-to-8bit (ORCPT ); Mon, 24 Sep 2012 19:55:37 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 24 Sep 2012 16:55:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,478,1344236400"; d="scan'208";a="196595292" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by azsmga001.ch.intel.com with ESMTP; 24 Sep 2012 16:55:35 -0700 Received: from orsmsx108.amr.corp.intel.com (10.22.225.41) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.1.355.2; Mon, 24 Sep 2012 16:55:34 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.152]) by ORSMSX108.amr.corp.intel.com ([169.254.9.202]) with mapi id 14.01.0355.002; Mon, 24 Sep 2012 16:55:34 -0700 From: "Hefty, Sean" To: "linux-rdma (linux-rdma@vger.kernel.org)" , "netdev@vger.kernel.org" Subject: [PATCH 15/26 v3] rdma/cm: Only listen on IB devices when using AF_IB Thread-Topic: [PATCH 15/26 v3] rdma/cm: Only listen on IB devices when using AF_IB Thread-Index: Ac2ajl0Gqk2DAnW4Q6G3iH0uhPL/6w== Date: Mon, 24 Sep 2012 23:55:33 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A8237346A8F115@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If an rdma_cm_id is bound to AF_IB, with a wild card address, only listen on IB devices. Signed-off-by: Sean Hefty --- resending with netdev copied drivers/infiniband/core/cma.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 13423bb..d7bc654 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1671,6 +1671,10 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv, struct rdma_cm_id *id; int ret; + if (cma_family(id_priv) == AF_IB && + rdma_node_get_transport(cma_dev->device->node_type) != RDMA_TRANSPORT_IB) + return; + id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps, id_priv->id.qp_type); if (IS_ERR(id))