]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel
authorDavid Ahern <dsa@cumulusnetworks.com>
Thu, 27 Apr 2017 16:11:13 +0000 (09:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Apr 2017 16:49:26 +0000 (12:49 -0400)
commit3993f2cb983b2100409851f7b2abb21d685ea19c
tree8830b0c2f03b2ec010a4746392ad345516982763
parent6d684e54690caef45cf14051ddeb7c71beeb681b
samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel

Add option to xdp1 and xdp_tx_iptunnel to insert xdp program in
SKB_MODE:
 - update set_link_xdp_fd to take a flags argument that is added to the
   RTM_SETLINK message

 - Add -S option to xdp1 and xdp_tx_iptunnel user code. When passed in
   XDP_FLAGS_SKB_MODE is set in the flags arg passed to set_link_xdp_fd

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/bpf_load.c
samples/bpf/bpf_load.h
samples/bpf/xdp1_user.c
samples/bpf/xdp_tx_iptunnel_user.c