[PATCH bpf-next] selftests_bpf: extend test_tc_tunnel test with vxlan

2021-03-05 Thread Xuesen Huang
From: Xuesen Huang Add BPF_F_ADJ_ROOM_ENCAP_L2_ETH flag to the existing tests which encapsulates the ethernet as the inner l2 header. Update a vxlan encapsulation test case. Signed-off-by: Xuesen Huang Signed-off-by: Li Wang Signed-off-by: Willem de Bruijn --- tools/testing/selftests/bpf

Re: [PATCH] selftests_bpf: extend test_tc_tunnel test with vxlan

2021-03-05 Thread Xuesen Huang
> 2021年3月4日 下午10:02,Willem de Bruijn 写道: > > On Thu, Mar 4, 2021 at 1:42 AM Xuesen Huang wrote: >> >> From: Xuesen Huang >> >> Add BPF_F_ADJ_ROOM_ENCAP_L2_ETH flag to the existing tests which >> encapsulates the ethernet as the inner l2 header. &

[PATCH] selftests_bpf: extend test_tc_tunnel test with vxlan

2021-03-03 Thread Xuesen Huang
From: Xuesen Huang Add BPF_F_ADJ_ROOM_ENCAP_L2_ETH flag to the existing tests which encapsulates the ethernet as the inner l2 header. Update a vxlan encapsulation test case. Signed-off-by: Xuesen Huang Signed-off-by: Li Wang Signed-off-by: Willem de Bruijn --- tools/testing/selftests/bpf

[PATCH/v5] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
From: Xuesen Huang bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. Suggested-by: Willem de Bruijn Sig

Re: [PATCH/v4] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
> 2021年3月4日 上午2:53,Willem de Bruijn 写道: > > On Wed, Mar 3, 2021 at 7:33 AM Xuesen Huang wrote: >> >> From: Xuesen Huang >> >> bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets >> encapsulation. But that is not appropriat

Re: [PATCH/v4] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
Thanks Cong! Thanks to your suggestion, I try to add a simple test case to test_tc_tunnel. It works for me :) Thanks for your review. > 2021年3月3日 下午8:33,Xuesen Huang 写道: > > From: Xuesen Huang > > bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packe

[PATCH/v4] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-03-03 Thread Xuesen Huang
From: Xuesen Huang bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. Update test_tc_tunnel to verify add

[PATCH/v3] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-02-25 Thread Xuesen Huang
From: Xuesen Huang bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. v3: - Fix the code format. v2: Sugges

[PATCH/v2] bpf: add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH

2021-02-18 Thread Xuesen Huang
From: Xuesen Huang bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. Suggested-by: Willem de Bruijn Sig