All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Singh, Aman Deep" <aman.deep.singh@intel.com>
To: Dengdui Huang <huangdengdui@huawei.com>, <dev@dpdk.org>
Cc: <ferruh.yigit@amd.com>, <yuying.zhang@intel.com>,
	<liuyonglong@huawei.com>
Subject: Re: [PATCH] app/testpmd: handle IEEE1588 init fail
Date: Fri, 5 Apr 2024 21:06:14 +0530	[thread overview]
Message-ID: <f87d78ba-6d0e-40fa-8c6e-c75f5e62d4dd@intel.com> (raw)
In-Reply-To: <20240330074409.273916-1-huangdengdui@huawei.com>


On 3/30/2024 1:14 PM, Dengdui Huang wrote:
> When the port's timestamping function failed to initialize
> (for example, the device does not support PTP), the packets
> received by the hardware do not contain the timestamp.
> In this case, IEEE1588 packet forwarding should not start.
> This patch fix it.
>
> Plus, adding a failure message when failed to disable PTP.
>
> Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>

Acked-by: Aman Singh <aman.deep.singh@intel.com>

> ---
>   app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
>   1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
> index 3371771751..afea7735c7 100644
> --- a/app/test-pmd/ieee1588fwd.c
> +++ b/app/test-pmd/ieee1588fwd.c
> @@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
>   static int
>   port_ieee1588_fwd_begin(portid_t pi)
>   {
> -	rte_eth_timesync_enable(pi);
> -	return 0;
> +	int ret;
> +
> +	ret = rte_eth_timesync_enable(pi);
> +	if (ret)
> +		printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
> +
> +	return ret;
>   }
>   
>   static void
>   port_ieee1588_fwd_end(portid_t pi)
>   {
> -	rte_eth_timesync_disable(pi);
> +	int ret;
> +
> +	ret = rte_eth_timesync_disable(pi);
> +	if (ret)
> +		printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
>   }
>   
>   static void

  reply	other threads:[~2024-04-05 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30  7:44 [PATCH] app/testpmd: handle IEEE1588 init fail Dengdui Huang
2024-04-05 15:36 ` Singh, Aman Deep [this message]
2024-07-05 11:27   ` Ferruh Yigit
2024-04-05 16:44 ` Stephen Hemminger
2024-04-08  5:52   ` huangdengdui
2024-04-08  8:45     ` Ferruh Yigit
2024-04-09  2:06       ` huangdengdui
2024-04-09  2:50         ` Stephen Hemminger
2024-04-17  9:26           ` huangdengdui

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=f87d78ba-6d0e-40fa-8c6e-c75f5e62d4dd@intel.com \
    --to=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=huangdengdui@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=yuying.zhang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.