[PATCH] net/ice: fix get link status timeout

Shuang Han hanshuang87 at gmail.com
Mon Feb 6 09:35:44 CET 2023


> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye at intel.com>
> Sent: Monday, February 06, 2023 2:23 PM
> To: dev at dpdk.org
> Cc: stable at dpdk.org; yidingx.zhou at intel.com; Mingjin Ye
> <mingjinx.ye at intel.com>; Qiming Yang <qiming.yang at intel.com>; Qi Zhang
> <qi.z.zhang at 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 at dpdk.org
>
> Signed-off-by: Mingjin Ye <mingjinx.ye at 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.


More information about the stable mailing list