From patchwork Wed Jan 13 14:51:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sebastien dugue X-Patchwork-Id: 72650 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0DEwLZv028180 for ; Wed, 13 Jan 2010 14:58:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755575Ab0AMO6V (ORCPT ); Wed, 13 Jan 2010 09:58:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755561Ab0AMO6V (ORCPT ); Wed, 13 Jan 2010 09:58:21 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:40634 "EHLO ecfrec.frec.bull.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755575Ab0AMO6T (ORCPT ); Wed, 13 Jan 2010 09:58:19 -0500 Received: from cyclope.frec.bull.fr (cyclope.frec.bull.fr [129.183.4.9]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id CD83C7019F; Wed, 13 Jan 2010 15:58:10 +0100 (CET) Received: from frecb007965 (frecb007965.frec.bull.fr [129.183.101.36]) by cyclope.frec.bull.fr (Postfix) with ESMTP id A786B27291; Wed, 13 Jan 2010 15:58:08 +0100 (CET) Date: Wed, 13 Jan 2010 15:51:50 +0100 From: sebastien dugue To: linux-rdma Cc: Roland Dreier , Sasha Khapyorsky Subject: [PATCH 1/3] rdma_cm: Add support for a new RDMA_PS_LUSTRE Lustre port space Message-ID: <20100113155150.59867f40@frecb007965> In-Reply-To: <20100113154952.0f01aa1d@frecb007965> References: <20100113154952.0f01aa1d@frecb007965> Organization: BULL X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index cc9b594..6b9e75e 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -78,6 +78,7 @@ static DEFINE_IDR(sdp_ps); static DEFINE_IDR(tcp_ps); static DEFINE_IDR(udp_ps); static DEFINE_IDR(ipoib_ps); +static DEFINE_IDR(lustre_ps); static int next_port; struct cma_device { @@ -2066,6 +2067,9 @@ static int cma_get_port(struct rdma_id_private *id_priv) case RDMA_PS_IPOIB: ps = &ipoib_ps; break; + case RDMA_PS_LUSTRE: + ps = &lustre_ps; + break; default: return -EPROTONOSUPPORT; } @@ -3034,6 +3038,7 @@ static void __exit cma_cleanup(void) idr_destroy(&tcp_ps); idr_destroy(&udp_ps); idr_destroy(&ipoib_ps); + idr_destroy(&lustre_ps); } module_init(cma_init); diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index c6b2962..d662799 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h @@ -63,11 +63,12 @@ enum rdma_cm_event_type { }; enum rdma_port_space { - RDMA_PS_SDP = 0x0001, - RDMA_PS_IPOIB = 0x0002, - RDMA_PS_TCP = 0x0106, - RDMA_PS_UDP = 0x0111, - RDMA_PS_SCTP = 0x0183 + RDMA_PS_SDP = 0x0001, + RDMA_PS_IPOIB = 0x0002, + RDMA_PS_TCP = 0x0106, + RDMA_PS_UDP = 0x0111, + RDMA_PS_LUSTRE = 0x0153, + RDMA_PS_SCTP = 0x0183 }; struct rdma_addr {