[openib-general] RDMA CM and loopback addresses
Jason Gunthorpe
jgunthorpe at obsidianresearch.com
Thu Mar 30 16:14:24 PST 2006
On Thu, Mar 30, 2006 at 03:48:50PM -0800, Sean Hefty wrote:
> On the client side, the client does need to know which device to use before
> calling connect. The client obtains the device by calling bind() or
> resolve_addr(). The latter call takes the source and destination addresses, and
> obtains the device based on local routing information.
> So, bind() could be made to avoid mapping to a specific hardware device. I just
> don't think that it makes as much sense for RDMA interface, and results in other
> restrictions, such as requiring deferred resource allocation.
Hmm. This all sounds very reasonable, but if resolve_addr is
available, why not get rid of bind()? Do not provide any way
in the API for a non-listening socket to get the bound hardware device
without providing both source and dest.
ie make:
bind(src);
preallocate();
connect(dest)
Illegal and instead require:
reasolve_addr(src,dest);
preallocate();
connect(dest);
Then the only time you ever have to choose a device based only on
source address is if it is a listening socket, which is entirely OK,
IMHO.
If you always have a src,dest pair when looking up the hardware device
for an outgoing connection then you can always follow the directions
for egress device in the routing table so it should be as consistent
as possible..
Regards,
Jason
More information about the general
mailing list