From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ronak Doshi Subject: Re: suspicius csum initialization in vmxnet3_rx_csum Date: Fri, 1 Jun 2018 11:10:01 -0700 Message-ID: References: <1527151641.3058.32.camel@redhat.com> <4aab239242c841b8cbff08eea5f340f89f368a42.camel@redhat.com> <20180531233227.GA6985@neilslaptop.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Cc: Paolo Abeni , Guolin Yang , Boon Ang , Louis Luo , To: Neil Horman Return-path: Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:58450 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835AbeFASKE (ORCPT ); Fri, 1 Jun 2018 14:10:04 -0400 In-Reply-To: <20180531233227.GA6985@neilslaptop.think-freely.org> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 31 May 2018, Neil Horman wrote: > On Thu, May 31, 2018 at 11:02:34AM -0700, Ronak Doshi wrote: > > > > On Wed, 30 May 2018, Paolo Abeni wrote: > > > > > Hi, > > > > > > On Thu, 2018-05-24 at 21:48 +0000, Guolin Yang wrote: > > > > Yes, that code is not correct, we should fix that code > > > > > > Did you have any chance to address the issue and/or to give a more in- > > > deepth look to the change proposed in my initial email? > > > > > Hi Paolo, > > > > Can you provide the esx build you are using? It can be found using > > "vmware -vl" on ESX host. > > > > Did you try your proposed fix and did it work? Are you sure the packet > > hits the below if block and not the else block? I still don't think the > > ICMP packet will go through the below if block. > > > > if (gdesc->rcd.csum) { > > skb->csum = htons(gdesc->rcd.csum); > > skb->ip_summed = CHECKSUM_PARTIAL; > > } else { > > skb_checksum_none_assert(skb); > > } > > > > The vmxnet3 emulation does not calculate rcd.csum for ICMP packet and > > hence should go through the else block i.e. checksum none. > > > What packet types will rcd.csum be set for? > Neil > I looked thorugh the emulation code and found that rcd.csum is not set. For valid v4/v6, TCP/UDP packets the code block above the mentioend "if" block will be executed or else it will go through checksum none. That's why I wanted to know (in previous emails) which ESX build is being used while this was tested. The code block under "if (gdesc->rcd.csum)" block might seem incorrect but it shouldn't be hit as rcd.csum is not set. Hence, I asked did the fix provided by Paolo worked for the icmp test? Thanks, Ronak