linux-stable/include
Yonghong Song 057996380a bpf: Add batch ops to all htab bpf map
htab can't use generic batch support due some problematic behaviours
inherent to the data structre, i.e. while iterating the bpf map  a
concurrent program might delete the next entry that batch was about to
use, in that case there's no easy solution to retrieve the next entry,
the issue 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.

This commits implements BPF_MAP_LOOKUP_BATCH and adds support for new
command BPF_MAP_LOOKUP_AND_DELETE_BATCH. Note that for update/delete
batch ops it is possible to use the generic implementations.

[1] https://lore.kernel.org/bpf/20190724165803.87470-1-brianvv@google.com/
[2] https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@fb.com/

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115184308.162644-6-brianvv@google.com
2020-01-15 14:00:35 -08:00
..
acpi
asm-generic powerpc updates for 5.5 #2 2019-12-06 13:36:31 -08:00
clocksource
crypto
drm mm + drm coherent memory support for vmwgfx 2019-11-30 09:38:11 -08:00
dt-bindings ARM: Device-tree updates 2019-12-05 12:09:47 -08:00
keys powerpc updates for 5.5 2019-11-30 14:35:43 -08:00
kunit
kvm
linux bpf: Add batch ops to all htab bpf map 2020-01-15 14:00:35 -08:00
math-emu
media drm main pull for 5.5-rc1 2019-11-27 17:45:48 -08:00
misc
net bpf: tcp: Support tcp_congestion_ops in bpf 2020-01-09 08:46:18 -08:00
pcmcia
ras
rdma IB/core: Introduce rdma_user_mmap_entry_insert_range() API 2019-12-12 16:55:36 -05:00
scsi
soc net: mscc: ocelot: export ANA, DEV and QSYS registers to include/soc/mscc 2020-01-05 23:22:33 -08:00
sound ASoC: Fixes for v5.5 2019-12-17 14:18:32 +01:00
target
trace sctp: move trace_sctp_probe_path into sctp_outq_sack 2019-12-26 13:06:45 -08:00
uapi bpf: Add batch ops to all htab bpf map 2020-01-15 14:00:35 -08:00
vdso
video
xen xen/interface: re-define FRONT/BACK_RING_ATTACH() 2019-12-20 13:44:42 +01:00