]> 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)
commit64e62c6523cef6965fde838df5e6039ad7f24a1b
treec76dbceda09bc9e807db8217194952b1df4b554b
parenta1decb23773aedc1c9d98c5913b4e0c7bb82c407
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