History

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.

Quentin Monnet committed 8 years ago

Commit 7a279e91 parent f1982222 files · +20 −22Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+10−11
@@ -1010,7 +1010,6 @@ union bpf_attr { · 1009 unmodified lines
1010 * ::1010 * ::
1011 *1011 *
1012 * # sysctl kernel.perf_event_max_stack=<new value>1012 * # sysctl kernel.perf_event_max_stack=<new value>
1013 *
1014 * Return1013 * Return
1015 * The positive or null stack id on success, or a negative error1014 * 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 { · 804 unmodified lines
1821 * ::1820 * ::
1822 *1821 *
1823 * # sysctl kernel.perf_event_max_stack=<new value>1822 * # sysctl kernel.perf_event_max_stack=<new value>
1824 *
1825 * Return1823 * Return
1826 * a non-negative value equal to or less than size on success, or1824 * 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 * Description1828 * Description
@@ -1845,7 +1843,6 @@ union bpf_attr { · 14 unmodified lines
1845 * in socket filters where *skb*\ **->data** does not always point1843 * 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 * Return1846 * 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 { · 9 unmodified lines
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 vs1864 * **BPF_FIB_LOOKUP_DIRECT**
1867 * full lookup using FIB rules1865 * Do a direct table lookup vs full lookup using FIB
1868 * **BPF_FIB_LOOKUP_OUTPUT** means do lookup from an egress1866 * 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 or1871 * *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 * Return1873 * Return
1875 * Egress device index on success, 0 if packet needs to continue1874 * Egress device index on success, 0 if packet needs to continue
1876 * up the stack for further processing or a negative error in case1875 * up the stack for further processing or a negative error in case