[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cca36ce-2f8e-e5a4-4e80-f838f7f543fd@fb.com>
Date: Sat, 9 May 2020 21:51:14 -0700
From: Yonghong Song <yhs@...com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
CC: Andrii Nakryiko <andriin@...com>, <bpf@...r.kernel.org>,
Martin KaFai Lau <kafai@...com>, <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...com>,
Daniel Borkmann <daniel@...earbox.net>, <kernel-team@...com>
Subject: Re: [PATCH bpf-next v4 05/21] bpf: implement bpf_seq_read() for bpf
iterator
On 5/9/20 5:30 PM, Alexei Starovoitov wrote:
> On Sat, May 09, 2020 at 10:59:04AM -0700, Yonghong Song wrote:
>> +
>> + err = seq->op->show(seq, p);
>> + if (err > 0) {
>> + seq->count = offs;
>
> as far as I can see this condition can never happen.
> I understand that seq_read() has this logic, but four iterators
> implemented don't exercise this path.
> I guess it's ok to keep it, but may be add warn_once so we notice
> when things change?
Yes, it won't happen with our current bpf return values.
I keep it to be compatible with seq_read() and for potential
future use in case we want to enable this.
we will add a warn_once here.
Powered by blists - more mailing lists