| @@ -3171,13 +3171,12 @@ union bpf_attr { · 3170 unmodified lines |
| 3171 | 3171 | * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags) |
| 3172 | 3172 | * Description |
| 3173 | 3173 | * Copy *size* bytes from *data* into a ring buffer *ringbuf*. |
| 3174 | | − * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of |
| 3175 | | − * new data availability is sent. |
| 3176 | | − * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of |
| 3177 | | − * new data availability is sent unconditionally. |
| 3174 | + * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3175 | + * of new data availability is sent. |
| 3176 | + * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3177 | + * of new data availability is sent unconditionally. |
| 3178 | 3178 | * Return |
| 3179 | | − * 0, on success; |
| 3180 | | − * < 0, on error. |
| 3179 | + * 0 on success, or a negative error in case of failure. |
| 3181 | 3180 | * |
| 3182 | 3181 | * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) |
| 3183 | 3182 | * Description |
| @@ -3189,20 +3188,20 @@ union bpf_attr { · 5 unmodified lines |
| 3189 | 3188 | * void bpf_ringbuf_submit(void *data, u64 flags) |
| 3190 | 3189 | * Description |
| 3191 | 3190 | * Submit reserved ring buffer sample, pointed to by *data*. |
| 3192 | | − * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of |
| 3193 | | − * new data availability is sent. |
| 3194 | | − * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of |
| 3195 | | − * new data availability is sent unconditionally. |
| 3191 | + * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3192 | + * of new data availability is sent. |
| 3193 | + * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3194 | + * of new data availability is sent unconditionally. |
| 3196 | 3195 | * Return |
| 3197 | 3196 | * Nothing. Always succeeds. |
| 3198 | 3197 | * |
| 3199 | 3198 | * void bpf_ringbuf_discard(void *data, u64 flags) |
| 3200 | 3199 | * Description |
| 3201 | 3200 | * Discard reserved ring buffer sample, pointed to by *data*. |
| 3202 | | − * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of |
| 3203 | | − * new data availability is sent. |
| 3204 | | − * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of |
| 3205 | | − * new data availability is sent unconditionally. |
| 3201 | + * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification |
| 3202 | + * of new data availability is sent. |
| 3203 | + * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 3204 | + * of new data availability is sent unconditionally. |
| 3206 | 3205 | * Return |
| 3207 | 3206 | * Nothing. Always succeeds. |
| 3208 | 3207 | * |
| @@ -3210,16 +3209,18 @@ union bpf_attr { · 1 unmodified line |
| 3210 | 3209 | * Description |
| 3211 | 3210 | * Query various characteristics of provided ring buffer. What |
| 3212 | 3211 | * exactly is queries is determined by *flags*: |
| 3213 | | − * - BPF_RB_AVAIL_DATA - amount of data not yet consumed; |
| 3214 | | − * - BPF_RB_RING_SIZE - the size of ring buffer; |
| 3215 | | − * - BPF_RB_CONS_POS - consumer position (can wrap around); |
| 3216 | | − * - BPF_RB_PROD_POS - producer(s) position (can wrap around); |
| 3217 | | − * Data returned is just a momentary snapshots of actual values |
| 3212 | + * |
| 3213 | + * * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed. |
| 3214 | + * * **BPF_RB_RING_SIZE**: The size of ring buffer. |
| 3215 | + * * **BPF_RB_CONS_POS**: Consumer position (can wrap around). |
| 3216 | + * * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around). |
| 3217 | + * |
| 3218 | + * Data returned is just a momentary snapshot of actual values |
| 3218 | 3219 | * and could be inaccurate, so this facility should be used to |
| 3219 | 3220 | * power heuristics and for reporting, not to make 100% correct |
| 3220 | 3221 | * calculation. |
| 3221 | 3222 | * Return |
| 3222 | | − * Requested value, or 0, if flags are not recognized. |
| 3223 | + * Requested value, or 0, if *flags* are not recognized. |
| 3223 | 3224 | * |
| 3224 | 3225 | * int bpf_csum_level(struct sk_buff *skb, u64 level) |
| 3225 | 3226 | * Description |