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 6EEEF42530 for ; Thu, 7 Sep 2023 04:30:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76556402C6; Thu, 7 Sep 2023 04:30:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 5FA514029D; Thu, 7 Sep 2023 04:30:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694053825; x=1725589825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qlZquVO4aQO5+0JrH/rfwhl+lAab3qkN8PzVlVmGdO8=; b=Zc2ybJy3WDETttFG4Uz1en3ssVXlnNa/jmkd/KdhX+2+/r7+xJh9PSu1 iD1Ys4NpjVe6YudV2SJt6HstIijCZISGwmep17B1lXaf2RGsXrzbYd6Dg jo6VMAlsRT3bHDtwE+DnAQ5lyhdtqEqe6idWBoXTorcqO2Ub7z5TsAUti x5l0dHoYIpUAEv91pLfjlBcsBrEqk04+fycdOiufkwhs+JsLed2hl+HJn Tr7989pVEbthnJjTmeVs3vGyhSxPeP5dIzMN2OsEmrFNVcol299XRwpBz XDt3slg6Ad0CFTqcXV7Dw8TPeBTGNekRUr6UGehufGowxh6wZgnJD+3Dm A==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="443627695" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="443627695" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 19:30:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="776875788" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="776875788" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 19:30:22 -0700 From: Yiding Zhou To: dev@dpdk.org Cc: Yiding Zhou , stable@dpdk.org, Kuan Xu Subject: [PATCH v2] net/iavf: fix port stats not cleared Date: Thu, 7 Sep 2023 10:39:42 +0800 Message-Id: <20230907023942.3150495-1-yidingx.zhou@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230830065451.2976544-1-yidingx.zhou@intel.com> References: <20230830065451.2976544-1-yidingx.zhou@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org After VF reset, kernel driver may reuse the orignal VSI without reset its stats. Call 'iavf_dev_stats_reset' during the initialization of the VF in order to clear any statistics that may exist from the last use of the VF and to avoid statistics errors. Fixes: 22b123a36d07 ("net/avf: initialize PMD") Cc: stable@dpdk.org Signed-off-by: Kuan Xu Signed-off-by: Yiding Zhou --- drivers/net/iavf/iavf_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index f2fc5a5621..24c6342dee 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2721,6 +2721,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev) iavf_default_rss_disable(adapter); + iavf_dev_stats_reset(eth_dev); /* Start device watchdog */ iavf_dev_watchdog_enable(adapter); -- 2.34.1