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 4EC44A034F; Tue, 30 Mar 2021 15:59:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5445406B4; Tue, 30 Mar 2021 15:59:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C06AC40691 for ; Tue, 30 Mar 2021 15:59:29 +0200 (CEST) IronPort-SDR: P31lvu/F6EV9nY1pcly16mwTR5TyXyGE6CfMPyaSriiYRYUa40Ns6IrI72K/KMWb0/2Q2M6E+8 KLEygNjD/k8w== X-IronPort-AV: E=McAfee;i="6000,8403,9939"; a="178901821" X-IronPort-AV: E=Sophos;i="5.81,290,1610438400"; d="scan'208";a="178901821" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 06:59:28 -0700 IronPort-SDR: CvutZAZV7S30p7L2xc2XyoE1GP7EwEQnSiTOL0fYYl9TO5m8pWNTqexBlD7KysMTAKrvagLFeL GgbJF0ujTrmA== X-IronPort-AV: E=Sophos;i="5.81,290,1610438400"; d="scan'208";a="418183246" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.213.217]) ([10.213.213.217]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 06:59:27 -0700 To: "Min Hu (Connor)" , dev@dpdk.org References: <1616748961-11239-1-git-send-email-humin29@huawei.com> <1616748961-11239-3-git-send-email-humin29@huawei.com> From: Ferruh Yigit Cc: Andrew Rybchenko , Thomas Monjalon X-User: ferruhy Message-ID: Date: Tue, 30 Mar 2021 14:59:24 +0100 MIME-Version: 1.0 In-Reply-To: <1616748961-11239-3-git-send-email-humin29@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 2/2] net/hns3: support IEEE 1588 PTP 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 Sender: "dev" On 3/26/2021 8:56 AM, Min Hu (Connor) wrote: > Add hns3 support for new ethdev APIs to enable and read IEEE1588/ > 802.1AS PTP timestamps. > > Signed-off-by: Min Hu (Connor) > --- > doc/guides/nics/features/hns3.ini | 2 + > doc/guides/nics/hns3.rst | 1 + > drivers/net/hns3/hns3_cmd.h | 33 +++++ > drivers/net/hns3/hns3_ethdev.c | 59 +++++++- > drivers/net/hns3/hns3_ethdev.h | 25 ++++ > drivers/net/hns3/hns3_ptp.c | 294 ++++++++++++++++++++++++++++++++++++++ > drivers/net/hns3/hns3_regs.h | 25 ++++ > drivers/net/hns3/hns3_rxtx.c | 56 +++++++- > drivers/net/hns3/hns3_rxtx.h | 12 ++ > drivers/net/hns3/hns3_rxtx_vec.c | 19 ++- > drivers/net/hns3/meson.build | 3 +- > 11 files changed, 516 insertions(+), 13 deletions(-) > create mode 100644 drivers/net/hns3/hns3_ptp.c > > diff --git a/doc/guides/nics/features/hns3.ini b/doc/guides/nics/features/hns3.ini > index 3988be4..502bfe7 100644 > --- a/doc/guides/nics/features/hns3.ini > +++ b/doc/guides/nics/features/hns3.ini > @@ -43,6 +43,8 @@ Stats per queue = Y > FW version = Y > Registers dump = Y > Module EEPROM dump = Y > +Timesync = Y > +Timestamp offload = Y > Multiprocess aware = Y > Linux = Y > ARMv8 = Y > diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst > index ccd2f6f..3366562 100644 > --- a/doc/guides/nics/hns3.rst > +++ b/doc/guides/nics/hns3.rst > @@ -37,6 +37,7 @@ Features of the HNS3 PMD are: > - MTU update > - NUMA support > - Generic flow API > +- IEEE1588/802.1AS timestamping > > Prerequisites > ------------- > diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h > index e704d0c..abc853b 100644 > --- a/drivers/net/hns3/hns3_cmd.h > +++ b/drivers/net/hns3/hns3_cmd.h > @@ -123,6 +123,12 @@ enum hns3_opcode_type { > HNS3_OPC_CLEAR_MAC_TNL_INT = 0x0312, > HNS3_OPC_CONFIG_FEC_MODE = 0x031A, > > +#ifdef RTE_LIBRTE_IEEE1588 > + /* PTP command */ > + HNS3_OPC_PTP_INT_EN = 0x0501, > + HNS3_OPC_CFG_PTP_MODE = 0x0507, > +#endif > + Hi Connor, Does it needs to be a compile time configuration? What happens if it is always enabled, or controlled by device argument?