diff mbox series

[bpf] xsk: relax UMEM headroom alignment

Message ID 20190918075739.19451-1-bjorn.topel@gmail.com
State Accepted
Delegated to: BPF Maintainers
Headers show
Series [bpf] xsk: relax UMEM headroom alignment | expand

Commit Message

Björn Töpel Sept. 18, 2019, 7:57 a.m. UTC
From: Björn Töpel <bjorn.topel@intel.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@intel.com>
---
 net/xdp/xdp_umem.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Daniel Borkmann Sept. 19, 2019, 12:33 p.m. UTC | #1
On Wed, Sep 18, 2019 at 09:57:39AM +0200, Björn Töpel wrote:
> From: Björn Töpel <bjorn.topel@intel.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@intel.com>

Applied, thanks!
diff mbox series

Patch

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;