Re: [PATCH net-next v4 0/4] net: selftest: improve test string formatting and checksum handling

From
Jakub Kicinski <kuba@kernel.org>
Date
2025-06-25 20:21:18
Also in
lkml
Reply to
Oleksij Rempel, 2025-06-25
On Wed, 25 Jun 2025 07:07:42 +0200 Oleksij Rempel wrote:
Hm... at least part of this behavior can be verified with self-tests:

- Send a TCP packet with an intentionally incorrect checksum,
  ensuring its state is CHECKSUM_NONE so the transmit path doesn't change it.
- Test if we receive this packet back via the PHY loopback.
   - If received: The test checks the ip_summed status of the
     received packet.
      - A status of CHECKSUM_NONE indicates the hardware correctly passed
        the packet up without validating it.
_NONE or _COMPLETE are both fine in this case.
      - A status of CHECKSUM_UNNECESSARY indicates a failure, as the hardware
        or driver incorrectly marked a bad checksum as good.
   - If not received (after a timeout): The test then checks the device's
     error statistics.
      - If the rx_errors counter has incremented
      - If the counter has not incremented, the packet was lost for an unknown
        reason, and the test fails.

What do you think?
Sounds like a good idea! Not sure if I'd bother with the rx_error
handling. Hopefully the drivers can be configured to pass the packet
thru.
Thread (18 messages) 18 messages, 4 authors, last reply 2025-07-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help