From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5026C169C4 for ; Thu, 31 Jan 2019 17:38:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96444218AF for ; Thu, 31 Jan 2019 17:38:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbfAaRii (ORCPT ); Thu, 31 Jan 2019 12:38:38 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:33502 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbfAaRih (ORCPT ); Thu, 31 Jan 2019 12:38:37 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DDF0114F85B10; Thu, 31 Jan 2019 09:38:36 -0800 (PST) Date: Thu, 31 Jan 2019 09:38:36 -0800 (PST) Message-Id: <20190131.093836.257654513323223386.davem@davemloft.net> To: tariqt@mellanox.com Cc: netdev@vger.kernel.org, eranbe@mellanox.com, saeedm@mellanox.com, edumazet@google.com Subject: Re: [PATCH net] net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames From: David Miller In-Reply-To: <1548939763-20074-1-git-send-email-tariqt@mellanox.com> References: <1548939763-20074-1-git-send-email-tariqt@mellanox.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 31 Jan 2019 09:38:37 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Tariq Toukan Date: Thu, 31 Jan 2019 15:02:43 +0200 > From: Saeed Mahameed > > When an ethernet frame is padded to meet the minimum ethernet frame > size, the padding octets are not covered by the hardware checksum. > Fortunately the padding octets are usually zero's, which don't affect > checksum. However, it is not guaranteed. For example, switches might > choose to make other use of these octets. > This repeatedly causes kernel hardware checksum fault. > > Prior to the cited commit below, skb checksum was forced to be > CHECKSUM_NONE when padding is detected. After it, we need to keep > skb->csum updated. However, fixing up CHECKSUM_COMPLETE requires to > verify and parse IP headers, it does not worth the effort as the packets > are so small that CHECKSUM_COMPLETE has no significant advantage. > > Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends") > Cc: Eric Dumazet > Signed-off-by: Saeed Mahameed > Signed-off-by: Tariq Toukan > --- > drivers/net/ethernet/mellanox/mlx4/en_rx.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > Hi Dave, > Please queue for -stable >= v4.18. Please look into Eric's feedback and update the comment as needed. Thank you.