[openib-general] Re: [PATCH] sdp: replace ip_dev_find with dev_base scan (was Re: ip_dev_find resolution?)
Hal Rosenstock
halr at voltaire.com
Mon Dec 12 07:08:09 PST 2005
On Mon, 2005-12-12 at 09:56, Michael S. Tsirkin wrote:
> Quoting Michael S. Tsirkin <mst at mellanox.co.il>:
> > Subject: Re: ip_dev_find resolution?
> >
> > Quoting r. Hal Rosenstock <halr at voltaire.com>:
> > > Subject: Re: ip_dev_find resolution?
> > >
> > > On Tue, 2005-12-06 at 12:56, Michael S. Tsirkin wrote:
> > > > Actually, I wander whether instead of ip_dev_find we can just
> > > >
> > > > read_lock(&dev_base_lock);
> > > > for (dev = dev_base; dev; dev = dev->next) {
> > > >
> > > > and check the ip address?
> > >
> > > working off the ip_ptr and ip6_ptr ?
> >
> > Yes.
> >
> > > > If this works, this has the advantage of supporting IPv6 as well.
> > >
> > > This was introduced at one point and we subsequently changed to
> > > ip_dev_find. I forget exactly why this was but can dig it out if no
> > one
> > > recalls.
> >
> > Please do.
>
> Any updates? Hal?
>
> I've coded the following up since I grew tired of patching my kernels
> to run sdp. Seems to work fine for me, can someone please speak up
> on why this isnt a good idea for CMA, as well?
Sorry for the slow response on this. I meant to dig this out over the
weekend.
I believe the reason it was changed from searching the netdevices list
to ip_dev_find originally was that this really is a route lookup on the
dest addr to determine what the local outgoing interface is and that
can't be done directly from the netdevices list if the destination is
not (IP) subnet local (e.g. gateway cases).
> Ultimately, IMO this also has a better chance to be generalizable to IPv6.
Yes, we need a different lookup for IPv6 with the current (ip_dev_find)
approach.
-- Hal
More information about the general
mailing list