From: Leon Hwang <hffilwlqm@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Yizhou Tang <tangyeechou@gmail.com>,
kernel-patches-bot@fb.com, bpf <bpf@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 2/2] bpf: Introduce bpf user log
Date: Tue, 11 Jul 2023 10:55:38 +0800 [thread overview]
Message-ID: <115c6eac-ab28-7220-e1e4-5747bf641bbe@gmail.com> (raw)
In-Reply-To: <CAADnVQK5RLqVhc9AxaCSuQxFRDAb8wohmUDNrYEViXLf5mEMNQ@mail.gmail.com>
On 11/7/23 07:45, Alexei Starovoitov wrote:
> On Fri, Jul 7, 2023 at 9:08 PM Leon Hwang <hffilwlqm@gmail.com> wrote:
>> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
>> index 34fa334938ba5..8a458cfcd91bd 100644
>> --- a/include/uapi/linux/bpf.h
>> +++ b/include/uapi/linux/bpf.h
>> @@ -1549,7 +1549,6 @@ union bpf_attr {
>> };
>> __u32 attach_type; /* attach type */
>> __u32 flags; /* extra flags */
>> - struct bpf_generic_user_log log; /* user log */
>> union {
>> __u32 target_btf_id; /* btf_id of target to attach to */
>> struct {
>> @@ -1585,6 +1584,9 @@ union bpf_attr {
>> __s32 priority;
>> __u32 flags;
>> } netfilter;
>> + struct {
>> + struct bpf_generic_user_log ulog; /* user log */
>> + } xdp;
>
> 1.
> You cannot break api in patch 1 and fix it in patch 2.
>
> 2.
> libbpf side is missing.
>
> 3.
> selftest is missing.
>
> 4.
> bpf_vlog_finalize() should be used and error propagated back through
> link_create.
> Same api must be used: log_level, log_size, log_buf, log_true_size.
>
> But considering all that I agree with Daniel Xu that
> tracepoint would be better here.
Sorry for missing 2&3.
Tracepoint is considered. I'll change it from user log to a tracepoint.
I'll submit tracepoint patch with libbpf&selftest patches later.
Thanks,
Leon
next prev parent reply other threads:[~2023-07-11 2:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-08 4:07 [PATCH bpf-next v2 0/2] bpf: Introduce user log Leon Hwang
2023-07-08 4:07 ` [PATCH bpf-next v2 1/2] bpf: Introduce bpf generic log Leon Hwang
2023-07-10 22:23 ` Andrii Nakryiko
2023-07-11 3:10 ` Leon Hwang
2023-07-08 4:07 ` [PATCH bpf-next v2 2/2] bpf: Introduce bpf user log Leon Hwang
2023-07-10 23:45 ` Alexei Starovoitov
2023-07-11 2:55 ` Leon Hwang [this message]
2023-07-08 22:02 ` [PATCH bpf-next v2 0/2] bpf: Introduce " Daniel Xu
2023-07-09 3:44 ` Leon Hwang
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=115c6eac-ab28-7220-e1e4-5747bf641bbe@gmail.com \
--to=hffilwlqm@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-patches-bot@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=tangyeechou@gmail.com \
--cc=yhs@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).