From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding Date: Tue, 4 Dec 2018 18:52:35 -0800 Message-ID: References: <20181128061013.3885-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Saeed Mahameed , Eric Dumazet To: Linux Kernel Network Developers Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:44285 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbeLECws (ORCPT ); Tue, 4 Dec 2018 21:52:48 -0500 Received: by mail-pl1-f193.google.com with SMTP id k8so9289158pls.11 for ; Tue, 04 Dec 2018 18:52:47 -0800 (PST) In-Reply-To: <20181128061013.3885-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Nov 27, 2018 at 10:10 PM Cong Wang wrote: > > 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 ususally zero's, which don't affect > checksum. However, we have a switch which pads non-zero octets, this > causes kernel hardware checksum fault repeatedly. > > Prior to commit 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"), > skb checksum is forced to be CHECKSUM_NONE when padding is detected. > After it, we need to keep skb->csum updated, like what we do for FCS. > > The logic is a bit complicated when dealing with both FCS and padding, > so I wrap it up in a helper function mlx5e_csum_padding(). > > I tested this patch with RXFCS on and off, it works fine without any > warning in both cases. > > Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"), > Cc: Saeed Mahameed > Cc: Eric Dumazet > Signed-off-by: Cong Wang Nacked-by: Cong Wang This patch has no value for upstream. Let's discard it. Please don't use or rework on this patch for any purpose. Thanks!