aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-03-18 15:57:41 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2018-03-19 16:14:40 -0400
commit4c4c3c276c099f265c8b11e0132ce826ee718e2c (patch)
treeecd85d08aa7f5d2936ed7414304491a7892a4a94 /tools/include
parent1acc60b6a41bd4e43c3cb10e5395a5c812e158f5 (diff)
bpf: sockmap sample, add option to attach SK_MSG program
Add sockmap option to use SK_MSG program types. 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.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 13d9c59d79ce..01b9c97b172e 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -720,6 +720,15 @@ union bpf_attr {
720 * int bpf_override_return(pt_regs, rc) 720 * int bpf_override_return(pt_regs, rc)
721 * @pt_regs: pointer to struct pt_regs 721 * @pt_regs: pointer to struct pt_regs
722 * @rc: the return value to set 722 * @rc: the return value to set
723 *
724 * int bpf_msg_redirect_map(map, key, flags)
725 * Redirect msg to a sock in map using key as a lookup key for the
726 * sock in map.
727 * @map: pointer to sockmap
728 * @key: key to lookup sock in map
729 * @flags: reserved for future use
730 * Return: SK_PASS
731 *
723 */ 732 */
724#define __BPF_FUNC_MAPPER(FN) \ 733#define __BPF_FUNC_MAPPER(FN) \
725 FN(unspec), \ 734 FN(unspec), \
@@ -781,7 +790,9 @@ union bpf_attr {
781 FN(perf_prog_read_value), \ 790 FN(perf_prog_read_value), \
782 FN(getsockopt), \ 791 FN(getsockopt), \
783 FN(override_return), \ 792 FN(override_return), \
784 FN(sock_ops_cb_flags_set), 793 FN(sock_ops_cb_flags_set), \
794 FN(msg_redirect_map), \
795 FN(msg_apply_bytes),
785 796
786/* integer value in 'imm' field of BPF_CALL instruction selects which helper 797/* integer value in 'imm' field of BPF_CALL instruction selects which helper
787 * function eBPF program intends to call 798 * function eBPF program intends to call