From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 1/2] ethdev: introduce generic IP/UDP tunnel checksum and TSO Date: Tue, 17 Apr 2018 23:21:55 +0200 Message-ID: <3801247.KLjoC6WWjY@xps> References: <20180408123240.110698-1-xuemingl@mellanox.com> <20180417144759.160311-1-xuemingl@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , Yongseok Koh , Olivier MATZ , Shahaf Shuler , Bernard , Ferruh Yigit To: Xueming Li Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 408738DF0 for ; Tue, 17 Apr 2018 23:21:58 +0200 (CEST) In-Reply-To: <20180417144759.160311-1-xuemingl@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 17/04/2018 16:47, Xueming Li: > This patch introduce new TX offload flags for device that supports > IP or UDP tunneled packet L3/L4 checksum and TSO offload. > > 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 tunnel headers that contain payload length, sequence id > or checksum will not be updated. [...] > +/**< Device supports UDP tunneled packet TSO */ > +#define DEV_TX_OFFLOAD_UDP_TNL_TSO 0x00040000 > +/**< Device supports IP based tunnel packet TSO */ > +#define DEV_TX_OFFLOAD_IP_TNL_TSO 0x00080000 These doxygen comments are related to the constants on the next line. So the syntax is /** not /**< [...] General comment: API description is required for application writers and PMD developers. You need to provide details about what the offload is expected to do. > +/** > + * Generic IP encapsulated tunnel type, used for TSO offload instead > + * of defining new tunnel types. The words "instead of defining new tunnel types" are justifications for the commit message, not for the code itself. > This feature relies on offloading > + * DEV_TX_OFFLOAD_IP_TNL_TSO present. I think you want to say that DEV_TX_OFFLOAD_IP_TNL_TSO must be enabled. > + * Tunnel header that contains payload length, sequence id or checksum > + * is not expected to be updated. OK So what is updated by this offload exactly? inner and outer checksums on IPV4/TCP/UDP? What else? No IPv6? No SCTP? > + */ > +#define PKT_TX_TUNNEL_IP (0xDULL << 45) > +/** > + * Generic UDP encapsulated tunnel type, used for TSO offload instead > + * of defining new tunnel types. This feature relies on offloading > + * DEV_TX_OFFLOAD_UDP_TNL_TSO present. > + * Tunnel header that contains payload length, sequence id or checksum > + * is not expected to be updated. > + */ Same comments as for PKT_TX_TUNNEL_IP. > +#define PKT_TX_TUNNEL_UDP (0xEULL << 45)