summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatan Azrad <matan@mellanox.com>2018-02-14 14:47:26 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-02-14 16:32:00 +0100
commit56b48dc5e3753d0988bbbeffee4cf5ab9b19f7cf (patch)
treee1a0a16850650da4a4e19163a18a5407d5cbdde7
parentba2f43464ed53fd1358cf7b1f483103c616f341c (diff)
downloaddpdk-draft-windows-56b48dc5e3753d0988bbbeffee4cf5ab9b19f7cf.zip
dpdk-draft-windows-56b48dc5e3753d0988bbbeffee4cf5ab9b19f7cf.tar.gz
dpdk-draft-windows-56b48dc5e3753d0988bbbeffee4cf5ab9b19f7cf.tar.xz
net/failsafe: fix Rx interrupt reinstallation
Fail-safe dev_start() operation can be called by both the application and the hot-plug alarm mechanism. The installation of Rx interrupt are triggered from dev_start() in any time it is called while actually the Rx interrupt should be installed only by the application calls. So, each plug-in event causes reinstallation which causes memory leak and spoils the fail-safe Rx interrupt mechanism. Trigger the Rx interrupt installation only when it does not exist. Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode") Signed-off-by: Matan Azrad <matan@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
-rw-r--r--drivers/net/failsafe/failsafe_intr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c
index f6ff04d..6b7f9c1 100644
--- a/drivers/net/failsafe/failsafe_intr.c
+++ b/drivers/net/failsafe/failsafe_intr.c
@@ -523,7 +523,7 @@ failsafe_rx_intr_install(struct rte_eth_dev *dev)
const struct rte_intr_conf *const intr_conf =
&priv->dev->data->dev_conf.intr_conf;
- if (intr_conf->rxq == 0)
+ if (intr_conf->rxq == 0 || dev->intr_handle != NULL)
return 0;
if (fs_rx_intr_vec_install(priv) < 0)
return -rte_errno;