From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 408738DF0
 for <dev@dpdk.org>; Tue, 17 Apr 2018 23:21:58 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id B3D2121E15;
 Tue, 17 Apr 2018 17:21:57 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Tue, 17 Apr 2018 17:21:57 -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=VkVdXDeYpnSBpyEC8aPIVREOq/
 M0lfkkX5/pRGSoSGk=; b=UFHJm66PJa/EeVPhPOuZKJIBhx4cTsQ6zM38fbL6jQ
 2MCbKBT/Hdqizlvx9NgQYNxGwV/pNJXwot5QutclRH81StzI4MQumtu9Wlapnp7z
 UyKYmKX9BmlHB/7XSzPfu7JwCQp06qv74EqweFL20BG+ErpRPJmsiFWurX1lxb3V
 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=VkVdXD
 eYpnSBpyEC8aPIVREOq/M0lfkkX5/pRGSoSGk=; b=JFUzlkMsYt5Fov8+6r1d91
 2GOr7+ZgR7a9per1icfyyV9oi2ahanU2KYn4VMzUU0o7rmdnAgta54zpZD01qCFs
 I+gLgGbky3TAcHXswTC9nOZeEAEo2Mrbw3vwr6tHLVan0czw7ZppCrifuidoEbVC
 V3gTjCu5fM7Zwy9nDMz2dXjFNIuCHCbfJTHqcM3Xi+o+IQZTgawsskPtC3DlRT/+
 zfEThjKY0sHeKcwHV8jXTcZmYvRHJbkFx08ToZfK5eXydB1Uhyc+sn9fv8OynW+U
 QCFbFhWukWQ6ldIOOAS3TxyFagcmVGaB2YrmoXBTuQ34WnCU2p09e52wprngHIzQ
 ==
X-ME-Sender: <xms:dWXWWmo1TemkLTgkPpu-1W0uyotLZbqTvKzXq60fNMoIXqiyR8R6uQ>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 8F60EE44D5;
 Tue, 17 Apr 2018 17:21:56 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Xueming Li <xuemingl@mellanox.com>
Cc: dev@dpdk.org, Wenzhuo Lu <wenzhuo.lu@intel.com>,
 Jingjing Wu <jingjing.wu@intel.com>, Yongseok Koh <yskoh@mellanox.com>,
 Olivier MATZ <olivier.matz@6wind.com>, Shahaf Shuler <shahafs@mellanox.com>,
 Bernard <bernard.iremonger@intel.com>, Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 17 Apr 2018 23:21:55 +0200
Message-ID: <3801247.KLjoC6WWjY@xps>
In-Reply-To: <20180417144759.160311-1-xuemingl@mellanox.com>
References: <20180408123240.110698-1-xuemingl@mellanox.com>
 <20180417144759.160311-1-xuemingl@mellanox.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v5 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: Tue, 17 Apr 2018 21:21:58 -0000

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*:
> 
> <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 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)