In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment. For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a notification to the process if needed.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -4082,12 +4082,20 @@ union bpf_attr { · 4081 unmodified lines | ||
| 4082 | 4082 | * of new data availability is sent. |
| 4083 | 4083 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 4084 | 4084 | * of new data availability is sent unconditionally. |
| 4085 | + * If **0** is specified in *flags*, an adaptive notification | |
| 4086 | + * of new data availability is sent. | |
| 4087 | + * | |
| 4088 | + * An adaptive notification is a notification sent whenever the user-space | |
| 4089 | + * process has caught up and consumed all available payloads. In case the user-space | |
| 4090 | + * process is still processing a previous payload, then no notification is needed | |
| 4091 | + * as it will process the newly added payload automatically. | |
| 4085 | 4092 | * Return |
| 4086 | 4093 | * 0 on success, or a negative error in case of failure. |
| 4087 | 4094 | * |
| 4088 | 4095 | * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags) |
| 4089 | 4096 | * Description |
| 4090 | 4097 | * Reserve *size* bytes of payload in a ring buffer *ringbuf*. |
| 4098 | + * *flags* must be 0. | |
| 4091 | 4099 | * Return |
| 4092 | 4100 | * Valid pointer with *size* bytes of memory available; NULL, |
| 4093 | 4101 | * otherwise. |
| @@ -4099,6 +4107,10 @@ union bpf_attr { · 5 unmodified lines | ||
| 4099 | 4107 | * of new data availability is sent. |
| 4100 | 4108 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 4101 | 4109 | * of new data availability is sent unconditionally. |
| 4110 | + * If **0** is specified in *flags*, an adaptive notification | |
| 4111 | + * of new data availability is sent. | |
| 4112 | + * | |
| 4113 | + * See 'bpf_ringbuf_output()' for the definition of adaptive notification. | |
| 4102 | 4114 | * Return |
| 4103 | 4115 | * Nothing. Always succeeds. |
| 4104 | 4116 | * |
| @@ -4109,6 +4121,10 @@ union bpf_attr { · 4 unmodified lines | ||
| 4109 | 4121 | * of new data availability is sent. |
| 4110 | 4122 | * If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification |
| 4111 | 4123 | * of new data availability is sent unconditionally. |
| 4124 | + * If **0** is specified in *flags*, an adaptive notification | |
| 4125 | + * of new data availability is sent. | |
| 4126 | + * | |
| 4127 | + * See 'bpf_ringbuf_output()' for the definition of adaptive notification. | |
| 4112 | 4128 | * Return |
| 4113 | 4129 | * Nothing. Always succeeds. |
| 4114 | 4130 | * |