net/i40e: fix port close in FreeBSD
authorChenxu Di <chenxux.di@intel.com>
Wed, 11 Dec 2019 09:06:03 +0000 (09:06 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:45:23 +0000 (19:45 +0100)
FreeBSD OS doesn't support igb_uio interrupt, so it will fail when
unregister the interrupt callback in port close. We can fix the issue by
passing -ENOENT when check the return value of unregister interrupt
callback function.

Fixes: ac89d46096d5 ("net/i40e: release port upon close")
Cc: stable@dpdk.org
Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/i40e/i40e_ethdev.c

index 5999c96..8b25003 100644 (file)
@@ -2594,7 +2594,7 @@ i40e_dev_close(struct rte_eth_dev *dev)
        do {
                ret = rte_intr_callback_unregister(intr_handle,
                                i40e_dev_interrupt_handler, dev);
-               if (ret >= 0) {
+               if (ret >= 0 || ret == -ENOENT) {
                        break;
                } else if (ret != -EAGAIN) {
                        PMD_INIT_LOG(ERR,