DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix port close in FreeBSD
@ 2019-12-11  9:06 Chenxu Di
  2019-12-18  2:08 ` Ye Xiaolong
  0 siblings, 1 reply; 2+ messages in thread
From: Chenxu Di @ 2019-12-11  9:06 UTC (permalink / raw)
  To: dev; +Cc: Yang Qiming, Chenxu Di, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix port close in FreeBSD
  2019-12-11  9:06 [dpdk-dev] [PATCH] net/i40e: fix port close in FreeBSD Chenxu Di
@ 2019-12-18  2:08 ` Ye Xiaolong
  0 siblings, 0 replies; 2+ messages in thread
From: Ye Xiaolong @ 2019-12-18  2:08 UTC (permalink / raw)
  To: Chenxu Di; +Cc: dev, Yang Qiming, stable

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-18  2:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11  9:06 [dpdk-dev] [PATCH] net/i40e: fix port close in FreeBSD Chenxu Di
2019-12-18  2:08 ` Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).