Commit b7d3ed5b authored by Teng Qin's avatar Teng Qin Committed by David S. Miller

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: default avatarTeng Qin <qinteng@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 41e9a804
...@@ -313,8 +313,11 @@ union bpf_attr { ...@@ -313,8 +313,11 @@ union bpf_attr {
* @flags: room for future extensions * @flags: room for future extensions
* Return: 0 on success or negative error * Return: 0 on success or negative error
* *
* u64 bpf_perf_event_read(&map, index) * u64 bpf_perf_event_read(map, flags)
* Return: Number events read or error code * read perf event counter value
* @map: pointer to perf_event_array map
* @flags: index of event in the map or bitmask flags
* Return: value of perf event counter read or error code
* *
* int bpf_redirect(ifindex, flags) * int bpf_redirect(ifindex, flags)
* redirect to another netdev * redirect to another netdev
...@@ -328,11 +331,11 @@ union bpf_attr { ...@@ -328,11 +331,11 @@ union bpf_attr {
* @skb: pointer to skb * @skb: pointer to skb
* Return: realm if != 0 * Return: realm if != 0
* *
* int bpf_perf_event_output(ctx, map, index, data, size) * int bpf_perf_event_output(ctx, map, flags, data, size)
* output perf raw sample * output perf raw sample
* @ctx: struct pt_regs* * @ctx: struct pt_regs*
* @map: pointer to perf_event_array map * @map: pointer to perf_event_array map
* @index: index of event in the map * @flags: index of event in the map or bitmask flags
* @data: data on stack to be output as raw data * @data: data on stack to be output as raw data
* @size: size of data * @size: size of data
* Return: 0 on success or negative error * Return: 0 on success or negative error
......
...@@ -313,8 +313,11 @@ union bpf_attr { ...@@ -313,8 +313,11 @@ union bpf_attr {
* @flags: room for future extensions * @flags: room for future extensions
* Return: 0 on success or negative error * Return: 0 on success or negative error
* *
* u64 bpf_perf_event_read(&map, index) * u64 bpf_perf_event_read(map, flags)
* Return: Number events read or error code * read perf event counter value
* @map: pointer to perf_event_array map
* @flags: index of event in the map or bitmask flags
* Return: value of perf event counter read or error code
* *
* int bpf_redirect(ifindex, flags) * int bpf_redirect(ifindex, flags)
* redirect to another netdev * redirect to another netdev
...@@ -328,11 +331,11 @@ union bpf_attr { ...@@ -328,11 +331,11 @@ union bpf_attr {
* @skb: pointer to skb * @skb: pointer to skb
* Return: realm if != 0 * Return: realm if != 0
* *
* int bpf_perf_event_output(ctx, map, index, data, size) * int bpf_perf_event_output(ctx, map, flags, data, size)
* output perf raw sample * output perf raw sample
* @ctx: struct pt_regs* * @ctx: struct pt_regs*
* @map: pointer to perf_event_array map * @map: pointer to perf_event_array map
* @index: index of event in the map * @flags: index of event in the map or bitmask flags
* @data: data on stack to be output as raw data * @data: data on stack to be output as raw data
* @size: size of data * @size: size of data
* Return: 0 on success or negative error * Return: 0 on success or negative error
......
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