Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Yonghong Song
On 5/8/20 10:30 PM, Alexei Starovoitov wrote: On 5/8/20 9:18 PM, Yonghong Song wrote: On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Alexei Starovoitov
On 5/8/20 9:18 PM, Yonghong Song wrote: On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/t

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Yonghong Song
On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identic

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Andrii Nakryiko
On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: > > Two helpers bpf_seq_printf and bpf_seq_write, are added for > writing data to the seq_file buffer. > > bpf_seq_printf supports common format string flag/width/type > fields so at least I can get identical results for > netlink and ipv6_route

[PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-06 Thread Yonghong Song
Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identical results for netlink and ipv6_route targets. For bpf_seq_printf and bpf_seq_write, return value -EOVE