]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: remove struct bpf_map_type_list
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 Apr 2017 13:34:58 +0000 (15:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Apr 2017 18:38:43 +0000 (14:38 -0400)
commit9861d36518dc67852ed5d1cb4f13127c6869d58e
treec76dbceda09bc9e807db8217194952b1df4b554b
parent8df7125ba7437949209e078e507d733f956c2b8e
bpf: remove struct bpf_map_type_list

There's no need to have struct bpf_map_type_list since
it just contains a list_head, the type, and the ops
pointer. Since the types are densely packed and not
actually dynamically registered, it's much easier and
smaller to have an array of type->ops pointer. Also
initialize this array statically to remove code needed
to initialize it.

In order to save duplicating the list, move it to the
types header file added by the previous patch and
include it in the same fashion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
include/linux/bpf_types.h
kernel/bpf/arraymap.c
kernel/bpf/hashtab.c
kernel/bpf/lpm_trie.c
kernel/bpf/stackmap.c
kernel/bpf/syscall.c