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 DD7FD42606; Thu, 21 Sep 2023 11:18:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D8A64026D; Thu, 21 Sep 2023 11:18:30 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 323DE4014F for ; Thu, 21 Sep 2023 11:18:28 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RrqW32g3yzVkhg; Thu, 21 Sep 2023 17:15:27 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 21 Sep 2023 17:18:26 +0800 Message-ID: <6ab973de-3194-6eb8-ea31-f9c1def4c276@huawei.com> Date: Thu, 21 Sep 2023 17:18:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v3 1/2] examples/ptpclient: add the check for PTP capability To: Ferruh Yigit , , Gagandeep Singh , Hemant Agrawal CC: , , References: <20220628133959.21381-1-liudongdong3@huawei.com> <20230817084226.55327-1-lihuisong@huawei.com> <20230817084226.55327-2-lihuisong@huawei.com> From: "lihuisong (C)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected 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 在 2023/9/16 1:29, Ferruh Yigit 写道: > On 8/17/2023 9:42 AM, Huisong Li wrote: >> If a port doesn't support PTP, there is no need to keep running >> app. So this patch adds the check for PTP capability. >> >> Fixes: 7a04a4f67dca ("examples/ptpclient: enable Rx timestamp offload") >> Cc: stable@dpdk.org >> >> Signed-off-by: Huisong Li >> Signed-off-by: Dongdong Liu >> --- >> examples/ptpclient/ptpclient.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c >> index cdf2da64df..181d8fb357 100644 >> --- a/examples/ptpclient/ptpclient.c >> +++ b/examples/ptpclient/ptpclient.c >> @@ -196,6 +196,11 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) >> >> if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_TIMESTAMP) >> port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_TIMESTAMP; >> + else { >> + printf("port(%u) doesn't support PTP: %s\n", port, >> + strerror(-retval)); >> + return -ENOTSUP; >> + } >> > I am not sure why TIMESTAMP offload is required for PTP, I think there > is a confusion. If TIMESTAMP offload is not required for PTP, there isn't PTP offload in ethdev lib. > > > Gagandeep, Hemant, > Can you please clarify why TIMESTAMP offload is enabled? looking forward to your reply. > > .