Re: [PATCH v2 2/2] net/ixgbe: fix return value of close operation

Bruce Richardson <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
On Wed, Jul 15, 2026 at 02:48:16PM +0200, Sid Ali Cherrati wrote:
> 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 ixgbe_dev_close(), so applications checking
> rte_eth_dev_close() != 0 treat a successful close as a failure.
> 
> Use a separate cb_ret variable for the unregister return value so a
> successful unregister never clobbers the dev_stop() error already
> stored in ret, and stop retrying once unregister fails with anything
> other than -EAGAIN, since those errors are not transient.
> 
> Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")
> Cc: [email protected]
> 
> Signed-off-by: Sid Ali Cherrati <[email protected]>
> ---
> v2: use a temporary cb_ret variable instead of unconditionally zeroing
>     ret, and stop retrying on a non-transient unregister error, so an
>     earlier error is not lost or masked by a successful/failed
>     unregister
> 
>  drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
Acked-by: Bruce Richardson <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.