bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: "Jakub Kicinski" <jakub.kicinski@netronome.com>,
	"Stanislav Fomichev" <sdf@fomichev.me>,
	"Andrii Nakryiko" <andrii.nakryiko@gmail.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Andrii Nakryiko" <andriin@fb.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Jiri Olsa" <jolsa@kernel.org>, "Martin KaFai Lau" <kafai@fb.com>,
	"Namhyung Kim" <namhyung@kernel.org>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>,
	linux-perf-users@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Quentin Monnet" <quentin.monnet@netronome.com>
Subject: Re: [PATCH] libbpf: Fix up generation of bpf_helper_defs.h
Date: Wed, 27 Nov 2019 17:20:17 -0800	[thread overview]
Message-ID: <CAADnVQLFVH000BJM4cN29kcC+KKDmVek3jaen3cZz2=12jP58g@mail.gmail.com> (raw)
In-Reply-To: <58CA150B-D006-48DF-A279-077BA2FFD6EC@kernel.org>

On Wed, Nov 27, 2019 at 5:17 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> On November 27, 2019 9:59:15 PM GMT-03:00, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> >On Wed, Nov 27, 2019 at 4:50 PM Arnaldo Carvalho de Melo
> ><arnaldo.melo@gmail.com> wrote:
> >>
> >> Take it as one, I think it's what should have been in the cset it is
> >fixing, that way no breakage would have happened.
> >
> >Ok. I trimmed commit log and applied here:
> >https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=1fd450f99272791df8ea8e1b0f5657678e118e90
> >
> >What about your other fix and my suggestion there?
> >(__u64) cast instead of PRI ?
> >We do this already in two places:
> >libbpf.c:                shdr_idx, (__u64)sym->st_value);
> >libbpf.c:             (__u64)sym.st_value, GELF_ST_TYPE(sym.st_info),
>
>
> I'm using the smartphone now, but I thought you first suggested using a cast to long, if you mean using %llu + cast to __u64, then should be was ugly as using PRI, IOW, should work on both 64 bit and 32 bit. :-)

Yes. I suggested (long) first, but then found two cases in libbpf that
solve this with (__u64),
so better to stick to that for consistency.

  reply	other threads:[~2019-11-28  1:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 15:10 [PATCH] libbpf: Fix up generation of bpf_helper_defs.h Arnaldo Carvalho de Melo
2019-11-26 15:48 ` Arnaldo Carvalho de Melo
2019-11-26 16:38   ` Toke Høiland-Jørgensen
2019-11-26 18:34     ` Arnaldo Carvalho de Melo
2019-11-26 18:50       ` Toke Høiland-Jørgensen
2019-11-26 19:04         ` Arnaldo Carvalho de Melo
2019-11-26 22:05           ` Andrii Nakryiko
2019-11-26 22:10             ` Arnaldo Carvalho de Melo
2019-11-26 22:17               ` Arnaldo Carvalho de Melo
2019-11-26 22:38                 ` Andrii Nakryiko
2019-11-26 23:10                   ` Stanislav Fomichev
2019-11-26 23:52                     ` Jakub Kicinski
2019-11-27  1:39                       ` Arnaldo Carvalho de Melo
2019-11-27 13:45                         ` [PATCH] libbpf: Use PRIu64 for sym->st_value to fix build on 32-bit arches Arnaldo Carvalho de Melo
2019-11-27 16:39                           ` Alexei Starovoitov
2019-11-27 18:45                             ` Arnaldo Carvalho de Melo
2019-11-27 18:55                               ` Alexei Starovoitov
2019-11-27 19:39                                 ` Arnaldo Carvalho de Melo
2019-11-27 19:33                           ` Alexei Starovoitov
2019-12-03 13:50                           ` Naresh Kamboju
2019-12-03 14:41                             ` Arnaldo Carvalho de Melo
2019-11-28  0:31                         ` [PATCH] libbpf: Fix up generation of bpf_helper_defs.h Alexei Starovoitov
2019-11-28  0:51                           ` Arnaldo Carvalho de Melo
2019-11-28  0:59                             ` Alexei Starovoitov
2019-11-28  1:17                               ` Arnaldo Carvalho de Melo
2019-11-28  1:20                                 ` Alexei Starovoitov [this message]
2019-11-28  1:27                                   ` Arnaldo Carvalho de Melo
2019-11-28  1:52                                     ` Alexei Starovoitov
2019-11-26 16:53 ` Alexei Starovoitov
2019-11-26 18:30   ` Arnaldo Carvalho de Melo

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='CAADnVQLFVH000BJM4cN29kcC+KKDmVek3jaen3cZz2=12jP58g@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.monnet@netronome.com \
    --cc=sdf@fomichev.me \
    --cc=toke@redhat.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).