From 47cf8373a1792b4a2c49cc03994f479fd4a693a2 Mon Sep 17 00:00:00 2001 From: Yong Wang Date: Tue, 10 Oct 2017 07:24:20 -0400 Subject: [PATCH] net/i40e: fix uninitialized variable In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in func call i40evf_dev_atomic_write_link_status(), but is uninitialized. Fixes: 2a73125b7041 ("i40evf: fix link info update") Cc: stable@dpdk.org Signed-off-by: Yong Wang Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_ethdev_vf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 111ac397b3..b2e5aa6937 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2100,6 +2100,8 @@ i40evf_dev_link_update(struct rte_eth_dev *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 = + dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED; i40evf_dev_atomic_write_link_status(dev, &new_link); -- 2.20.1