diff options
author | Martin KaFai Lau <martin.lau@kernel.org> | 2023-01-15 12:56:17 -0800 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2023-01-15 12:56:17 -0800 |
commit | 81bbbb697481700ef8f31619f9d1e96cca894b5a (patch) | |
tree | 905aca8486fed33eadf5853d56c4d8bd681e3b04 /samples | |
parent | 1c48391bc6739f5e3306919d4b887b92c35d5490 (diff) | |
parent | 7105f76fb56f5ed66a59bc048bc71e9f100e1d39 (diff) |
Merge branch 'bpf: Add ipip6 and ip6ip decap support for bpf_skb_adjust_room()'
Ziyang Xuan says:
====================
Add ipip6 and ip6ip decap support for bpf_skb_adjust_room().
Main use case is for using cls_bpf on ingress hook to decapsulate
IPv4 over IPv6 and IPv6 over IPv4 tunnel packets.
And add ipip6 and ip6ip decap testcases to verify that
bpf_skb_adjust_room() correctly decapsulate ipip6 and ip6ip
tunnel packets.
$./test_tc_tunnel.sh
ipip
encap 192.168.1.1 to 192.168.1.2, type ipip, mac none len 100
test basic connectivity
0
test bpf encap without decap (expect failure)
Ncat: TIMEOUT.
1
test bpf encap with tunnel device decap
0
test bpf encap with bpf decap
0
OK
ipip6
encap 192.168.1.1 to 192.168.1.2, type ipip6, mac none len 100
test basic connectivity
0
test bpf encap without decap (expect failure)
Ncat: TIMEOUT.
1
test bpf encap with tunnel device decap
0
test bpf encap with bpf decap
0
OK
ip6ip6
encap fd::1 to fd::2, type ip6tnl, mac none len 100
test basic connectivity
0
test bpf encap without decap (expect failure)
Ncat: TIMEOUT.
1
test bpf encap with tunnel device decap
0
test bpf encap with bpf decap
0
OK
sit
encap fd::1 to fd::2, type sit, mac none len 100
test basic connectivity
0
test bpf encap without decap (expect failure)
Ncat: TIMEOUT.
1
test bpf encap with tunnel device decap
0
test bpf encap with bpf decap
0
OK
...
OK. All tests passed
v3:
- Fix compilation failure of selftests/bpf.
- Combine two new branches in bpf_skb_adjust_room().
- Simplify description for new flags BPF_F_ADJ_ROOM_DECAP_L3_IP*.
v2:
- Use decap flags to indicate the new IP header.
Do not rely on skb->encapsulation.
====================
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions