netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] mlx4: set csum_complete_sw bit when fixing complete csum
@ 2016-06-27 18:22 Cong Wang
  2016-06-27 21:08 ` Or Gerlitz
  0 siblings, 1 reply; 13+ messages in thread
From: Cong Wang @ 2016-06-27 18:22 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, Shani Michaeli, Tariq Toukan, Yishai Hadas

The stack doesn't trust the complete csum by hardware
even when it is correct. 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.

Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE')
Cc: Shani Michaeli <shanim@mellanox.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-30 17:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27 18:22 [Patch net] mlx4: set csum_complete_sw bit when fixing complete csum Cong Wang
2016-06-27 21:08 ` Or Gerlitz
2016-06-27 21:44   ` Cong Wang
2016-06-27 21:47     ` Tom Herbert
2016-06-27 21:49       ` Cong Wang
2016-06-27 22:04         ` Tom Herbert
2016-06-27 22:53           ` Cong Wang
2016-06-27 23:16             ` Tom Herbert
2016-06-28 14:30     ` Or Gerlitz
2016-06-28 16:52       ` Cong Wang
2016-06-29 14:23         ` Tariq Toukan
2016-06-29 14:33           ` Or Gerlitz
2016-06-30 17:08           ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).