Re: [Patch net] mlx4: set csum_complete_sw bit when fixing complete csum
From: Or Gerlitz <hidden>
Date: 2016-06-27 21:08:32
On Mon, Jun 27, 2016 at 9:22 PM, Cong Wang [off-list ref] wrote:
The stack doesn't trust the complete csum by hardware even when it is correct.
Can you explain that a little further?
In the case we fix csum by ourself probably it is safe to just mark it as completed by software.
This should shut up a kernel warning from netdev_rx_csum_fault() with mlx4 driver for ICMP packets.
can you point/paste the exact warning and how to reproduce that? is that as simple as running ping and/or ping6?
quoted hunk ↗ jump to hunk
Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE') Cc: Shani Michaeli <redacted> Cc: Tariq Toukan <redacted> Cc: Yishai Hadas <redacted> Signed-off-by: Cong Wang <redacted> --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 1 + 1 file changed, 1 insertion(+)diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index c1b3a9c..b44c434 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c@@ -732,6 +732,7 @@ static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va, if (get_fixed_ipv6_csum(hw_checksum, skb, hdr)) return -1; #endif + skb->csum_complete_sw = 1; return 0; } --2.1.0