Re: net: dsa: lantiq_gswip: getting the first selftests to pass

Florian Fainelli
2022-07-27T21:10:41Z

On 7/27/22 13:36, Martin Blumenstingl wrote:
> Hello,
>
> there are some pending issues with the Lantiq GSWIP driver.
> Vladimir suggested to get the kernel selftests to pass in a first step.
> I am starting with
> tools/testing/selftests/drivers/net/dsa/local_termination.sh as my
> understanding is that this contains the most basic tests and should be
> the first step.

Since I am in the process of re-designing my test rack at home with DSA devices, how do you run the selftests out of curiosity? Is there a nice diagram that explains how to get a physical connection set-up?

I used to have between 2 and 4 Ethernet controllers dedicated to each port of the switch of the DUT so I could run bridge/standalone/bandwidth testing but I feel like this is a tad extreme and am cutting down on the number of Ethernet ports so I can put NVMe drives in the machine instead.

Thanks!

>
> The good news is that not all tests are broken!
> There are eight tests which are not passing. Those eight can be split
> into two groups of four, because it's the same four tests that are
> failing for "standalone" and "bridge" interfaces:
> - Unicast IPv4 to unknown MAC address
> - Unicast IPv4 to unknown MAC address, allmulti
> - Multicast IPv4 to unknown group
> - Multicast IPv6 to unknown group
>
> What they all have in common is the fact that we're expecting that no
> packets are received. But in reality packets are received. I manually
> confirmed this by examining the tcpdump file which is generated by the
> selftests.
>
> Vladimir suggested in [0]:
>> [...] we'll need to make smaller steps, like disable address
>> learning on standalone ports, isolate FDBs, maybe offload the bridge TX
>> forwarding process (in order to populate the "Force no learning" bit in
>> tag_gswip.c properly), and only then will the local_termination test
>> also pass [...]
>
> Based on the failing tests I am wondering which step would be a good
> one to start with.
> Is this problem that the selftests are seeing a flooding issue? In
> that case I suspect that the "interesting behavior" (of the GSWIP's
> flooding behavior) that Vladimir described in [1] would be a starting
> point.
>
> Full local_termination.sh selftest output:
> TEST: lan2: Unicast IPv4 to primary MAC address [ OK ]
> TEST: lan2: Unicast IPv4 to macvlan MAC address [ OK ]
> TEST: lan2: Unicast IPv4 to unknown MAC address [FAIL]
> reception succeeded, but should have failed
> TEST: lan2: Unicast IPv4 to unknown MAC address, promisc [ OK ]
> TEST: lan2: Unicast IPv4 to unknown MAC address, allmulti [FAIL]
> reception succeeded, but should have failed
> TEST: lan2: Multicast IPv4 to joined group [ OK ]
> TEST: lan2: Multicast IPv4 to unknown group [FAIL]
> reception succeeded, but should have failed
> TEST: lan2: Multicast IPv4 to unknown group, promisc [ OK ]
> TEST: lan2: Multicast IPv4 to unknown group, allmulti [ OK ]
> TEST: lan2: Multicast IPv6 to joined group [ OK ]
> TEST: lan2: Multicast IPv6 to unknown group [FAIL]
> reception succeeded, but should have failed
> TEST: lan2: Multicast IPv6 to unknown group, promisc [ OK ]
> TEST: lan2: Multicast IPv6 to unknown group, allmulti [ OK ]
> TEST: br0: Unicast IPv4 to primary MAC address [ OK ]
> TEST: br0: Unicast IPv4 to macvlan MAC address [ OK ]
> TEST: br0: Unicast IPv4 to unknown MAC address [FAIL]
> reception succeeded, but should have failed
> TEST: br0: Unicast IPv4 to unknown MAC address, promisc [ OK ]
> TEST: br0: Unicast IPv4 to unknown MAC address, allmulti [FAIL]
> reception succeeded, but should have failed
> TEST: br0: Multicast IPv4 to joined group [ OK ]
> TEST: br0: Multicast IPv4 to unknown group [FAIL]
> reception succeeded, but should have failed
> TEST: br0: Multicast IPv4 to unknown group, promisc [ OK ]
> TEST: br0: Multicast IPv4 to unknown group, allmulti [ OK ]
> TEST: br0: Multicast IPv6 to joined group [ OK ]
> TEST: br0: Multicast IPv6 to unknown group [FAIL]
> reception succeeded, but should have failed
> TEST: br0: Multicast IPv6 to unknown group, promisc [ OK ]
> TEST: br0: Multicast IPv6 to unknown group, allmulti [ OK ]
>
>
> Thank you!
> Best regards,
> Martin
>
> [0] https://lore.kernel.org/netdev/20220706210651.ozvjcwwp2hquzmhn@skbuf/
> [1] https://lore.kernel.org/netdev/20220702185652.dpzrxuitacqp6m3t@skbuf/

--
Florian