Re: [PATCH bpf-next] libbpf: Improve BPF_PROG2 macro code quality and description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 10, 2022 at 1:35 PM <sdf@xxxxxxxxxx> wrote:
>
> On 09/09, Yonghong Song wrote:
> > Commit 34586d29f8df ("libbpf: Add new BPF_PROG2 macro") added BPF_PROG2
> > macro for trampoline based programs with struct arguments. Andrii
> > made a few suggestions to improve code quality and description.
> > This patch implemented these suggestions including better internal
> > macro name, consistent usage pattern for __builtin_choose_expr(),
> > simpler macro definition for always-inline func arguments and
> > better macro description.
>
> Not sure if Andrii wants to take a look, if not feel free to use:
>

Andrii wanted to :) But thanks for looking and acking as well.

I've slightly reformatted the "doccomment" for BPF_PROG2 and also
removed other uses of quadruple underscore for consistency. Thanks.
Applied to bpf-next.


> Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
>
> > Signed-off-by: Yonghong Song <yhs@xxxxxx>
> > ---
> >   tools/lib/bpf/bpf_tracing.h | 77 ++++++++++++++++++++++---------------
> >   1 file changed, 47 insertions(+), 30 deletions(-)
>
> > diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
> > index 8d4bdd18cb3d..a71ca48ea479 100644
> > --- a/tools/lib/bpf/bpf_tracing.h
> > +++ b/tools/lib/bpf/bpf_tracing.h
> > @@ -438,39 +438,45 @@ typeof(name(0)) name(unsigned long long *ctx)
> >           \
> >   static __always_inline typeof(name(0))                                          \
> >   ____##name(unsigned long long *ctx, ##args)
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux