Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/bpf: Emit an #error directive known types list needs updating

Make the compiler report a clear error when bpf_helpers_doc.py needs
updating rather than rely on the fact that Clang fails to compile
English:

../../../lib/bpf/bpf_helper_defs.h:2707:1: error: unknown type name 'Unrecognized'
Unrecognized type 'struct bpf_inet_lookup', please add it to known types!

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191016085811.11700-1-jakub@cloudflare.com

authored by

Jakub Sitnicki and committed by
Daniel Borkmann
456a513b 5bc60de5

+1 -1
+1 -1
scripts/bpf_helpers_doc.py
··· 489 489 if t in self.mapped_types: 490 490 return self.mapped_types[t] 491 491 print("") 492 - print("Unrecognized type '%s', please add it to known types!" % t) 492 + print("#error \"Unrecognized type '%s', please add it to known types!\"" % t) 493 493 sys.exit(1) 494 494 495 495 seen_helpers = set()