Commit bcc7f554 authored by Quentin Monnet's avatar Quentin Monnet Committed by Alexei Starovoitov

bpf: Fix formatting in documentation for BPF helpers

When producing the bpf-helpers.7 man page from the documentation from
the BPF user space header file, rst2man complains:

    <stdin>:2636: (ERROR/3) Unexpected indentation.
    <stdin>:2640: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

Let's fix formatting for the relevant chunk (item list in
bpf_ringbuf_query()'s description), and for a couple other functions.
Signed-off-by: default avatarQuentin Monnet <quentin@isovalent.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200623153935.6215-1-quentin@isovalent.com
parent b338cb92
...@@ -3171,13 +3171,12 @@ union bpf_attr { ...@@ -3171,13 +3171,12 @@ union bpf_attr {
* int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
* Description * Description
* Copy *size* bytes from *data* into a ring buffer *ringbuf*. * Copy *size* bytes from *data* into a ring buffer *ringbuf*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* 0, on success; * 0 on success, or a negative error in case of failure.
* < 0, on error.
* *
* void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
* Description * Description
...@@ -3189,20 +3188,20 @@ union bpf_attr { ...@@ -3189,20 +3188,20 @@ union bpf_attr {
* void bpf_ringbuf_submit(void *data, u64 flags) * void bpf_ringbuf_submit(void *data, u64 flags)
* Description * Description
* Submit reserved ring buffer sample, pointed to by *data*. * Submit reserved ring buffer sample, pointed to by *data*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* Nothing. Always succeeds. * Nothing. Always succeeds.
* *
* void bpf_ringbuf_discard(void *data, u64 flags) * void bpf_ringbuf_discard(void *data, u64 flags)
* Description * Description
* Discard reserved ring buffer sample, pointed to by *data*. * Discard reserved ring buffer sample, pointed to by *data*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* Nothing. Always succeeds. * Nothing. Always succeeds.
* *
...@@ -3210,16 +3209,18 @@ union bpf_attr { ...@@ -3210,16 +3209,18 @@ union bpf_attr {
* Description * Description
* Query various characteristics of provided ring buffer. What * Query various characteristics of provided ring buffer. What
* exactly is queries is determined by *flags*: * exactly is queries is determined by *flags*:
* - BPF_RB_AVAIL_DATA - amount of data not yet consumed; *
* - BPF_RB_RING_SIZE - the size of ring buffer; * * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed.
* - BPF_RB_CONS_POS - consumer position (can wrap around); * * **BPF_RB_RING_SIZE**: The size of ring buffer.
* - BPF_RB_PROD_POS - producer(s) position (can wrap around); * * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
* Data returned is just a momentary snapshots of actual values * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
*
* Data returned is just a momentary snapshot of actual values
* and could be inaccurate, so this facility should be used to * and could be inaccurate, so this facility should be used to
* power heuristics and for reporting, not to make 100% correct * power heuristics and for reporting, not to make 100% correct
* calculation. * calculation.
* Return * Return
* Requested value, or 0, if flags are not recognized. * Requested value, or 0, if *flags* are not recognized.
* *
* int bpf_csum_level(struct sk_buff *skb, u64 level) * int bpf_csum_level(struct sk_buff *skb, u64 level)
* Description * Description
......
...@@ -3171,13 +3171,12 @@ union bpf_attr { ...@@ -3171,13 +3171,12 @@ union bpf_attr {
* int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
* Description * Description
* Copy *size* bytes from *data* into a ring buffer *ringbuf*. * Copy *size* bytes from *data* into a ring buffer *ringbuf*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* 0, on success; * 0 on success, or a negative error in case of failure.
* < 0, on error.
* *
* void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
* Description * Description
...@@ -3189,20 +3188,20 @@ union bpf_attr { ...@@ -3189,20 +3188,20 @@ union bpf_attr {
* void bpf_ringbuf_submit(void *data, u64 flags) * void bpf_ringbuf_submit(void *data, u64 flags)
* Description * Description
* Submit reserved ring buffer sample, pointed to by *data*. * Submit reserved ring buffer sample, pointed to by *data*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* Nothing. Always succeeds. * Nothing. Always succeeds.
* *
* void bpf_ringbuf_discard(void *data, u64 flags) * void bpf_ringbuf_discard(void *data, u64 flags)
* Description * Description
* Discard reserved ring buffer sample, pointed to by *data*. * Discard reserved ring buffer sample, pointed to by *data*.
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
* new data availability is sent. * of new data availability is sent.
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
* new data availability is sent unconditionally. * of new data availability is sent unconditionally.
* Return * Return
* Nothing. Always succeeds. * Nothing. Always succeeds.
* *
...@@ -3210,16 +3209,18 @@ union bpf_attr { ...@@ -3210,16 +3209,18 @@ union bpf_attr {
* Description * Description
* Query various characteristics of provided ring buffer. What * Query various characteristics of provided ring buffer. What
* exactly is queries is determined by *flags*: * exactly is queries is determined by *flags*:
* - BPF_RB_AVAIL_DATA - amount of data not yet consumed; *
* - BPF_RB_RING_SIZE - the size of ring buffer; * * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed.
* - BPF_RB_CONS_POS - consumer position (can wrap around); * * **BPF_RB_RING_SIZE**: The size of ring buffer.
* - BPF_RB_PROD_POS - producer(s) position (can wrap around); * * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
* Data returned is just a momentary snapshots of actual values * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
*
* Data returned is just a momentary snapshot of actual values
* and could be inaccurate, so this facility should be used to * and could be inaccurate, so this facility should be used to
* power heuristics and for reporting, not to make 100% correct * power heuristics and for reporting, not to make 100% correct
* calculation. * calculation.
* Return * Return
* Requested value, or 0, if flags are not recognized. * Requested value, or 0, if *flags* are not recognized.
* *
* int bpf_csum_level(struct sk_buff *skb, u64 level) * int bpf_csum_level(struct sk_buff *skb, u64 level)
* Description * Description
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment