diff options
author | Yonghong Song <[email protected]> | 2020-05-13 11:02:18 -0700 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2020-05-13 12:30:50 -0700 |
commit | 2e3ed68bfcd9c5ca2cf8b88ba23a34992ccd0b1f (patch) | |
tree | 7a6512153de614c5ef0f5ef361da4ba3d19d5b7b /tools/perf/scripts/python/syscall-counts.py | |
parent | 21aef70eade22a656297c28d5da93301915d2ac2 (diff) |
bpf: Add comments to interpret bpf_prog return values
Add a short comment in bpf_iter_run_prog() function to
explain how bpf_prog return value is converted to
seq_ops->show() return value:
bpf_prog return seq_ops()->show() return
0 0
1 -EAGAIN
When show() return value is -EAGAIN, the current
bpf_seq_read() will end. If the current seq_file buffer
is empty, -EAGAIN will return to user space. Otherwise,
the buffer will be copied to user space.
In both cases, the next bpf_seq_read() call will
try to show the same object which returned -EAGAIN
previously.
Signed-off-by: Yonghong Song <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions