DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD
@ 2020-03-25  7:32 zhihongx.peng
  0 siblings, 0 replies; 3+ messages in thread
From: zhihongx.peng @ 2020-03-25  7:32 UTC (permalink / raw)
  To: xiaolong.ye, wenzhuo.lu, konstantin.ananyev
  Cc: dev, Peng Zhihong, liang-min.wang

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 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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD
  2020-03-25  3:31 zhihongx.peng
@ 2020-03-26 22:01 ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2020-03-26 22:01 UTC (permalink / raw)
  To: zhihongx.peng
  Cc: xiaolong.ye, wenzhuo.lu, konstantin.ananyev, dev, liang-min.wang

On Tue, 24 Mar 2020 23:31:11 -0400
zhihongx.peng@intel.com wrote:

> +/*BSD has no interrupt mechanism, so force NIC status synchronization.*/
> +#ifdef RTE_EXEC_ENV_FREEBSD
> +	wait = 1;
> +#endif
> +

Please format comments correctly.
Is there a better way to detect interrupt mechanism with a function?
#ifdef's make for hard to maintain code.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD
@ 2020-03-25  3:31 zhihongx.peng
  2020-03-26 22:01 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: zhihongx.peng @ 2020-03-25  3:31 UTC (permalink / raw)
  To: xiaolong.ye, wenzhuo.lu, konstantin.ananyev
  Cc: dev, Peng Zhihong, liang-min.wang

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 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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  7:32 [dpdk-dev] [DPDK] net/ixgbe: fix status synchronization on BSD zhihongx.peng
  -- strict thread matches above, loose matches on Subject: below --
2020-03-25  3:31 zhihongx.peng
2020-03-26 22:01 ` Stephen Hemminger

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox