Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2528127ybb; Sun, 5 Apr 2020 09:43:10 -0700 (PDT) X-Google-Smtp-Source: APiQypJ1MwB26nURbrhwTCtx4uzYAoNwEzksX9KctN5JHfMGlrqY3wQEk0tIexU4/+i5R0Ojqg2p X-Received: by 2002:a05:6808:103:: with SMTP id b3mr10488908oie.46.1586104990654; Sun, 05 Apr 2020 09:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586104990; cv=none; d=google.com; s=arc-20160816; b=mTvpJ4OACTAe0nbNCJUaxMy/nP6Fq78Re96nln0AjV8CixG//8lrZD4GYu6LOq4CUi zwIVmJYawsCDldrDWXQWVWg6wLnQNCOn84Y3mNK5OxcTkYA8lS/NezjtsFDYiriZJQwk HVA5KI1KAKOqmkK2TTU5j9gsvWUdhPyRKcwJ1XDAQN7OJ2pVCsUjXJ0oeyDEHsqTqMeq bO1720YTWWJp2ZitwsOPwEQiAABcITt2NdxMjGAGQs4aLgsXdmcXouFQq0pivKrBFiIb f5uktxmdueSxVHnWEyK9mMz74WJAHxYo1sD1LU6F3RdGpZiMtTMZaDOxczGtREtn7TrS cfsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+M0Y1kjtlZOoIzta5LvEShFkET8hM92YHdaoqL+I5Fg=; b=s/kAwd13UW81S3c3oCtcp+Ft+eh6FwhrjwBb7E2QLNh3jAdHHMHaM3YA9WW+4D5BqO V38fdNAuuvgVvY04qSXKeQD5cyEOVgwEH7cd/ZxJp2C9QIw+TsMDmyiwpRhed0MOMkZH f5H2U64QZJGVqvxolunDNOJTcUvdFz/Bn8G57exLq4DYEMEjw/uDsIvDjkX0VbAlgKPV B0J92tTT/YHFxZ17A+sDbweMT+vrKXlKBlE1FDOjUPIE27GynpuY7qAL5u98Kn2V90P+ gA26LDqryn3JZ/kVNu+MGqLFeorPcRpN9zwlBpAWCK3jH4stFlRppkJY8JsTLmaYDJrZ hxow== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (dns failure for signature) header.i=@infradead.org header.s=bombadil.20170209 header.b=dq7sjnd5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si8028363otk.67.2020.04.05.09.42.58; Sun, 05 Apr 2020 09:43:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (dns failure for signature) header.i=@infradead.org header.s=bombadil.20170209 header.b=dq7sjnd5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727648AbgDEQla (ORCPT + 99 others); Sun, 5 Apr 2020 12:41:30 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43786 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbgDEQl3 (ORCPT ); Sun, 5 Apr 2020 12:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=+M0Y1kjtlZOoIzta5LvEShFkET8hM92YHdaoqL+I5Fg=; b=dq7sjnd54/K3+ZTSbi2RUgN+61 rJw2w4cuSzHi64TQmp4migtec4jAcBa15X41M9GNs2Ar9QcvqxJE2XP/khncENXbWRU5zmZpG9JKL qUomqye3eWwhubDeX/WbcRFiJjr9q5eXJ+MwtiafS0gIpIrlNq/w+P6rfa2xOgt79r+6jNWEFx5Rk 9FU6XydQ4jwaryrEGp5NcqWDrb4w0QCtmGUva7es7IeTbAwzcCM704hXvi+t/Dq27YzNxW/XjyZWv LCxi63wdSEOCAg822kz2avJI2F+gLYXROu7sDfgeNsJf0oYLgqZpunQq18W69n0t9dy8i5D9vY/cA yNjCc1Ag==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jL8Kr-0002db-DQ; Sun, 05 Apr 2020 16:41:25 +0000 Subject: Re: [PATCH net] skbuff.h: Improve the checksum related comments To: Dexuan Cui , Matthew Wilcox Cc: "netdev@vger.kernel.org" , "davem@davemloft.net" , "willemb@google.com" , "kuba@kernel.org" , "simon.horman@netronome.com" , "sdf@google.com" , "john.hurley@netronome.com" , "edumazet@google.com" , "fw@strlen.de" , "jonathan.lemon@gmail.com" , "pablo@netfilter.org" , "jeremy@azazel.net" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" References: <1586071063-51656-1-git-send-email-decui@microsoft.com> <20200405103618.GV21484@bombadil.infradead.org> From: Randy Dunlap Message-ID: <7a0df207-8ad3-3731-c372-146a19befc02@infradead.org> Date: Sun, 5 Apr 2020 09:41:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/5/20 9:33 AM, Dexuan Cui wrote: >> From: Matthew Wilcox >> Sent: Sunday, April 5, 2020 3:36 AM >> To: Dexuan Cui >> >> On Sun, Apr 05, 2020 at 12:17:43AM -0700, Dexuan Cui wrote: >>> * CHECKSUM_COMPLETE: >>> * >>> - * This is the most generic way. The device supplied checksum of the >> _whole_ >>> - * packet as seen by netif_rx() and fills out in skb->csum. Meaning, the >>> + * This is the most generic way. The device supplies checksum of the >> _whole_ >>> + * packet as seen by netif_rx() and fills out in skb->csum. This means the >> >> I think both 'supplies' and 'supplied' are correct in this sentence. The >> nuances are slightly different, but the meaning is the same in this instance. > > I see. So let me rever back to "supplied". > >> You missed a mistake in the second line though, it should be either 'fills >> out' or 'fills in'. I think we tend to prefer 'fills in'. > > Thanks! Will use "fills in" in v2. > >>> * CHECKSUM_COMPLETE: >>> * Not used in checksum output. If a driver observes a packet with this >> value >>> - * set in skbuff, if should treat as CHECKSUM_NONE being set. >>> + * set in skbuff, the driver should treat it as CHECKSUM_NONE being set. >> >> I would go with "it should treat the packet as if CHECKSUM_NONE were set." > > Thanks. Will use this version. > >>> @@ -211,7 +211,7 @@ >>> * is implied by the SKB_GSO_* flags in gso_type. Most obviously, if the >>> * gso_type is SKB_GSO_TCPV4 or SKB_GSO_TCPV6, TCP checksum offload >> as >>> * part of the GSO operation is implied. If a checksum is being offloaded >>> - * with GSO then ip_summed is CHECKSUM_PARTIAL, csum_start and >> csum_offset >>> + * with GSO then ip_summed is CHECKSUM_PARTIAL AND csum_start and >> csum_offset >>> * are set to refer to the outermost checksum being offload (two offloaded >>> * checksums are possible with UDP encapsulation). >> >> Why the capitalisation of 'AND'? > > The current text without the patch is: > * part of the GSO operation is implied. If a checksum is being offloaded > * with GSO then ip_summed is CHECKSUM_PARTIAL, csum_start and csum_offset > * are set to refer to the outermost checksum being offload (two offloaded > * checksums are possible with UDP encapsulation). > > The comma after the "CHECKSUM_PARTIAL" seems suspicious to me. I feel we > should add an "and" after the comma, or replace the comma with "and", but > either way we'll have "... and csum_start and csum_offset...", which seems a little > unnatural to me since we have 2 'and's here... So I tried to make it a little natural > by replacing the first 'and' with 'AND', which obviously causes confusion to you. maybe "both csum_start and csum_offset are set to refer to". > Please suggest the best change here. Thanks! > >> Thanks for the improvements, >> >> Reviewed-by: Matthew Wilcox (Oracle) > > Thanks for the comments! I'll wait for your suggestion on the 'AND' and post > a v2. -- ~Randy