Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3785018pxb; Tue, 26 Jan 2021 04:54:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmXq/vFI/rsFMQVZ1N0ncgZkdpfFIUb1QVciLabHF2G6LYd/XO2Hr/X0dDaCsEHy3x6HBY X-Received: by 2002:a05:6402:c9c:: with SMTP id cm28mr4599188edb.281.1611665654437; Tue, 26 Jan 2021 04:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611665654; cv=none; d=google.com; s=arc-20160816; b=Vhtjd+ZoOU4/4HGKj1yWcswFNlSmv2K1cEIoM3SP9mULbBjRwzRiy6a3MdAu5OsGUp IyREoH1LekajG/trmFmf+XOtUUmBsMrcJBQ+mYQE5PjZyhwF1Yl799c0Xhu703oqXmIt DEtrrxpgnHQGgHFW2/OP4WaazpML/SsyKTdi+u5lO1sBGVdBISuE4ypAruv98rmvLaJ1 OA/UqwLBqtCDUPbdoQ3D9NwKAGoPw2iv+y6HVkneNE0xRge0nNPQR+qIsYYq9awOtxGp DpbaHAQuzM5NluiLKj1IiOXEIGhrnCLsy7NMzL9ItMa0nIDThCyxDUeexJIHAG2u9BhI tAhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZqCqxPOpZNmg86kT+vNUGdughKBQC+baHo9Trm91BVM=; b=gxALE9oAtsD+qE287mLZ/xym3LU3eBl4p6aD9h5Ou1DGVYX6QNBuZFDYBn5WWQ3dhr isXQRdvKDML9J7aBrUP6h83tp2Eyx6imjbqmhwNSldHLIsPitSKaSGUPWJPBGv0ExT0p QFket6Z9Hl6/PGa4Gb/L9EPIphJ/YRSDfWZSepTdykFZ30U/mMLVS3tD3i6KFIph73Hh o0pty/AAE7zTfCz0Cb7Q3ekicT6xqGhnFwHomwF4YHgTXceIE/OBByqTljG1kGF0nFZM m4f7sj2UY1Xc6xQJnyffwcfJUqauJwqDwt0V3VnZrjA+2V/lazG9glno5z4CkDnhaNyz CRCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si7109971ejx.477.2021.01.26.04.53.49; Tue, 26 Jan 2021 04:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392360AbhAZMwn (ORCPT + 99 others); Tue, 26 Jan 2021 07:52:43 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:48216 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391915AbhAZMvN (ORCPT ); Tue, 26 Jan 2021 07:51:13 -0500 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id D37C520534; Tue, 26 Jan 2021 13:50:27 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HX9cLZtSrG5O; Tue, 26 Jan 2021 13:50:27 +0100 (CET) Received: from mail-essen-02.secunet.de (unknown [10.53.40.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 5C52D200A7; Tue, 26 Jan 2021 13:50:27 +0100 (CET) Received: from mbx-essen-01.secunet.de (10.53.40.197) by mail-essen-02.secunet.de (10.53.40.205) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 26 Jan 2021 13:50:27 +0100 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 26 Jan 2021 13:50:26 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 144A33182E68; Tue, 26 Jan 2021 13:50:27 +0100 (CET) Date: Tue, 26 Jan 2021 13:50:27 +0100 From: Steffen Klassert To: Dongseok Yi CC: "'David S. Miller'" , 'Alexander Lobakin' , , 'Jakub Kicinski' , 'Hideaki YOSHIFUJI' , "'Willem de Bruijn'" , , Subject: Re: [PATCH net v3] udp: ipv4: manipulate network header of NATed UDP GRO fraglist Message-ID: <20210126125027.GX3576117@gauss3.secunet.de> References: <1611235479-39399-1-git-send-email-dseok.yi@samsung.com> <20210125124544.GW3576117@gauss3.secunet.de> <026001d6f37a$97461300$c5d23900$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <026001d6f37a$97461300$c5d23900$@samsung.com> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 26, 2021 at 09:31:29AM +0900, Dongseok Yi wrote: > On 1/25/21 9:45 PM, Steffen Klassert wrote: > > On Thu, Jan 21, 2021 at 10:24:39PM +0900, Dongseok Yi wrote: > > > > > > +static void __udpv4_gso_segment_csum(struct sk_buff *seg, > > > + __be32 *oldip, __be32 *newip, > > > + __be16 *oldport, __be16 *newport) > > > +{ > > > + struct udphdr *uh; > > > + struct iphdr *iph; > > > + > > > + if (*oldip == *newip && *oldport == *newport) > > > + return; > > > > This check is redundant as you check this already in > > __udpv4_gso_segment_list_csum. > > When comes in __udpv4_gso_segment_csum, the condition would be > SNAT or DNAT. I think we don't need to do the function if the > condition is not met. I want to skip the function for SNAT checksum > when DNAT only case. Is it better to remove the check? Ok, so it can be seen as an optimization. It is ok as it is. Acked-by: Steffen Klassert Thanks!