[openib-general] [RFC/PATCH v2] rdma/cma: use the ipoib broadcast group qkey
Or Gerlitz
or.gerlitz at gmail.com
Mon Jan 22 20:42:54 PST 2007
On 1/23/07, Sean Hefty <mshefty at ichips.intel.com> wrote:
> Or Gerlitz wrote:
> > Modify the kernel rdma cm use the ipoib broadcast group qkey instead a qkey
> > of its own for its UD IDs/QPs. For RDMA_PS_UDP ID, the qkey is stored in
> > struct rdma_id_private and delivered also in ADDR_RESOLVED and
> > CONNECT_REQUEST events. The user space library learns the qkey from these
> > events and use them when it is called to create UD QP.
>
> Overall, I think this is a reasonable approach. I would just like the framework
> to provide a way to restrict any userspace application from joining an ipoib
> multicast group. What do you think of the idea of creating a new port space
> specific to ipoib, similar to what's provided for SDP?
Basically, I am positive to this, under the assumption that it will be
possible for --non-- root user space application to create
RDMA_PS_IPOIB IDs and use them as i would have been doing with
RDMA_PS_UDP IDs.
> For example, add:
> enum rdma_port_space {
> RDMA_PS_SDP = 0x0001,
> + RDMA_PS_IPOIB = 0x0002,
> RDMA_PS_TCP = 0x0106,
> RDMA_PS_UDP = 0x0111,
>
> The qkey/MGID would adjust based on the port space, which is specified as part
> of rdma_create_id().
OK
> of rdma_create_id(). Use of RDMA_PS_IPOIB could then be restricted using a
> check similar to that used for port assignment (see cma_use_port() -
> capable(CAP_NET_BIND_SERVICE)).
I don't want to loose a day, so if you don't mind, i would ask you for
a crash course here, i don't really think to fully understand the
following lines from cma_use_port() ...
1753 sin = (struct sockaddr_in *) &id_priv->id.route.addr.src_addr;
1754 snum = ntohs(sin->sin_port);
1755 if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
1756 return -EACCES;
what would be the equivalent check for RDMA_PS_IPOIB? and would this
check be done only on rdma_create_id time?
Or.
More information about the general
mailing list