samples/bpf: fix xdpsock l2fwd tx for unaligned mode
authorCiara Loftus <ciara.loftus@intel.com>
Fri, 13 Sep 2019 10:39:48 +0000 (10:39 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 16 Sep 2019 07:35:10 +0000 (09:35 +0200)
commit5a712e1363c8ecb4b504a888833ef91416314c36
tree8b79b58d9ea4bcb2cb9b9d56907a3aa2907ecea8
parent2e78fc620f5c62e94cab4a8240b2a76de38cd514
samples/bpf: fix xdpsock l2fwd tx for unaligned mode

Preserve the offset of the address of the received descriptor, and include
it in the address set for the tx descriptor, so the kernel can correctly
locate the start of the packet data.

Fixes: 03895e63ff97 ("samples/bpf: add buffer recycling for unaligned chunks to xdpsock")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdpsock_user.c