diff mbox series

[bpf-next,2/4] bpf: Sync bpf.h to tools/

Message ID 4d2d70d45310947ca1d9cf138be3eabf2891c9e2.1532966062.git.rdna@fb.com
State Changes Requested, archived
Delegated to: BPF Maintainers
Headers show
Series Support bpf_get_socket_cookie in more prog types | expand

Commit Message

Andrey Ignatov July 30, 2018, 4:04 p.m. UTC
Sync bpf_get_socket_cookie() related bpf UAPI changes to tools/.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
---
 tools/include/uapi/linux/bpf.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Yonghong Song July 30, 2018, 11:49 p.m. UTC | #1
On 7/30/18 9:04 AM, Andrey Ignatov wrote:
> Sync bpf_get_socket_cookie() related bpf UAPI changes to tools/.
> 
> Signed-off-by: Andrey Ignatov <rdna@fb.com>

Acked-by: Yonghong Song <yhs@fb.com>
diff mbox series

Patch

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 870113916cac..0ebaaf7f3568 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1371,6 +1371,20 @@  union bpf_attr {
  * 		A 8-byte long non-decreasing number on success, or 0 if the
  * 		socket field is missing inside *skb*.
  *
+ * u64 bpf_get_socket_cookie(struct bpf_sock_addr *ctx)
+ * 	Description
+ * 		Equivalent to bpf_get_socket_cookie() helper that accepts
+ * 		*skb*, but gets socket from **struct bpf_sock_addr** contex.
+ * 	Return
+ * 		A 8-byte long non-decreasing number.
+ *
+ * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
+ * 	Description
+ * 		Equivalent to bpf_get_socket_cookie() helper that accepts
+ * 		*skb*, but gets socket from **struct bpf_sock_ops** contex.
+ * 	Return
+ * 		A 8-byte long non-decreasing number.
+ *
  * u32 bpf_get_socket_uid(struct sk_buff *skb)
  * 	Return
  * 		The owner UID of the socket associated to *skb*. If the socket