selftests: forwarding: gre_multipath: Update next-hop statistics match criteria
authorNir Dotan <nird@mellanox.com>
Tue, 7 Aug 2018 16:41:55 +0000 (19:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Aug 2018 23:02:30 +0000 (16:02 -0700)
gre_multipath test was using egress vlan_id matching on flows, for the
purpose of collecting next-hops statistics, later to be compared
against configured weights.
As matching on vlan_id on egress direction is not supported on all HW
devices, change the match criteria to use destination IP.

Signed-off-by: Nir Dotan <nird@mellanox.com>
Acked-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/gre_multipath.sh

index 3b1e047f7617674af1b18f742585e66884761d65..cca2baa03fb81b12f393a1df566dbe0494cabe27 100755 (executable)
@@ -95,10 +95,10 @@ sw1_create()
           nexthop dev g1b
 
        tc qdisc add dev $ul1 clsact
-       tc filter add dev $ul1 egress pref 111 prot 802.1q \
-          flower vlan_id 111 action pass
-       tc filter add dev $ul1 egress pref 222 prot 802.1q \
-          flower vlan_id 222 action pass
+       tc filter add dev $ul1 egress pref 111 prot ipv4 \
+          flower dst_ip 192.0.2.66 action pass
+       tc filter add dev $ul1 egress pref 222 prot ipv4 \
+          flower dst_ip 192.0.2.82 action pass
 }
 
 sw1_destroy()