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: [email protected]
Signed-off-by: David Marchand <[email protected]>
---
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