From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: [PATCH v2] net/failsafe: fix Rx interrupt reinstallation Date: Wed, 14 Feb 2018 14:47:26 +0000 Message-ID: <1518619646-23990-1-git-send-email-matan@mellanox.com> References: <1518562772-29823-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org To: Gaetan Rivet Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0043.outbound.protection.outlook.com [104.47.1.43]) by dpdk.org (Postfix) with ESMTP id BDB611B016 for ; Wed, 14 Feb 2018 15:47:43 +0100 (CET) In-Reply-To: <1518562772-29823-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/failsafe/failsafe_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev) 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; -- 1.9.5