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 D6471428B7; Mon, 3 Apr 2023 11:24:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71BAE40ED7; Mon, 3 Apr 2023 11:24:28 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 871FA40A7E for ; Mon, 3 Apr 2023 11:24:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680513867; x=1712049867; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=duQL7OXwYjmyaaaR6h4H0IqlBNmfjyO9v/2H821qFxo=; b=cyXo4QrV18kesSFEi87E0h1+yzBPzClCTFAvUb+UewwBHIW2iWkOyobN On/1572zpQqooxZ8/PGPJNs5L9LSWRq6FIosKTXuq+8i4Uf1t4zkbvyJG EldJZqaGtgdb7KQVQ3NG1ZjsjrMbwYPtgoeW2LHNUSdWzuMNWjJ2ddQFM bsE7B+dZV++xpyBsCcMrW5DFnX9qg1VwwaCuxkcVvklusoa7LksEU4s1E 8W5X1gLUkWiZB4EgrKnqmdznpbWzfXtOzalbmgiGk0j/PhTWGQrsCZTwd ETH3tGOpDLP6SPQ5+99RctvH03h/npiCCzwTYnUg0IIulfHO9hJvgk2OZ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10668"; a="321514231" X-IronPort-AV: E=Sophos;i="5.98,314,1673942400"; d="scan'208";a="321514231" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2023 02:24:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10668"; a="829495915" X-IronPort-AV: E=Sophos;i="5.98,314,1673942400"; d="scan'208";a="829495915" Received: from unknown (HELO npg-dpdk-simeisu-cvl-119d218.sh.intel.com) ([10.67.119.208]) by fmsmga001.fm.intel.com with ESMTP; 03 Apr 2023 02:24:23 -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 v2 0/3] add frequency adjustment support for PTP timesync Date: Mon, 3 Apr 2023 17:22:45 +0800 Message-Id: <20230403092248.81551-1-simei.su@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20230331022258.382085-1-simei.su@intel.com> References: <20230331022258.382085-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 v2 1/3] ethdev: add frequency adjustment API. [RFC v2 2/3] examples/ptpclient: refine application. [RFC v2 3/3] examples/ptpclient: add frequency adjustment support. 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 | 18 ++++ lib/ethdev/rte_ethdev.h | 19 ++++ 6 files changed, 245 insertions(+), 31 deletions(-) -- 2.9.5