Similar to erspan collect_md mode in ipv4, the first patch adds support for ip6erspan collect metadata mode. The second patch adds the test case using bpf_skb_[gs]et_tunnel_key helpers.
The corresponding iproute2 patch: https://marc.info/?l=linux-netdev&m=151251545410047&w=2 William Tu (2): ip6_gre: add ip6 erspan collect_md mode samples/bpf: add ip6erspan sample code net/ipv6/ip6_gre.c | 110 +++++++++++++++++++++++++++++++---------- samples/bpf/tcbpf2_kern.c | 58 ++++++++++++++++++++++ samples/bpf/test_tunnel_bpf.sh | 37 ++++++++++++++ 3 files changed, 180 insertions(+), 25 deletions(-) -- 2.7.4