From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFA9741EAC; Thu, 16 Mar 2023 08:10:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68DF640FDF; Thu, 16 Mar 2023 08:10:00 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id E06A140EF1; Thu, 16 Mar 2023 08:09:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678950598; x=1710486598; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=l2+AfN/YBK4UyNo6Yx5ApYDRP1/FPctavk128/ud8lk=; b=T9ARuEM5pbxjkAen+07GyVbYWjG0tFQEWpJf1MIrx5F16kdztwhdxZMx 9WXbxJdPnutnUOLBSEW9zNf6MOZ7GtRwKeMVfJL2bf2+mWDZTvGteblE4 7YN4kuY/zfX9xVt+kJVogZvxAhrxCTfXdV18pkbJJ/GrBCseIfwQXdp9h hZk5DO2j0AF4vT29nxPhCsjF1cG3d52kI6BxOY2jIfTL+pfSoChnqP+DQ fGuyzBF3dNtU6qo6JCOibBwyRYSX2AOE21IbVkKwWP2Ar9teeZ6sp3u/2 gSzNEHGHcIGqb1BPDHFY2zNQrCafApovKL+Df5ZCfKx9AUgceNB+wMhMg g==; X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="402781459" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="402781459" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2023 00:09:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="709975256" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="709975256" Received: from unknown (HELO localhost.localdomain) ([10.239.252.103]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2023 00:09:54 -0700 From: Zhichao Zeng To: dev@dpdk.org Cc: stable@dpdk.org, yidingx.zhou@intel.com, qi.z.zhang@intel.com, Zhichao Zeng , Jingjing Wu , Beilei Xing Subject: [PATCH] net/iavf: fix dev stop return value Date: Thu, 16 Mar 2023 15:14:49 +0800 Message-Id: <20230316071449.532296-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The rte_eth_dev_stop will return wrong value as error will return from iavf PMD during device reset. This patch is a around to fix it by return 0 in dev_stop during device reset. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Cc: stable@dpdk.org Signed-off-by: Zhichao Zeng --- drivers/net/iavf/iavf_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 3196210f2c..f6d68403ce 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1065,6 +1065,9 @@ iavf_dev_stop(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); + if (vf->vf_reset) + return 0; + if (adapter->closed) return -1; -- 2.25.1