From patchwork Wed Jun 21 07:51:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 128880 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 0F2CD42D10; Wed, 21 Jun 2023 09:48:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F336441151; Wed, 21 Jun 2023 09:48:07 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id E5A7E4113F for ; Wed, 21 Jun 2023 09:48:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687333686; x=1718869686; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=g9GuiuZR70jzlCNYiDgzIAtv6fxsH6mIo0xnHnt9xE0=; b=XTtEXP0/mTO/NZD70dy2W60A2fpUA7JOWJR13V90Klto4cEYS0+Ymn1T q2MXXCRHVS1CWADPmpgM8VFKXhHUkQ2EFcYRDWVdaFR78+ywKDCUTaTHl KklG0Gk6ZuiV22A2eMSbtL54H6IxUGJYibRSZhg28l57T6J+SMSfopc4c 0d/m9D89YcRUxCEPgHbYG3GJo+3AhX0LRyyqHhN89IQaU4Ji+zdLl6OzI VNF2gtQwpKP6/8NbvCGGw+gw9S8OZLx/3eZ698Ksk+EN5vaqgSgm/nYUP N89v6fjNGQlL+QXjCTSaBV2uBN0PgwpprtxA+0BoG2320o3AuUqUDu0oM w==; X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="389538116" X-IronPort-AV: E=Sophos;i="6.00,259,1681196400"; d="scan'208";a="389538116" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 00:45:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10747"; a="888556292" X-IronPort-AV: E=Sophos;i="6.00,259,1681196400"; d="scan'208";a="888556292" Received: from unknown (HELO zhichao-dpdk..) ([10.239.252.103]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 00:45:34 -0700 From: Zhichao Zeng To: dev@dpdk.org Cc: qi.z.zhang@intel.com, songx.jiale@intel.com, Zhichao Zeng , Jingjing Wu , Beilei Xing Subject: [PATCH] net/iavf: fix duplicate reset done check with large VF Date: Wed, 21 Jun 2023 15:51:55 +0800 Message-Id: <20230621075156.2997087-1-zhichaox.zeng@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 This patch fixes duplicate VF reset done check in dev_reset with large VF, which cause some errors when starting testpmd with large VF. Fixes: 7a93cd3575eb ("net/iavf: add VF reset check") Signed-off-by: Zhichao Zeng --- drivers/net/iavf/iavf_ethdev.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 00b963128b..d32f4f826f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2859,15 +2859,17 @@ iavf_dev_reset(struct rte_eth_dev *dev) int ret; struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private); - /* - * Check whether the VF reset has been done and inform application, - * to avoid calling the virtual channel command, which may cause - * the device to be abnormal. - */ - ret = iavf_check_vf_reset_done(hw); - if (ret) { - PMD_DRV_LOG(ERR, "Wait too long for reset done!\n"); - return ret; + if (dev->data->nb_rx_queues <= IAVF_MAX_NUM_QUEUES_DFLT) { + /* + * Check whether the VF reset has been done and inform application, + * to avoid calling the virtual channel command, which may cause + * the device to be abnormal. + */ + ret = iavf_check_vf_reset_done(hw); + if (ret) { + PMD_DRV_LOG(ERR, "Wait too long for reset done!\n"); + return ret; + } } PMD_DRV_LOG(DEBUG, "Start dev_reset ...\n");