[openib-general] Re: port_num
Michael S. Tsirkin
mst at mellanox.co.il
Wed Mar 15 16:45:52 PST 2006
Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [openib-general] Re: port_num
>
> Michael S. Tsirkin wrote:
> >How about we get something simple done for now for SDP on IB since that
> >is still the first user of this functionality?
> >And then we'll see how to improve from there.
>
> I would agree, but I'm still not sure it's that easy.
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.
Now as Roland suggested if ULPs want to look it up in host tables
or something, they'll just have to avoid giving port number 0.
This is similiar 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.
> Doesn't SDP have
> actual sockets?
struct sock *? Yes
> 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"?
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.
--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
More information about the general
mailing list