[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191119042012.3wpj5porwkntpfm4@ast-mbp.dhcp.thefacebook.com>
Date: Mon, 18 Nov 2019 20:35:01 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Brian Vazquez <brianvv@...gle.com>
Cc: Brian Vazquez <brianvv.kernel@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S . Miller" <davem@...emloft.net>,
Yonghong Song <yhs@...com>,
Stanislav Fomichev <sdf@...gle.com>,
Petar Penkov <ppenkov@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH bpf-next 5/9] bpf: add batch ops to all htab bpf map
On Mon, Nov 18, 2019 at 05:43:53PM -0800, Brian Vazquez wrote:
> From: Yonghong Song <yhs@...com>
>
> htab can't use generic batch support due some problematic behaviours
> inherent to the datastructre, i.e. while iterating the bpf map a
> concurrent program might delete the next entry that batch was about to
> use, in this case there's no easy solution to retrieve the next entry
> and the issua has been discussed multiple times (see [1] and [2]).
> The only way hmap can be traversed without the problem previously
> exposed is by making sure that the map is traversing entire buckets.
> This commit implements those strict requirements for hmap, the
> implementation follows the same interaction that generic support with
> some exceptions:
>
> - If keys/values buffer are not big enough to traverse a bucket,
> ENOSPC will be returned.
> - out_batch contains the value of the next bucket in the iteration, not
> the next key, but this is transparent for the user since the user
> should never use out_batch for other than bpf batch syscalls.
>
> Note that only lookup and lookup_and_delete batch ops require the hmap
> specific implementation and update/delete batch ops can be the generic
> ones.
>
> [1] https://lore.kernel.org/bpf/20190724165803.87470-1-brianvv@google.com/
> [2] https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@fb.com/
>
> Co-authored-by: Brian Vazquez <brianvv@...gle.com>
> Signed-off-by: Brian Vazquez <brianvv@...gle.com>
> Signed-off-by: Yonghong Song <yhs@...com>
SOB order is not quite correct.
If the patch was mainly developed by Yonghong it should have his 'From:'
then his SOB and then your SOB.
You can drop Co-authored-by field.
Patch 2 was also mainly done by Yonghong or not ?
If so it should have his 'From:' field.
Powered by blists - more mailing lists