summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJohn Fastabend2018-03-18 20:58:12 +0100
committerDaniel Borkmann2018-03-19 21:14:41 +0100
commit0dcbbf6785799ba05b44df2ba6bcc1195f4f945c (patch)
treefc6bb4f05e72ef992a80d015fa963fa08d2cbc6d /tools/include/uapi/linux/bpf.h
parentbpf: sockmap add SK_DROP tests (diff)
downloadkernel-qcow2-linux-0dcbbf6785799ba05b44df2ba6bcc1195f4f945c.tar.gz
kernel-qcow2-linux-0dcbbf6785799ba05b44df2ba6bcc1195f4f945c.tar.xz
kernel-qcow2-linux-0dcbbf6785799ba05b44df2ba6bcc1195f4f945c.zip
bpf: sockmap sample test for bpf_msg_pull_data
This adds an option to test the msg_pull_data helper. This uses two options txmsg_start and txmsg_end to let the user specify start and end bytes to pull. The options can be used with txmsg_apply, txmsg_cork options as well as with any of the basic tests, txmsg, txmsg_redir and txmsg_drop (plus noisy variants) to run pull_data inline with those tests. By giving user direct control over the variables we can easily do negative testing as well as positive tests. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r--tools/include/uapi/linux/bpf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index e6924ab20fc3..d245c41213ac 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -793,7 +793,8 @@ union bpf_attr {
FN(sock_ops_cb_flags_set), \
FN(msg_redirect_map), \
FN(msg_apply_bytes), \
- FN(msg_cork_bytes),
+ FN(msg_cork_bytes), \
+ FN(msg_pull_data),
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
* function eBPF program intends to call