diff options
| author | Teng Qin <qinteng@fb.com> | 2017-06-03 00:03:54 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-06-04 21:58:16 -0400 |
| commit | b7d3ed5be9bd7e0689eee0f0f36702937cd8f7c8 (patch) | |
| tree | 754be25be7f1808e265bf2e8a65d190fdeaa75da /tools/include | |
| parent | 41e9a8046c92e26a68fdf5a4cb831b7c60113602 (diff) | |
bpf: update perf event helper functions documentation
This commit updates documentation of the bpf_perf_event_output and
bpf_perf_event_read helpers to match their implementation.
Signed-off-by: Teng Qin <qinteng@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 94dfa9def355..e78aece03628 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -313,8 +313,11 @@ union bpf_attr { | |||
| 313 | * @flags: room for future extensions | 313 | * @flags: room for future extensions |
| 314 | * Return: 0 on success or negative error | 314 | * Return: 0 on success or negative error |
| 315 | * | 315 | * |
| 316 | * u64 bpf_perf_event_read(&map, index) | 316 | * u64 bpf_perf_event_read(map, flags) |
| 317 | * Return: Number events read or error code | 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 | * int bpf_redirect(ifindex, flags) | 322 | * int bpf_redirect(ifindex, flags) |
| 320 | * redirect to another netdev | 323 | * redirect to another netdev |
| @@ -328,11 +331,11 @@ union bpf_attr { | |||
| 328 | * @skb: pointer to skb | 331 | * @skb: pointer to skb |
| 329 | * Return: realm if != 0 | 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 | * output perf raw sample | 335 | * output perf raw sample |
| 333 | * @ctx: struct pt_regs* | 336 | * @ctx: struct pt_regs* |
| 334 | * @map: pointer to perf_event_array map | 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 | * @data: data on stack to be output as raw data | 339 | * @data: data on stack to be output as raw data |
| 337 | * @size: size of data | 340 | * @size: size of data |
| 338 | * Return: 0 on success or negative error | 341 | * Return: 0 on success or negative error |
