From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7475942B14; Mon, 15 May 2023 16:18:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F22D540687; Mon, 15 May 2023 16:18:14 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 6032E40395 for ; Mon, 15 May 2023 16:18:13 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D25C35C0160; Mon, 15 May 2023 10:18:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 15 May 2023 10:18:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1684160290; x=1684246690; bh=xAjWM5dRl3N0pb+auqJ3OB1c1TwlHW8d3zK X+NvsYeI=; b=JfmGNWANATQLQW/zfZn2Ikf5+BAWEdPlkCtfHdIsIVvwvtT8JvN lBNtYZvWdHBim+I17iEIAZ0xVXdgktoAV3XcZSzCT5bjv2Bleow2ZACMnJcF8VIt uHv/tEsHmZwYpqefMzf5GfUWiiiooxe2FkzXBJoziMmJO0XCYBmPWN+imNvk/b/a urIIZAmeN212uHQ0+PW26Nbur70OZhkkmjh3RimKUNB8BtIqJ+QfxXw0HA3gBm0Q y6sLMQLyPoT4FuHUZ7h3dL1HVmxNtB0RKpTun+7Y5euyf4ycl7ghUxz7QS9PggUx WRJ1mNp41GpjOAaFzbSe0aoY3y1RWWC5yCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1684160290; x=1684246690; bh=xAjWM5dRl3N0pb+auqJ3OB1c1TwlHW8d3zK X+NvsYeI=; b=s1ZJ1gTdKdfqphgbsL0ntwEe84RcZzqdVVNZNGUTi6/osYo8pP0 t0IzZ/KbRafrzQaPtoq4AVEHdfTfhSX8k56sHacK/OFi3fEjbNDaR5psJYf8AL9I AffWrmWMoWPVrVanSUVN/+x5yCHCOremWwLFXQNjRzquYQcGf/ZDcqboLcpkz4mQ J3m/jY9G4XMNJ0taicHBESoje4m9pYGc/YRB+nG4fiN4Bzh58moHbUONv7SP7szi jL5QvDLmzd7t66mm+Qw9mDaPLrNSCN38ddopFwtNjd2ueFT0/mT1ypxXTK7Vnm57 lVyylKxQ92T7PrU7/3s3WRGecXHlRPIh78w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehjedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 May 2023 10:18:09 -0400 (EDT) From: Thomas Monjalon To: Simei Su Cc: ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, kirill.rybalchenko@intel.com, qi.z.zhang@intel.com, dev@dpdk.org, wenjun1.wu@intel.com, david.marchand@redhat.com Subject: Re: [RFC v2 1/3] ethdev: add frequency adjustment API Date: Mon, 15 May 2023 16:18:07 +0200 Message-ID: <4222577.mogB4TqSGs@thomas> In-Reply-To: <20230403092248.81551-2-simei.su@intel.com> References: <20230331022258.382085-1-simei.su@intel.com> <20230403092248.81551-1-simei.su@intel.com> <20230403092248.81551-2-simei.su@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hello, 03/04/2023 11:22, Simei Su: > This patch introduces a new timesync API "rte_eth_timesync_adjust_freq" > which enables frequency adjustment during PTP timesync. You should explain how it compares with existing functions like rte_eth_timesync_adjust_time(). [...] > /** > + * Adjust the clock increment rate on an Ethernet device. > + * > + * This is usually used in conjunction with other Ethdev timesync functions to > + * synchronize the device time using the IEEE1588/802.1AS protocol. All timesync functions have this sentence, but it does not help to understand how to combine them. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param ppm > + * Parts per million with 16-bit fractional field Sorry I don't understand what this parameter is about. Probably because I'm not an expert of IEEE1588/802.1AS protocol. Please make it possible to understand for basic users. > + * > + * @return > + * - 0: Success. > + * - -ENODEV: The port ID is invalid. > + * - -EIO: if device is removed. > + * - -ENOTSUP: The function is not supported by the Ethernet driver. > + */ > +int rte_eth_timesync_adjust_freq(uint16_t port_id, int64_t ppm); In general, I think there is an effort to provide in order to make the timesync API better understandable. Example of something to explain: how Rx and Tx timestamps of a port are differents? Is it different of rte_eth_timesync_read_time()? The function rte_eth_read_clock() was provided with a better explanation. Please make improvements in API documentation as part of this API, I don't want to get more functions without improving explanation of older functions. Thank you