common/iavf: avoid copy in async mode

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

Fixes: e5b2a9e957 ("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>
This commit is contained in:
Steven Zou 2022-09-05 09:42:06 +08:00 committed by Qi Zhang
parent 4841015ffb
commit c60fad5626

View File

@ -788,7 +788,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)