[DPDK] net/ixgbe: fix status synchronization on BSD

Message ID 20200325073250.11214-1-zhihongx.peng@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series [DPDK] net/ixgbe: fix status synchronization on BSD |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Peng, ZhihongX March 25, 2020, 7:32 a.m. UTC
  From: Peng Zhihong <zhihongx.peng@intel.com>

DPDK does not implement interrupt mechanism on BSD,
so force NIC status synchronization.

Fixes: dc66e5fd01b9 (net/ixgbe: improve link state check on VF)
Cc: liang-min.wang@intel.com

Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 23b3f5b0c..6135effcd 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4243,6 +4243,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