Skip to contentSkip to conversation

net/ixgbe: fix status synchronization on BSD

PATCH Applied [email protected] 3 participants 3 messages Apr 17, 2020 – May 6, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: fix status synchronization on BSD

From: Peng Zhihong <[email protected]>

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

Fixes dc66e5fd01b9 (net/ixgbe: improve link state check on VF)
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 2c5797635..efd8aced4 100644
@@ -4262,6 +4262,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
Signature · 1 line
2.17.1
Tested-by on v1 1/1
#1 lore raw

Regards,
HuangZhiMin

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of [email protected]
Sent: Friday, April 17, 2020 11:52 AM
To: Ye, Xiaolong <[email protected]>; Lu, Wenzhuo <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; Peng, ZhihongX <[email protected]>; Wang, Liang-min <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix status synchronization on BSD

From: Peng Zhihong <[email protected]>

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

Fixes dc66e5fd01b9 (net/ixgbe: improve link state check on VF)
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 2c5797635..efd8aced4 100644
@@ -4262,6 +4262,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.17.1

Acked-by on v1 1/1 Applied
#2 lore raw
In reply to [email protected]
Quoted 32 lines · On 04/16, [email protected] wrote:

From: Peng Zhihong <[email protected]>

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

Fixes dc66e5fd01b9 (net/ixgbe: improve link state check on VF)

---
drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++

1 file changed, 5 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -0
index 2c5797635..efd8aced4 100644
@@ -4262,6 +4262,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
Signature · 1 line
2.17.1

Applied to dpdk-next-net-intel, Thanks.