# Re: \[PATCH net-next v4 3/4\] net: selftests: add checksum mode support and SW checksum handling

- From: Simon Horman \<horms@kernel.org\>
- Date: 2025-05-16 12:57:49 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/05/3058231
- Thread: https://ratatoskr.run/netdev/2025/05/3056192/t.md

```text
On Thu, May 15, 2025 at 10:30:59AM +0200, Oleksij Rempel wrote:
> Introduce `enum net_test_checksum_mode` to support both CHECKSUM_COMPLETE
> and CHECKSUM_PARTIAL modes in selftest packet generation.
> 
> Add helpers to calculate and apply software checksums for TCP/UDP in
> CHECKSUM_COMPLETE mode, and refactor checksum handling into a dedicated
> function `net_test_set_checksum()`.
> 
> Update PHY loopback tests to use CHECKSUM_COMPLETE by default to avoid
> hardware offload dependencies and improve reliability.
> 
> Also rename loopback test names to clarify checksum type and transport.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Simon Horman <horms@kernel.org>

```
