From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id CB640A0521;
	Tue,  3 Nov 2020 13:27:35 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 76D9ECA8D;
	Tue,  3 Nov 2020 13:22:50 +0100 (CET)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
 [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 2ECAACA60
 for <dev@dpdk.org>; Tue,  3 Nov 2020 13:22:46 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id DD122B7B;
 Tue,  3 Nov 2020 07:22:44 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 03 Nov 2020 07:22:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding; s=fm2; bh=I0HTrZtx91GsQ
 fbnCyhblM/atkf+cz51aFUCA5+HErA=; b=QDAQZX524ST1Nyv2FtNy4UA/tb9MC
 38NTnMM8RXbtigMkfCmL6EZLXpDsgT35CiI0MtfmWC7uh9+uhskoMyD0YBqUUdux
 DaE0RO5QS2RBsBpDZPY5/2xXrgDFcM/ZEPkWAasH0/slMX/OF7l9Teyksz0wZ+aU
 daFDWpba41/7nphdQMKEM08AVNVONzldrsSLd6DwkwuVR7JUdB4S+0MUMxxVttU4
 k7kFsQ+kun7wzlX9FvChXd1LctUjGFgThydNKiylf/JQQeFJ7PyeS7Xvz67Qhzz5
 WYfFX0jR9Au2tn6rHl4fjKFUaVXLaKbM6j2EuIK7JfQCPi19d2afJxbdw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:date:from
 :in-reply-to:message-id:mime-version:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; bh=I0HTrZtx91GsQfbnCyhblM/atkf+cz51aFUCA5+HErA=; b=mCnHObjv
 ZxHr6Alj+uElFzKDJkcaYy4rQ0SOJhJaM32mxNLOGV8QNa6vIbsQQvALkWlxPnzq
 ti7EFJ4ilkv7dqs6YphC82/h/CarSlKpIiCapzhjZJndfL93NabZXCZEMb3BBDl4
 OUKaDsuO+8UnklX7n/H1Tabb8PQMA2oHGoT9rWSY1LXBifviShWocphmaGDZtfTc
 9PBgxQhTScN4jXAzKqGLz3sg9tNjRwu/65xPPD15G+kyBg+zuIqltfFw8IQ03XJ8
 zLG20nYPPKMMKoAP2+jG0pyo8Knyxm6LeA7GZ6g1qg7KjZqT8CQBpeHWZrEGW+eG
 aVYIubrsAD/hdA==
X-ME-Sender: <xms:lEuhXx2JNxdRnEQ40VItjLhE-61AbmK3UFjAFhIhpquq-CoYGv9dNA>
 <xme:lEuhX4GLh5zKU49KoyWNZ9PywD0YYHWd-4HMf-3IQXtIS4AG1f5RgZ4PNTWDnaLRa
 08rSSGjGMJwop-D6g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgfeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre
 dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes
 mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe
 efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv
 tdefrddukeegnecuvehluhhsthgvrhfuihiivgepuddunecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:lEuhXx6kWN2E6dgFtWs193xQlQUI09fiaN6AX4ECNNkuQYRrTkJO4Q>
 <xmx:lEuhX-1AvHYt-7_PGyjN6A4gYcIT9LSKMxEdt9qC1Uv7gw_EmHH0yw>
 <xmx:lEuhX0FXPE23xDuIn36ELi1gJSWJGyD-ZxVeyPCcl-hqDmRVwt0Qpg>
 <xmx:lEuhX5NuOLQZBzhgC9ZKiWEf4-ML93HOB06_vW78Qk_m5Vn30g712w>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 7B3FB3064682;
 Tue,  3 Nov 2020 07:22:43 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, david.marchand@redhat.com,
 bruce.richardson@intel.com, olivier.matz@6wind.com,
 andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com, viacheslavo@nvidia.com
Date: Tue,  3 Nov 2020 13:22:02 +0100
Message-Id: <20201103122205.183472-14-thomas@monjalon.net>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20201103122205.183472-1-thomas@monjalon.net>
References: <20201029092751.3837177-1-thomas@monjalon.net>
 <20201103122205.183472-1-thomas@monjalon.net>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v4 13/16] ethdev: add doxygen comment for Rx
	timestamp API
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://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

The offload flag DEV_RX_OFFLOAD_TIMESTAMP had no documentation.
After switching to dynamic mbuf flag and field,
it becomes even more important to explicit the feature behaviour.

A doxygen comment for the timesync API was mentioning
the deprecated timestamp field, so it is also updated.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ethdev/rte_ethdev.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index ba997f16ce..1fc5f662fa 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1344,6 +1344,11 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_VLAN_EXTEND	0x00000400
 #define DEV_RX_OFFLOAD_JUMBO_FRAME	0x00000800
 #define DEV_RX_OFFLOAD_SCATTER		0x00002000
+/**
+ * Timestamp is set by the driver in RTE_MBUF_DYNFIELD_TIMESTAMP_NAME
+ * and RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME is set in ol_flags.
+ * The mbuf field and flag are registered when the offload is configured.
+ */
 #define DEV_RX_OFFLOAD_TIMESTAMP	0x00004000
 #define DEV_RX_OFFLOAD_SECURITY         0x00008000
 #define DEV_RX_OFFLOAD_KEEP_CRC		0x00010000
@@ -4647,7 +4652,7 @@ int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
  * rte_eth_read_clock(port, base_clock);
  *
  * Then, convert the raw mbuf timestamp with:
- * base_time_sec + (double)(mbuf->timestamp - base_clock) / freq;
+ * base_time_sec + (double)(*timestamp_dynfield(mbuf) - base_clock) / freq;
  *
  * This simple example will not provide a very good accuracy. One must
  * at least measure multiple times the frequency and do a regression.
-- 
2.28.0