[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250917150739.7c40c5c0@kernel.org>
Date: Wed, 17 Sep 2025 15:07:39 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC] net: selftests: Adding TX checksum offload validation
On Tue, 16 Sep 2025 11:12:02 +0200 Oleksij Rempel wrote:
> While working with the smsc95xx driver, I identified a need for better
> validation of the driver and hardware TX checksum offloading capabilities. I
> believe a generic test suite for this would benefit other drivers as well.
>
> The generic selftest framework in net/core/selftests.c seems like the ideal
> location. It already contains a test for the RX checksum path, so adding
> validation for the TX path feels like a natural extension.
>
> Here is the list of test cases I propose to add:
> - TX csum offload, IPv4, TCP, Standard MTU Packet
> - TX csum offload, IPv4, UDP, Standard MTU Packet
> - TX csum offload, IPv4, ICMP, Standard Payload
> - TX csum offload, IPv4, TCP, Minimal Size Packet (1-byte payload)
> - TX csum offload, IPv4, UDP, Minimal Size Packet (1-byte payload)
> - TX csum offload, IPv4, UDP, Zero-Checksum Payload (Verify checksum becomes
> 0xFFFF)
> - TX csum offload, IPv4, TCP, With Single VLAN Tag
> - TX csum offload, IPv4, TCP, With Double VLAN Tag (Q-in-Q)
> - TX csum offload, IPv6, TCP, Standard MTU Packet
> - TX csum offload, IPv6, UDP, Standard MTU Packet
The in-kernel tests are best for things which are hard to trigger from
user space. Have you seen tools/testing/selftests/drivers/net/hw/csum.py
and tools/testing/selftests/net/lib/csum.c ?
Powered by blists - more mailing lists