summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorMoti Haimovsky <motih@mellanox.com>2018-01-29 10:34:37 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-01-30 10:20:35 +0100
commitfc1b5ec522ee92f303cb74e683a5efe477cf9b56 (patch)
tree74e0d365880e9047872d11532b37661112c0d7a9 /drivers/net/mlx4/mlx4.c
parentf8ec9e2fff26b11e3c1bd7d1391521ca98c3300d (diff)
downloaddpdk-fc1b5ec522ee92f303cb74e683a5efe477cf9b56.zip
dpdk-fc1b5ec522ee92f303cb74e683a5efe477cf9b56.tar.gz
dpdk-fc1b5ec522ee92f303cb74e683a5efe477cf9b56.tar.xz
net/mlx4: fix removal detection of stopped port
In failsafe device start can be called for ports/devices that had been plugged out. The mlx4 PMD detects device removal by listening to the device RMV events, when the mlx4 port is being stopped, the PMD no longer listens to these events causing the PMD to stop detecting device removals. This patch fixes this issue by moving installation of the interrupt handler to device configuration, and toggle only the Rx-queue interrupts on start/stop. Fixes: a6e8b01c3c26 ("net/mlx4: compact interrupt functions") Cc: stable@dpdk.org Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 952dae0..680eca7 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -108,7 +108,13 @@ mlx4_dev_configure(struct rte_eth_dev *dev)
" flow error type %d, cause %p, message: %s",
-ret, strerror(-ret), error.type, error.cause,
error.message ? error.message : "(unspecified)");
+ goto exit;
}
+ ret = mlx4_intr_install(priv);
+ if (ret)
+ ERROR("%p: interrupt handler installation failed",
+ (void *)dev);
+exit:
return ret;
}
@@ -141,7 +147,7 @@ mlx4_dev_start(struct rte_eth_dev *dev)
(void *)dev, strerror(-ret));
goto err;
}
- ret = mlx4_intr_install(priv);
+ ret = mlx4_rxq_intr_enable(priv);
if (ret) {
ERROR("%p: interrupt handler installation failed",
(void *)dev);
@@ -187,7 +193,7 @@ mlx4_dev_stop(struct rte_eth_dev *dev)
dev->rx_pkt_burst = mlx4_rx_burst_removed;
rte_wmb();
mlx4_flow_sync(priv, NULL);
- mlx4_intr_uninstall(priv);
+ mlx4_rxq_intr_disable(priv);
mlx4_rss_deinit(priv);
}