From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C4AAE7CBE for ; Wed, 18 Apr 2018 18:45:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 09:45:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,466,1517904000"; d="scan'208";a="38459137" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga002.fm.intel.com with ESMTP; 18 Apr 2018 09:45:54 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.164]) by irsmsx110.ger.corp.intel.com ([169.254.15.211]) with mapi id 14.03.0319.002; Wed, 18 Apr 2018 17:45:54 +0100 From: "Ananyev, Konstantin" To: Thomas Monjalon , Xueming Li CC: "Lu, Wenzhuo" , "Wu, Jingjing" , Yongseok Koh , Olivier MATZ , Shahaf Shuler , "Iremonger, Bernard" , "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 1/2] ethdev: introduce generic IP/UDP tunnel checksum and TSO Thread-Index: AQHT1yGaHe+Q/F++6kWhQ3fi0FkxT6QGutgQ Date: Wed, 18 Apr 2018 16:45:53 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AE9179C8@IRSMSX102.ger.corp.intel.com> References: <20180408123240.110698-1-xuemingl@mellanox.com> <20180418135852.27598-1-xuemingl@mellanox.com> <2683955.QbV0EBoMcY@xps> In-Reply-To: <2683955.QbV0EBoMcY@xps> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjM0NTM4ZTctOWM1MS00YzYzLWJjZmQtOTc5MDY5MDBiNTdkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImREMmpRYWRXTVh4ejNTeE9HWFJXNEhiMXZoZTU4RnpZN0xnYXh5Y1BEUkE9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Wed, 18 Apr 2018 16:45:58 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, April 18, 2018 3:28 PM > To: Xueming Li > Cc: Lu, Wenzhuo ; Wu, Jingjing ; Yongseok Koh ; Olivier MATZ > ; Shahaf Shuler ; Iremonger= , Bernard ; Yigit, Ferruh > ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6 1/2] ethdev: introduce generic IP/UDP t= unnel checksum and TSO >=20 > 18/04/2018 15:58, Xueming Li: > > This patch introduce new TX offload flags for device that supports > > IP or UDP tunneled packet L3/L4 checksum and TSO offload. > > It will be used for non-standard tunnels. > > > > The support from the device is for inner and outer checksums on > > IPV4/TCP/UDP and TSO for *any packet with the following format*: > > > > / [optional IPv4/IPv6] / [optional TCP/UDP] / > headers> / [optional inner IPv4/IPv6] / [optional TCP/UDP] > > > > For example the following packets can use this feature: > > > > 1. eth / ipv4 / udp / VXLAN / ip / tcp > > 2. eth / ipv4 / GRE / MPLS / ipv4 / udp > > > > Please note that specific tunnel headers that contain payload length, > > sequence id or checksum will not be updated. > > > > 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 >=20 > Except a small comment below, it looks OK. >=20 > Acked-by: Thomas Monjalon >=20 > 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? Konstantin >=20 >=20 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > +/** > > + * Generic IP encapsulated tunnel type, used for TSO and checksum offl= oad. > > + * It can be used for tunnels which are not standards or listed above. > > + * It is preferred to use specific tunnel flags like PKT_TX_TUNNEL_VXL= AN > > + * if possible. >=20 > PKT_TX_TUNNEL_GRE or PKT_TX_TUNNEL_IPIP may be a better example than > PKT_TX_TUNNEL_VXLAN in IP tunnel case. >=20 > > + * The ethdev must be configured with DEV_TX_OFFLOAD_IP_TNL_TSO. > > + * Outer and inner checksums are done according to the existing flags = like > > + * PKT_TX_xxx_CKSUM. > > + * Specific tunnel headers that contain payload length, sequence id > > + * or checksum are not expected to be updated. > > + */ > > +#define PKT_TX_TUNNEL_IP (0xDULL << 45) > > +/** > > + * Generic UDP encapsulated tunnel type, used for TSO and checksum off= load. > > + * UDP tunnel type implies outer IP layer. > > + * It can be used for tunnels which are not standards or listed above. > > + * It is preferred to use specific tunnel flags like PKT_TX_TUNNEL_VXL= AN > > + * if possible. > > + * The ethdev must be configured with DEV_TX_OFFLOAD_UDP_TNL_TSO. > > + * Outer and inner checksums are done according to the existing flags = like > > + * PKT_TX_xxx_CKSUM. > > + * Specific tunnel headers that contain payload length, sequence id > > + * or checksum are not expected to be updated. > > + */ > > +#define PKT_TX_TUNNEL_UDP (0xEULL << 45) >=20 >=20