diff options
| author | Quentin Monnet <quentin.monnet@netronome.com> | 2018-05-29 07:27:44 -0400 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-29 15:42:13 -0400 |
| commit | 7a279e93330bd4f0074973293f1cd1aacf7c5fa6 (patch) | |
| tree | 028388c902a8a63b4231eba7e63fd7d2784cf42d /tools/include/uapi/linux | |
| parent | f198222f056745b2622c89190a13c5a485011014 (diff) | |
bpf: clean up eBPF helpers documentation
These are minor edits for the eBPF helpers documentation in
include/uapi/linux/bpf.h.
The main fix consists in removing "BPF_FIB_LOOKUP_", because it ends
with a non-escaped underscore that gets interpreted by rst2man and
produces the following message in the resulting manual page:
DOCUTILS SYSTEM MESSAGES
System Message: ERROR/3 (/tmp/bpf-helpers.rst:, line 1514)
Unknown target name: "bpf_fib_lookup".
Other edits consist in:
- Improving formatting for flag values for "bpf_fib_lookup()" helper.
- Emphasising a parameter name in description of the return value for
"bpf_get_stack()" helper.
- Removing unnecessary blank lines between "Description" and "Return"
sections for the few helpers that would use it, for consistency.
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include/uapi/linux')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index cc68787f2d97..3f556b35ac8d 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -1010,7 +1010,6 @@ union bpf_attr { | |||
| 1010 | * :: | 1010 | * :: |
| 1011 | * | 1011 | * |
| 1012 | * # sysctl kernel.perf_event_max_stack=<new value> | 1012 | * # sysctl kernel.perf_event_max_stack=<new value> |
| 1013 | * | ||
| 1014 | * Return | 1013 | * Return |
| 1015 | * The positive or null stack id on success, or a negative error | 1014 | * The positive or null stack id on success, or a negative error |
| 1016 | * in case of failure. | 1015 | * in case of failure. |
| @@ -1821,10 +1820,9 @@ union bpf_attr { | |||
| 1821 | * :: | 1820 | * :: |
| 1822 | * | 1821 | * |
| 1823 | * # sysctl kernel.perf_event_max_stack=<new value> | 1822 | * # sysctl kernel.perf_event_max_stack=<new value> |
| 1824 | * | ||
| 1825 | * Return | 1823 | * Return |
| 1826 | * a non-negative value equal to or less than size on success, or | 1824 | * A non-negative value equal to or less than *size* on success, |
| 1827 | * a negative error in case of failure. | 1825 | * or a negative error in case of failure. |
| 1828 | * | 1826 | * |
| 1829 | * int skb_load_bytes_relative(const struct sk_buff *skb, u32 offset, void *to, u32 len, u32 start_header) | 1827 | * int skb_load_bytes_relative(const struct sk_buff *skb, u32 offset, void *to, u32 len, u32 start_header) |
| 1830 | * Description | 1828 | * Description |
| @@ -1845,7 +1843,6 @@ union bpf_attr { | |||
| 1845 | * in socket filters where *skb*\ **->data** does not always point | 1843 | * in socket filters where *skb*\ **->data** does not always point |
| 1846 | * to the start of the mac header and where "direct packet access" | 1844 | * to the start of the mac header and where "direct packet access" |
| 1847 | * is not available. | 1845 | * is not available. |
| 1848 | * | ||
| 1849 | * Return | 1846 | * Return |
| 1850 | * 0 on success, or a negative error in case of failure. | 1847 | * 0 on success, or a negative error in case of failure. |
| 1851 | * | 1848 | * |
| @@ -1861,16 +1858,18 @@ union bpf_attr { | |||
| 1861 | * rt_metric is set to metric from route. | 1858 | * rt_metric is set to metric from route. |
| 1862 | * | 1859 | * |
| 1863 | * *plen* argument is the size of the passed in struct. | 1860 | * *plen* argument is the size of the passed in struct. |
| 1864 | * *flags* argument can be one or more BPF_FIB_LOOKUP_ flags: | 1861 | * *flags* argument can be a combination of one or more of the |
| 1862 | * following values: | ||
| 1865 | * | 1863 | * |
| 1866 | * **BPF_FIB_LOOKUP_DIRECT** means do a direct table lookup vs | 1864 | * **BPF_FIB_LOOKUP_DIRECT** |
| 1867 | * full lookup using FIB rules | 1865 | * Do a direct table lookup vs full lookup using FIB |
| 1868 | * **BPF_FIB_LOOKUP_OUTPUT** means do lookup from an egress | 1866 | * rules. |
| 1869 | * perspective (default is ingress) | 1867 | * **BPF_FIB_LOOKUP_OUTPUT** |
| 1868 | * Perform lookup from an egress perspective (default is | ||
| 1869 | * ingress). | ||
| 1870 | * | 1870 | * |
| 1871 | * *ctx* is either **struct xdp_md** for XDP programs or | 1871 | * *ctx* is either **struct xdp_md** for XDP programs or |
| 1872 | * **struct sk_buff** tc cls_act programs. | 1872 | * **struct sk_buff** tc cls_act programs. |
| 1873 | * | ||
| 1874 | * Return | 1873 | * Return |
| 1875 | * Egress device index on success, 0 if packet needs to continue | 1874 | * Egress device index on success, 0 if packet needs to continue |
| 1876 | * up the stack for further processing or a negative error in case | 1875 | * up the stack for further processing or a negative error in case |
