BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net,  martin.lau@linux.dev, kernel-team@fb.com,
	yonghong.song@linux.dev,  arnaldo.melo@gmail.com
Subject: Re: [PATCH bpf-next v1 1/4] bpf: allow specifying bpf_fastcall attribute for BPF helpers
Date: Fri, 27 Sep 2024 15:39:31 -0700	[thread overview]
Message-ID: <514848caed1511bcb4f69a2dee7d927214929580.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzZBoBgdSa-AU-0kJUXsv0yHt54BUOeBb4bBsNiSx-u7tQ@mail.gmail.com>

On Fri, 2024-09-27 at 15:31 -0700, Andrii Nakryiko wrote:

[...]

> @@ -871,9 +871,10 @@ class PrinterHelpers(Printer):
>                  print(' *{}{}'.format(' \t' if line else '', line))
> 
>          print(' */')
> +        print('static ', end='')
>          if helper.attrs:
> -            print(" ".join(helper.attrs))
> -        print('static %s %s(* const %s)(' % (self.map_type(proto['ret_type']),
> +            print('%s ' % (" ".join(helper.attrs)), end='')
> +        print('%s %s(* const %s)(' % (self.map_type(proto['ret_type']),
>                                        proto['ret_star'],
> proto['name']), end='')
>          comma = ''
>          for i, a in enumerate(proto['args']):
> 
> But now I have:
> 
> static __bpf_fastcall __u32 (* const bpf_get_smp_processor_id)(void) =
> (void *) 8;
> 
> and
> 
> extern __bpf_fastcall void *bpf_rdonly_cast(const void *obj__ign, u32
> btf_id__k) __weak __ksym;
> 
> and that makes me a touch happier. I hope you don't mind.

This change looks fine to me.

[...]

> Looks good to me, and I'm not sure there is anything too controversial
> here, so I went ahead and applied to bpf-next, thanks.

Great, thank you.


  reply	other threads:[~2024-09-27 22:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16  9:17 [PATCH bpf-next v1 0/4] 'bpf_fastcall' attribute in vmlinux.h and bpf_helper_defs.h Eduard Zingerman
2024-09-16  9:17 ` [PATCH bpf-next v1 1/4] bpf: allow specifying bpf_fastcall attribute for BPF helpers Eduard Zingerman
2024-09-27 22:31   ` Andrii Nakryiko
2024-09-27 22:39     ` Eduard Zingerman [this message]
2024-09-16  9:17 ` [PATCH bpf-next v1 2/4] bpf: __bpf_fastcall for bpf_get_smp_processor_id in uapi Eduard Zingerman
2024-09-16  9:17 ` [PATCH bpf-next v1 3/4] bpf: use KF_FASTCALL to mark kfuncs supporting fastcall contract Eduard Zingerman
2024-09-16  9:17 ` [PATCH bpf-next v1 4/4] bpftool: __bpf_fastcall for kfuncs marked with special decl_tag Eduard Zingerman
2024-09-16  9:22 ` [PATCH bpf-next v1 0/4] 'bpf_fastcall' attribute in vmlinux.h and bpf_helper_defs.h Eduard Zingerman
2024-09-27 22:40 ` patchwork-bot+netdevbpf

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=514848caed1511bcb4f69a2dee7d927214929580.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=yonghong.song@linux.dev \
    /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