From patchwork Mon Sep 5 01:42:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Zou X-Patchwork-Id: 115828 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81CCBA055D; Mon, 5 Sep 2022 03:43:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32D7140697; Mon, 5 Sep 2022 03:43:15 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 684A8400D4 for ; Mon, 5 Sep 2022 03:43:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662342193; x=1693878193; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YPDRhb19ww7i7yxCvB7LBhwhE2XaWqbTqRVKVHRSBXE=; b=NNMK9vBuL79QZ0QmplgNk/7mE2r3yH4C0OPXhNiX+fI4uSdfBqEME2ZA gCBqC/fvmE4zPrFfhpBLh233m4M7eJjO3DsblIpJBXqGUPDDZIj7I1VNn j2XK6PR7IVrVr7gsGv+lMOhNegCdtYKJC9GLjaxrSadfPKluYDnblKNQu h2q/BpzWMZ0+krFCEzGZElaScMhyMY6HXDFY1vd6MGPF98G8nm/l4qw0w uuRGwPlUNipjN4dw0Sg6N7ch6bnmHMCXo9ah/GRMv7RpYG5xmlDNGuNjq 1z35STGFLmCs1jmJcMFm8rowf/fXp+a9xooumir+FuwLoXN8K8LYEyPGm Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10460"; a="297593657" X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="297593657" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2022 18:43:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="643617965" Received: from wp1 (HELO WP1.localdomain) ([10.240.108.100]) by orsmga008.jf.intel.com with ESMTP; 04 Sep 2022 18:42:44 -0700 From: Steven Zou To: dev@dpdk.org Cc: qi.z.zhang@intel.com, guang3.yang@intel.com, Steven Zou Subject: [PATCH] common/iavf: do not copy desc/buff in async mode Date: Mon, 5 Sep 2022 09:42:06 +0800 Message-Id: <20220905014206.14872-1-steven.zou@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org If cmd_details are defined or async flag is set, don't copy the desc/buff back to temp. Signed-off-by: Steven Zou Acked-by: Qi Zhang --- 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)