From: Nelson Escobar Date: Mon, 19 Sep 2016 18:50:09 +0000 (-0700) Subject: net/enic: unregister interrupt handler when stopping X-Git-Tag: spdx-start~5813 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=667b8a3bd497d738471d301f5b2f50065f4c8a02;p=dpdk.git net/enic: unregister interrupt handler when stopping enic_disable() wasn't calling rte_intr_disable() or rte_intr_callback_unregister(). stopping/starting a port 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 --- diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index eb32ac1ace..aafdc64fe6 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -797,6 +797,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);