[openib-general] Re: Re: port_num
Michael S. Tsirkin
mst at mellanox.co.il
Wed Mar 15 15:16:17 PST 2006
Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: Re: port_num
>
> Michael S. Tsirkin wrote:
> >>>Sean, how come rdma_cm_id port_num field is only 8 bit?
> >>>I think it must be at least 16 - I need to get at the port number
> >>>after binding it with a wildcard 0 port.
> >>
> >>This is the port number of the rdma device, not the TCP port number. The
> >>TCP
> >>port number is part of the rdma_route::rdma_addr::src_addr.
> >
> >
> >Wanted to make sure: will CMA let me bind to port 0, and select a port for
> >me?
>
> The CMA will let you bind to port 0, but it doesn't select a port for you.
Not what I wanted then :)
> This was something that James brought up earlier, but there's not a decent
> fix for this that can handle iWarp as well.
Well, but if an application manages port spaces by itself it won't be portable
either. And it seems like a waste to manage ports - some global and some
per-device, all for the wildcard port special-case when cma could do it.
> The issue is the current CMA port spaces may be distinct from real
> TCP/UPD/etc. port spaces. So, port 0 can work fine from the CMA's
> perspective.
Can we have it at least for SDP?
> Are you wanting a port value for listening or connecting?
Both I guess: most common is listening, but if the user sends without binding
I'll autobind, same as a TCP socket.
--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
More information about the general
mailing list