Skip to content

Commit b0659d8

Browse files
anakryikoborkmann
authored andcommitted
bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments
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: 457f443 ("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
1 parent c92cbae commit b0659d8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • include/uapi/linux
  • tools/include/uapi/linux

‎include/uapi/linux/bpf.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3168,7 +3168,7 @@ union bpf_attr {
31683168
* Return
31693169
* The id is returned or 0 in case the id could not be retrieved.
31703170
*
3171-
* void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
3171+
* int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
31723172
* Description
31733173
* Copy *size* bytes from *data* into a ring buffer *ringbuf*.
31743174
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of

‎tools/include/uapi/linux/bpf.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3168,7 +3168,7 @@ union bpf_attr {
31683168
* Return
31693169
* The id is returned or 0 in case the id could not be retrieved.
31703170
*
3171-
* void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
3171+
* int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
31723172
* Description
31733173
* Copy *size* bytes from *data* into a ring buffer *ringbuf*.
31743174
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of

0 commit comments

Comments
 (0)