[openib-general] Re: [PATCH] CMA: allow/require bind beforeconnect

Steve Wise swise at opengridcomputing.com
Tue Mar 28 07:33:05 PST 2006


On Mon, 2006-03-27 at 14:40 -0800, Sean Hefty wrote:
> >On IB, it also maps ports to service IDs.
> >
> >This argues that the port values are within the scope of the CMA
> >and that the active side behavior should be changed.
> 
> The passive side maps the source port, and the active side maps the destination
> port.  So, a port assignment is only needed on the passive side.  Although, if
> code needs to be there to support listens that don't care which port they listen
> on, then using it on the active side isn't any more difficult.
> 

As Tom and James pointed out, NFS over RDMA needs the port number of
each client to do security policy.  And it is expected that the client
will be assigned a privileged port only if the client process is
privileged.  And privileged ports are < 1024.  So the active side also
maps its local port in some instances.

To support NFS, the CMA needs to manage local port assignment.  And to
support applications that are RDMA transport independent, I assert that
the CMA should allocate port numbers using a consistent model across all
rdma transport types.   Otherwise, you break NFSoRDMA methinks. And that
model should be akin to the native TCP stack's model for port
allocation. 

> An application wants to connect to some server, and doesn't care what port
> number is used.  Why does it care that the source port assignment is unique?

The app _usually_ doesn't care.  See NFS discussion for a client app
that does care.  Also, providers DO care.  Because of this issue, the
chelsio iwarp provider right now has to allocate its own ephemeral ports
at connect time.  This logic should be moved into the IWCM or maybe the
CMA and an explicit bind() operation be exported by the iwarp providers
to allow the IWCM or CMA to track all port allocations.

> And how unique is unique?  System wide?  Within the RDMA CM?  Within all of TCP?
> Within all TCP ports over a specific IP address?  Within the RDMA CM within its
> TCP space over a specific IP address?  Etc.
> 
> What scope is needed, and why?  SDP has its own address family.  Does this give
> it its own port space, or does it need to share it?
> 

This a harder question.  I think it should be at least global across the
RDMA CM.  Why?  Because that's the model that is expected by IP
applications that are being moved over to RDMA/CMA.

My 2 cents.




More information about the general mailing list