Re: [PATCH bpf-next v3 05/21] bpf: implement bpf_seq_read() for bpf iterator

2020-05-08 Thread Yonghong Song
On 5/8/20 11:52 AM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:39 PM Yonghong Song wrote: bpf iterator uses seq_file to provide a lossless way to transfer data to user space. But we want to call bpf program after all objects have been traversed, and bpf program may write additional da

Re: [PATCH bpf-next v3 05/21] bpf: implement bpf_seq_read() for bpf iterator

2020-05-08 Thread Andrii Nakryiko
On Wed, May 6, 2020 at 10:39 PM Yonghong Song wrote: > > bpf iterator uses seq_file to provide a lossless > way to transfer data to user space. But we want to call > bpf program after all objects have been traversed, and > bpf program may write additional data to the > seq_file buffer. The current

[PATCH bpf-next v3 05/21] bpf: implement bpf_seq_read() for bpf iterator

2020-05-06 Thread Yonghong Song
bpf iterator uses seq_file to provide a lossless way to transfer data to user space. But we want to call bpf program after all objects have been traversed, and bpf program may write additional data to the seq_file buffer. The current seq_read() does not work for this use case. Besides allowing sto