summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorLawrence Brakmo <brakmo@fb.com>2018-01-26 03:14:09 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-01-26 03:41:14 +0300
commitde525be2ca2734865d29c4b67ddd29913b214906 (patch)
tree85e7a4d4b7c45de053c1d9528c1849d65252edfa /include/uapi
parentb73042b8a28e2603ac178295ab96c876ba5a97a1 (diff)
downloadlinux-de525be2ca2734865d29c4b67ddd29913b214906.tar.xz
bpf: Support passing args to sock_ops bpf function
Adds support for passing up to 4 arguments to sock_ops bpf functions. It reusues the reply union, so the bpf_sock_ops structures are not increased in size. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/bpf.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 406c19d6016b..8d5874c2c4ff 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -952,8 +952,9 @@ struct bpf_map_info {
struct bpf_sock_ops {
__u32 op;
union {
- __u32 reply;
- __u32 replylong[4];
+ __u32 args[4]; /* Optionally passed to bpf program */
+ __u32 reply; /* Returned by bpf program */
+ __u32 replylong[4]; /* Optionally returned by bpf prog */
};
__u32 family;
__u32 remote_ip4; /* Stored in network byte order */