]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: selftests: add PHY-loopback test for bad TCP checksums
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 17 Jul 2025 08:35:24 +0000 (10:35 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Jul 2025 00:19:46 +0000 (17:19 -0700)
commite7ce59d9205e3842d0931632372aaf9fb4d901cf
tree676e3c8a695d3f66ab3243f48583435bb92ed70d
parenta6f190630d070173897a7e98a30188b7638ba0a1
net: selftests: add PHY-loopback test for bad TCP checksums

Detect NICs and drivers that either drop frames with a corrupted TCP
checksum or, worse, pass them up as valid.  The test flips one bit in
the checksum, transmits the packet in internal loopback, and fails when
the driver reports CHECKSUM_UNNECESSARY.

Discussed at:
https://lore.kernel.org/all/20250625132117.1b3264e8@kernel.org/

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250717083524.1645069-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/selftests.c