xsk: relax UMEM headroom alignment
authorBjörn Töpel <bjorn.topel@intel.com>
Wed, 18 Sep 2019 07:57:39 +0000 (09:57 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Sep 2019 12:23:41 +0000 (14:23 +0200)
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>
net/xdp/xdp_umem.c

index 947b8ff..cdaef54 100644 (file)
@@ -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;