From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] [PATCH 5/22 v2] [for 2.6.36] rdma/cm: update port reservation to support AF_IB
Date: Thu, 25 Mar 2010 17:43:58 -0600 [thread overview]
Message-ID: <20100325234358.GQ29129@obsidianresearch.com> (raw)
In-Reply-To: <C70579E21917462C89AAEAE3C225A58B-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
On Thu, Mar 25, 2010 at 03:40:35PM -0700, Sean Hefty wrote:
> >I would be inclined to ditch the port space concept entirely for
> >AF_IB. Just ignore the input parameter and always base the selection
> >on the SID region. It is confusing to that there are two ways to
> >specify the same thing.
>
> The address family is not sufficient to determine the desired port space. For
> example, AF_INET is usable for RDMA_PS_TCP and RDMA_PS_UDP.
Right, but AF_IB has only one 'port space' - SID, so the ps input
parameter should be unused. It is reasonable that port space is an
address family specific input like the protocol input is to socket(2).
For now, what can happen inside the kernel is that a function like
cma_get_port can include:
if (sa_family == AF_IB) {
if (sib_sid inside SDP_PREFIX)
ps = &sdp_ps;
if (sib_sid inside TCP_PREFIX)
ps = &tcp_ps;
if (sib_sid inside UDP_PREFIX)
ps = &udp_ps;
else -EINVAL; // FIXME, support more cases
}
And the user specifies the port space they want by setting the sib_sid
and sib_sid_mask appropriately.
Ideally want we want in the kernel is a better scheme than seperate
idr tables for managing the SID space in IB - the user API should be
built to support that general notion and the kernel can catch up.
If no bind address is specified then the kernel can use the IB locally
administered SID prefix of 0x2/8.
So the flow is:
- AF_INET/AF_INET6 *must* specify a port space and use 16 bit port
addressing
- AF_IB does not use the port space input
- AF_IB with no bind address, or a wild card SID, is identical to
binding to the SID 0x2/8
- AF_IB with a bind address can bind to any port space by specifying
the correct SID prefix during bind.
These semantics are intended to make sense as a user space API, not
so much to reflect how the kernel currently works..
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-03-25 23:43 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 17:48 [RFC] [PATCH 0/22] [for 2.6.36] rdma/cm: add support for native IB addressing Sean Hefty
[not found] ` <2F3826558E79459EAD2A457A604221C1-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-23 17:52 ` [RFC] [PATCH 1/22] [for 2.6.36] rdma/cm: define native IB address Sean Hefty
2010-03-23 17:54 ` [RFC] [PATCH 2/22] [for 2.6.36] rdma/cm: fix handling of ipv6 addressing in cma_use_port Sean Hefty
2010-03-23 17:55 ` [RFC] [PATCH 3/22] [for 2.6.36] rdma/cm: include AF_IB in loopback and any address checks Sean Hefty
2010-03-23 17:57 ` [RFC] [PATCH 4/22] [for 2.6.36] ib/addr: add AF_IB support to ip_addr_size Sean Hefty
2010-03-23 17:59 ` [RFC] [PATCH 5/22] [for 2.6.36] rdma/cm: update port reservation to support AF_IB Sean Hefty
[not found] ` <012F7D9E5E97445E9100EF170212AEE7-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-25 19:05 ` [RFC] [PATCH 5/22 v2] " Sean Hefty
[not found] ` <7451BD1514874F3E987E55040776EECC-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-25 20:29 ` Jason Gunthorpe
[not found] ` <20100325202924.GO29129-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-03-25 21:00 ` Sean Hefty
[not found] ` <AC26D518E7AE4BE6BA3BDFC11480F8DB-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-25 22:04 ` Jason Gunthorpe
[not found] ` <20100325220435.GP29129-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-03-25 22:40 ` Sean Hefty
[not found] ` <C70579E21917462C89AAEAE3C225A58B-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-25 23:43 ` Jason Gunthorpe [this message]
2010-03-26 3:56 ` Sean Hefty
[not found] ` <FD7DFBFAF86D4EA99F82836CBCA8AB33-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-26 4:08 ` Jason Gunthorpe
[not found] ` <20100326040809.GD9769-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-03-26 16:06 ` Sean Hefty
[not found] ` <57287E48AAAD47A4BD50719B889F4596-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-26 17:17 ` Sean Hefty
[not found] ` <350558935FCC47B6A5ABA8402109746C-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-26 17:20 ` Jason Gunthorpe
[not found] ` <20100326172057.GR29129-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-03-26 17:23 ` Sean Hefty
2010-03-27 0:11 ` Sean Hefty
[not found] ` <0F1BE18DBBF74165AEA2B3283B01F338-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-27 0:44 ` Jason Gunthorpe
[not found] ` <20100327004440.GE9769-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-03-27 1:01 ` Sean Hefty
2010-03-23 18:01 ` [RFC] [PATCH 6/22] [for 2.6.36] rdma/cm: Allow user to specify AF_IB when binding Sean Hefty
2010-03-23 18:03 ` [RFC] [PATCH 7/22] [for 2.6.36] rdma/cm: do not modify sa_family when setting loopback address Sean Hefty
2010-03-23 18:04 ` [RFC] [PATCH 8/22] [for 2.6.36] rdma/cm: restrict AF_IB loopback to binding to IB devices only Sean Hefty
2010-03-23 18:06 ` [RFC] [PATCH 9/22] [for 2.6.36] rdma/cm: add support for AF_IB to rdma_resolve_addr Sean Hefty
2010-03-23 18:07 ` [RFC] [PATCH 10/22] [for 2.6.36] rdma/cm: add support for AF_IB to cma_get_service_id Sean Hefty
2010-03-23 18:08 ` [RFC] [PATCH 11/22] [for 2.6.36] rdma/cm: fixup white space Sean Hefty
2010-03-23 18:11 ` [RFC] [PATCH 12/22] [for 2.6.36] rdma/cm: expose private data when using AF_IB Sean Hefty
2010-03-23 18:12 ` [RFC] [PATCH 13/22] [for 2.6.36] rdma/cm: only listen on IB devices " Sean Hefty
2010-03-23 18:14 ` [RFC] [PATCH 14/22] [for 2.6.36] rdma/ucm: support querying for AF_IB addresses Sean Hefty
2010-03-23 18:16 ` [RFC] [PATCH 15/22] [for 2.6.36] ib/sa: export function to pack a path record into wire format Sean Hefty
2010-03-23 18:18 ` [RFC] [PATCH 16/22] [for 2.6.36] rdma/ucm: support querying when IB paths are not reversible Sean Hefty
2010-03-23 18:20 ` [RFC] [PATCH 17/22] [for 2.6.36] rdma/cm: export cma_get_service_id Sean Hefty
2010-03-23 18:23 ` [RFC] [PATCH 18/22] [for 2.6.36] rdma/ucm: add ability to query GID addresses Sean Hefty
2010-03-23 18:25 ` [RFC] [PATCH 19/22] [for 2.6.36] rdma/ucm: name changes to indicate only IP addresses supported Sean Hefty
2010-03-23 18:27 ` [RFC] [PATCH 20/22] [for 2.6.36] rdma/ucm: allow user space to bind to AF_IB Sean Hefty
2010-03-23 18:28 ` [RFC] [PATCH 21/22] [for 2.6.36] rdma/ucm: allow user space to pass AF_IB into resolve Sean Hefty
2010-03-23 18:30 ` [RFC] [PATCH 22/22] [for 2.6.36] rdma/ucm: allow user space to specify AF_IB when joining multicast Sean Hefty
[not found] ` <48F1FC4C2F114E928EB38D690091185E-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2010-03-25 19:08 ` [RFC] [PATCH 22/22 v2] " Sean Hefty
2010-03-23 19:22 ` [RFC] [PATCH 0/22] [for 2.6.36] rdma/cm: add support for native IB addressing Sean Hefty
2010-03-26 17:33 ` 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=20100325234358.GQ29129@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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