Re: [bpf-next PATCH v2 15/18] bpf: sockmap sample support for bpf_msg_cork_bytes()
flat view
From: Alexei Starovoitov <hidden>
Date: 2018-03-15 20:16:00
On Mon, Mar 12, 2018 at 12:24:21PM -0700, John Fastabend wrote:
quoted hunk ↗ jump to hunk
Add sample application support for the bpf_msg_cork_bytes helper. This lets the user specify how many bytes each verdict should apply to. Similar to apply_bytes() tests these can be run as a stand-alone test when used without other options or inline with other tests by using the txmsg_cork option along with any of the basic tests txmsg, txmsg_redir, txmsg_drop. Signed-off-by: John Fastabend <john.fastabend@gmail.com> --- include/uapi/linux/bpf_common.h | 7 ++-- samples/sockmap/sockmap_kern.c | 53 +++++++++++++++++++++++++---- samples/sockmap/sockmap_user.c | 19 ++++++++++ tools/include/uapi/linux/bpf.h | 3 +- tools/testing/selftests/bpf/bpf_helpers.h | 2 + 5 files changed, 71 insertions(+), 13 deletions(-)diff --git a/include/uapi/linux/bpf_common.h b/include/uapi/linux/bpf_common.h index ee97668..18be907 100644 --- a/include/uapi/linux/bpf_common.h +++ b/include/uapi/linux/bpf_common.h@@ -15,10 +15,9 @@ /* ld/ldx fields */ #define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 /* 32-bit */ -#define BPF_H 0x08 /* 16-bit */ -#define BPF_B 0x10 /* 8-bit */ -/* eBPF BPF_DW 0x18 64-bit */ +#define BPF_W 0x00 +#define BPF_H 0x08 +#define BPF_B 0x10
this hunk seems wrong here. Botched rebase?