DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/hns3: support IEEE 1588 PTP
Date: Wed, 31 Mar 2021 10:35:29 +0800	[thread overview]
Message-ID: <751cf194-7de2-4f9b-3f1a-fd2ad9c941f2@huawei.com> (raw)
In-Reply-To: <a72f6cf8-28a3-20ec-b0b6-536a329c8d04@intel.com>



在 2021/3/30 21:59, Ferruh Yigit 写道:
> 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) <humin29@huawei.com>
>> ---
>>   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?
> .
Hi Ferruh,
	Firstly the "RTE_LIBRTE_IEEE1588" origins from the config file in DPDK. 
Almost every nic driver use this macro in compile time.
	For me, I think using this macro give one option for users to
decide if his APPs contains this module. For example, in loT field,
some microprocessor has small memory or small disk, So the APPs should 
be as small as possible. So, if user does not need "PTP", the APPs no
need to contain it.
	Well, another top, if is always enabled, for HNS3 PMD, it will
work well for our nic. If user want to use "PTP", just call API. If user
does not use it, it also doesn't matter. But we advise that if user
don't need this function, just turn it off.
	Thanks.





  reply	other threads:[~2021-03-31  2:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  8:55 [dpdk-dev] [PATCH 0/2] Support PTP for hns3 PMD Min Hu (Connor)
2021-03-26  8:56 ` [dpdk-dev] [PATCH 1/2] net/hns3: fix code check warning Min Hu (Connor)
2021-03-26  8:56 ` [dpdk-dev] [PATCH 2/2] net/hns3: support IEEE 1588 PTP Min Hu (Connor)
2021-03-30 13:59   ` Ferruh Yigit
2021-03-31  2:35     ` Min Hu (Connor) [this message]
2021-03-31  7:28       ` Thomas Monjalon
2021-03-31  9:26         ` Ferruh Yigit
2021-03-31 11:00           ` Min Hu (Connor)
2021-03-30 14:12   ` Ferruh Yigit
2021-03-31  2:38     ` Min Hu (Connor)
2021-03-31  7:01 ` [dpdk-dev] [PATCH v2 0/2] Support PTP for hns3 PMD Min Hu (Connor)
2021-03-31  7:01   ` [dpdk-dev] [PATCH v2 1/2] net/hns3: fix code check warning Min Hu (Connor)
2021-03-31  7:01   ` [dpdk-dev] [PATCH v2 2/2] net/hns3: support IEEE 1588 PTP Min Hu (Connor)
2021-04-01 13:38 ` [dpdk-dev] [PATCH v3 0/2] Support PTP for hns3 PMD Min Hu (Connor)
2021-04-01 13:38   ` [dpdk-dev] [PATCH v3 1/2] net/hns3: fix code check warning Min Hu (Connor)
2021-04-01 13:38   ` [dpdk-dev] [PATCH v3 2/2] net/hns3: support IEEE 1588 PTP Min Hu (Connor)
2021-04-01 16:41   ` [dpdk-dev] [PATCH v3 0/2] Support PTP for hns3 PMD Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=751cf194-7de2-4f9b-3f1a-fd2ad9c941f2@huawei.com \
    --to=humin29@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).