kernel_optimize_test/scripts
Quentin Monnet 6f96674dbd bpf: relax constraints on formatting for eBPF helper documentation
The Python script used to parse and extract eBPF helpers documentation
from include/uapi/linux/bpf.h expects a very specific formatting for the
descriptions (single dot represents a space, '>' stands for a tab):

    /*
     ...
     *.int bpf_helper(list of arguments)
     *.>    Description
     *.>    >       Start of description
     *.>    >       Another line of description
     *.>    >       And yet another line of description
     *.>    Return
     *.>    >       0 on success, or a negative error in case of failure
     ...
     */

This is too strict, and painful for developers who wants to add
documentation for new helpers. Worse, it is extremely difficult to check
that the formatting is correct during reviews. Change the format
expected by the script and make it more flexible. The script now works
whether or not the initial space (right after the star) is present, and
accepts both tabs and white spaces (or a combination of both) for
indenting description sections and contents.

Concretely, something like the following would now be supported:

    /*
     ...
     *int bpf_helper(list of arguments)
     *......Description
     *.>    >       Start of description...
     *>     >       Another line of description
     *..............And yet another line of description
     *>     Return
     *.>    ........0 on success, or a negative error in case of failure
     ...
     */

While at it, remove unnecessary carets from each regex used with match()
in the script. They are redundant, as match() tries to match from the
beginning of the string by default.

v2: Remove unnecessary caret when a regex is used with match().

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-05-02 17:46:50 +02:00
..
basic
coccinelle
dtc Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
gcc-plugins
gdb
genksyms kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically 2018-04-07 19:04:02 +09:00
kconfig kconfig: extend output of 'listnewconfig' 2018-04-13 23:23:11 +09:00
ksymoops
mod
package kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg 2018-04-13 23:18:41 +09:00
selinux
tracing
.gitignore
adjust_autoksyms.sh Kbuild updates for v4.17 2018-04-03 15:51:22 -07:00
asn1_compiler.c kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
bloat-o-meter syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention 2018-04-09 16:47:28 +02:00
bootgraph.pl
bpf_helpers_doc.py bpf: relax constraints on formatting for eBPF helper documentation 2018-05-02 17:46:50 +02:00
check_00index.sh
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl checkpatch: whinge about bool bitfields 2018-04-11 10:28:36 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: show the code context 2018-04-05 21:36:21 -07:00
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh
headers.sh
insert-sys-cert.c
kallsyms.c arm64 updates for 4.17 2018-04-04 16:01:43 -07:00
Kbuild.include Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
kernel-doc
ld-version.sh
leaking_addresses.pl leaking_addresses: check if file name contains address 2018-04-07 08:50:34 +10:00
Lindent
link-vmlinux.sh
Makefile
Makefile.asm-generic
Makefile.build kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: use HOSTLDFLAGS for single .c executables 2018-04-07 19:04:02 +09:00
Makefile.kasan
Makefile.kcov
Makefile.lib kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost
Makefile.modsign
Makefile.ubsan
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
namespace.pl
objdiff
parse-maintainers.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl RISC-V changes for 4.17 2018-04-04 16:43:47 -07:00
setlocalversion
show_delta
sign-file.c
sortextable.c
sortextable.h
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
tags.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh