[PATCH v2] net/iavf: fix misleading AQ failure logging

Anurag Mandal anurag.mandal at intel.com
Tue Jun 9 14:00:50 CEST 2026


iavf_handle_virtchnl_msg() drains the admin receive queue in a loop
until iavf_clean_arq_element() reports that no descriptors are
pending. When the queue becomes empty, the base driver returns
IAVF_ERR_ADMIN_QUEUE_NO_WORK (-57), which is the documented
terminator for the drain loop, and is not an error.

The current loop treats every non-IAVF_SUCCESS return as a failure
and logs it as follows:

"Failed to read msg from AdminQ, ret: -57"

This message floods the logs on every interrupt cycle and misleads
the triage during VF reset by chasing a real virtchnl problem
seeing these spurious -57 AQ failure lines in logs and assumes
the admin queue is broken, when in fact it has just been drained.

This patch fixes the aforesaid issue by treating
IAVF_ERR_ADMIN_QUEUE_NO_WORK in virtchnl message drain as a normal
loop exit empty-queue condition and avoid logging it as an misleading
AQ failure.

Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")
Cc: stable at dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
V2: Addressed Ciara Loftus's comment
 -  kept 'break" for ret == IAVF_ERR_ADMIN_QUEUE_NO_WORK case

 drivers/net/intel/iavf/iavf_vchnl.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index 94ccfb5d6e..39ebddff31 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -571,8 +571,16 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
 		ret = iavf_clean_arq_element(hw, &info, &pending);
 
 		if (ret != IAVF_SUCCESS) {
-			PMD_DRV_LOG(INFO, "Failed to read msg from AdminQ,"
-				    "ret: %d", ret);
+			/*
+			 * IAVF_ERR_ADMIN_QUEUE_NO_WORK (-57) means AQ is empty
+			 * and is a normal way to terminate the drain loop.
+			 * Log error only for genuine other failure codes.
+			 * Incorrect logging like this during VF resets might
+			 * mislead into chasing a non-existent AQ failure.
+			 */
+			if (ret != IAVF_ERR_ADMIN_QUEUE_NO_WORK)
+				PMD_DRV_LOG(INFO, "Failed to read msg from AdminQ,"
+					    "ret: %d", ret);
 			break;
 		}
 		aq_opc = rte_le_to_cpu_16(info.desc.opcode);
-- 
2.34.1



More information about the dev mailing list