[openib-general] CMA issue: bind selects the same port after close

Tom Tucker tom at opengridcomputing.com
Wed Sep 13 20:33:23 PDT 2006




On 9/12/06 11:39 PM, "Sean Hefty" <sean.hefty at intel.com> wrote:

>>> I completely understand that the existing port management services are not
>>> exported, but functionally, they support multiple port spaces, show up in
>>> netstat, etc... Can someone please explain to me the reluctance to use these
>>> services in favor of replicating them?
> 
> My reluctance to use the existing port spaces is that we're not guaranteed to
> run TCP or IP.  I'm happy to map the address spaces, but that's not the same
> as
> using those addresses when you're not using that protocol.
> 
>> inet_csk_get_port actually *is* exported, and while it might be hard for CMA
>> to
>> use it (needs struct sock*), maybe it is easy for SDP.
> 

Yes, I agree. This is the crux of the issue. The sock structure is coupled
with inet_csk_get_port, and it is not trivial in size. This service,
however, is itself built on lower level port allocation services that are
not coupled with struct sock, but are also not exported. So what I think
needs to be done is to look at these lower level services and decide a) how
to effectively export them, and b) rationalize their export.
 

> I did look at this, but the use of struck sock made it extremely difficult for
> the CMA to use the existing calls.
> 
>> So, possibly we should just leave the CMA port allocation as is,
>> and enhance SDP to use inet_csk_get_port.
> 
> That sounds reasonable.
> 

Short term, perhaps, but long-term, I think we end up with this same kind of
logic being replicated in ULP all over the place.

> - Sean






More information about the general mailing list