Thread (12 messages) flat view 12 messages, 5 authors, 2026-08-18

Re: [PATCH net v2 1/3] xsk: align TX metadata layout across ABIs

From: Simon Horman <horms@kernel.org>
Date: 2026-08-17 10:17:31
Also in: bpf, intel-wired-lan, linux-arm-kernel, linux-rdma, lkml

On Thu, Aug 13, 2026 at 12:07:58PM -0700, Stanislav Fomichev wrote:
Add explicit padding before launch_time so xsk_tx_metadata has the same
layout on 32-bit and 64-bit systems.

On i386 and m68k, the old native 32-bit layout put launch_time at offset 12
and had a natural size of 20 bytes. Using sizeof(struct xsk_tx_metadata) as
tx_metadata_len was already rejected because the length must be a multiple
of eight, so the straightforward use of the interface was broken on those
ABIs. Userspace could still register a padded length of 24 bytes, though;
mixing the old and new layouts then silently reads launch_time from the
wrong offset and misprograms packet launch times. This intentionally
replaces that incompatible layout while the interface is still new.

Fixes: ca4419f15abd ("xsk: Add launch time hardware offload support to XDP Tx metadata")
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help