DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@marvell.com>
To: <dev@dpdk.org>
Cc: Rasesh Mody <rmody@marvell.com>, <ferruh.yigit@intel.com>,
	<GR-Everest-DPDK-Dev@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/3] net/bnx2x: fix link events polling for SRIOV
Date: Wed, 3 Jul 2019 16:43:12 -0700	[thread overview]
Message-ID: <20190703234313.10782-2-rmody@marvell.com> (raw)
In-Reply-To: <20190703234313.10782-1-rmody@marvell.com>

We do not need to schedule periodic poll for slowpath link events
for SRIOV. The link events are handled by the PF driver.

Fixes: 6041aa619f9a ("net/bnx2x: fix poll link status")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 10b4fdb8e..127811b92 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -218,9 +218,12 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE(sc);
 
 	/* start the periodic callout */
-	if (atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP) {
-		bnx2x_periodic_start(dev);
-		PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
+	if (IS_PF(sc)) {
+		if (atomic_load_acq_long(&sc->periodic_flags) ==
+		    PERIODIC_STOP) {
+			bnx2x_periodic_start(dev);
+			PMD_DRV_LOG(DEBUG, sc, "Periodic poll re-started");
+		}
 	}
 
 	ret = bnx2x_init(sc);
@@ -258,10 +261,10 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
 		rte_intr_disable(&sc->pci_dev->intr_handle);
 		rte_intr_callback_unregister(&sc->pci_dev->intr_handle,
 				bnx2x_interrupt_handler, (void *)dev);
-	}
 
-	/* stop the periodic callout */
-	bnx2x_periodic_stop(dev);
+		/* stop the periodic callout */
+		bnx2x_periodic_stop(dev);
+	}
 
 	ret = bnx2x_nic_unload(sc, UNLOAD_NORMAL, FALSE);
 	if (ret) {
@@ -680,7 +683,9 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 	return 0;
 
 out:
-	bnx2x_periodic_stop(eth_dev);
+	if (IS_PF(sc))
+		bnx2x_periodic_stop(eth_dev);
+
 	return ret;
 }
 
-- 
2.18.0


  reply	other threads:[~2019-07-03 23:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 23:43 [dpdk-dev] [PATCH 1/3] net/bnx2x: fix read VF id Rasesh Mody
2019-07-03 23:43 ` Rasesh Mody [this message]
2019-07-03 23:43 ` [dpdk-dev] [PATCH 3/3] net/bnx2x: fix fastpath SB allocation for SRIOV Rasesh Mody
2019-07-09 10:33 ` [dpdk-dev] [PATCH 1/3] net/bnx2x: fix read VF id Jerin Jacob Kollanukkaran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190703234313.10782-2-rmody@marvell.com \
    --to=rmody@marvell.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).