From 0012111a3d879b0b0e27d14a841e2a729545727d Mon Sep 17 00:00:00 2001 From: Zhihong Peng Date: Thu, 16 Apr 2020 23:52:12 -0400 Subject: [PATCH] net/ixgbe: fix link status synchronization on BSD DPDK does not implement interrupt mechanism on BSD, so force NIC status synchronization. Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") Cc: stable@dpdk.org Signed-off-by: Zhihong Peng Tested-by: Zhimin Huang Acked-by: Xiaolong Ye --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index aa1e8aac51..cf5f1fe709 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4257,6 +4257,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0) wait = 0; +/* BSD has no interrupt mechanism, so force NIC status synchronization. */ +#ifdef RTE_EXEC_ENV_FREEBSD + wait = 1; +#endif + if (vf) diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait); else -- 2.20.1