From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 352686CCA for ; Wed, 18 Apr 2018 16:28:27 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5A92D20DC8; Wed, 18 Apr 2018 10:28:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 18 Apr 2018 10:28:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=4j/1c+/9CcCa83gDzxOoK/F/Nc eUUGjsM6x29BM4sr8=; b=oNGdXmXkwD0mT8kH3V5BXYxlEV/At81+b0NnJreXzS DrFSy3V6iJDx5Kpwu/5xpGtYmzvkpvvUY3AbT9Ow3f8c2ufX0t0XhWo0CZ9WP0qH naKVpIkhh54WsP7Fkmor9KQtdVYZjn/M9EkB47dUBk/NXattREYhBHqjuyHnh/k3 s= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=4j/1c+ /9CcCa83gDzxOoK/F/NceUUGjsM6x29BM4sr8=; b=SmfkLk5FcN3fuXs49X/0d8 2ZQWulwkPHrSkwO+/e7skmx+mJ06Zyexu6xIq0uznebvrPlskMGC40nj4lv2Drt0 SN9+edITB/HOYIAiLEolwMis5xlQGuZ9bFHYjJeTCEq7Vjf13aTzaRihL6AFOiGc AlEqJ3DWdjCKTW/CJGsZiVWyjqIV510kUm6+c7YiIxHxTXKXpICMZhBxNaCN84Sv vQ3+LMRQlHytCsaLIdPjQPI9VkQ6RKWwvhcOF8MR+9AT/WhXgJ8bHC3qhWKmlfaF QWTNpv7wf20NVe00exDtMXdnzJ0ci8nQl4neD7NUIZUqbq9d1t66I8R0tW1D4ggQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2DDDBE43EC; Wed, 18 Apr 2018 10:28:25 -0400 (EDT) From: Thomas Monjalon To: Xueming Li Cc: Wenzhuo Lu , Jingjing Wu , Yongseok Koh , Olivier MATZ , Shahaf Shuler , Bernard , Ferruh Yigit , dev@dpdk.org Date: Wed, 18 Apr 2018 16:28:23 +0200 Message-ID: <2683955.QbV0EBoMcY@xps> In-Reply-To: <20180418135852.27598-1-xuemingl@mellanox.com> References: <20180408123240.110698-1-xuemingl@mellanox.com> <20180418135852.27598-1-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 14:28:27 -0000 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 Except a small comment below, it looks OK. Acked-by: Thomas Monjalon Please send a deprecation notice for PKT_TX_OUTER_IP_CKSUM. > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > +/** > + * 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_VXLAN > + * if possible. PKT_TX_TUNNEL_GRE or PKT_TX_TUNNEL_IPIP may be a better example than PKT_TX_TUNNEL_VXLAN in IP tunnel case. > + * 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_VXLAN > + * 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)