net/ixgbe: fix status synchronization on BSD

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

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Peng, ZhihongX April 17, 2020, 3:52 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(+)
  

Comments

Huang, ZhiminX April 28, 2020, 10:19 a.m. UTC | #1
Tested-by: Huang, ZhiminX <zhiminx.huang@intel.com>

Regards,
HuangZhiMin



-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of zhihongx.peng@intel.com
Sent: Friday, April 17, 2020 11:52 AM
To: Ye, Xiaolong <xiaolong.ye@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org; Peng, ZhihongX <zhihongx.peng@intel.com>; Wang, Liang-min <liang-min.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix status synchronization on BSD

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(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c5797635..efd8aced4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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
  
Xiaolong Ye May 6, 2020, 5:22 a.m. UTC | #2
On 04/16, zhihongx.peng@intel.com wrote:
>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(+)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>index 2c5797635..efd8aced4 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.c
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>@@ -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: Xiaolong Ye <xiaolong.ye@intel.com>

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

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c5797635..efd8aced4 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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