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)
commit40077e0cf62206ac3c315b6991d8dcddb3703286
treec76dbceda09bc9e807db8217194952b1df4b554b
parentbe9370a7d8614d1fa54649c75de14458e79b91ec
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