From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <konstantin.ananyev@intel.com> Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C4AAE7CBE for <dev@dpdk.org>; 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" <konstantin.ananyev@intel.com> To: Thomas Monjalon <thomas@monjalon.net>, Xueming Li <xuemingl@mellanox.com> CC: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>, "Wu, Jingjing" <jingjing.wu@intel.com>, Yongseok Koh <yskoh@mellanox.com>, Olivier MATZ <olivier.matz@6wind.com>, Shahaf Shuler <shahafs@mellanox.com>, "Iremonger, Bernard" <bernard.iremonger@intel.com>, "Yigit, Ferruh" <ferruh.yigit@intel.com>, "dev@dpdk.org" <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 <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=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 <xuemingl@mellanox.com> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.c= om>; Yongseok Koh <yskoh@mellanox.com>; Olivier MATZ > <olivier.matz@6wind.com>; Shahaf Shuler <shahafs@mellanox.com>; Iremonger= , Bernard <bernard.iremonger@intel.com>; Yigit, Ferruh > <ferruh.yigit@intel.com>; 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*: > > > > <some headers> / [optional IPv4/IPv6] / [optional TCP/UDP] / <some > > 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 <xuemingl@mellanox.com> >=20 > Except a small comment below, it looks OK. >=20 > Acked-by: Thomas Monjalon <thomas@monjalon.net> >=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