OSDN Git Service

bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments
authorAndrii Nakryiko <andriin@fb.com>
Mon, 15 Jun 2020 21:49:26 +0000 (14:49 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 16 Jun 2020 00:17:01 +0000 (02:17 +0200)
Fix definition of bpf_ringbuf_output() in UAPI header comments, which is used
to generate libbpf's bpf_helper_defs.h header. Return value is a number (error
code), not a pointer.

Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200615214926.3638836-1-andriin@fb.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h

index 1968481..974a713 100644 (file)
@@ -3168,7 +3168,7 @@ union bpf_attr {
  *     Return
  *             The id is returned or 0 in case the id could not be retrieved.
  *
- * void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
  *     Description
  *             Copy *size* bytes from *data* into a ring buffer *ringbuf*.
  *             If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
index 1968481..974a713 100644 (file)
@@ -3168,7 +3168,7 @@ union bpf_attr {
  *     Return
  *             The id is returned or 0 in case the id could not be retrieved.
  *
- * void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
  *     Description
  *             Copy *size* bytes from *data* into a ring buffer *ringbuf*.
  *             If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of