Re: [PATCH net 00/12] net: iflink and link-netnsid fixes

2020-10-02 Thread Sabrina Dubroca
2020-10-01, 14:25:38 -0700, Stephen Hemminger wrote: > On Thu, 1 Oct 2020 09:59:24 +0200 > Sabrina Dubroca wrote: > > > In a lot of places, we use this kind of comparison to detect if a > > device has a lower link: > > > > dev->ifindex != dev_get_iflink(dev) > > > Since this is a common ope

Re: [PATCH net 00/12] net: iflink and link-netnsid fixes

2020-10-01 Thread Stephen Hemminger
On Thu, 1 Oct 2020 09:59:24 +0200 Sabrina Dubroca wrote: > In a lot of places, we use this kind of comparison to detect if a > device has a lower link: > > dev->ifindex != dev_get_iflink(dev) Since this is a common operation, it would be good to add a new helper function in netdevice.h In

[PATCH net 00/12] net: iflink and link-netnsid fixes

2020-10-01 Thread Sabrina Dubroca
In a lot of places, we use this kind of comparison to detect if a device has a lower link: dev->ifindex != dev_get_iflink(dev) This seems to be a leftover of the pre-netns days, when the ifindex was unique over the whole system. Nowadays, with network namespaces, it's very easy to create a devi