summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2019-09-18 03:57:39 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2019-09-19 08:23:41 -0400
commit733ef7f056a5e23b66e8e7bb3508ca882db388f0 (patch)
tree1ba4a5c5ffc42b18a32d43ed6220476ed2e48c23
parenta0791f0df7d212c245761538b17a9ea93607b667 (diff)
xsk: relax UMEM headroom alignment
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> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--net/xdp/xdp_umem.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 947b8ff0227e..cdaef54d48be 100644
--- a/net/xdp/xdp_umem.c
+++ b/net/xdp/xdp_umem.c
@@ -383,8 +383,6 @@ static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
383 return -EINVAL; 383 return -EINVAL;
384 } 384 }
385 385
386 headroom = ALIGN(headroom, 64);
387
388 size_chk = chunk_size - headroom - XDP_PACKET_HEADROOM; 386 size_chk = chunk_size - headroom - XDP_PACKET_HEADROOM;
389 if (size_chk < 0) 387 if (size_chk < 0)
390 return -EINVAL; 388 return -EINVAL;