]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: Fix packet matching in mirroring selftests
authorPetr Machata <petrm@nvidia.com>
Tue, 9 Nov 2021 16:17:34 +0000 (17:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Nov 2021 14:38:44 +0000 (14:38 +0000)
commita025afbbdfef59ed0c81d84101dc755ce3e8d5ee
treef9e00b468a700d3521df75242bc6fab86a90de04
parent91143879e33e7498719775ba491fa427d439961a
selftests: forwarding: Fix packet matching in mirroring selftests

In commit 1008761ac751 ("cls_flower: Fix inability to match GRE/IPIP
packets"), cls_flower was fixed to match an outer packet of a tunneled
packet as would be expected, rather than dissecting to the inner packet and
matching on that.

This fix uncovered several issues in packet matching in mirroring
selftests:

- in mirror_gre_bridge_1d_vlan.sh and mirror_gre_vlan_bridge_1q.sh, the
  vlan_ethtype match is copied around as "ip", even as some of the tests
  are running over ip6gretap. This is fixed by using an "ipv6" for
  vlan_ethtype in the ip6gretap tests.

- in mirror_gre_changes.sh, a filter to count GRE packets is set up to
  match TTL of 50. This used to trigger in the offloaded datapath, where
  the envelope TTL was matched, but not in the software datapath, which
  considered TTL of the inner packet. Now that both match consistently, all
  the packets were double-counted. This is fixed by marking the filter as
  skip_hw, leaving only the SW datapath component active.

Fixes: 1008761ac751 ("cls_flower: Fix inability to match GRE/IPIP packets")
Signed-off-by: Petr Machata <petrm@nvidia.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_changes.sh
tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
tools/testing/selftests/net/forwarding/mirror_lib.sh
tools/testing/selftests/net/forwarding/mirror_vlan.sh