diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-03-18 12:58:02 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-03-19 21:14:40 +0100 |
commit | 468b3fdea8826b232a570d95ba45272eb38919cb (patch) | |
tree | 64e4055c3e932bddb222c3a5ec814e413d8e7922 /tools/include | |
parent | 1c16c3126ac938562a68ab7041fe74ce0de53166 (diff) | |
download | linux-468b3fdea8826b232a570d95ba45272eb38919cb.tar.gz linux-468b3fdea8826b232a570d95ba45272eb38919cb.tar.bz2 linux-468b3fdea8826b232a570d95ba45272eb38919cb.zip |
bpf: sockmap sample support for bpf_msg_cork_bytes()
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>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/uapi/linux/bpf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 01b9c97b172e..e6924ab20fc3 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -792,7 +792,8 @@ union bpf_attr { FN(override_return), \ FN(sock_ops_cb_flags_set), \ FN(msg_redirect_map), \ - FN(msg_apply_bytes), + FN(msg_apply_bytes), \ + FN(msg_cork_bytes), /* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call |