Skip to contentSkip to conversation

xsk: relax UMEM headroom alignment

PATCH Applied Björn Töpel 2 participants 2 messages Sep 18, 2019 – Sep 19, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsk: relax UMEM headroom alignment

From: Björn Töpel <[email protected]>

This patch removes the 64B alignment of the UMEM headroom. There is really no reason for it, and having a headroom less than 64B should be valid.

Fixes c0c77d8fb787 ("xsk: add user memory registration support sockopt")
---
 net/xdp/xdp_umem.c | 2 --
 1 file changed, 2 deletions(-)
net/xdp/xdp_umem.c +0 -2
index 688aac7a6943..0e81a7fd2df7 100644
@@ -335,8 +335,6 @@ static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
 	if (chunks < chunks_per_page || chunks % chunks_per_page)
 		return -EINVAL;
 
-	headroom = ALIGN(headroom, 64);
-
 	size_chk = chunk_size - headroom - XDP_PACKET_HEADROOM;
 	if (size_chk < 0)
 		return -EINVAL;
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Björn Töpel

From: Björn Töpel <[email protected]>

This patch removes the 64B alignment of the UMEM headroom. There is really no reason for it, and having a headroom less than 64B should be valid.

Fixes c0c77d8fb787 ("xsk: add user memory registration support sockopt")

Applied, thanks!