Re: [PATCH bpf-next 5/9] bpf: add batch ops to all htab bpf map

From: Alexei Starovoitov
Date: Mon Nov 18 2019 - 23:35:09 EST


On Mon, Nov 18, 2019 at 05:43:53PM -0800, Brian Vazquez wrote:
> From: Yonghong Song <yhs@xxxxxx>
>
> 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@xxxxxxxxxx/
> [2] https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@xxxxxx/
>
> Co-authored-by: Brian Vazquez <brianvv@xxxxxxxxxx>
> Signed-off-by: Brian Vazquez <brianvv@xxxxxxxxxx>
> Signed-off-by: Yonghong Song <yhs@xxxxxx>

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.