linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: David Miller <davem@davemloft.net>
Cc: <peterz@infradead.org>, <bgregg@netflix.com>,
	<daniel@iogearbox.net>, <qinteng@fb.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kernel-team@fb.com>
Subject: Re: [PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / RAW events
Date: Mon, 22 May 2017 16:35:07 -0700	[thread overview]
Message-ID: <63c0ec55-9cb7-50a0-2020-fe17283e532b@fb.com> (raw)
In-Reply-To: <20170522.192651.252662920166760334.davem@davemloft.net>

On 5/22/17 4:26 PM, David Miller wrote:
> From: Alexei Starovoitov <ast@fb.com>
> Date: Mon, 22 May 2017 15:48:40 -0700
>
>> @@ -31,7 +31,7 @@ static unsigned long long (*bpf_get_current_uid_gid)(void) =
>>  	(void *) BPF_FUNC_get_current_uid_gid;
>>  static int (*bpf_get_current_comm)(void *buf, int buf_size) =
>>  	(void *) BPF_FUNC_get_current_comm;
>> -static int (*bpf_perf_event_read)(void *map, int index) =
>> +static u64 (*bpf_perf_event_read)(void *map, u64 flags) =
>>  	(void *) BPF_FUNC_perf_event_read;
>
> If the second argument really is "u64 flags", then please update
> the comments in tools/include/uapi/linux/bpf.h as well.

of course.
As independent patch, I assume.
For both tools/include/uapi/...bpf.h and include/uapi/...bpf.h

It has some info:
/* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */
#define BPF_F_INDEX_MASK                0xffffffffULL
#define BPF_F_CURRENT_CPU               BPF_F_INDEX_MASK

yet perf_event_read() is least documented. hmm.
  * u64 bpf_perf_event_read(&map, index)
  *     Return: Number events read or error code

that needs to be fixed.

  reply	other threads:[~2017-05-22 23:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 22:48 [PATCH net-next 0/2] perf, bpf: add support for HW_CACHE and RAW events Alexei Starovoitov
2017-05-22 22:48 ` [PATCH net-next 1/2] " Alexei Starovoitov
2017-05-23  7:42   ` Peter Zijlstra
2017-05-23 14:38     ` Alexei Starovoitov
2017-05-23 16:31       ` Peter Zijlstra
2017-05-23 17:05         ` Alexei Starovoitov
2017-05-22 22:48 ` [PATCH net-next 2/2] samples/bpf: add samples for HW_CACHE / " Alexei Starovoitov
2017-05-22 23:26   ` David Miller
2017-05-22 23:35     ` Alexei Starovoitov [this message]
2017-05-22 23:40       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63c0ec55-9cb7-50a0-2020-fe17283e532b@fb.com \
    --to=ast@fb.com \
    --cc=bgregg@netflix.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qinteng@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).