diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2021-09-22 09:56:12 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-09-28 00:18:35 +0200 |
commit | e4e9baf06a6ea6cfbf69db4c3766a0879329dda2 (patch) | |
tree | e60f101507807392c651ebcf04db90a72254c018 /tools/testing/selftests/bpf/xdpxceiver.h | |
parent | 96a40678ce5390cd8515ff32e55ad932fd1fa328 (diff) | |
download | lwn-e4e9baf06a6ea6cfbf69db4c3766a0879329dda2.tar.gz lwn-e4e9baf06a6ea6cfbf69db4c3766a0879329dda2.zip |
selftests: xsk: Change interleaving of packets in unaligned mode
Change the interleaving of packets in unaligned mode. With the current
buffer addresses in the packet stream, the last buffer in the umem
could not be used as a large packet could potentially write over the
end of the umem. The kernel correctly threw this buffer address away
and refused to use it. This is perfectly fine for all regular packet
streams, but the ones used for unaligned mode have every other packet
being at some different offset. As we will add checks for correct
offsets in the next patch, this needs to be fixed. Just start these
page-boundary straddling buffers one page earlier so that the last
one is not on the last page of the umem, making all buffers valid.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210922075613.12186-13-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.h')
0 files changed, 0 insertions, 0 deletions