[dpdk-dev] [PATCH] net/ixgbe: fix link status after port reset

Wang, ShougangX shougangx.wang at intel.com
Tue Apr 21 04:49:07 CEST 2020


Hi, Xiaolong

> -----Original Message-----
> From: Ye, Xiaolong <xiaolong.ye at intel.com>
> Sent: Tuesday, April 14, 2020 3:54 PM
> To: Wang, ShougangX <shougangx.wang at intel.com>
> Cc: dev at dpdk.org; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Yang, Qiming
> <qiming.yang at intel.com>; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix link status after port reset
> 
> Hi, Shougang
> 
> On 04/13, Shougang Wang wrote:
> >It's a normal behavior to change the link status to up after resetting
> >the port. So it is unnecessary to set link down before starting port,
> >and changing the link state(link up/down) frequently will cause link
> >speed unstable.
> >
> >Fixes: c3f2fbff78cf ("net/ixgbe: fix link status")
> >Cc: stable at dpdk.org
> >
> >Signed-off-by: Shougang Wang <shougangx.wang at intel.com>
> >---
> > drivers/net/ixgbe/ixgbe_ethdev.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> >b/drivers/net/ixgbe/ixgbe_ethdev.c
> >index 23b3f5b0c..206358b85 100644
> >--- a/drivers/net/ixgbe/ixgbe_ethdev.c
> >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> >@@ -1196,7 +1196,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev,
> void *init_params __rte_unused)
> > 	diag = ixgbe_bypass_init_hw(hw);
> > #else
> > 	diag = ixgbe_init_hw(hw);
> >-	hw->mac.autotry_restart = false;
> 
> Why do we need this change? Seems it is not mentioned in the commit log.

In c3f2fbff78cf, port was set to down by following 2 steps.
1. Setting autotry_restart flag to false to prevent NIC from linking up by itself.
2. Calling ixgbe_dev_set_link_down().

Force to set link status to down is unnecessary operation before starting port, so I revert these 2 changes in this patch.

Thanks
Shougang


More information about the dev mailing list