DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix application reset callback calls
@ 2024-01-17 11:54 David Marchand
  2024-02-01  8:58 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2024-01-17 11:54 UTC (permalink / raw)
  To: dev
  Cc: ktraynor, john.mcnamara, ian.stokes, stable, Jingjing Wu,
	Beilei Xing, Qi Zhang, Mingjin Ye

Don't trigger an application reset callback if the port is not started.

Bugzilla ID: 1337
Fixes: 675a104e2e94 ("net/iavf: fix abnormal disable HW interrupt")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/iavf/iavf_vchnl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 0a3e1d082c..14dfe313b7 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -88,7 +88,10 @@ iavf_dev_event_handle(void *param __rte_unused)
 				continue;
 			}
 
-			rte_eth_dev_callback_process(pos->dev, pos->event, pos->param);
+			/* Don't invoke an application reset callback if not started yet. */
+			if (pos->event != RTE_ETH_EVENT_INTR_RESET ||
+					pos->dev->data->dev_started != 0)
+				rte_eth_dev_callback_process(pos->dev, pos->event, pos->param);
 			rte_free(pos);
 		}
 	}
-- 
2.43.0


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

* Re: [PATCH] net/iavf: fix application reset callback calls
  2024-01-17 11:54 [PATCH] net/iavf: fix application reset callback calls David Marchand
@ 2024-02-01  8:58 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2024-02-01  8:58 UTC (permalink / raw)
  To: john.mcnamara, Bruce Richardson
  Cc: dev, ktraynor, ian.stokes, stable, Jingjing Wu, Beilei Xing,
	Qi Zhang, Mingjin Ye, Ferruh Yigit

On Wed, Jan 17, 2024 at 12:54 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Don't trigger an application reset callback if the port is not started.
>
> Bugzilla ID: 1337
> Fixes: 675a104e2e94 ("net/iavf: fix abnormal disable HW interrupt")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

I am withdrawing this patch.
As I mentionned in the bugzilla, this patch is probably introducing races.

I don't have the time/expertise to look deeper into this driver, and
it does not seem like Intel will invest in fixing this.

Fyi, I sent a patch on the ethdev API recommending not to use locks in
application event callbacks.
Reviews welcome.

Thanks.

-- 
David Marchand


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

end of thread, other threads:[~2024-02-01  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 11:54 [PATCH] net/iavf: fix application reset callback calls David Marchand
2024-02-01  8:58 ` David Marchand

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).