bpf: Add map-in-map support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpf: Fix and simplifications on inline map lookupkernel/ kernel/ | +15 | 1 reply | |
| 2/4 | bpf: Add array of maps supportinclude/ include/ kernel/ +5 more | +225 | 0 replies | |
| 3/4 | bpf: Add hash of maps supportinclude/ include/ kernel/ +2 more | +134 | 0 replies | |
| 4/4 | bpf: Add tests for map-in-mapsamples/ samples/ samples/ +6 more | +451 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Alexei Starovoitov | Daniel Borkmann |
|---|---|---|
| 1/4 | A-b | A-b |
| 2/4 | A-b | A-b |
| 3/4 | A-b | A-b |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/4] bpf: Add map-in-map support
This patchset adds map-in-map support (map->map).
One use case is the (vips -> webservers) in the L4 load balancer so that different vips can be backed by different set of webservers.
Please refer to the individual commit log for details.
Martin KaFai Lau (4):
bpf: Fix and simplifications on inline map lookup
bpf: Add array of maps support
bpf: Add hash of maps support
bpf: Add tests for map-in-map
include/linux/bpf.h | 3 + include/uapi/linux/bpf.h | 3 + kernel/bpf/Makefile | 2 +- kernel/bpf/arraymap.c | 74 ++++++++++-- kernel/bpf/hashtab.c | 121 +++++++++++++++++++ kernel/bpf/map_in_map.c | 97 ++++++++++++++++ kernel/bpf/map_in_map.h | 23 ++++ kernel/bpf/syscall.c | 13 ++- kernel/bpf/verifier.c | 57 +++++++-- samples/bpf/Makefile | 4 + samples/bpf/bpf_helpers.h | 1 + samples/bpf/bpf_load.c | 22 +++- samples/bpf/test_map_in_map_kern.c | 173 ++++++++++++++++++++++++++++ samples/bpf/test_map_in_map_user.c | 116 +++++++++++++++++++ tools/include/uapi/linux/bpf.h | 3 + tools/lib/bpf/bpf.c | 17 +++ tools/lib/bpf/bpf.h | 2 + tools/testing/selftests/bpf/test_verifier.c | 131 ++++++++++++++++++--- 18 files changed, 823 insertions(+), 39 deletions(-) create mode 100644 kernel/bpf/map_in_map.c create mode 100644 kernel/bpf/map_in_map.h create mode 100644 samples/bpf/test_map_in_map_kern.c create mode 100644 samples/bpf/test_map_in_map_user.c
Signature · 1 line
2.9.3