Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/13/17 2:56 PM, Wei Wang wrote: >> Looking at my patch to move host routes from loopback to device with the >> address, I have this: >> >> @@ -2789,7 +2808,8 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg) >> const struct arg_dev_net *adn = arg; >> const struct

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/13/17 2:56 PM, Wei Wang wrote: >> Looking at my patch to move host routes from loopback to device with the >> address, I have this: >> >> @@ -2789,7 +2808,8 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg) >> const struct arg_dev_net *adn = arg; >> const struct

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread Wei Wang
> Looking at my patch to move host routes from loopback to device with the > address, I have this: > > @@ -2789,7 +2808,8 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg) > const struct arg_dev_net *adn = arg; > const struct net_device *dev = adn->dev; > > - if

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread Wei Wang
> Looking at my patch to move host routes from loopback to device with the > address, I have this: > > @@ -2789,7 +2808,8 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg) > const struct arg_dev_net *adn = arg; > const struct net_device *dev = adn->dev; > > - if

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/12/17 1:42 PM, Wei Wang wrote: > Hi Ido, > >>> - if ((rt->dst.dev == dev || !dev) && >>> + if ((rt->dst.dev == dev || !dev || >>> + rt->rt6i_idev->dev == dev) && >> >> Can you please explain why this line is needed? While host routes aren't >> removed from the FIB by

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-13 Thread David Ahern
On 8/12/17 1:42 PM, Wei Wang wrote: > Hi Ido, > >>> - if ((rt->dst.dev == dev || !dev) && >>> + if ((rt->dst.dev == dev || !dev || >>> + rt->rt6i_idev->dev == dev) && >> >> Can you please explain why this line is needed? While host routes aren't >> removed from the FIB by

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
Hi Ido, >> - if ((rt->dst.dev == dev || !dev) && >> + if ((rt->dst.dev == dev || !dev || >> + rt->rt6i_idev->dev == dev) && > > Can you please explain why this line is needed? While host routes aren't > removed from the FIB by rt6_ifdown() (when dst.dev goes down), they are >

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
Hi Ido, >> - if ((rt->dst.dev == dev || !dev) && >> + if ((rt->dst.dev == dev || !dev || >> + rt->rt6i_idev->dev == dev) && > > Can you please explain why this line is needed? While host routes aren't > removed from the FIB by rt6_ifdown() (when dst.dev goes down), they are >

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
On Fri, Aug 11, 2017 at 8:37 PM, David Ahern wrote: > On 8/11/17 6:25 PM, Wei Wang wrote: >> By "a patch to fix that" do you mean after your patch, for every rt6, >> rt6->rt6i_idev will be the same as rt6->dst.dev? > > FIB entries should have them the same device with my patch.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
On Fri, Aug 11, 2017 at 8:37 PM, David Ahern wrote: > On 8/11/17 6:25 PM, Wei Wang wrote: >> By "a patch to fix that" do you mean after your patch, for every rt6, >> rt6->rt6i_idev will be the same as rt6->dst.dev? > > FIB entries should have them the same device with my patch. > > The copies

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
> Looks good so far! I've not hit the issue yet. > Great. I will prepare an official patch then. > Thanks so much for sorting out a fix! > > If its useful: > Tested-by: John Stultz Sure will do. Thanks. Wei On Fri, Aug 11, 2017 at 8:07 PM, John Stultz

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
> Looks good so far! I've not hit the issue yet. > Great. I will prepare an official patch then. > Thanks so much for sorting out a fix! > > If its useful: > Tested-by: John Stultz Sure will do. Thanks. Wei On Fri, Aug 11, 2017 at 8:07 PM, John Stultz wrote: > On Fri, Aug 11, 2017 at 5:31

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
On Fri, Aug 11, 2017 at 8:07 PM, John Stultz wrote: > On Fri, Aug 11, 2017 at 5:31 PM, John Stultz wrote: >> On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: If after Cong's fix, the issue still happens, could you help try

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Wei Wang
On Fri, Aug 11, 2017 at 8:07 PM, John Stultz wrote: > On Fri, Aug 11, 2017 at 5:31 PM, John Stultz wrote: >> On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: If after Cong's fix, the issue still happens, could you help try the patch attached and collect all logs when you try the

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Ido Schimmel
Hi Wei, On Fri, Aug 11, 2017 at 05:10:02PM -0700, Wei Wang wrote: > I think we have a potential fix for this issue. > Martin and I found that when addrconf_dst_alloc() creates a rt6, it is > possible that rt6->dst.dev points to loopback device while > rt6->rt6i_idev->dev points to a real device.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-12 Thread Ido Schimmel
Hi Wei, On Fri, Aug 11, 2017 at 05:10:02PM -0700, Wei Wang wrote: > I think we have a potential fix for this issue. > Martin and I found that when addrconf_dst_alloc() creates a rt6, it is > possible that rt6->dst.dev points to loopback device while > rt6->rt6i_idev->dev points to a real device.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:25 PM, Wei Wang wrote: > By "a patch to fix that" do you mean after your patch, for every rt6, > rt6->rt6i_idev will be the same as rt6->dst.dev? FIB entries should have them the same device with my patch. The copies done (ip6_rt_cache_alloc and ip6_rt_pcpu_alloc) will have to set

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:25 PM, Wei Wang wrote: > By "a patch to fix that" do you mean after your patch, for every rt6, > rt6->rt6i_idev will be the same as rt6->dst.dev? FIB entries should have them the same device with my patch. The copies done (ip6_rt_cache_alloc and ip6_rt_pcpu_alloc) will have to set

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread John Stultz
On Fri, Aug 11, 2017 at 5:31 PM, John Stultz wrote: > On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: >>> If after Cong's fix, the issue still happens, could you help try the >>> patch attached and collect all logs when you try the reproduce the >>>

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread John Stultz
On Fri, Aug 11, 2017 at 5:31 PM, John Stultz wrote: > On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: >>> If after Cong's fix, the issue still happens, could you help try the >>> patch attached and collect all logs when you try the reproduce the >>> issue? It would be great to have logs for

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
> So yes, sorry I haven't been able to get back quicker on the other > patches sent, was mucking about in other work. > > So yea, this patch (potential fix for unregister_netdevice()) seems > to avoid the issue. > > I'm going to do some further testing, but its looking good so far. > Great.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
> So yes, sorry I haven't been able to get back quicker on the other > patches sent, was mucking about in other work. > > So yea, this patch (potential fix for unregister_netdevice()) seems > to avoid the issue. > > I'm going to do some further testing, but its looking good so far. > Great.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread John Stultz
On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: >> If after Cong's fix, the issue still happens, could you help try the >> patch attached and collect all logs when you try the reproduce the >> issue? It would be great to have logs for both success case and the >> failure case.

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread John Stultz
On Fri, Aug 11, 2017 at 5:10 PM, Wei Wang wrote: >> If after Cong's fix, the issue still happens, could you help try the >> patch attached and collect all logs when you try the reproduce the >> issue? It would be great to have logs for both success case and the >> failure case. >> >> Thanks so

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
On Fri, Aug 11, 2017 at 5:19 PM, David Ahern wrote: > On 8/11/17 6:10 PM, Wei Wang wrote: >> I think we have a potential fix for this issue. >> Martin and I found that when addrconf_dst_alloc() creates a rt6, it is >> possible that rt6->dst.dev points to loopback device while

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
On Fri, Aug 11, 2017 at 5:19 PM, David Ahern wrote: > On 8/11/17 6:10 PM, Wei Wang wrote: >> I think we have a potential fix for this issue. >> Martin and I found that when addrconf_dst_alloc() creates a rt6, it is >> possible that rt6->dst.dev points to loopback device while >>

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:10 PM, Wei Wang wrote: > I think we have a potential fix for this issue. > Martin and I found that when addrconf_dst_alloc() creates a rt6, it is > possible that rt6->dst.dev points to loopback device while > rt6->rt6i_idev->dev points to a real device. > When the real device goes

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread David Ahern
On 8/11/17 6:10 PM, Wei Wang wrote: > I think we have a potential fix for this issue. > Martin and I found that when addrconf_dst_alloc() creates a rt6, it is > possible that rt6->dst.dev points to loopback device while > rt6->rt6i_idev->dev points to a real device. > When the real device goes

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
> If after Cong's fix, the issue still happens, could you help try the > patch attached and collect all logs when you try the reproduce the > issue? It would be great to have logs for both success case and the > failure case. > > Thanks so much for your help. > I think we have a potential fix for

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
> If after Cong's fix, the issue still happens, could you help try the > patch attached and collect all logs when you try the reproduce the > issue? It would be great to have logs for both success case and the > failure case. > > Thanks so much for your help. > I think we have a potential fix for

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
On Fri, Aug 11, 2017 at 9:48 AM, Cong Wang wrote: > Hi, > > On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: >> On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >>> Hi John, >>> >>> Is it possible to try the attached

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Wei Wang
On Fri, Aug 11, 2017 at 9:48 AM, Cong Wang wrote: > Hi, > > On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: >> On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >>> Hi John, >>> >>> Is it possible to try the attached patch? >> >> Thanks so much for the quick turn around! >> >> So I dropped

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Cong Wang
Hi, On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: > On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >> Hi John, >> >> Is it possible to try the attached patch? > > Thanks so much for the quick turn around! > > So I dropped all the reverts you

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-11 Thread Cong Wang
Hi, On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: > On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >> Hi John, >> >> Is it possible to try the attached patch? > > Thanks so much for the quick turn around! > > So I dropped all the reverts you suggested, and applied this one > against

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread Wei Wang
On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: > On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >> Hi John, >> >> Is it possible to try the attached patch? > > Thanks so much for the quick turn around! > > So I dropped all the reverts you

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread Wei Wang
On Thu, Aug 10, 2017 at 11:12 AM, John Stultz wrote: > On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: >> Hi John, >> >> Is it possible to try the attached patch? > > Thanks so much for the quick turn around! > > So I dropped all the reverts you suggested, and applied this one > against

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread John Stultz
On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: > Hi John, > > Is it possible to try the attached patch? Thanks so much for the quick turn around! So I dropped all the reverts you suggested, and applied this one against 4.13-rc4, but I'm still seeing the problematic

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-10 Thread John Stultz
On Wed, Aug 9, 2017 at 10:41 PM, Wei Wang wrote: > Hi John, > > Is it possible to try the attached patch? Thanks so much for the quick turn around! So I dropped all the reverts you suggested, and applied this one against 4.13-rc4, but I'm still seeing the problematic behavior. > I am not sure

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
me >>>>>>> quirky behavior with my USB eth adapter. >>>>>>> >>>>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>>>> plugging it back in I often find that its not detected, and the system

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
> wrote: >>>>>>> So, with recent testing with my HiKey board, I've been noticing some >>>>>>> quirky behavior with my USB eth adapter. >>>>>>> >>>>>>> Basically, pluging the usb eth adapter in and then removing it, when &

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
then removing it, when >>>>>> plugging it back in I often find that its not detected, and the system >>>>>> slowly spits out the following message over and over: >>>>>> unregister_netdevice: waiting for eth0 to become free. Usage count

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
rky behavior with my USB eth adapter. >>>>>> >>>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>>> plugging it back in I often find that its not detected, and the system >>>>>> slowly spits

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
ome >>>>> quirky behavior with my USB eth adapter. >>>>> >>>>> Basically, pluging the usb eth adapter in and then removing it, when >>>>> plugging it back in I often find that its not detected, and the system >>>>> sl

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
r in and then removing it, when >>>>> plugging it back in I often find that its not detected, and the system >>>>> slowly spits out the following message over and over: >>>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>&

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang wrote: > > Does your USB adapter get an IPv6 address? Yes, it does. > If you see the problem starts to happen on commit > 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all > the following commits: > (from new to

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
On Wed, Aug 9, 2017 at 5:36 PM, Wei Wang wrote: > > Does your USB adapter get an IPv6 address? Yes, it does. > If you see the problem starts to happen on commit > 9514528d92d4cbe086499322370155ed69f5d06c, could you try reverting all > the following commits: > (from new to old) > 1eb04e7c9e63

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
cally, pluging the usb eth adapter in and then removing it, when >>>> plugging it back in I often find that its not detected, and the system >>>> slowly spits out the following message over and over: >>>> unregister_netdevice: waiting for eth0 to become free. Usage co

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Wei Wang
its not detected, and the system >>>> slowly spits out the following message over and over: >>>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >>> >>> The other bit is that after this starts printing, the board will no >>> longer

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
s not detected, and the system >>> slowly spits out the following message over and over: >>> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 >> >> The other bit is that after this starts printing, the board will no >> longer reboot (i

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread John Stultz
some >>> quirky behavior with my USB eth adapter. >>> >>> Basically, pluging the usb eth adapter in and then removing it, when >>> plugging it back in I often find that its not detected, and the system >>> slowly spits out the following message over and ove

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Cong Wang
ky behavior with my USB eth adapter. >> >> Basically, pluging the usb eth adapter in and then removing it, when >> plugging it back in I often find that its not detected, and the system >> slowly spits out the following message over and over: >> unregister_ne

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-09 Thread Cong Wang
ically, pluging the usb eth adapter in and then removing it, when >> plugging it back in I often find that its not detected, and the system >> slowly spits out the following message over and over: >> unregister_netdevice: waiting for eth0 to become free. Usage count = 1 > &g

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-07 Thread John Stultz
back in I often find that its not detected, and the system > slowly spits out the following message over and over: > unregister_netdevice: waiting for eth0 to become free. Usage count = 1 The other bit is that after this starts printing, the board will no longer reboot (it hangs conti

Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-07 Thread John Stultz
ts not detected, and the system > slowly spits out the following message over and over: > unregister_netdevice: waiting for eth0 to become free. Usage count = 1 The other bit is that after this starts printing, the board will no longer reboot (it hangs continuing to occasionally print the

unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-07 Thread John Stultz
and over: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 I've tried to go through and bisect it, but apparently the issue isn't always reproducible, as I'm apparently getting lots of false negatives (where I can't always reproduce boot to boot the issue on the same kernel

unregister_netdevice: waiting for eth0 to become free. Usage count = 1

2017-08-07 Thread John Stultz
and over: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 I've tried to go through and bisect it, but apparently the issue isn't always reproducible, as I'm apparently getting lots of false negatives (where I can't always reproduce boot to boot the issue on the same kernel