From: Stanislav Fomichev <sdf@fomichev.me>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev,
song@kernel.org, yhs@fb.com, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@google.com, haoluo@google.com,
jolsa@kernel.org, Julian Schindel <mail@arctic-alpaca.de>,
Magnus Karlsson <magnus.karlsson@gmail.com>
Subject: Re: [PATCH bpf 3/3] xsk: Try to make xdp_umem_reg extension a bit more future-proof
Date: Thu, 25 Jul 2024 11:01:17 -0700 [thread overview]
Message-ID: <ZqKS7QAH54vTnJ2z@mini-arch> (raw)
In-Reply-To: <ZqEcAKWCDp6lyaC9@boxer>
On 07/24, Maciej Fijalkowski wrote:
> On Fri, Jul 12, 2024 at 06:52:53PM -0700, Stanislav Fomichev wrote:
> > Add a couple of things:
> > 1. Remove xdp_umem_reg_v2 since its sizeof is the same as xdp_umem_reg
>
> So thing here is that adding __attribute__((packed)) on kernel side
> wouldn't help because we wouldn't fix old uapi with this, correct? old
> uapi would still yield 32 bytes for xdp_umem_reg without tx_metadata_len.
>
> Just explaining here to myself.
Yea :-(
> > 2. Add BUILD_BUG_ON that checks that the size of xdp_umem_reg_v1 is less
> > than xdp_umem_reg; presumably, when we get to v2, there is gonna
> > be a similar line to enforce that sizeof(v2) > sizeof(v1)
> > 3. Add BUILD_BUG_ON to make sure the last field plus its size matches
> > the overall struct size. The intent is to demonstrate that we don't
> > have any lingering padding.
>
> This is good stuff but I wonder wouldn't it be more feasible to squash
> this with 1/3 ? And have it backported. Regarding the patch logistics, you
> did not provide fixes tag here for some reason, but still include the
> patch routed via bpf tree.
SG, will resend this against bpf-next.
next prev parent reply other threads:[~2024-07-25 18:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 1:52 [PATCH bpf 0/3] xsk: require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len Stanislav Fomichev
2024-07-13 1:52 ` [PATCH bpf 1/3] " Stanislav Fomichev
2024-07-13 1:52 ` [PATCH bpf 2/3] selftests/bpf: Add XDP_UMEM_TX_METADATA_LEN to XSK TX metadata test Stanislav Fomichev
2024-07-13 1:52 ` [PATCH bpf 3/3] xsk: Try to make xdp_umem_reg extension a bit more future-proof Stanislav Fomichev
2024-07-24 15:21 ` Maciej Fijalkowski
2024-07-25 18:01 ` Stanislav Fomichev [this message]
2024-07-19 15:22 ` [PATCH bpf 0/3] xsk: require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len Daniel Borkmann
2024-07-19 15:29 ` Fijalkowski, Maciej
2024-07-19 15:40 ` Daniel Borkmann
2024-07-24 15:23 ` Maciej Fijalkowski
2024-07-25 10:06 ` Daniel Borkmann
2024-07-25 11:28 ` Maciej Fijalkowski
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=ZqKS7QAH54vTnJ2z@mini-arch \
--to=sdf@fomichev.me \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@gmail.com \
--cc=mail@arctic-alpaca.de \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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).