From: Björn Töpel Date: Wed, 18 Sep 2019 07:57:39 +0000 (+0200) Subject: xsk: relax UMEM headroom alignment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=733ef7f056a5e23b66e8e7bb3508ca882db388f0;p=linux.git 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 Signed-off-by: Daniel Borkmann --- diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index 947b8ff0227e6..cdaef54d48beb 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) return -EINVAL; } - headroom = ALIGN(headroom, 64); - size_chk = chunk_size - headroom - XDP_PACKET_HEADROOM; if (size_chk < 0) return -EINVAL;