[PATCH v3 3/8] net/iavf: add virtchnl interrupt enable flag
Anatoly Burakov
anatoly.burakov at intel.com
Fri Mar 6 11:58:19 CET 2026
For some functionality, we will need to know if the virtchnl message queue
interrupts are enabled (i.e. if the new virtchnl messages will be delivered
into an interrupt thread as opposed to having to directly poll the queue).
Add such flag and track its status during init/close.
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
drivers/net/intel/iavf/iavf.h | 1 +
drivers/net/intel/iavf/iavf_ethdev.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index b2389e0bbd..cf98d12247 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -243,6 +243,7 @@ struct iavf_info {
RTE_ATOMIC(uint32_t) pend_cmd_count;
int cmd_retval; /* return value of the cmd response from PF */
uint8_t *aq_resp; /* buffer to store the adminq response from PF */
+ bool aq_intr_enabled;
/** iAVF watchdog enable */
bool watchdog_enabled;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index e3690cce11..9fdebec0f4 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -2853,6 +2853,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
/* configure and enable device interrupt */
iavf_enable_irq0(hw);
+ vf->aq_intr_enabled = true;
ret = iavf_flow_init(adapter);
if (ret) {
@@ -2900,6 +2901,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
iavf_security_ctx_destroy(adapter);
flow_init_err:
+ vf->aq_intr_enabled = false;
iavf_disable_irq0(hw);
if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
@@ -2975,6 +2977,7 @@ iavf_dev_close(struct rte_eth_dev *dev)
iavf_config_promisc(adapter, false, false);
iavf_vf_reset(hw);
+ vf->aq_intr_enabled = false;
iavf_shutdown_adminq(hw);
if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) {
/* disable uio intr before callback unregister */
--
2.47.3
More information about the dev
mailing list