bpf: Remove the cgroup -> bpf header dependecy
authorJakub Kicinski <kuba@kernel.org>
Thu, 16 Dec 2021 02:55:38 +0000 (18:55 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 16 Dec 2021 22:57:10 +0000 (14:57 -0800)
commitfd1740b6abac39f68ce12e201697f106e0f1d519
treed433789c16f3bf5d5cbdbc07268a9f9e71a65564
parentaef2feda97b840ec38e9fa53d0065188453304e8
bpf: Remove the cgroup -> bpf header dependecy

Remove the dependency from cgroup-defs.h to bpf-cgroup.h and bpf.h.
This reduces the incremental build size of x86 allmodconfig after
bpf.h was touched from ~17k objects rebuilt to ~5k objects.
bpf.h is 2.2kLoC and is modified relatively often.

We need a new header with just the definition of struct cgroup_bpf
and enum cgroup_bpf_attach_type, this is akin to cgroup-defs.h.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/bpf/20211216025538.1649516-4-kuba@kernel.org
include/linux/bpf-cgroup-defs.h [new file with mode: 0644]
include/linux/bpf-cgroup.h
include/linux/cgroup-defs.h