summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2020-05-13 20:02:18 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-05-13 21:30:50 +0200
commit2e3ed68bfcd9c5ca2cf8b88ba23a34992ccd0b1f (patch)
tree7a6512153de614c5ef0f5ef361da4ba3d19d5b7b /net/netlink
parentbpf: Change btf_iter func proto prefix to "bpf_iter_" (diff)
downloadlinux-2e3ed68bfcd9c5ca2cf8b88ba23a34992ccd0b1f.tar.xz
linux-2e3ed68bfcd9c5ca2cf8b88ba23a34992ccd0b1f.zip
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 <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200513180218.2949517-1-yhs@fb.com
Diffstat (limited to 'net/netlink')
0 files changed, 0 insertions, 0 deletions