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 85F91A04E7; Tue, 3 Nov 2020 01:18:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51081AA1F; Tue, 3 Nov 2020 01:14:55 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id AD205BE55 for ; Tue, 3 Nov 2020 01:14:53 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 73ABBB17; Mon, 2 Nov 2020 19:14:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 02 Nov 2020 19:14:52 -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=Nvjvcp834/ohH 4yHfu4NlXAupxaGuLa5aQnU3e9zlds=; b=HoGaQNQUqO2KvOtTCRem88/mUeEFD kE5At94QRuHAuSDKtc7Yvqu4CKDz0BBrhGPD/t2UBp606SHJsBG2JSGQbFHy3HaY Aar7o5mYjO9MnW7kS7qgYscSM0I6gJpXIzbGxlwt2kv+L6YB39OogG5kjAFsAAQD hrUhhoSeWWWPf3QFTgGUOYDJmWi3yrqdkctnzgIUBc/xn3BrALaNa63rBy9xSM+F m3wjYM/k9m7iXuVXLnfrgwiLoCJ9WimEwIQPp08AB8jF3wlagJrVvVlf0ZiQP6iD r6G/Y0YnUBvHbiAKz+L89tddepz39ymU9uGgCScYjLJQtSgnnFp/AvDbw== 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=Nvjvcp834/ohH4yHfu4NlXAupxaGuLa5aQnU3e9zlds=; b=irW4J9uH x/xsFExVbR7tC9p5F8Oag03SjYGhjPifbQ6yvEDd9uBB88/ED3+ZX3IZHFZSRX0W bzFhr4c+dxzPR8emml98ivhAsvSSHxqiz0qqjJnCHtsYG3ryacWWjz2DP8q43J+x cZZ35WXwDjsd1+GuHhX7BSf7khZ2ZyTvDjfS6n4qKfd28w/OrfpkF/k8TnhW600r HoLD+8kN4xL+U2nkJCjsSAR4xqCLuojzuUAN/GGIW0eBX5JbXvmNTDI72xSAEOJj /FLa8KQ67hajEeKhqSIaypyLm9i5BjRfpiwbERnp62by+ztAaxBCNce8n1JuUTSC kLOsmjkJAxPRDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtvddgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgepuddunecurfgrrhgrmhepmhgrihhlfh 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 13B97306467E; Mon, 2 Nov 2020 19:14:49 -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 01:14:04 +0100 Message-Id: <20201103001407.2931963-14-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201103001407.2931963-1-thomas@monjalon.net> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201103001407.2931963-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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 doxyegn comment for the timesync API was mentioning the deprecated timestamp field, so it is also updated. Signed-off-by: Thomas Monjalon --- 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