Lines Matching +full:line +full:- +full:name

2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright (C) 2018-2019 Netronome Systems, Inc.
24 def __init__(self, line='<line not provided>', reader=None): argument
27 'Error at file offset %d, parsing line: %s' %
28 (reader.tell(), line))
30 BaseException.__init__(self, 'Error parsing line: %s' % line)
60 name, distincts arguments.
69 res['name'] = capture.group(3)
78 'name' : capture.group(6)
89 @filename: name of file to parse, usually include/uapi/linux/bpf.h in the
94 self.line = ''
117 capture = p.match(self.line)
121 end = end_re.match(self.line)
124 self.line = self.reader.readline()
129 # - "void"
130 # - "type name"
131 # - "type *name"
132 # - Same as above, with "const" and/or "struct" in front of type
133 # - "..." (undefined number of arguments, for bpf_trace_printk())
136 capture = p.match(self.line)
139 self.line = self.reader.readline()
144 capture = p.match(self.line)
152 self.line = self.reader.readline()
153 if self.line == ' *\n':
157 capture = p.match(self.line)
170 capture = p.match(self.line)
178 self.line = self.reader.readline()
179 if self.line == ' *\n':
183 capture = p.match(self.line)
197 if offset == -1:
203 self.line = self.reader.readline()
229 capture = assign_p.match(self.line)
231 # Skip line if an enum entry is assigned to another entry
232 self.line = self.reader.readline()
234 capture = bpf_p.match(self.line)
236 bpf_cmd_str += self.line
239 self.line = self.reader.readline()
251 self.desc_unique_helpers.add(proto['name'])
259 # Note: seek_to(..) discards the first line below the target search text,
268 capture = p.match(self.line)
270 fn_defines_str += self.line
275 self.line = self.reader.readline()
283 name = proto['name']
285 enum_val = self.helper_enum_vals[name]
287 raise Exception("Helper %s is missing from enum bpf_func_id" % name)
291 seen_helpers.add(name)
294 …der (#%d) must be aligned with its position (#%d) in enum bpf_func_id" % (name, desc_val, enum_val…
368 .. SPDX-License-Identifier: Linux-man-pages-copyleft
381 # a section must be followed by a blank line.
382 for line in re.sub('\n$', '', elem.desc, count=1).split('\n'):
383 print('{}{}'.format('\t\t' if line else '', line))
387 for line in elem.ret.rstrip().split('\n'):
388 print('{}{}'.format('\t\t' if line else '', line))
408 cmd = ['git', 'log', '-1', '--pretty=format:%cs', '--no-patch',
409 '-L',
431 BPF-HELPERS
433 -------------------------------------------------------------------------------
435 -------------------------------------------------------------------------------
445 written in a pseudo-assembly language, then attached to one of the several
449 These functions are restricted to a white-list of helpers defined in the
462 without requiring any foreign-function interface. As a result, calling helpers
502 generally translates into the C source code of the program containing a line
513 But as of this writing, the BPF sub-system is under heavy development. New eBPF
516 the efforts of the community, this page might not be up-to-date. If you want to
524 * *net/core/filter.c* contains the definition of most network-related helper
526 * *kernel/trace/bpf_trace.c* is the equivalent for most tracing program-related
535 **bpftool-feature**\ (8) for details). Add the **unprivileged** keyword to
563 **tc-bpf**\ (8)'''
575 proto['name']),
581 if a['name']:
586 one_arg += '*{}*\\ **'.format(a['name'])
614 -------------------------------------------------------------------------------
616 -------------------------------------------------------------------------------
762 /* This is auto-generated file. See bpf_doc.py for details. */
789 if proto['name'] in self.seen_helpers:
791 self.seen_helpers.add(proto['name'])
794 print(" * %s" % proto['name'])
798 # a section must be followed by a blank line.
799 for line in re.sub('\n$', '', helper.desc, count=1).split('\n'):
800 print(' *{}{}'.format(' \t' if line else '', line))
805 for line in helper.ret.rstrip().split('\n'):
806 print(' *{}{}'.format(' \t' if line else '', line))
810 proto['ret_star'], proto['name']), end='')
814 n = a['name']
815 if proto['name'] in self.overloaded_helpers and i == 0:
834 # ../include/uapi/linux/bpf.h, use it as a default name for the file to parse,
835 # otherwise the --filename argument will be required from the command line.
847 The RST-formatted output produced can be turned into a manual page with the
850 argParser.add_argument('--header', action='store_true',
853 argParser.add_argument('--filename', help='path to include/uapi/linux/bpf.h',
856 argParser.add_argument('--filename', help='path to include/uapi/linux/bpf.h')