[PATCH] common/iavf: do not copy desc/buff in async mode

Steven Zou steven.zou at intel.com
Mon Sep 5 03:42:06 CEST 2022


If cmd_details are defined or async flag is set,
don't copy the desc/buff back to temp.

Signed-off-by: Steven Zou <steven.zou at intel.com>
---
 drivers/common/iavf/iavf_adminq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
index 0bf5af0cbe..2e59820b3b 100644
--- a/drivers/common/iavf/iavf_adminq.c
+++ b/drivers/common/iavf/iavf_adminq.c
@@ -784,7 +784,8 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
 	}
 
 	/* if ready, copy the desc back to temp */
-	if (iavf_asq_done(hw)) {
+	if (iavf_asq_done(hw) &&
+		!details->async && !details->postpone) {
 		iavf_memcpy(desc, desc_on_ring, sizeof(struct iavf_aq_desc),
 			    IAVF_DMA_TO_NONDMA);
 		if (buff != NULL)
-- 
2.34.1



More information about the dev mailing list