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 9027D431B6; Fri, 20 Oct 2023 06:05:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28531402B8; Fri, 20 Oct 2023 06:05:45 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id CC7FE402B7 for ; Fri, 20 Oct 2023 06:05:42 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SBW9D6KFCzNpBv; Fri, 20 Oct 2023 12:01:20 +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; Fri, 20 Oct 2023 12:05:20 +0800 Message-ID: Date: Fri, 20 Oct 2023 12:05:19 +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: Hemant Agrawal , Ferruh Yigit , "dev@dpdk.org" , Gagandeep Singh CC: "thomas@monjalon.net" , "andrew.rybchenko@oktetlabs.ru" , "liuyonglong@huawei.com" References: <20220628133959.21381-1-liudongdong3@huawei.com> <20230817084226.55327-1-lihuisong@huawei.com> <20230817084226.55327-2-lihuisong@huawei.com> <6ab973de-3194-6eb8-ea31-f9c1def4c276@huawei.com> <7be6fe83-173f-4905-9f3b-519cdefae34f@amd.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: dggems702-chm.china.huawei.com (10.3.19.179) 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 Hi Hemant and Ferruh, 在 2023/9/21 19:22, Hemant Agrawal 写道: >> On 9/21/2023 10:18 AM, lihuisong (C) wrote: >>> 在 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. >>> >> What do you mean with "PTP offload"? >> >> If you check the ptpclient sample app, it parses ptp packets in the application. >> >>>> >>>> Gagandeep, Hemant, >>>> Can you please clarify why TIMESTAMP offload is enabled? >>> looking forward to your reply. > [Hemant] as explained in other mail, it is a requirement for dpaa2. So, we are just passing the offload argument. > > Well, currently there is no such offload to know HW PTP support in DPDK. It can be introduced. I agree with you, Heman. > > And I agree the above else should not be there atleast w.r.t TIMESTAMP OFFLOAD. Ack. @Ferruh, I wonder what you think. Looking forward to your reply. > >>>> .