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: sta...@dpdk.org
>>>
>>> Signed-off-by: Huisong Li <lihuis...@huawei.com>
>>> Signed-off-by: Dongdong Liu <liudongdo...@huawei.com>
>>> ---
>>>   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.
>>
>> .

Reply via email to