xsk: Simplify xp_aligned_validate_desc implementation
authorKal Conley <kal.conley@dectris.com>
Mon, 10 Apr 2023 12:18:41 +0000 (14:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 13 Apr 2023 12:51:02 +0000 (14:51 +0200)
commit0c5f48599bed55c13d6f979ea824554bdebdf2ad
treef0b8893de4e74e6439147e67bd9072aa75fe4a20
parentee5059a64dbad4806a3c11babd0dbed5a5d04ead
xsk: Simplify xp_aligned_validate_desc implementation

Perform the chunk boundary check like the page boundary check in
xp_desc_crosses_non_contig_pg(). This simplifies the implementation and
reduces the number of branches.

Signed-off-by: Kal Conley <kal.conley@dectris.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20230410121841.643254-1-kal.conley@dectris.com
net/xdp/xsk_queue.h