summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@fomichev.me>2024-07-13 03:52:51 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2024-07-25 11:57:27 +0200
commitd5e726d9143c5624135f5dc9e4069799adeef734 (patch)
treed24f61de8cd5af48ecedeecac656669eb4a8019f /include
parentbpf: Fix a segment issue when downgrading gso_size (diff)
downloadlinux-d5e726d9143c5624135f5dc9e4069799adeef734.tar.xz
linux-d5e726d9143c5624135f5dc9e4069799adeef734.zip
xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len
Julian reports that commit 341ac980eab9 ("xsk: Support tx_metadata_len") can break existing use cases which don't zero-initialize xdp_umem_reg padding. Introduce new XDP_UMEM_TX_METADATA_LEN to make sure we interpret the padding as tx_metadata_len only when being explicitly asked. Fixes: 341ac980eab9 ("xsk: Support tx_metadata_len") Reported-by: Julian Schindel <mail@arctic-alpaca.de> Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/bpf/20240713015253.121248-2-sdf@fomichev.me
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/if_xdp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h
index d31698410410..42ec5ddaab8d 100644
--- a/include/uapi/linux/if_xdp.h
+++ b/include/uapi/linux/if_xdp.h
@@ -41,6 +41,10 @@
*/
#define XDP_UMEM_TX_SW_CSUM (1 << 1)
+/* Request to reserve tx_metadata_len bytes of per-chunk metadata.
+ */
+#define XDP_UMEM_TX_METADATA_LEN (1 << 2)
+
struct sockaddr_xdp {
__u16 sxdp_family;
__u16 sxdp_flags;