[openib-general] Re: [IBAT] interface numbering assumption

Hal Rosenstock halr at voltaire.com
Mon Sep 26 10:12:49 PDT 2005


On Fri, 2005-09-23 at 15:33, James Lentini wrote: 
> On Fri, 23 Sep 2005, Hal Rosenstock wrote:
> 
> > > Is there a better way to enumerate all of the network inferaces? I 
> > > believe that is what this for loop is attempting to accomplish.
> > 
> > Yes. I think that the net_device list from dev_base could be walked
> > instead and that would resolve this issue.
> 
> Can you help we understand the logic in at.c:resolve_ip()? Here is my 
> assumption of what this function does:
> 
>  1) consults the IP routing table for an interface 
>     device using ip_route_output_key
> 
>  2) if the device does not meet certain criteria, return an error
> 
>  3) if the device is a loopback device, search for another device 
>     that is an INFINIBAND device and is UP.
> 
>  4) ...
> 
> I've included a small patch below to fix the problem I observed in #3. 
> It walks the dev_base list as you described.

Thanks. Applied.

> However I don't understand why the device returned in step #1 isn't 
> always used as I assumpe this is the interface the routing table says 
> to use. That makes me think I've misinterpreted the purpose of 
> ip_route_output_key. What am I missing?

Because the loopback device is sometimes the answer and that doesn't
work for address resolution. It needs to be an IPoIB interface. I don't
think you can expect ATS to work over a loopback interface.

-- Hal




More information about the general mailing list