]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: add map create command
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 15 Oct 2018 23:30:36 +0000 (16:30 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Oct 2018 23:39:21 +0000 (16:39 -0700)
commit87c922469d5f47f5a441fd9f980423f35933daa2
treed823270ded921a40ce37d54b4bdfbf607c8f402b
parent74ff524a62685b7bea83e0c59a8dda7c93395e39
tools: bpftool: add map create command

Add a way of creating maps from user space.  The command takes
as parameters most of the attributes of the map creation system
call command.  After map is created its pinned to bpffs.  This makes
it possible to easily and dynamically (without rebuilding programs)
test various corner cases related to map creation.

Map type names are taken from bpftool's array used for printing.
In general these days we try to make use of libbpf type names, but
there are no map type names in libbpf as of today.

As with most features I add the motivation is testing (offloads) :)

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/Documentation/bpftool-map.rst
tools/bpf/bpftool/Documentation/bpftool.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/common.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/map.c