Re: [PATCH bpf-next 3/8] bpf: add comments to interpret bpf_prog return values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 12, 2020 at 8:53 AM Yonghong Song <yhs@xxxxxx> wrote:
>
> 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@xxxxxx>
> ---

Acked-by: Andrii Nakryiko <andriin@xxxxxx>

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux