[dpdk-dev] [PATCH] net/i40e: fix uninitialized variable
Yong Wang
wang.yong19 at zte.com.cn
Fri Sep 22 09:18:15 CEST 2017
In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in
func call i40evf_dev_atomic_write_link_status(), but is uninitialized.
Signed-off-by: Yong Wang <wang.yong19 at zte.com.cn>
---
drivers/net/i40e/i40e_ethdev_vf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 73c315a..3c0f436 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2218,6 +2218,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
new_link.link_status = vf->link_up ? ETH_LINK_UP :
ETH_LINK_DOWN;
+ new_link.link_autoneg = ETH_LINK_AUTONEG;
i40evf_dev_atomic_write_link_status(dev, &new_link);
--
1.8.3.1
More information about the dev
mailing list