From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC871C33CB6 for ; Thu, 23 Jan 2020 14:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD0A3217F4 for ; Thu, 23 Jan 2020 14:29:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728939AbgAWO3m (ORCPT ); Thu, 23 Jan 2020 09:29:42 -0500 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:44904 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbgAWO3l (ORCPT ); Thu, 23 Jan 2020 09:29:41 -0500 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1iudU9-0007vD-Dk; Thu, 23 Jan 2020 15:29:29 +0100 Date: Thu, 23 Jan 2020 15:29:29 +0100 From: Florian Westphal To: Daniel Borkmann Cc: Florian Westphal , Praveen Chaudhary , pablo@netfilter.org, davem@davemloft.net, kadlec@netfilter.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenggen Xu , Andy Stracner Subject: Re: [PATCH v3] [net]: Fix skb->csum update in inet_proto_csum_replace16(). Message-ID: <20200123142929.GV795@breakpoint.cc> References: <1573080729-3102-1-git-send-email-pchaudhary@linkedin.com> <1573080729-3102-2-git-send-email-pchaudhary@linkedin.com> <16d56ee6-53bc-1124-3700-bc0a78f927d6@iogearbox.net> <20200122114333.GQ795@breakpoint.cc> <20200123082106.GT795@breakpoint.cc> <1c1fc75d-e69c-f2f6-78ce-de9dc8aa89ca@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c1fc75d-e69c-f2f6-78ce-de9dc8aa89ca@iogearbox.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Daniel Borkmann wrote: > On 1/23/20 9:21 AM, Florian Westphal wrote: > > So, AFAIU from what you're saying above the patch seems fine as-is and > > just needs a more verbose commit message explaining why replace16() > > doesn't update skb->csum while all the other ones do. > > > > Is that correct? > > Probably better a comment in the code to avoid confusion on why it's not done in > inet_proto_csum_replace16() but all the other cases; mainly to avoid some folks > in future sending random cleanup patches w/ removal attempts. Makes sense, thanks! Praveen, can you spin a v4 with a comment in replace16 that it intentionally elides the skb->csum update because the function is only used by ipv6? Thanks!