linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture
@ 2018-07-08 17:58 petrm
  2018-07-08 17:58 ` Petr Machata
  2018-07-11  5:58 ` davem
  0 siblings, 2 replies; 4+ messages in thread
From: petrm @ 2018-07-08 17:58 UTC (permalink / raw)


The function do_test_span_vlan_dir_ips() is used for testing whether
mirrored packets are VLAN-encapsulated. But since it only considers
VLAN encapsulation, it may end up matching unmirrored ARP traffic as
well. One consequence is a rare failure of mirror_gre_vlan_bridge_1q's
test_gretap_untagged_egress. Decreasing ping cadence in mirror_test()
makes the problem easily reproducible.

Therefore tighten up the match criterion to only count those 802.1q
packets where the next header is IP.

Signed-off-by: Petr Machata <petrm at mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index d36dc26c6c51..07991e1025c7 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -105,7 +105,7 @@ do_test_span_vlan_dir_ips()
 	# Install the capture as skip_hw to avoid double-counting of packets.
 	# The traffic is meant for local box anyway, so will be trapped to
 	# kernel.
-	vlan_capture_install $dev "skip_hw vlan_id $vid"
+	vlan_capture_install $dev "skip_hw vlan_id $vid vlan_ethtype ip"
 	mirror_test v$h1 $ip1 $ip2 $dev 100 $expect
 	mirror_test v$h2 $ip2 $ip1 $dev 100 $expect
 	vlan_capture_uninstall $dev
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture
  2018-07-08 17:58 [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture petrm
@ 2018-07-08 17:58 ` Petr Machata
  2018-07-11  5:58 ` davem
  1 sibling, 0 replies; 4+ messages in thread
From: Petr Machata @ 2018-07-08 17:58 UTC (permalink / raw)


The function do_test_span_vlan_dir_ips() is used for testing whether
mirrored packets are VLAN-encapsulated. But since it only considers
VLAN encapsulation, it may end up matching unmirrored ARP traffic as
well. One consequence is a rare failure of mirror_gre_vlan_bridge_1q's
test_gretap_untagged_egress. Decreasing ping cadence in mirror_test()
makes the problem easily reproducible.

Therefore tighten up the match criterion to only count those 802.1q
packets where the next header is IP.

Signed-off-by: Petr Machata <petrm at mellanox.com>
---
 tools/testing/selftests/net/forwarding/mirror_lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh
index d36dc26c6c51..07991e1025c7 100644
--- a/tools/testing/selftests/net/forwarding/mirror_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh
@@ -105,7 +105,7 @@ do_test_span_vlan_dir_ips()
 	# Install the capture as skip_hw to avoid double-counting of packets.
 	# The traffic is meant for local box anyway, so will be trapped to
 	# kernel.
-	vlan_capture_install $dev "skip_hw vlan_id $vid"
+	vlan_capture_install $dev "skip_hw vlan_id $vid vlan_ethtype ip"
 	mirror_test v$h1 $ip1 $ip2 $dev 100 $expect
 	mirror_test v$h2 $ip2 $ip1 $dev 100 $expect
 	vlan_capture_uninstall $dev
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture
  2018-07-08 17:58 [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture petrm
  2018-07-08 17:58 ` Petr Machata
@ 2018-07-11  5:58 ` davem
  2018-07-11  5:58   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: davem @ 2018-07-11  5:58 UTC (permalink / raw)


From: Petr Machata <petrm at mellanox.com>
Date: Sun, 08 Jul 2018 19:58:55 +0200

> The function do_test_span_vlan_dir_ips() is used for testing whether
> mirrored packets are VLAN-encapsulated. But since it only considers
> VLAN encapsulation, it may end up matching unmirrored ARP traffic as
> well. One consequence is a rare failure of mirror_gre_vlan_bridge_1q's
> test_gretap_untagged_egress. Decreasing ping cadence in mirror_test()
> makes the problem easily reproducible.
> 
> Therefore tighten up the match criterion to only count those 802.1q
> packets where the next header is IP.
> 
> Signed-off-by: Petr Machata <petrm at mellanox.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture
  2018-07-11  5:58 ` davem
@ 2018-07-11  5:58   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-11  5:58 UTC (permalink / raw)


From: Petr Machata <petrm@mellanox.com>
Date: Sun, 08 Jul 2018 19:58:55 +0200

> The function do_test_span_vlan_dir_ips() is used for testing whether
> mirrored packets are VLAN-encapsulated. But since it only considers
> VLAN encapsulation, it may end up matching unmirrored ARP traffic as
> well. One consequence is a rare failure of mirror_gre_vlan_bridge_1q's
> test_gretap_untagged_egress. Decreasing ping cadence in mirror_test()
> makes the problem easily reproducible.
> 
> Therefore tighten up the match criterion to only count those 802.1q
> packets where the next header is IP.
> 
> Signed-off-by: Petr Machata <petrm at mellanox.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-07-11  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-08 17:58 [PATCH net-next] selftests: forwarding: mirror_lib: Tighten up VLAN capture petrm
2018-07-08 17:58 ` Petr Machata
2018-07-11  5:58 ` davem
2018-07-11  5:58   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).