From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org
Cc: kernel-team@meta.com, Quentin Monnet <qmo@kernel.org>,
Mykyta Yatsenko <yatsenko@meta.com>
Subject: Re: [PATCH v2 bpf-next 1/3] bpftool: improve skeleton backwards compat with old buggy libbpfs
Date: Mon, 08 Jul 2024 15:54:41 -0700 [thread overview]
Message-ID: <9c48d70561d2e7334c17d0c79816b987660c5c84.camel@gmail.com> (raw)
In-Reply-To: <20240708204540.4188946-2-andrii@kernel.org>
On Mon, 2024-07-08 at 13:45 -0700, Andrii Nakryiko wrote:
[...]
> @@ -878,23 +895,22 @@ codegen_maps_skeleton(struct bpf_object *obj, size_t map_cnt, bool mmaped, bool
>
> codegen("\
> \n\
> - \n\
> - s->maps[%zu].name = \"%s\"; \n\
> - s->maps[%zu].map = &obj->maps.%s; \n\
> + \n\
> + map = (struct bpf_map_skeleton *)((char *)s->maps + %zu * s->map_skel_sz);\n\
> + map->name = \"%s\"; \n\
> + map->map = &obj->maps.%s; \n\
> ",
> - i, bpf_map__name(map), i, ident);
> + i, bpf_map__name(map), ident);
> /* memory-mapped internal maps */
> if (mmaped && is_mmapable_map(map, ident, sizeof(ident))) {
> - printf("\ts->maps[%zu].mmaped = (void **)&obj->%s;\n",
> - i, ident);
> + printf("\tmap->mmaped = (void **)&obj->%s; \n", ident);
^^^^
nit: this still prints extra white space
[...]
next prev parent reply other threads:[~2024-07-08 22:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 20:45 [PATCH v2 bpf-next 0/3] Fix libbpf BPF skeleton forward/backward compat Andrii Nakryiko
2024-07-08 20:45 ` [PATCH v2 bpf-next 1/3] bpftool: improve skeleton backwards compat with old buggy libbpfs Andrii Nakryiko
2024-07-08 22:16 ` Eduard Zingerman
2024-07-08 22:54 ` Eduard Zingerman [this message]
2024-07-08 23:20 ` Andrii Nakryiko
2024-07-08 20:45 ` [PATCH v2 bpf-next 2/3] libbpf: fix BPF skeleton forward/backward compat handling Andrii Nakryiko
2024-07-08 20:45 ` [PATCH v2 bpf-next 3/3] libbpf: improve old BPF skeleton handling for map auto-attach Andrii Nakryiko
2024-07-08 23:09 ` Eduard Zingerman
2024-07-10 2:10 ` [PATCH v2 bpf-next 0/3] Fix libbpf BPF skeleton forward/backward compat 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=9c48d70561d2e7334c17d0c79816b987660c5c84.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=qmo@kernel.org \
--cc=yatsenko@meta.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