From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC846A0521; Tue, 3 Nov 2020 15:14:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0F03FCC75; Tue, 3 Nov 2020 15:10:13 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id CA084CC40 for ; Tue, 3 Nov 2020 15:10:09 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 8BC68C6B; Tue, 3 Nov 2020 09:10:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 03 Nov 2020 09:10:09 -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=QynIBVF9/MBY3 FNkDxxWw2JAMzlmPXgxVPy15JhtK94=; b=weCWxjBRuT4bi9qgKzpyLQO6H00uQ tVWPj5LB9+DQfgPLxy8607MM1X7yIAZdIxz7ePATTTq83FZS8vmdFcbX4NMBSLx+ G7VDi7su7rga5858vpkFvcvMyXSlAJYU3rAc9PX/nxduDpEifM8OlCpX8ow5VAHZ oMjPjCNfMQviSKP/+FsNTKwLbyh3yqImzF8veLwGwhoDGuYxt796cRAtSLyt/lRe XeN5FINHPbKb479NXoQnv8Dr71fZLh+s6oiTsep06wtod9t/hTftJWLpMEfsCNzD G5uU3n7ADHU0HqhLp7y5C9a2lE7sNRhrwMQtDzmLTSlfiv7mVt8WfWxQQ== 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=QynIBVF9/MBY3FNkDxxWw2JAMzlmPXgxVPy15JhtK94=; b=hNOzwo6V AkFOCIrVbnzVIkPtUokmqBiuxvTCZFwlh2X8NNRrdgYQoZGRdXHSNrcNVo2W29aW kyrMVP54Gxf52Yiaxec5BFnmvIzM/yhAYZbJHjt3j6wQ9ZCcf3kgD8kDgbXYsY6N wziMhj+rUs7xEwAtcHholWB/4lMJgGdlpC9GA6mUDd7DoYOxm52hB2jzmqbNosML CzuVoUtwfCwdL4UaaNFKuzCnZezSusdQkDuCMd+27I5EORZdndcocYuxUIcILebb sNRbGFDOS5HD5OykAXFtcnIw+exsPgY14NgywV6bxNnkUZUlfNZ6lPdiXHxX8hEC fsY1RNgZLrg9JQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtfedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgepuddtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 228CD3280067; Tue, 3 Nov 2020 09:10:07 -0500 (EST) From: Thomas Monjalon 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 15:09:28 +0100 Message-Id: <20201103140931.488700-14-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201103140931.488700-1-thomas@monjalon.net> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201103140931.488700-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: David Marchand Acked-by: Andrew Rybchenko --- 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 e341a08817..4988054cb2 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 @@ -4646,7 +4651,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