[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190918075739.19451-1-bjorn.topel@gmail.com>
Date: Wed, 18 Sep 2019 09:57:39 +0200
From: Björn Töpel <bjorn.topel@...il.com>
To: ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org
Cc: Björn Töpel <bjorn.topel@...el.com>,
magnus.karlsson@...el.com, magnus.karlsson@...il.com,
bpf@...r.kernel.org, jonathan.lemon@...il.com
Subject: [PATCH bpf] xsk: relax UMEM headroom alignment
From: Björn Töpel <bjorn.topel@...el.com>
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")
Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
---
net/xdp/xdp_umem.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 688aac7a6943..0e81a7fd2df7 100644
--- a/net/xdp/xdp_umem.c
+++ b/net/xdp/xdp_umem.c
@@ -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;
--
2.20.1
Powered by blists - more mailing lists