Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2285605ybb; Sun, 5 Apr 2020 03:41:43 -0700 (PDT) X-Google-Smtp-Source: APiQypLKWxIYiosucA+BJgCDEB0Crihi5bf5vfnS7yL3khNyhc2DGKc0atf7vzmukp7rGBrwOKj7 X-Received: by 2002:a05:6830:158e:: with SMTP id i14mr14091301otr.103.1586083303126; Sun, 05 Apr 2020 03:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586083303; cv=none; d=google.com; s=arc-20160816; b=yfaP3WoJw8wAcJiv3fbKKfXSMHM4tg3i44cIe/uP0MtCMK58UauX7i5a3rsXQj34vK x4vOe6pcl96jvT/AkGNqH4zFhZXMnJ7dFIWbQHXl5yOou9Kt5CtP1yvDMA0LJwneH1Q4 xp+abXv4sY24yzJhUFwb+QRUIOiE4rnjCPkQWzQYCg1T3Yr2JOtCtXnYmtWpJTUqD6XI ZiIwuVNWl3J/m8DNhFrztl29K9iuxyMJeAixGdgvkmagbUHqbe6+3hPvM1egXYteCVQJ nMNgHSJsk0tvnAtFq0jQjhoMOfUi5GHni7IT6tI+CvQie60OMdf+jBEseQGqSY1V6as2 NNtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/yYzyLnkt5o4Y6sZshOUF7fL7wkCcwbfoUoIru+drL8=; b=PbJnVg5K+YsN7faSmBccpW3StKr1k7Wcz/QHTHOKnARIbDC0OjZhN1mqwzrpkbzfrC bp6pIaRYXdVI81CMwRb7Iv0iqLb+36EYLQwNk2RdSZMHmXRVyQxFpSL68a5NysxbN5qP H1b9jIdlR3Jn+eRB1lvsuv7uvgbv7K+V8bXu/Pc9DxhYc+ruvNzfzNcOUGi4YCtLH6nR AGxYOq59ghZISW7J6ECjbyN/I9CfJlklkgGneKkpXrpOkxSyId/R64HXhvS0fmWwaPg9 9P4P8D2PePyRT/6WKWOIbSzULpWyptiUq+nPRN6m6UIYY/ACPNISDV1kqLMPn5LYAGh6 Kzmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="j5X9/Ru3"; 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 y35si6007684otb.315.2020.04.05.03.41.30; Sun, 05 Apr 2020 03:41:43 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="j5X9/Ru3"; 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 S1726535AbgDEKgX (ORCPT + 99 others); Sun, 5 Apr 2020 06:36:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49386 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbgDEKgX (ORCPT ); Sun, 5 Apr 2020 06:36:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/yYzyLnkt5o4Y6sZshOUF7fL7wkCcwbfoUoIru+drL8=; b=j5X9/Ru3dETwVmESQJCHU9yF9s On7QaK9lK3CMZ7kXWhnwVrN00KeNKZyK93dEX+TfcpnmgdoyAvD1FIUpxrA0AtPypRpPml23hJCfy KhRuDRSX396CyPjihpasA9adwWaq0CKaHfLy+4rbiWPgalNw2IJ8wCok/x6HFd5hhu4W9RTmUEzmb GXvYWCI9A/p3s5gxkNEiD7cRzDWz+pYUE0TMFZoki91O9P1uhFIS0Kn8MJO0wDuGphZksUbX4+V3j 0DEI9ks+BWAqV+fB0QhxYlawQkcNHu278of7/FmzeAjJNLBaQGYAtfB+JM8PMys1oirQUeXrhmxbU g3IkxjmA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jL2dW-0007eO-Vw; Sun, 05 Apr 2020 10:36:18 +0000 Date: Sun, 5 Apr 2020 03:36:18 -0700 From: Matthew Wilcox To: Dexuan Cui 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, rdunlap@infradead.org, jeremy@azazel.net, pabeni@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] skbuff.h: Improve the checksum related comments Message-ID: <20200405103618.GV21484@bombadil.infradead.org> References: <1586071063-51656-1-git-send-email-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586071063-51656-1-git-send-email-decui@microsoft.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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'. > * 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." > @@ -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'? Thanks for the improvements, Reviewed-by: Matthew Wilcox (Oracle)