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

Message ID 20220905014206.14872-1-steven.zou@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series common/iavf: do not copy desc/buff in async mode |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Testing fail Testing issues

Commit Message

Steven Zou Sept. 5, 2022, 1:42 a.m. UTC
  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@intel.com>
---
 drivers/common/iavf/iavf_adminq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang Sept. 5, 2022, 2 a.m. UTC | #1
> -----Original Message-----
> From: Zou, Steven <steven.zou@intel.com>
> Sent: Monday, September 5, 2022 9:42 AM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Guang3
> <guang3.yang@intel.com>; Zou, Steven <steven.zou@intel.com>
> Subject: [PATCH] common/iavf: do not copy desc/buff in async mode
> 
> If cmd_details are defined or async flag is set, don't copy the desc/buff back
> to temp.
> 

Added 
Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")
Cc: stable@dpdk.org

> Signed-off-by: Steven Zou <steven.zou@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

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)