]> git.baikalelectronics.ru Git - 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)
commit842efb6c1dda21ab83c4eaeacf28c3af33da460b
tree8830b0c2f03b2ec010a4746392ad345516982763
parent89afb3051d76935a1ca662901db81bb008e867f9
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