From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 6F905231E for ; Mon, 23 Apr 2018 11:55:48 +0200 (CEST) Received: from alille-654-1-134-221.w90-34.abo.wanadoo.fr ([90.34.61.221] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fAYCL-0002o9-OE; Mon, 23 Apr 2018 11:55:51 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 23 Apr 2018 11:55:41 +0200 Date: Mon, 23 Apr 2018 11:55:41 +0200 From: Olivier Matz To: Thomas Monjalon Cc: "Ananyev, Konstantin" , Xueming Li , "Lu, Wenzhuo" , "Wu, Jingjing" , Yongseok Koh , Shahaf Shuler , "Iremonger, Bernard" , "Yigit, Ferruh" , "dev@dpdk.org" Message-ID: <20180423095541.4wsjundovqouikcw@platinum> References: <20180408123240.110698-1-xuemingl@mellanox.com> <2683955.QbV0EBoMcY@xps> <2601191342CEEE43887BDE71AB977258AE9179C8@IRSMSX102.ger.corp.intel.com> <25401990.h546MBpoIl@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25401990.h546MBpoIl@xps> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v6 1/2] ethdev: introduce generic IP/UDP tunnel checksum and TSO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2018 09:55:48 -0000 On Wed, Apr 18, 2018 at 08:02:35PM +0200, Thomas Monjalon wrote: > 18/04/2018 18:45, Ananyev, Konstantin: > > From: Thomas Monjalon > > > 18/04/2018 15:58, Xueming Li: > > > > The new flag PKT_TX_TUNNEL_IP is redundant with PKT_TX_OUTER_IP_CKSUM. > > > > The old flag PKT_TX_OUTER_IP_CKSUM can be deprecated and removed in > > > > later release. > > > > > > > > Signed-off-by: Xueming Li > > > > > > Except a small comment below, it looks OK. > > > > > > Acked-by: Thomas Monjalon > > > > > > Please send a deprecation notice for PKT_TX_OUTER_IP_CKSUM. > > > > I probably missed something, but why PKT_TX_OUTER_IP_CKSUM > > is supposed to be deprecated? > > Because PKT_TX_TUNNEL_* flags sepersede it. I think we need to discuss it. > > We use the offload flags PKT_TX_TUNNEL_* when we request some offloads > in the outer and the inner headers at the same time. > When setting a tunnel flag PKT_TX_TUNNEL_*, it can be expected that > the outer checksums will be offloaded, otherwise it is almost > impossible to request an offload in the inner header. > In the case of an UDP tunnel, any change in the inner packet will > require an UDP checksum update. > In the case of an IP tunnel, a change of the inner packet size > (like TSO) will require an IP checksum update. > > If we really require PKT_TX_OUTER_IP_CKSUM to be set in addition to > PKT_TX_TUNNEL_* flags, then we should add more PKT_TX_OUTER_*_CKSUM, > like PKT_TX_OUTER_UDP_CKSUM which is missing. I agree, I think PKT_TX_TUNNEL_* implies PKT_TX_OUTER_IP_CKSUM. And I don't see use-case where we only need PKT_TX_OUTER_IP_CKSUM, because in that case we can use PKT_TX_IP_CKSUM. But this can be discussed in a second step, for now I think it's safer to keep it as is. Olivier