Skip to contentSkip to conversation

net/iavf: fix application reset callback calls

PATCH In review David Marchand 1 participant 2 messages Jan 17, 2024 – Feb 1, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix application reset callback calls

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")
---
 drivers/net/iavf/iavf_vchnl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_vchnl.c +4 -1
index 0a3e1d082c..14dfe313b7 100644
@@ -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);
 		}
 	}
Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · David Marchand

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

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.

Signature · 1 line
David Marchand