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 30C312BC7 for ; Mon, 23 Apr 2018 11:59:36 +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 1fAYG2-0002od-UG; Mon, 23 Apr 2018 11:59:40 +0200 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 23 Apr 2018 11:59:31 +0200 Date: Mon, 23 Apr 2018 11:59:31 +0200 From: Olivier Matz To: Xueming Li Cc: Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , Yongseok Koh , Shahaf Shuler , Ferruh Yigit , dev@dpdk.org, AnanyevKonstantinkonstantin.ananyev@intel.com Message-ID: <20180423095931.asgabujzxomj44h2@platinum> References: <20180418135852.27598-1-xuemingl@mellanox.com> <20180420124859.114100-2-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180420124859.114100-2-xuemingl@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v7 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:59:36 -0000 Hi Xueming, First, sorry for the lack of quick feedback on this series. On Fri, Apr 20, 2018 at 08:48:58PM +0800, Xueming Li wrote: > 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. > > Signed-off-by: Xueming Li > Acked-by: Thomas Monjalon [...] > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -210,6 +210,31 @@ extern "C" { > #define PKT_TX_TUNNEL_GENEVE (0x4ULL << 45) > /**< TX packet with MPLS-in-UDP RFC 7510 header. */ > #define PKT_TX_TUNNEL_MPLSINUDP (0x5ULL << 45) > +/** > + * Generic IP encapsulated tunnel type, used for TSO and checksum offload. > + * 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_GRE > + * or PKT_TX_TUNNEL_IPIP if possible. > + * 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 offload. > + * 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_GRE > + * or PKT_TX_TUNNEL_IPIP if possible. Minor comment: A better example here, instead of GRE and IPIP, could be VXLAN because it is UDP-based. Then, Acked-by: Olivier Matz Thanks