[openib-general] Re: [PATCH] ib_addr: local/loopback address handling

Michael S. Tsirkin mst at mellanox.co.il
Tue Apr 4 15:08:40 PDT 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [PATCH] ib_addr: local/loopback address handling
> 
> Michael S. Tsirkin wrote:
> >>	if (ZERONET(src_ip)) {
> >>		src_in->sin_family = dst_in->sin_family;
> >>		src_in->sin_addr.s_addr = dst_ip;
> >>		ret = copy_addr(addr, dev, dev->dev_addr);
> >>	} else if (LOOPBACK(src_ip)) {
> >>		ret = rdma_translate_ip((struct sockaddr *)dst_in, addr);
> >>		if (!ret)
> >>			memcpy(addr->dst_dev_addr, dev->dev_addr, 
> >>			MAX_ADDR_LEN);
> >>	} else {
> >>		ret = rdma_translate_ip((struct sockaddr *)src_in, addr);
> >>		if (!ret)
> >>			memcpy(addr->dst_dev_addr, dev->dev_addr, 
> >>			MAX_ADDR_LEN);
> >>	}
> >
> >This will put the IP of an actual IB device in the SDP hello message, 
> >right?
> >I don't think we should have 127.0.0.1 there ...
> 
> After some testing, this appears to work the way I expected anyway.
> 
> My test system has a local IP address of 192.168.0.102.
> 
> I could connect from 127.0.0.1 to 127.0.0.1, 192.168.0.102 to 127.0.0.1, 
> and 127.0.0.1 to 192.168.0.102.  I could not connect between 127.0.0.1 to 
> 192.168.0.101, which is my other test system.
> 
> I believe that this does carry 127.0.0.1 in the connection messages, since 
> that's the address that we're bound to.

Sean, this wasn't ever checked in, was it?  If so, please do.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list