lkml.org 
[lkml]   [2023]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH bpf-next v2 2/2] bpf: Introduce bpf user log
From


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

\
 
 \ /
  Last update: 2023-07-11 04:56    [W:0.050 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site