linux-imx/tools/testing/selftests
Sean Anderson 033a71efab selftests: net: csum: Fix checksums for packets with non-zero padding
[ Upstream commit e8a63d473b ]

Padding is not included in UDP and TCP checksums. Therefore, reduce the
length of the checksummed data to include only the data in the IP
payload. This fixes spurious reported checksum failures like

rx: pkt: sport=33000 len=26 csum=0xc850 verify=0xf9fe
pkt: bad csum

Technically it is possible for there to be trailing bytes after the UDP
data but before the Ethernet padding (e.g. if sizeof(ip) + sizeof(udp) +
udp.len < ip.len). However, we don't generate such packets.

Fixes: 91a7de8560 ("selftests/net: add csum offload test")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240906210743.627413-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-18 19:24:09 +02:00
..
alsa kselftest/alsa - conf: Stringify the printed errno in sysfs_get() 2024-01-25 15:35:40 -08:00
amd-pstate linux-kselftest-next-6.4-rc1 2023-04-24 12:28:34 -07:00
arm64 kselftest: arm64: Add a null pointer check 2024-06-27 13:49:02 +02:00
bpf selftests/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected() 2024-09-18 19:24:07 +02:00
breakpoints
cachestat selftests: cachestat: Fix build warnings on ppc64 2024-07-25 09:50:42 +02:00
capabilities
cgroup selftests: cgroup: skip test_cgcore_lesser_ns_open when cgroup2 mounted without nsdelegate 2024-06-12 11:12:00 +02:00
clone3 selftests/clone3: Fix broken test under !CONFIG_TIME_NS 2023-11-28 17:20:05 +00:00
connector selftests: connector: Fix input argument error paths to skip 2023-07-31 20:11:42 -07:00
core fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-08-29 17:33:14 +02:00
cpu-hotplug
cpufreq selftests/cpufreq: Don't enable generic lock debugging options 2023-06-12 16:39:11 -06:00
damon selftests/damon/sysfs: test damon_target filter 2023-08-21 13:37:37 -07:00
dma
dmabuf-heaps kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2024-09-12 11:11:38 +02:00
drivers mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors 2024-08-03 08:53:38 +02:00
efivarfs selftests/efivarfs: create-read: fix a resource leak 2023-11-28 17:19:42 +00:00
exec
fchmodat2 selftests: link libasan statically for tests with -fsanitize=address 2023-09-19 13:21:32 -07:00
filelock selftests: add OFD lock tests 2023-08-24 10:41:47 -04:00
filesystems selftests/binderfs: use the Makefile's rules, not Make's implicit rules 2024-06-12 11:11:49 +02:00
firmware
fpu
ftrace tracing/selftests: Fix kprobe event name test for .isra. functions 2024-06-21 14:38:39 +02:00
futex selftests/futex: pass _GNU_SOURCE without a value to the compiler 2024-07-25 09:50:43 +02:00
gpio gpio updates for v6.5 2023-06-29 10:11:10 -07:00
hid cred: get rid of CONFIG_DEBUG_CREDENTIALS 2023-12-20 17:01:51 +01:00
ia64
intel_pstate
iommu iommufd: Do not allow creating areas without READ or WRITE 2024-09-04 13:28:24 +02:00
ipc
ir
kcmp selftests/kcmp: remove unused open mode 2024-06-12 11:12:11 +02:00
kexec
kmod
kselftest linux-kselftest-next-6.6-rc2 2023-09-12 09:10:36 -07:00
kvm KVM: selftests: Add test for uaccesses to non-existent vgic-v2 CPUIF 2024-06-12 11:11:27 +02:00
landlock selftests/landlock: Add cred_transfer test 2024-08-03 08:54:17 +02:00
lib
livepatch
lkdtm selftests/lkdtm: Disable CONFIG_UBSAN_TRAP in test config 2023-11-28 17:19:36 +00:00
locking
media_tests selftests: media_tests: Add new subtest to video_device_test 2023-06-12 16:39:10 -06:00
membarrier
memfd selftests: improve vm.memfd_noexec sysctl tests 2023-08-21 13:38:00 -07:00
memory-hotplug
mincore selftests/mincore: fix skip condition for check_huge_pages test 2023-07-13 12:51:13 -06:00
mm selftests: memfd_secret: don't build memfd_secret test on unsupported arches 2024-08-29 17:33:43 +02:00
mount
mount_setattr
move_mount_set_group
mqueue selftests/mqueue: Set timeout to 180 seconds 2024-04-03 15:28:20 +02:00
nci
net selftests: net: csum: Fix checksums for packets with non-zero padding 2024-09-18 19:24:09 +02:00
netfilter net: skb_find_text: Ignore patterns extending past 'to' 2023-11-20 11:59:01 +01:00
nolibc selftests/nolibc: fix testcase status alignment 2024-02-05 20:14:15 +00:00
nsfs
ntb
openat2 selftests/openat2: Fix build warnings on ppc64 2024-07-25 09:50:42 +02:00
perf_events
pid_namespace
pidfd selftests/pidfd: Fix ksft print formats 2023-11-20 11:59:17 +01:00
powerpc selftests/powerpc/dexcr: Add -no-pie to hashchk tests 2024-06-12 11:12:44 +02:00
prctl selftests:prctl: add set-process-name to .gitignore 2023-07-25 10:33:25 -06:00
proc selftests/proc: fixup proc-empty-vm test after KSM changes 2023-09-19 13:21:33 -07:00
pstore
ptp selftests/ptp: Add -X option for testing PTP_SYS_OFFSET_PRECISE 2023-07-28 10:59:40 +01:00
ptrace Update for entry and ptrace: 2023-04-25 11:05:04 -07:00
rcutorture clocksource: Scale the watchdog read retries automatically 2024-08-14 13:58:56 +02:00
resctrl selftests/resctrl: Fix closing IMC fds on error and open-code R+W instead of loops 2024-08-03 08:53:43 +02:00
riscv tools: selftests: riscv: Fix compile warnings in mm tests 2024-03-01 13:34:48 +01:00
rlimits
rseq linux-kselftest-next-6.6-rc1 2023-08-28 18:46:47 -07:00
rtc
safesetid
sched
seccomp selftests/seccomp: Handle EINVAL on unshare(CLONE_NEWPID) 2024-05-02 16:32:42 +02:00
sgx selftests/sgx: Fix linker script asserts 2024-02-05 20:14:32 +00:00
sigaltstack selftests/sigaltstack: Fix ppc64 GCC build 2024-08-03 08:54:30 +02:00
size
sparc64
splice
static_keys
sync
syscall_user_dispatch selftests: sud_test: return correct emulated syscall value on RISC-V 2024-06-12 11:11:24 +02:00
sysctl test_sysclt: Test for registering a mount point 2023-06-18 02:32:54 -07:00
tc-testing tc-testing: don't access non-existent variable on exception 2024-08-29 17:33:45 +02:00
tdx
timens selftest/timerns: fix clang build failures for abs() calls 2024-07-25 09:50:55 +02:00
timers selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior 2024-05-17 12:02:16 +02:00
tmpfs
tpm2
tty selftests: tty: add selftest for tty timestamp updates 2023-06-15 13:45:42 +02:00
uevent
user
user_events selftests/user_events: Fix abi_test for BE archs 2023-10-17 15:07:19 -06:00
vDSO selftests/vDSO: fix clang build errors and warnings 2024-07-25 09:50:55 +02:00
watchdog
wireguard wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU 2024-07-18 13:21:23 +02:00
x86 selftests/x86/lam: Zero out buffer for readlink() 2023-11-20 11:58:54 +01:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: fix dependency checker script 2023-09-08 10:06:49 -06:00
kselftest_harness.h selftests/harness: Actually report SKIP for signal tests 2023-08-10 23:10:09 -07:00
kselftest_install.sh
kselftest_module.h
kselftest.h kselftest: Add a ksft_perror() helper 2024-05-25 16:22:53 +02:00
lib.mk selftests: default to host arch for LLVM builds 2024-06-12 11:11:49 +02:00
Makefile Revert "selftests: error out if kernel header files are not yet built" 2023-12-20 17:02:01 +01:00
run_kselftest.sh kselftests: Sort the collections list to avoid duplicate tests 2023-06-12 16:39:11 -06:00