This commit updates documentation of the bpf_perf_event_output and bpf_perf_event_read helpers to match their implementation.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -313,8 +313,11 @@ union bpf_attr { · 312 unmodified lines | ||
| 313 | 313 | * @flags: room for future extensions |
| 314 | 314 | * Return: 0 on success or negative error |
| 315 | 315 | * |
| 316 | − * u64 bpf_perf_event_read(&map, index) | |
| 317 | − * Return: Number events read or error code | |
| 316 | + * u64 bpf_perf_event_read(map, flags) | |
| 317 | + * read perf event counter value | |
| 318 | + * @map: pointer to perf_event_array map | |
| 319 | + * @flags: index of event in the map or bitmask flags | |
| 320 | + * Return: value of perf event counter read or error code | |
| 318 | 321 | * |
| 319 | 322 | * int bpf_redirect(ifindex, flags) |
| 320 | 323 | * redirect to another netdev |
| @@ -328,11 +331,11 @@ union bpf_attr { · 7 unmodified lines | ||
| 328 | 331 | * @skb: pointer to skb |
| 329 | 332 | * Return: realm if != 0 |
| 330 | 333 | * |
| 331 | − * int bpf_perf_event_output(ctx, map, index, data, size) | |
| 334 | + * int bpf_perf_event_output(ctx, map, flags, data, size) | |
| 332 | 335 | * output perf raw sample |
| 333 | 336 | * @ctx: struct pt_regs* |
| 334 | 337 | * @map: pointer to perf_event_array map |
| 335 | − * @index: index of event in the map | |
| 338 | + * @flags: index of event in the map or bitmask flags | |
| 336 | 339 | * @data: data on stack to be output as raw data |
| 337 | 340 | * @size: size of data |
| 338 | 341 | * Return: 0 on success or negative error |