Re: [PATCH net-next v7 5/5] selftests: net: add a test for ip6gretap and ip6erspan with VLAN tags
From: Matthias May
Date: Thu Dec 03 2026 - 03:38:50 EST
On 01/12/2026 01:59, Anton Danilov wrote:
Add ip6_gre_vlan_inherit.sh. It sends IPv4 and IPv6 packets with a
given TTL and TOS through ip6gretap, with and without a key, and
through ip6erspan v1 and v2, directly and through a VLAN device on top
of the tunnel, and checks on the receiving side that
- the outer hop limit and traffic class are those of the inner
packet, with a VLAN tag in front of it or without;
- on ip6erspan, the COS field of the ERSPAN header is the one that the
inner TOS asks for, for IPv4 and for IPv6.
The outer header is matched with tc flower and the COS field with tc
u32, and the packets are counted.
Without the previous patches of this series 10 of the 24 checks fail:
the hop limit behind a tag on ip6gretap with a key, the hop limit and
traffic class behind a tag on ip6erspan, and the COS of IPv4 packets on
ip6erspan.
*SNIP
Hi Anton
This looks to me like a functional copy of the l2_tos_ttl_inherit.sh selftest.
This test already asserts that TTL and TOS are correctly inherited for gretap and ip6gretap.
It does not test anything for ip6erspan, but could be extended to include it.
Since you're adding a test for ip6erspan, would not the same be needed for erspan?
BR
Matthias