Lines Matching +full:uapi +full:- +full:header
2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright (C) 2018-2019 Netronome Systems, Inc.
109 @filename: name of file to parse, usually include/uapi/linux/bpf.h in the
151 # - "void"
152 # - "type name"
153 # - "type *name"
154 # - Same as above, with "const" and/or "struct" in front of type
155 # - "..." (undefined number of arguments, for bpf_trace_printk())
241 if offset == -1:
396 Checks the number of helpers/syscalls documented within the header file
427 .. See git log include/uapi/linux/bpf.h in kernel tree for details.
429 .. SPDX-License-Identifier: Linux-man-pages-copyleft
432 .. located in file include/uapi/linux/bpf.h of the Linux kernel sources
434 .. repository (header and footer).
460 version = subprocess.run(['make', '-s', '--no-print-directory', 'kernelversion'],
469 cmd = ['git', 'log', '-1', '--pretty=format:%cs', '--no-patch',
470 '-L',
471 '/{}/,/\\*\\//:include/uapi/linux/bpf.h'.format(delimiter)]
490 header = '''\
492 BPF-HELPERS
494 -------------------------------------------------------------------------------
496 -------------------------------------------------------------------------------
506 written in a pseudo-assembly language, then attached to one of the several
510 These functions are restricted to a white-list of helpers defined in the
523 without requiring any foreign-function interface. As a result, calling helpers
537 print(header.format(version=kernelVersion,
574 But as of this writing, the BPF sub-system is under heavy development. New eBPF
577 the efforts of the community, this page might not be up-to-date. If you want to
582 * *include/uapi/linux/bpf.h* is the main BPF header. It contains the full list
585 * *net/core/filter.c* contains the definition of most network-related helper
587 * *kernel/trace/bpf_trace.c* is the equivalent for most tracing program-related
596 **bpftool-feature**\\ (8) for details). Add the **unprivileged** keyword to
624 **tc-bpf**\\ (8)'''
671 header = '''\
675 -------------------------------------------------------------------------------
677 -------------------------------------------------------------------------------
685 print(header)
694 A printer for dumping collected information about helpers as C header to
826 header = '''\
827 /* This is auto-generated file. See bpf_doc.py for details. */
831 print(header)
954 # ../include/uapi/linux/bpf.h, use it as a default name for the file to parse,
955 # otherwise the --filename argument will be required from the command line.
958 bpfh = os.path.join(linuxRoot, 'include/uapi/linux/bpf.h')
960 # target -> output format -> printer
965 'header': PrinterHelpersHeader,
974 Parse eBPF header file and generate documentation for the eBPF API.
975 The RST-formatted output produced can be turned into a manual page with the
978 argParser.add_argument('--header', action='store_true',
979 help='generate C header file')
980 argParser.add_argument('--json', action='store_true',
983 argParser.add_argument('--filename', help='path to include/uapi/linux/bpf.h',
986 argParser.add_argument('--filename', help='path to include/uapi/linux/bpf.h')
1002 if args.header and args.json:
1003 error_die('Use either --header or --json, not both')
1006 if args.header:
1007 output_format = 'header'