Re: [PATCH 1/2] bpf: remove struct bpf_prog_type_list

2017-04-05 Thread Alexei Starovoitov
On Tue, Apr 04, 2017 at 07:27:10PM +0200, Johannes Berg wrote: > From: Johannes Berg > > 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

Re: [PATCH 1/2] bpf: remove struct bpf_prog_type_list

2017-04-04 Thread Johannes Berg
Oops, I really meant to send these as RFC more than anything, because I don't really understand why it's done that way :) FWIW, the bloat-o-meter looks similar in both cases, like this: add/remove: 0/11 grow/shrink: 9/1 up/down: 145/-365 (-220) function old

[PATCH 1/2] bpf: remove struct bpf_prog_type_list

2017-04-04 Thread Johannes Berg
From: Johannes Berg 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