bpf: remove struct bpf_prog_type_list
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 Apr 2017 13:34:57 +0000 (15:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Apr 2017 18:38:43 +0000 (14:38 -0400)
commitbe9370a7d8614d1fa54649c75de14458e79b91ec
tree69ab002234e93207d87ad9864028557919c791df
parent98601e8bc62d41659eb6478d2f66fb35361597ac
bpf: remove struct bpf_prog_type_list

There's no need to have struct bpf_prog_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 a new
header file and include it in the places needing it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
include/linux/bpf_types.h [new file with mode: 0644]
kernel/bpf/syscall.c
kernel/trace/bpf_trace.c
net/core/filter.c