Skip to content

Commit

Permalink
common/iavf: avoid copy in async mode
Browse files Browse the repository at this point in the history
[ upstream commit c60fad5 ]

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

Fixes: e5b2a9e ("net/avf/base: add base code for avf PMD")

Signed-off-by: Steven Zou <steven.zou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
hzouSteven authored and kevintraynor committed Oct 11, 2022
1 parent fc56f98 commit 85de691
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/common/iavf/iavf_adminq.c
Expand Up @@ -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)
Expand Down

0 comments on commit 85de691

Please sign in to comment.