[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <767cade7-4cc4-b47d-a8ca-a30c01e0ba47@netronome.com>
Date: Mon, 8 Jul 2019 10:10:00 +0100
From: Quentin Monnet <quentin.monnet@...ronome.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Björn Töpel <bjorn.topel@...il.com>
Subject: Re: [PATCH bpf-next v2 6/6] tools: Add definitions for devmap_hash
map type
2019-07-06 10:47 UTC+0200 ~ Toke Høiland-Jørgensen <toke@...hat.com>
> From: Toke Høiland-Jørgensen <toke@...hat.com>
>
> This adds a selftest, syncs the tools/ uapi header and adds the
> devmap_hash name to bpftool for the new devmap_hash map type.
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---
> tools/bpf/bpftool/map.c | 1 +
> tools/include/uapi/linux/bpf.h | 1 +
> tools/testing/selftests/bpf/test_maps.c | 16 ++++++++++++++++
> 3 files changed, 18 insertions(+)
>
> diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
> index 5da5a7311f13..c345f819b840 100644
> --- a/tools/bpf/bpftool/map.c
> +++ b/tools/bpf/bpftool/map.c
> @@ -37,6 +37,7 @@ const char * const map_type_name[] = {
> [BPF_MAP_TYPE_ARRAY_OF_MAPS] = "array_of_maps",
> [BPF_MAP_TYPE_HASH_OF_MAPS] = "hash_of_maps",
> [BPF_MAP_TYPE_DEVMAP] = "devmap",
> + [BPF_MAP_TYPE_DEVMAP_HASH] = "devmap_hash",
> [BPF_MAP_TYPE_SOCKMAP] = "sockmap",
> [BPF_MAP_TYPE_CPUMAP] = "cpumap",
> [BPF_MAP_TYPE_XSKMAP] = "xskmap",
> diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
> index cecf42c871d4..8afaa0a19c67 100644
> --- a/tools/include/uapi/linux/bpf.h
> +++ b/tools/include/uapi/linux/bpf.h
> @@ -134,6 +134,7 @@ enum bpf_map_type {
> BPF_MAP_TYPE_QUEUE,
> BPF_MAP_TYPE_STACK,
> BPF_MAP_TYPE_SK_STORAGE,
> + BPF_MAP_TYPE_DEVMAP_HASH,
> };
>
> /* Note that tracing related programs such as
Hi Toke, thanks for the bpftool update!
Could you please also complete the documentation and bash completion for
the map type? We probably want to add the new name to the "bpftool map
help" message [0], to the manual page [1], and to the bash completion
file [2].
Thanks,
Quentin
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bpf/bpftool/map.c?h=v5.2-rc6#n1271
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bpf/bpftool/Documentation/bpftool-map.rst?h=v5.2-rc6#n46
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bpf/bpftool/bash-completion/bpftool?h=v5.2-rc6#n449
Powered by blists - more mailing lists