diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2017-05-01 11:26:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-01 16:42:37 +0200 |
commit | 6387d0111ca4740b69a082a92fc373185af11133 (patch) | |
tree | ac6e2a31dc6650b92de059ce1c6261f7fd33a65a /samples/bpf/bpf_load.c | |
parent | Merge branch 'xdp-netlink-ext-ack' (diff) | |
download | linux-6387d0111ca4740b69a082a92fc373185af11133.tar.xz linux-6387d0111ca4740b69a082a92fc373185af11133.zip |
samples/bpf: fix SKB_MODE flag to be a 32-bit unsigned int
The kernel side of XDP_FLAGS_SKB_MODE is unsigned, and the rtnetlink
IFLA_XDP_FLAGS is defined as NLA_U32. Thus, userspace programs under
samples/bpf/ should use the correct type.
Fixes: 3993f2cb983b ("samples/bpf: Add support for SKB_MODE to xdp1 and xdp_tx_iptunnel")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/bpf_load.c')
-rw-r--r-- | samples/bpf/bpf_load.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c index 0ec0dea3c41e..4221dc359453 100644 --- a/samples/bpf/bpf_load.c +++ b/samples/bpf/bpf_load.c @@ -14,6 +14,7 @@ #include <linux/perf_event.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> +#include <linux/types.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/syscall.h> @@ -585,7 +586,7 @@ struct ksym *ksym_search(long key) return &syms[0]; } -int set_link_xdp_fd(int ifindex, int fd, int flags) +int set_link_xdp_fd(int ifindex, int fd, __u32 flags) { struct sockaddr_nl sa; int sock, seq = 0, len, ret = -1; |