DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix get link status timeout
@ 2023-02-06  6:22 Mingjin Ye
  2023-02-06  7:23 ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Mingjin Ye @ 2023-02-06  6:22 UTC (permalink / raw)
  To: dev; +Cc: stable, yidingx.zhou, Mingjin Ye, Qiming Yang, Qi Zhang

When hw is just started, it will immediately obtain the link status, and
the longest attempt is 1 second. Some NICs are slow to initialize, which
make it fails to obtain the link status.

The patch fixes this issue by modifying the longest attempt to 5 seconds.

Fixes: cf911d90e366 ("net/ice: support link update")
Cc: stable@dpdk.org

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 0bc739daf0..eaa556f45c 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3927,7 +3927,7 @@ static int
 ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
 #define CHECK_INTERVAL 100  /* 100ms */
-#define MAX_REPEAT_TIME 10  /* 1s (10 * 100ms) in total */
+#define MAX_REPEAT_TIME 50  /* 5s (50 * 100ms) in total */
 	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct ice_link_status link_status;
 	struct rte_eth_link link, old;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH] net/ice: fix get link status timeout
@ 2023-02-06  7:56 韩爽
  2023-02-06 10:51 ` Ye, MingjinX
  0 siblings, 1 reply; 9+ messages in thread
From: 韩爽 @ 2023-02-06  7:56 UTC (permalink / raw)
  To: Thomas Monjalon, Mingjin Ye
  Cc: dev, stable, yidingx.zhou, Qiming Yang, Qi Zhang, Mingjin Ye,
	david.marchand, ferruh.yigit



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, February 06, 2023 3:23 PM
> To: Mingjin Ye <mingjinx.ye@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; yidingx.zhou@intel.com; Qiming Yang
> <qiming.yang@intel.com>; Qi Zhang <qi.z.zhang@intel.com>; Mingjin Ye
> <mingjinx.ye@intel.com>; david.marchand@redhat.com;
> ferruh.yigit@amd.com
> Subject: Re: [PATCH] net/ice: fix get link status timeout
> 
> 06/02/2023 07:22, Mingjin Ye:
> > When hw is just started, it will immediately obtain the link status,
> > and the longest attempt is 1 second. Some NICs are slow to initialize,
> > which make it fails to obtain the link status.
> >
> > The patch fixes this issue by modifying the longest attempt to 5 seconds.
> 
> What is the consequence?
> In which case, DPDK application would be blocked during 5 seconds?
> 

I think ice_link_update with wait_to_complete needs to be optimized when ice_link_update.
Our system integrates dozens or more interfaces(E810), even if wait 1 second, the system starts very slowly.

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH] net/ice: fix get link status timeout
@ 2023-02-06  8:35 Shuang Han
  0 siblings, 0 replies; 9+ messages in thread
From: Shuang Han @ 2023-02-06  8:35 UTC (permalink / raw)
  To: mingjinx.ye; +Cc: dev, qi.z.zhang, qiming.yang, stable, yidingx.zhou

> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Sent: Monday, February 06, 2023 2:23 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; yidingx.zhou@intel.com; Mingjin Ye
> <mingjinx.ye@intel.com>; Qiming Yang <qiming.yang@intel.com>; Qi Zhang
> <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice: fix get link status timeout
>
>
> When hw is just started, it will immediately obtain the link status, and the
> longest attempt is 1 second. Some NICs are slow to initialize, which make it fails
> to obtain the link status.
>
> The patch fixes this issue by modifying the longest attempt to 5 seconds.
>
> Fixes: cf911d90e366 ("net/ice: support link update")
> Cc: stable@dpdk.org
>
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/net/ice/ice_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index
> 0bc739daf0..eaa556f45c 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -3927,7 +3927,7 @@ static int
>  ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)  {  #define
> CHECK_INTERVAL 100  /* 100ms */ -#define MAX_REPEAT_TIME 10  /* 1s (10
> * 100ms) in total */
> +#define MAX_REPEAT_TIME 50  /* 5s (50 * 100ms) in total */
>  struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>  struct ice_link_status link_status;
>  struct rte_eth_link link, old;
> --
> 2.25.1

Sorry for my mail client setting with last reply.
I think ice_link_update with wait_to_complete needs to be optimized
when ice_link_update.
Our system integrates dozens or more interfaces(E810), even if wait 1
second, the system starts very slowly.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-07  6:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06  6:22 [PATCH] net/ice: fix get link status timeout Mingjin Ye
2023-02-06  7:23 ` Thomas Monjalon
2023-02-06  8:14   ` Ye, MingjinX
2023-02-06  9:15     ` Thomas Monjalon
2023-02-06 10:06       ` Ye, MingjinX
2023-02-06  7:56 韩爽
2023-02-06 10:51 ` Ye, MingjinX
2023-02-07  6:48   ` Yang, Qiming
2023-02-06  8:35 Shuang Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).