]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit048fc847ebc428b73d6975f65578d4704105f6cd
tree8b79b58d9ea4bcb2cb9b9d56907a3aa2907ecea8
parent064b389362ba9f627573450dfce6a0c986949f1a
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: 5e08df9791c5 ("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