Hi, > -----Original Message----- > From: Yong Wang [mailto:wang.yon...@zte.com.cn] > Sent: Tuesday, September 19, 2017 11:17 AM > To: Lu, Wenzhuo <wenzhuo...@intel.com> > Cc: dev@dpdk.org; Yong Wang <wang.yon...@zte.com.cn> > Subject: [PATCH] net/ixgbe: fix uninitialized variable > > In func ixgbe_dev_link_update(), "link.link_autoneg" is used in func call > rte_ixgbe_dev_atomic_write_link_status(), but is uninitialized. > > Signed-off-by: Yong Wang <wang.yon...@zte.com.cn> > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index 9ca5cbc..971de0c 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3957,6 +3957,7 @@ static int > ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, > link.link_status = ETH_LINK_DOWN; > link.link_speed = 0; > link.link_duplex = ETH_LINK_HALF_DUPLEX; > + link.link_autoneg = ETH_LINK_AUTONEG; TBH, I don't find ixgbe uses this field. But this patch doesn't harm. Acked-by: Wenzhuo Lu <wenzhuo...@intel.com>
> memset(&old, 0, sizeof(old)); > rte_ixgbe_dev_atomic_read_link_status(dev, &old); > > -- > 1.8.3.1