Re: [PATCH v3 net-next 2/6] net: hibmcge: Add support for rx checksum offload

From: Jijie Shao
Date: Thu Feb 27 2025 - 06:30:52 EST



on 2025/2/26 0:23, Jakub Kicinski wrote:
On Tue, 25 Feb 2025 17:00:45 +0800 Jijie Shao wrote:
+ NETIF_F_RXCSUM)
I don't see you setting the checksum to anything other than NONE
When receiving packets, MAC checks the checksum by default. This behavior cannot be disabled.
If the checksum is incorrect, the MAC notifies the driver through the descriptor.

If checksum offload is enabled, the driver drops the packet.
Otherwise, the driver set the checksum to NONE and sends the packet to the stack.
Dropping packets with bad csum is not correct.
Packets where device validated L4 csum should have csum set
to UNNECESSARY, most likely. Please read the comment in skbuff.h

Hi, is it ok below:

rx checksum offload enable:
device check ok -> CHECKSUM_UNNECESSARY -> stack
device check fail -> drop

rx checksum offload disable:
device check ok -> CHECKSUM_NONE -> stack
device check fail -> CHECKSUM_NONE -> stack

Thanks
Jijie Shao