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 9754BA034F; Wed, 31 Mar 2021 09:28:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8192F4069E; Wed, 31 Mar 2021 09:28:09 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 2565340141 for ; Wed, 31 Mar 2021 09:28:08 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 92C0C5C00CC; Wed, 31 Mar 2021 03:28:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 03:28:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= r6mmCYgu7HRRQ/rBv3TVdKe2z9HIOheXdpZ7lQMwmkY=; b=DjTSHqGyXIDbN2KO xAL8QTJk84K3JB/EFz/uieO9XRTOFyY9QsM14FA8fISh6Pc2bkf4z8Ip122igZac tL3QuHT+rq8CoH7yn8+mPi4BmQD5IcctlIa6dYJpTnNRU+y8PA3EhY4n2u/yaDfw IWKOD5slrwB2HwpcYLzBPfDXBz9levZ1zg5Juo73BXPIhBXoQ8yAhGH7jfmkJ+Zj JgudIElZCAx4H2fD+y8rYt71EtP+xydzqLkF/qdl09/BrRg4N9hrPK1iVOhU8m5Q WpZbuCbG+m6y+l9EwMf3Fcr7ALhRNy+JBkqM+UUHx+RgR8muLOT55u1cixM6Y9Iv 2DqGQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=r6mmCYgu7HRRQ/rBv3TVdKe2z9HIOheXdpZ7lQMwm kY=; b=dNISjz/k8gvINzaY+PFQhflRDfItizinchF8kyH8GbJuRfizdxFgUdHlz eiJ9W+ykG0UQ4mnRe7ItX7BplEQR4r0JsCDpoKkISZGT9euaPZ7/w9QjtdkGG8tD ASH/8sUrw0dwSJe0Xc0kYPHAhJ4hgpAiytucOwR6LMiD/KHiNXCVngu40RHnbn9g VAFPX8y9T4mwmX18XK/fKPIpJQOCFoSC1aXSKo6jQSlTyg1S4rtwSZzL7qOHO04f anQwOi4oqFW09mRDlYcbltVcYO5zsO7x4kYn2sCLhfkz0Egn4v+PTozVutJPlwHZ s0YykNhJTVoxRnKrnYWLK1ibg6YgA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeiuddguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeekteehtdeivefhieegjeelgedufeejheekkeetueevieeuvdev uedtjeevheevteenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C591240057; Wed, 31 Mar 2021 03:28:06 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit , "Min Hu (Connor)" Cc: dev@dpdk.org, Andrew Rybchenko Date: Wed, 31 Mar 2021 09:28:04 +0200 Message-ID: <26287890.AfWHT1PW0D@thomas> In-Reply-To: <751cf194-7de2-4f9b-3f1a-fd2ad9c941f2@huawei.com> References: <1616748961-11239-1-git-send-email-humin29@huawei.com> <751cf194-7de2-4f9b-3f1a-fd2ad9c941f2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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" 31/03/2021 04:35, Min Hu (Connor): > =E5=9C=A8 2021/3/30 21:59, Ferruh Yigit =E5=86=99=E9=81=93: > > 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) > >> --- 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 =3D 0x0312, > >> HNS3_OPC_CONFIG_FEC_MODE =3D 0x031A, > >> +#ifdef RTE_LIBRTE_IEEE1588 > >> + /* PTP command */ > >> + HNS3_OPC_PTP_INT_EN =3D 0x0501, > >> + HNS3_OPC_CFG_PTP_MODE =3D 0x0507, > >> +#endif > >> + > >=20 > > Hi Connor, > >=20 > > Does it needs to be a compile time configuration? What happens if it is= =20 > > always enabled, or controlled by device argument? > > . > Hi Ferruh, > Firstly the "RTE_LIBRTE_IEEE1588" origins from the config file in DPDK.= =20 > 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=20 > 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. Disabling at compile-time does not reduce the footprint significantly. RTE_LIBRTE_IEEE1588 should disappear, so I advise not using it in new code. Instead, you could enable/disable at runtime if needed.