From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [Patch net] mlx5: fixup checksum for ethernet padding Date: Tue, 27 Nov 2018 17:25:51 -0800 Message-ID: <0e6a8a08-b181-b17a-1330-0159808e9a42@gmail.com> References: <20181127232142.7561-1-xiyou.wangcong@gmail.com> <0b5b3894-161f-c604-12bc-ecde341d7776@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers , Saeed Mahameed , Eric Dumazet To: Cong Wang Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]:46283 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbeK1MZk (ORCPT ); Wed, 28 Nov 2018 07:25:40 -0500 Received: by mail-pf1-f194.google.com with SMTP id c73so9287924pfe.13 for ; Tue, 27 Nov 2018 17:25:53 -0800 (PST) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/27/2018 04:07 PM, Cong Wang wrote: > On Tue, Nov 27, 2018 at 3:48 PM Eric Dumazet wrote: >> >> But the padding might be added on normal packets (say 1000 bytes + 3 bytes of padding) ? > > I never see other padding cases than ETH_ZLEN. Does ethernet standard > require padding for other cases? I only read the section "3.2.8 Pad field" in > the standard. > Padding can be done by senders, eg using AF_PACKET, added at the tail of a regular IP/IP6 frame of 1000 or 6000 bytes. Note that mlx5 will presumably set CHECKSUM_UNNECESSARY for standard protocols, so if you want to reproduce the issue, you might need to find an IP frame that mlx5 is not able to checksum validate. Maybe a non-first fragment will do the trick.