[openib-general] Re: port_num

Sean Hefty sean.hefty at intel.com
Thu Mar 16 00:26:47 PST 2006


>I'd like to suggest that CMA implement its own rule along the lines
>of: if port is 0, bind to a port number unused by CMA in this port space
>and on this device.

To clarify: a user is permitted to bind to a specific port, but use a wildcard
IP address.  Just because a user binds to a port doesn't mean that they also
bind to an RDMA device.  This permits a single listen across all RDMA devices.
If one of those devices is an iWarp device, then the port number selected by the
CMA ends up needing to be a true TCP port number.

>This is similar to what we do need for source IP with bind:
>bind with wildcard source address binds to all devices, but if a ULP wants
>contol over which device to bind to, it can have it.

The CMA does this.  The problems show up when the IP address and port are both
wild cards.  Now a port number needs to be assigned that's valid across all RDMA
devices.

>> If an application running over SDP gets a TCP port number,
>> and that port number is generated by the CMA, then the port number seen by
>> the user could conflict with a real TCP port number.
>
>We don't have to pack things into IP packets, so we are in a separate space.
>What do you mean by "conflict"?

Here's my understanding, so correct me if I'm wrong.  A userspace application is
unaware of whether a bind call falls into SDP space or TCP.  If it hits SDP
space, then they can end up listening on TCP port 3000.  A separate call that
falls into TCP space can also end up listening on TCP port 3000.  Maybe this is
okay, given that SDP is its own address family?

Hmmm... this makes me wonder about how SDP will operate over the CMA.  The CMA
supports all RDMA devices, so either SDP can work over all RDMA devices, or the
CMA needs to filter non-IB devices when working with the SDP port space.

>If we decide at some point that port address space needs to be global,
>we'll be able to change that in CMA without touching all ULPs.
>I see this as another proof that this belongs in a central space.
>
>> I'm wondering if the correct approach wouldn't be for SDP to allocate a
>> port number and pass that to the CMA.  (Assuming that SDP has a socket.)
>
>The difficulty is with things like per-source-ip-address bind - it would
>force SDP to manage per-device port lists, and I would just as well
>move that to CMA.
>CMA hides the IP devices from me so I don't know how to select a port
>that will be safe to bind to a specific address.

I didn't follow this.  I was suggesting that SDP call inet_csk_get_port(), since
it can provide the necessary parameters.

- Sean





More information about the general mailing list