* [PATCH net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test
@ 2024-10-02 5:10 Kacper Ludwinski
2024-10-04 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kacper Ludwinski @ 2024-10-02 5:10 UTC (permalink / raw)
To: davem
Cc: kuba, vladimir.oltean, linux-kernel, linux-kselftest, netdev,
pabeni, petrm, horms, edumazet, shuah, Kacper Ludwinski,
Hangbin Liu, Shuah Khan
Currently, the second bridge command overwrites the first one.
Fix this by adding this VID to the interface behind $swp2.
The one_bridge_two_pvids() test intends to check that there is no
leakage of traffic between bridge ports which have a single VLAN - the
PVID VLAN.
Because of a typo, port $swp1 is configured with a PVID twice (second
command overwrites first), and $swp2 isn't configured at all (and since
the bridge vlan_default_pvid property is set to 0, this port will not
have a PVID at all, so it will drop all untagged and priority-tagged
traffic).
So, instead of testing the configuration that was intended, we are
testing a different one, where one port has PVID 2 and the other has
no PVID. This incorrect version of the test should also pass, but is
ineffective for its purpose, so fix the typo.
This typo has an impact on results of the test,
potentially leading to wrong conclusions regarding
the functionality of a network device.
The tests results:
TEST: Switch ports in VLAN-aware bridge with different PVIDs:
Unicast non-IP untagged [ OK ]
Multicast non-IP untagged [ OK ]
Broadcast non-IP untagged [ OK ]
Unicast IPv4 untagged [ OK ]
Multicast IPv4 untagged [ OK ]
Unicast IPv6 untagged [ OK ]
Multicast IPv6 untagged [ OK ]
Unicast non-IP VID 1 [ OK ]
Multicast non-IP VID 1 [ OK ]
Broadcast non-IP VID 1 [ OK ]
Unicast IPv4 VID 1 [ OK ]
Multicast IPv4 VID 1 [ OK ]
Unicast IPv6 VID 1 [ OK ]
Multicast IPv6 VID 1 [ OK ]
Unicast non-IP VID 4094 [ OK ]
Multicast non-IP VID 4094 [ OK ]
Broadcast non-IP VID 4094 [ OK ]
Unicast IPv4 VID 4094 [ OK ]
Multicast IPv4 VID 4094 [ OK ]
Unicast IPv6 VID 4094 [ OK ]
Multicast IPv6 VID 4094 [ OK ]
Fixes: 476a4f05d9b8 ("selftests: forwarding: add a no_forwarding.sh test")
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Kacper Ludwinski <kac.ludwinski@icloud.com>
---
tools/testing/selftests/net/forwarding/no_forwarding.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
v5:
- Add test results impacted by the changes
- Fix typo in commit message
v4:
- Add revision history od this patch
- Add "Reviewed-by:"
- Limit number of characters in commit to 80
- Add impact explanation to commit message
- Link: https://lore.kernel.org/linux-kselftest/20240930063543.94247-1-kac.ludwinski@icloud.com/
v3:
- Edit commit message
- Add missing Signed-off-by
- Link: https://lore.kernel.org/linux-kselftest/20240927112824.339-1-kac.ludwinski@icloud.com/
v2:
- Add missing CCs
- Fix typo in commit message
- Add target name
- Link: https://lore.kernel.org/linux-kselftest/fQknN_r6POzmrp8UVjyA3cknLnB1HB9I_jfaHoQScvvgHr59VfUNRs9IDo4kQHm1uxEp8_Luym2Vi6_aUGJIec3ZPhjY2qnJ57NgLZGA3K4=@protonmail.com/
v1:
- Link: https://lore.kernel.org/linux-kselftest/20240925050539.1906-1-kacper@ludwinski.dev/
diff --git a/tools/testing/selftests/net/forwarding/no_forwarding.sh b/tools/testing/selftests/net/forwarding/no_forwarding.sh
index 9e677aa64a06..694ece9ba3a7 100755
--- a/tools/testing/selftests/net/forwarding/no_forwarding.sh
+++ b/tools/testing/selftests/net/forwarding/no_forwarding.sh
@@ -202,7 +202,7 @@ one_bridge_two_pvids()
ip link set $swp2 master br0
bridge vlan add dev $swp1 vid 1 pvid untagged
- bridge vlan add dev $swp1 vid 2 pvid untagged
+ bridge vlan add dev $swp2 vid 2 pvid untagged
run_test "Switch ports in VLAN-aware bridge with different PVIDs"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test
2024-10-02 5:10 [PATCH net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test Kacper Ludwinski
@ 2024-10-04 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-04 22:40 UTC (permalink / raw)
To: Kacper Ludwinski
Cc: davem, kuba, vladimir.oltean, linux-kernel, linux-kselftest,
netdev, pabeni, petrm, horms, edumazet, shuah, liuhangbin, skhan
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 2 Oct 2024 14:10:16 +0900 you wrote:
> Currently, the second bridge command overwrites the first one.
> Fix this by adding this VID to the interface behind $swp2.
>
> The one_bridge_two_pvids() test intends to check that there is no
> leakage of traffic between bridge ports which have a single VLAN - the
> PVID VLAN.
>
> [...]
Here is the summary with links:
- [net,v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test
https://git.kernel.org/netdev/net/c/9f49d14ec41c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-04 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 5:10 [PATCH net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test Kacper Ludwinski
2024-10-04 22:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox