mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable
@ 2018-12-27 14:21 Stefano Cappa
  2018-12-28  1:14 ` Florian Fainelli
  2018-12-28  3:05 ` Andy Duan
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Cappa @ 2018-12-27 14:21 UTC (permalink / raw)
  To: fugang.duan, davem, netdev, linux-kernel

Hi everyone,
I already posted this in NXP forum as a comment
(https://community.nxp.com/thread/359397), in yocto mailing list
(https://lists.yoctoproject.org/pipermail/yocto/2018-December/043664.html)
and in meta-freescale mailing list
(https://lists.yoctoproject.org/pipermail/meta-freescale/2018-December/023625.html)
A user in meta-freescale's mailing list suggested to resend this
message to the emails obtained running "./scripts/get_maintainer.pl -F
drivers/net/ethernet/freescale/fec_main.c".


The problem is:

If I boot my iMX6 device with ethernet cable attached and I execute "ping6
ff02::fb" to ping the multicast address I get this response:
~# ping6 ff02::fb
PING ff02::fb (ff02::fb): 56 data bytes
64 bytes from fe80::c2f:eff:fe11:2d71: seq=0 ttl=64 time=2.057 ms
64 bytes from fe80::809:1bfb:8d4c:ae54: seq=0 ttl=64 time=73.101 ms (DUP!)
64 bytes from fe80::3e28:6dff:feed:5b97: seq=0 ttl=64 time=150.772 ms
(DUP!)


Otherwise, If I unplug and plug again ethernet cable, I cannot ping the
multicast ipv6 address anymore.
The result is:
~# ping6 ff02::fb
PING ff02::fb (ff02::fb): 56 data bytes
ping6: sendto: Network is unreachable


The original NXP discussion was about older version of Linux, however
this issue is happening with both Linux 4.9.88 and Linux 4.17.
Probably also with the latest version, but I didn't try.


Do you have any suggestions? Is this a bug? This is really a
frustrating and I'm really
surprised to see the same problem also on Linux 4.17.


PS: I'm sorry for the double email, but the previous one was in html
and it was rejected.

Thank u.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable
  2018-12-27 14:21 iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable Stefano Cappa
@ 2018-12-28  1:14 ` Florian Fainelli
  2018-12-28  3:05 ` Andy Duan
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2018-12-28  1:14 UTC (permalink / raw)
  To: Stefano Cappa, fugang.duan, davem, netdev, linux-kernel
  Cc: Andrew Lunn, Vivien Didelot

Le 12/27/18 à 6:21 AM, Stefano Cappa a écrit :
> Hi everyone,
> I already posted this in NXP forum as a comment
> (https://community.nxp.com/thread/359397), in yocto mailing list
> (https://lists.yoctoproject.org/pipermail/yocto/2018-December/043664.html)
> and in meta-freescale mailing list
> (https://lists.yoctoproject.org/pipermail/meta-freescale/2018-December/023625.html)
> A user in meta-freescale's mailing list suggested to resend this
> message to the emails obtained running "./scripts/get_maintainer.pl -F
> drivers/net/ethernet/freescale/fec_main.c".
> 
> 
> The problem is:
> 
> If I boot my iMX6 device with ethernet cable attached and I execute "ping6
> ff02::fb" to ping the multicast address I get this response:
> ~# ping6 ff02::fb
> PING ff02::fb (ff02::fb): 56 data bytes
> 64 bytes from fe80::c2f:eff:fe11:2d71: seq=0 ttl=64 time=2.057 ms
> 64 bytes from fe80::809:1bfb:8d4c:ae54: seq=0 ttl=64 time=73.101 ms (DUP!)
> 64 bytes from fe80::3e28:6dff:feed:5b97: seq=0 ttl=64 time=150.772 ms
> (DUP!)
> 
> 
> Otherwise, If I unplug and plug again ethernet cable, I cannot ping the
> multicast ipv6 address anymore.
> The result is:
> ~# ping6 ff02::fb
> PING ff02::fb (ff02::fb): 56 data bytes
> ping6: sendto: Network is unreachable
> 
> 
> The original NXP discussion was about older version of Linux, however
> this issue is happening with both Linux 4.9.88 and Linux 4.17.
> Probably also with the latest version, but I didn't try.
> 
> 
> Do you have any suggestions? Is this a bug? This is really a
> frustrating and I'm really
> surprised to see the same problem also on Linux 4.17.

All multicast filter programming would occur from within the
set_multicast_list() function. At first glance, there are several things
that could be wrong:

- hash is only 6 bits, and written across a pair of 32-bit registers, so
that would leave only 10 unique multicast address entries if I
understand correctly how the hardware is designed

- if we are exceeding the maximum number of unique hash values/bit
positions then the interface should be put in promiscuous mode to allow
the reception of all traffic, and multicast filtering needs to be done
in software (very few drivers get this right)

I would instrument that function and see what is happening in there at
the time of failure.

> 
> 
> PS: I'm sorry for the double email, but the previous one was in html
> and it was rejected.
> 
> Thank u.
> 


-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable
  2018-12-27 14:21 iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable Stefano Cappa
  2018-12-28  1:14 ` Florian Fainelli
@ 2018-12-28  3:05 ` Andy Duan
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Duan @ 2018-12-28  3:05 UTC (permalink / raw)
  To: Stefano Cappa, davem, netdev, linux-kernel

From: Stefano Cappa <stefano.cappa.ks89@gmail.com>
> Hi everyone,
> I already posted this in NXP forum as a comment
> (https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fco
> mmunity.nxp.com%2Fthread%2F359397&amp;data=02%7C01%7Cfugang.dua
> n%40nxp.com%7C189d5cad534e470a162508d66c068de2%7C686ea1d3bc2b
> 4c6fa92cd99c5c301635%7C0%7C0%7C636815172743636032&amp;sdata=fb
> H1wYnfrMI4437OIeAEDG1W23Ry6S3fscNqhHD8Kas%3D&amp;reserved=0),
> in yocto mailing list
> (https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
> .yoctoproject.org%2Fpipermail%2Fyocto%2F2018-December%2F043664.html
> &amp;data=02%7C01%7Cfugang.duan%40nxp.com%7C189d5cad534e470a1
> 62508d66c068de2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C
> 636815172743636032&amp;sdata=Tomd6ITYFIQ5M8NWzSMJG3N2llTCJqQU
> Qg7oSY5zs4s%3D&amp;reserved=0)
> and in meta-freescale mailing list
> (https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
> .yoctoproject.org%2Fpipermail%2Fmeta-freescale%2F2018-December%2F02
> 3625.html&amp;data=02%7C01%7Cfugang.duan%40nxp.com%7C189d5cad5
> 34e470a162508d66c068de2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0
> %7C0%7C636815172743636032&amp;sdata=WPGDb3B3P3nBGdkKbrgeW3ls
> Po0jVrQmxk9UlfFIkCw%3D&amp;reserved=0)
> A user in meta-freescale's mailing list suggested to resend this message to the
> emails obtained running "./scripts/get_maintainer.pl -F
> drivers/net/ethernet/freescale/fec_main.c".
> 
> 
> The problem is:
> 
> If I boot my iMX6 device with ethernet cable attached and I execute "ping6
> ff02::fb" to ping the multicast address I get this response:
> ~# ping6 ff02::fb
> PING ff02::fb (ff02::fb): 56 data bytes
> 64 bytes from fe80::c2f:eff:fe11:2d71: seq=0 ttl=64 time=2.057 ms
> 64 bytes from fe80::809:1bfb:8d4c:ae54: seq=0 ttl=64 time=73.101 ms
> (DUP!)
> 64 bytes from fe80::3e28:6dff:feed:5b97: seq=0 ttl=64 time=150.772 ms
> (DUP!)
> 
> 
> Otherwise, If I unplug and plug again ethernet cable, I cannot ping the
> multicast ipv6 address anymore.
> The result is:
> ~# ping6 ff02::fb
> PING ff02::fb (ff02::fb): 56 data bytes
> ping6: sendto: Network is unreachable
> 
> 
> The original NXP discussion was about older version of Linux, however this
> issue is happening with both Linux 4.9.88 and Linux 4.17.
> Probably also with the latest version, but I didn't try.
> 
I just test it on L4.14 kernel, it works as blow log.
If you unplug and plug the ethernet cable, you should see the log print out:
Unplug:  IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Plug:    IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Please check the link status in your local.

Log:
root@imx8mqevk:~# ping6 ff02::fb
PING ff02::fb (ff02::fb): 56 data bytes
64 bytes from fe80::219:19ff:fe81:9149: seq=0 ttl=64 time=0.208 ms
64 bytes from fe80::be30:5bff:feeb:81f1: seq=0 ttl=64 time=1.586 ms (DUP!)
64 bytes from fe80::baac:6fff:fe37:e4d9: seq=0 ttl=64 time=1.611 ms (DUP!)
64 bytes from fe80::85da:f9d1:6bbc:f86d: seq=0 ttl=64 time=1.633 ms (DUP!)
64 bytes from fe80::38b2:b24:bc4a:1475: seq=0 ttl=64 time=1.653 ms (DUP!)
64 bytes from fe80::204:9fff:fe02:e33d: seq=0 ttl=64 time=1.673 ms (DUP!)
64 bytes from fe80::baac:6fff:fe37:e62f: seq=0 ttl=64 time=1.692 ms (DUP!)
64 bytes from fe80::cf53:3c0e:3d04:87c6: seq=0 ttl=64 time=1.712 ms (DUP!)
64 bytes from fe80::204:9fff:fe02:7786: seq=0 ttl=64 time=1.732 ms (DUP!)
64 bytes from fe80::f781:3862:65df:dadd: seq=0 ttl=64 time=1.752 ms (DUP!)
64 bytes from fe80::f69b:5750:754b:4583: seq=0 ttl=64 time=1.771 ms (DUP!)
64 bytes from fe80::204:9fff:fe02:c5eb: seq=0 ttl=64 time=1.791 ms (DUP!)
64 bytes from fe80::204:9fff:fe02:556a: seq=0 ttl=64 time=1.811 ms (DUP!)
64 bytes from fe80::20e:c6ff:fea6:6880: seq=0 ttl=64 time=1.830 ms (DUP!)
64 bytes from fe80::82dc:2912:4288:c88f: seq=0 ttl=64 time=1.850 ms (DUP!)
64 bytes from fe80::1479:ad62:9b34:1e3e: seq=0 ttl=64 time=1.869 ms (DUP!)
64 bytes from fe80::972f:1cc8:846f:85e2: seq=0 ttl=64 time=1.889 ms (DUP!)
64 bytes from fe80::62ae:d015:196e:5d76: seq=0 ttl=64 time=1.908 ms (DUP!)
64 bytes from fe80::204:9fff:fe03:c37e: seq=0 ttl=64 time=2.439 ms (DUP!)
64 bytes from fe80::204:9fff:fe05:cf0f: seq=0 ttl=64 time=2.462 ms (DUP!)
64 bytes from fe80::204:9fff:fe05:cf11: seq=0 ttl=64 time=3.550 ms (DUP!)
^C
--- ff02::fb ping statistics ---
1 packets transmitted, 1 packets received, 20 duplicates, 0% packet loss
round-trip min/avg/max = 0.208/1.829/3.550 ms
root@imx8mqevk:~# [ 2338.265902] fec 30be0000.ethernet eth0: Link is Down
[ 2338.298193] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

root@imx8mqevk:~# [ 2344.410482] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2344.418129] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

root@imx8mqevk:~# ping6 ff02::fb
PING ff02::fb (ff02::fb): 56 data bytes
64 bytes from fe80::219:19ff:fe81:9149: seq=0 ttl=64 time=0.158 ms
64 bytes from fe80::be30:5bff:feeb:81f1: seq=0 ttl=64 time=1.853 ms (DUP!)
64 bytes from fe80::38b2:b24:bc4a:1475: seq=0 ttl=64 time=1.879 ms (DUP!)
64 bytes from fe80::85da:f9d1:6bbc:f86d: seq=0 ttl=64 time=1.901 ms (DUP!)
64 bytes from fe80::cf53:3c0e:3d04:87c6: seq=0 ttl=64 time=1.921 ms (DUP!)
64 bytes from fe80::baac:6fff:fe37:e4d9: seq=0 ttl=64 time=1.940 ms (DUP!)
64 bytes from fe80::f781:3862:65df:dadd: seq=0 ttl=64 time=1.961 ms (DUP!)


> 
> Do you have any suggestions? Is this a bug? This is really a frustrating and I'm
> really surprised to see the same problem also on Linux 4.17.
> 
> 
> PS: I'm sorry for the double email, but the previous one was in html and it was
> rejected.
> 
> Thank u.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-28  3:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 14:21 iMX6 FEC driver Linux-fslc 4.17 - IPV6 Multicast not working when unplugging/plugging ethernet cable Stefano Cappa
2018-12-28  1:14 ` Florian Fainelli
2018-12-28  3:05 ` Andy Duan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®