On Fri, Aug 12, 2016 at 10:35:08AM -0700, William Tu via iovisor-dev wrote:
> The patch creates sample code exercising bpf_skb_{set,get}_tunnel_key,
> and bpf_skb_{set,get}_tunnel_opt for GRE, VXLAN, and GENEVE.  A native
> tunnel device is created in a namespace to interact with a lwtunnel
> device out of the namespace, with metadata enabled.  The bpf_skb_set_*
> program is attached to tc egress and bpf_skb_get_* is attached to egress
> qdisc.  A ping between two tunnels is used to verify correctness and
> the result of bpf_skb_get_* printed by bpf_trace_printk.
> 
> Signed-off-by: William Tu <[email protected]>
> ---
>  samples/bpf/Makefile           |   1 +
>  samples/bpf/bpf_helpers.h      |   8 +++
>  samples/bpf/tcbpf2_kern.c      | 157 
> +++++++++++++++++++++++++++++++++++++++++
>  samples/bpf/test_tunnel_bpf.sh | 120 +++++++++++++++++++++++++++++++
>  4 files changed, 286 insertions(+)
...
>  /* llvm builtin functions that eBPF C program may use to
>   * emit BPF_LD_ABS and BPF_LD_IND instructions
> diff --git a/samples/bpf/tcbpf2_kern.c b/samples/bpf/tcbpf2_kern.c
> new file mode 100644
> index 0000000..ca0467d
> --- /dev/null
> +++ b/samples/bpf/tcbpf2_kern.c
> @@ -0,0 +1,157 @@
> +#include <uapi/linux/bpf.h>

awesome test.
Please add license banner and send it to netdev.
Thanks!

_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to