From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) by dpdk.org (Postfix) with ESMTP id 054423238 for ; Mon, 19 Sep 2016 20:50:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1064; q=dns/txt; s=iport; t=1474311016; x=1475520616; h=from:to:cc:subject:date:message-id; bh=QAeLG5aIP6yWB5MkY8xj8J+6mgyr1XBd37y/2yFZTBk=; b=BM1Bqxfz3RGMKrDo+pn5qdnGyqsYTPqHdlVbXeLAMFaY39S/w/0N/BsS hdAwKa+FH+MtX5lkUHEpsAUiv/EKtAsTauUreM9EWn5u7JK0b+KYReNMG 8mYdb5Eec2xssS10HdiFM4MH+3TLSvZ9Y0uHOy2Q4pubRlQshxbpao1HC g=; X-IronPort-AV: E=Sophos;i="5.30,363,1470700800"; d="scan'208";a="325434819" Received: from alln-core-9.cisco.com ([173.36.13.129]) by alln-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Sep 2016 18:50:15 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id u8JIoFtc031640; Mon, 19 Sep 2016 18:50:15 GMT Received: by cisco.com (Postfix, from userid 412739) id 00E2A3FAAE0F; Mon, 19 Sep 2016 11:50:14 -0700 (PDT) From: Nelson Escobar To: dev@dpdk.org Cc: bruce.richardson@intel.com, Nelson Escobar Date: Mon, 19 Sep 2016 11:50:09 -0700 Message-Id: <1474311011-19978-1-git-send-email-neescoba@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH 1/3] net/enic: cleanup interrupt setup when stopping port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 18:50:16 -0000 enic_disable() wasn't calling rte_intr_disable() or rte_intr_callback_unregister(). If stopping/starting a port, the latter omission would result in the same interrupt callback being registered multiple times, which would then cause it to be called multiple times on every interrupt. Fixes: fefed3d1e62c ("enic: new driver") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- drivers/net/enic/enic_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index b4ca371..aec24d2 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -798,6 +798,10 @@ int enic_disable(struct enic *enic) vnic_intr_mask(&enic->intr); (void)vnic_intr_masked(&enic->intr); /* flush write */ + rte_intr_disable(&enic->pdev->intr_handle); + rte_intr_callback_unregister(&enic->pdev->intr_handle, + enic_intr_handler, + (void *)enic->rte_dev); vnic_dev_disable(enic->vdev); -- 2.7.0