summaryrefslogtreecommitdiff
path: root/crypto/aes_generic.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2024-05-07 18:40:58 +0300
committerJakub Kicinski <kuba@kernel.org>2024-05-09 04:57:55 +0300
commit1d0dc857b5d8711ff0f037bea9a0c13049c1763c (patch)
tree83f110bab1329f22c349b80050bd1ad84702eb7b /crypto/aes_generic.c
parent58a4ff5d77b187086eb12d41d613749420947f19 (diff)
downloadlinux-1d0dc857b5d8711ff0f037bea9a0c13049c1763c.tar.xz
selftests: drv-net: add checksum tests
Run tools/testing/selftest/net/csum.c as part of drv-net. This binary covers multiple scenarios, based on arguments given, for both IPv4 and IPv6: - Accept UDP correct checksum - Detect UDP invalid checksum - Accept TCP correct checksum - Detect TCP invalid checksum - Transmit UDP: basic checksum offload - Transmit UDP: zero checksum conversion The test direction is reversed between receive and transmit tests, so that the NIC under test is always the local machine. In total this adds up to 12 testcases, with more to follow. For conciseness, I replaced individual functions with a function factory. Also detect hardware offload feature availability using Ethtool netlink and skip tests when either feature is off. This need may be common for offload feature tests and eventually deserving of a thin wrapper in lib.py. Missing are the PF_PACKET based send tests ('-P'). These use virtio_net_hdr to program hardware checksum offload. Which requires looking up the local MAC address and (harder) the MAC of the next hop. I'll have to give it some though how to do that robustly and where that code would belong. Tested: make -C tools/testing/selftests/ \ TARGETS="drivers/net drivers/net/hw" \ install INSTALL_PATH=/tmp/ksft cd /tmp/ksft sudo NETIF=ens4 REMOTE_TYPE=ssh \ REMOTE_ARGS="root@10.40.0.2" \ LOCAL_V4="10.40.0.1" \ REMOTE_V4="10.40.0.2" \ ./run_kselftest.sh -t drivers/net/hw:csum.py Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20240507154216.501111-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'crypto/aes_generic.c')
0 files changed, 0 insertions, 0 deletions