mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-17 22:24:18 -04:00
cache: enforce cache groups
Set up build time warnings to safeguard against future header changes of organized structs. Warning includes: 1) whether all variables are still in the same cache group 2) whether all the cache groups have the sum of the members size (in the maximum condition, including all members defined in configs) The __cache_group* variables are ignored in kernel-doc check in the various header files they appear in to enforce the cache groups. Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Coco Li <lixiaoyan@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1592,6 +1592,11 @@ sub push_parameter($$$$$) {
|
||||
$parameterdescs{$param} = "anonymous\n";
|
||||
$anon_struct_union = 1;
|
||||
}
|
||||
elsif ($param =~ "__cacheline_group" )
|
||||
# handle cache group enforcing variables: they do not need be described in header files
|
||||
{
|
||||
return; # ignore __cacheline_group_begin and __cacheline_group_end
|
||||
}
|
||||
|
||||
# warn if parameter has no description
|
||||
# (but ignore ones starting with # as these are not parameters
|
||||
|
||||
Reference in New Issue
Block a user