From: SidAli CHERRATI <scherrati1@gmail.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
SidAli CHERRATI <scherrati1@gmail.com>,
stable@dpdk.org
Subject: [PATCH 1/2] net/i40e: fix return value of close operation
Date: Fri, 10 Jul 2026 15:46:38 +0200 [thread overview]
Message-ID: <20260710134639.108129-1-scherrati1@gmail.com> (raw)
rte_intr_callback_unregister() returns the number of unregistered
callbacks on success. Since the close operation started returning
the ret variable instead of 0, this positive value leaks as the
return value of i40e_dev_close(), so applications checking
rte_eth_dev_close() != 0 treat a successful close as a failure.
Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")
Cc: stable@dpdk.org
Signed-off-by: SidAli CHERRATI <scherrati1@gmail.com>
---
drivers/net/intel/i40e/i40e_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..2fe6b1e118 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -2764,6 +2764,7 @@ i40e_dev_close(struct rte_eth_dev *dev)
ret = rte_intr_callback_unregister(intr_handle,
i40e_dev_interrupt_handler, dev);
if (ret >= 0 || ret == -ENOENT) {
+ ret = 0;
break;
} else if (ret != -EAGAIN) {
PMD_INIT_LOG(ERR,
--
2.34.1
next reply other threads:[~2026-07-10 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 13:46 SidAli CHERRATI [this message]
2026-07-10 13:46 ` [PATCH 2/2] net/ixgbe: fix return value of close operation SidAli CHERRATI
2026-07-10 15:26 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260710134639.108129-1-scherrati1@gmail.com \
--to=scherrati1@gmail.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox