[dpdk-stable] [PATCH 2/3] net/bnx2x: fix link events polling for SRIOV
Rasesh Mody
rmody at marvell.com
Thu Jul 4 01:43:12 CEST 2019
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 at dpdk.org
Signed-off-by: Rasesh Mody <rmody at 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
More information about the stable
mailing list