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 A041E42B71; Mon, 22 May 2023 15:15:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E4F040EE7; Mon, 22 May 2023 15:15:21 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id CB10740EE5 for ; Mon, 22 May 2023 15:15:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684761321; x=1716297321; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=InjeP4zM2VV0CJBt955Tik2hcvUD6RySOeYodB5t/og=; b=nLD6jancUunEB4aIj/Uz4R/kmN9ggjOYwGWTBWacbYnVOhVxZiSa5K6b Wi6pQMY/47Xi2lvImUOYILm+rVDHcviRcuvr38YIOv+RhGqARYeVtqBIY flzd/srcGqqmDQW3ApLg9pHzODX/S2H9mglJClsMKrMHv8vB9YkSkXhxe blOkTFnHtSGiORPIAD42kQkvsH0ifl4acmiZ9nCwYpsIlUcUlZ9DZEYbE zUjEI9lgd80kogCKXvbAGcYbRRV/OZf3X38NGTHfLAOFffgrBb1ibMJ6u ywvMAiSiQxt6UPYu6fq4MSUJmsxEmZk+h6dwleTeNqwSLyQNBwQ8easTJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="342369324" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="342369324" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 06:15:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="950085672" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="950085672" Received: from unknown (HELO npg-dpdk-simeisu-cvl-119d218.sh.intel.com) ([10.67.119.231]) by fmsmga006.fm.intel.com with ESMTP; 22 May 2023 06:15:17 -0700 From: Simei Su To: thomas@monjalon.net, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, kirill.rybalchenko@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, wenjun1.wu@intel.com, Simei Su Subject: [RFC v3 0/3] add frequency adjustment support for PTP timesync Date: Mon, 22 May 2023 21:23:29 +0800 Message-Id: <20230522132332.102030-1-simei.su@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20230403092248.81551-1-simei.su@intel.com> References: <20230403092248.81551-1-simei.su@intel.com> 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 This patchset cover below parts: (1)Introduce a new timesync API called "rte_eth_timesync_adjust_freq" that enables frequency adjustment during PTP timesync. This new API aligns with the kernel PTP which already supports frequency adjustment. It brings DPDK closer in alignment with the kernel's best practice. (2)Refine the ptpclient application by applying a PI algorithm that leverages the new API to further improve timesync accuracy. These changes doesn't break original solution and creates a more accurate solution for DPDK-based high accuracy PTP. We have provided significant improvements for timesync accuracy on e810 and we believe these improvements will also benefit other devices. The original command for starting ptpclient is: ./build/examples/dpdk-ptpclient -a 0000:81:00.0 -c 1 -n 3 -- -T 0 -p 0x1 The command with PI algorithm is: ./build/examples/dpdk-ptpclient -a 0000:81:00.0 -c 1 -n 3 -- -T 0 -p 0x1 -- controller=pi [RFC v3 1/3] ethdev: add frequency adjustment API. [RFC v3 2/3] examples/ptpclient: refine application. [RFC v3 3/3] examples/ptpclient: add frequency adjustment support. v3: * Refine commit log in patch. * Add more description for the new API. v2: * Remove the ice PMD part from the RFC. * Add description in cover letter. * Refine commit log in patch. Simei Su (3): ethdev: add frequency adjustment API examples/ptpclient: refine application examples/ptpclient: add frequency adjustment support examples/ptpclient/ptpclient.c | 222 +++++++++++++++++++++++++++++++++------ lib/ethdev/ethdev_driver.h | 5 + lib/ethdev/ethdev_trace.h | 9 ++ lib/ethdev/ethdev_trace_points.c | 3 + lib/ethdev/rte_ethdev.c | 19 ++++ lib/ethdev/rte_ethdev.h | 38 +++++++ 6 files changed, 265 insertions(+), 31 deletions(-) -- 2.9.5