From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [Patch net] net: invert the check of detecting hardware RX checksum fault Date: Fri, 16 Nov 2018 13:33:35 -0800 Message-ID: <5af4ca88-62f5-e54e-78b3-704405722925@gmail.com> References: <20181115231602.18328-1-xiyou.wangcong@gmail.com> <20181116015242.wmm6mooubjnum7qv@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Herbert Xu , Linux Kernel Network Developers , Tom Herbert , Eric Dumazet , Saeed Mahameed To: Cong Wang , Eric Dumazet Return-path: Received: from mail-pf1-f170.google.com ([209.85.210.170]:34337 "EHLO mail-pf1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbeKQHro (ORCPT ); Sat, 17 Nov 2018 02:47:44 -0500 Received: by mail-pf1-f170.google.com with SMTP id h3so5438310pfg.1 for ; Fri, 16 Nov 2018 13:33:39 -0800 (PST) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/16/2018 12:15 PM, Cong Wang wrote: > On Thu, Nov 15, 2018 at 8:52 PM Eric Dumazet wrote: >> >> It is very possible NIC provides an incorrect CHECKSUM_COMPLETE, in the >> case non zero trailer bytes were added by a buggy switch (or host) >> >> Saeed can comment/confirm, but the theory is that the NIC does header analysis and >> computes a checksum only on the bytes of the IP frame, not including the tail bytes >> that were added by a switch. > > > This theory seems can't explain why Pawel saw this warning so often, > which is beyond the probability of a buggy switch. I don't know. Well the bug here would be the receiver NIC, not really respecting CHECKSUM_COMPLETE premise (provide a checksum over all the bytes, regardless of how smart header parsing can be on the NIC) 'Buggy switch' would add random bytes after IP frames, but as I mentioned, any AF_PACKET user can cook arbitrary padding after a valid IP (or IPv6) frame. > > I will try it. > > Thanks. >