net/i40e: fix port close in FreeBSD
diff mbox series

Message ID 20191211090603.62152-1-chenxux.di@intel.com
State Accepted
Delegated to: xiaolong ye
Headers show
Series
  • net/i40e: fix port close in FreeBSD
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/travis-robot warning Travis build: failed
ci/checkpatch success coding style OK

Commit Message

Di, ChenxuX Dec. 11, 2019, 9:06 a.m. UTC
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>
---
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiaolong Ye Dec. 18, 2019, 2:08 a.m. UTC | #1
On 12/11, Chenxu Di wrote:
>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>
>---
> drivers/net/i40e/i40e_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
>index 5999c964b..8b2500391 100644
>--- a/drivers/net/i40e/i40e_ethdev.c
>+++ b/drivers/net/i40e/i40e_ethdev.c
>@@ -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,
>-- 
>2.17.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel, Thanks.

Patch
diff mbox series

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5999c964b..8b2500391 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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,