OSDN Git Service

selftests: xsk: do not send zero-length packets
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 10 May 2022 11:55:57 +0000 (13:55 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 May 2022 15:03:15 +0000 (08:03 -0700)
commitf3e619bb34d37c4c7ee80647e68b533d1f357927
tree73cf6ef9eca1adeca43bbe1e925fb4fde052b544
parent685e64a3c91df3d169be9e3e37862f118280927f
selftests: xsk: do not send zero-length packets

Do not try to send packets of zero length since they are dropped by
veth after commit 726e2c5929de84 ("veth: Ensure eth header is in skb's
linear part"). Replace these two packets with packets of length 60 so
that they are not dropped.

Also clean up the confusing naming. MIN_PKT_SIZE was really
MIN_ETH_PKT_SIZE and PKT_SIZE was both MIN_ETH_SIZE and the default
packet size called just PKT_SIZE. Make it consistent by using the
right define in the right place.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20220510115604.8717-3-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/xdpxceiver.c
tools/testing/selftests/bpf/xdpxceiver.h