]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selftests: forwarding: Tweak tc filters for mirror-to-gretap tests
authorPetr Machata <petrm@mellanox.com>
Thu, 28 Jun 2018 16:56:33 +0000 (18:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 11:34:09 +0000 (20:34 +0900)
When running mirror_gre_bridge_1d_vlan tests on veth, several issues
cause spurious failures:

- vlan_ethtype should be ip, not ipv6 even in mirror-to-ip6gretap case,
  because the overlay packet is still IPv4.
- Similarly ip_proto matches the innermost IP protocol, so can't be used
  to filter out GRE packet. Drop the corresponding condition.
- Because the above fixes the filters to match in slow path as well,
  they need to be made skip_hw so as not to double-count packets.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh

index 3bb4c2ba7b14281340b4560ce21be3a9bd79bd48..197e769c2ed16a65826c3bd67fb560725a28697b 100755 (executable)
@@ -74,12 +74,14 @@ test_vlan_match()
 
 test_gretap()
 {
-       test_vlan_match gt4 'vlan_id 555 vlan_ethtype ip' "mirror to gretap"
+       test_vlan_match gt4 'skip_hw vlan_id 555 vlan_ethtype ip' \
+                       "mirror to gretap"
 }
 
 test_ip6gretap()
 {
-       test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap"
+       test_vlan_match gt6 'skip_hw vlan_id 555 vlan_ethtype ip' \
+                       "mirror to ip6gretap"
 }
 
 test_gretap_stp()
index 619b469365be171c7a0ba39fbc84693214eb9e65..1c18e332cd4f2af3c7b0ca48dceb3e1634259377 100644 (file)
@@ -62,7 +62,7 @@ full_test_span_gre_dir_vlan_ips()
                          "$backward_type" "$ip1" "$ip2"
 
        tc filter add dev $h3 ingress pref 77 prot 802.1q \
-               flower $vlan_match ip_proto 0x2f \
+               flower $vlan_match \
                action pass
        mirror_test v$h1 $ip1 $ip2 $h3 77 10
        tc filter del dev $h3 ingress pref 77
index 1ac5038ae25664a5d15d8a9167327c97c1394156..d3e75bb6a2d860082d1ed9b806e86c5cd071b4cf 100755 (executable)
@@ -88,12 +88,14 @@ test_vlan_match()
 
 test_gretap()
 {
-       test_vlan_match gt4 'vlan_id 555 vlan_ethtype ip' "mirror to gretap"
+       test_vlan_match gt4 'skip_hw vlan_id 555 vlan_ethtype ip' \
+                       "mirror to gretap"
 }
 
 test_ip6gretap()
 {
-       test_vlan_match gt6 'vlan_id 555 vlan_ethtype ipv6' "mirror to ip6gretap"
+       test_vlan_match gt6 'skip_hw vlan_id 555 vlan_ethtype ip' \
+                       "mirror to ip6gretap"
 }
 
 test_span_gre_forbidden_cpu()