netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sean.hefty@intel.com
To: roland@purestorage.com, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org
Cc: Sean Hefty <sean.hefty@intel.com>
Subject: [PATCH v5 13/28] rdma/cm: Add support for AF_IB to cma_get_service_id
Date: Wed, 29 May 2013 10:09:19 -0700	[thread overview]
Message-ID: <1369847374-12176-14-git-send-email-sean.hefty@intel.com> (raw)
In-Reply-To: <1369847374-12176-1-git-send-email-sean.hefty@intel.com>

From: Sean Hefty <sean.hefty@intel.com>

cma_get_service_id forms the service ID based on the port space
and port number of the rdma_cm_id.  Extend the call to support
AF_IB, which contains the service ID directly.  This will
be needed to support any arbitrary SID.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
 drivers/infiniband/core/cma.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index f54169b..d307c94 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1379,6 +1379,9 @@ err1:
 
 static __be64 cma_get_service_id(enum rdma_port_space ps, struct sockaddr *addr)
 {
+	if (addr->sa_family == AF_IB)
+		return ((struct sockaddr_ib *) addr)->sib_sid;
+
 	return cpu_to_be64(((u64)ps << 16) + be16_to_cpu(cma_port(addr)));
 }
 
-- 
1.7.3

  parent reply	other threads:[~2013-05-29 17:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 17:09 [PATCH v5 00/28] rdma/cm: Add support for native IB addressing sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09 ` [PATCH v5 08/28] rdma/cm: Add helper functions to return id address information sean.hefty
     [not found] ` <1369847374-12176-1-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-05-29 17:09   ` [PATCH v5 01/28] rdma/cm: define native IB address sean.hefty-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1369847374-12176-2-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-06-10 17:49       ` Hefty, Sean
2013-05-29 17:09   ` [PATCH v5 02/28] rdma/cm: Allow enabling reuseaddr in any state sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 03/28] rdma/cm: Include AF_IB in loopback and any address checks sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 04/28] ib/addr: Add AF_IB support to ip_addr_size sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 05/28] rdma/cm: Update port reservation to support AF_IB sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 06/28] rdma/cm: Allow user to specify AF_IB when binding sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 07/28] rdma/cm: Do not modify sa_family when setting loopback address sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 09/28] rdma/cm: Restrict AF_IB loopback to binding to IB devices only sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 10/28] rdma/cm: Verify that source and dest sa_family are the same sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 11/28] rdma/cm: Add support for AF_IB to rdma_resolve_addr sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 12/28] rdma/cm: Add support for AF_IB to rdma_resolve_route sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 14/28] rdma/cm: Remove unused SDP related code sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 15/28] rdma/cm: Merge cma_get/save_net_info sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 16/28] rdma/cm: Expose private data when using AF_IB sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 18/28] rdma/cm: Only listen on IB devices " sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 19/28] rdma/ucm: Support querying for AF_IB addresses sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 20/28] ib/sa: Export function to pack a path record into wire format sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 21/28] rdma/ucm: Support querying when IB paths are not reversible sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 22/28] rdma/cm: Export cma_get_service_id sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 26/28] rdma/ucm: Allow user space to pass AF_IB into resolve sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 27/28] rdma/ucm: Allow user space to specify AF_IB when joining multicast sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09   ` [PATCH v5 28/28] rdma/cm: Export AF_IB statistics sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-05-29 17:09 ` sean.hefty [this message]
2013-05-29 17:09 ` [PATCH v5 17/28] rdma/cm: Set qkey for AF_IB sean.hefty
2013-05-29 17:09 ` [PATCH v5 23/28] rdma/ucm: Add ability to query GID addresses sean.hefty
2013-05-29 17:09 ` [PATCH v5 24/28] rdma/ucm: Name changes to indicate only IP addresses supported sean.hefty
2013-05-29 17:09 ` [PATCH v5 25/28] rdma/ucm: Allow user space to bind to AF_IB sean.hefty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369847374-12176-14-git-send-email-sean.hefty@intel.com \
    --to=sean.hefty@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roland@purestorage.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).