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 C27A541FCB for ; Wed, 30 Aug 2023 08:45:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E3874027D; Wed, 30 Aug 2023 08:45:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8BED140277; Wed, 30 Aug 2023 08:45:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693377928; x=1724913928; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YuP1XI99qr2vCp6YoVjSQTmKnj3XpRmGa3ycc3gf9V0=; b=YfxjWHkyVM3uNatboInTS8NJu65r3VlTd5Lmx2pUyjr3Emka48oNUa56 P9xnVErbNVvHx/132Tf8m8jxD2Bqt2K92WNX04FI1nvDMzJHKgR1lRoU/ 4glG5wROSsTUdDfhc/KH+tXlq407/zh38nEhogsUcCVZ7ZfGZTYlqe3Qu quWHLiLfHfhIB6vLrMchUzE19ooAtict8aKcKXMOmnLbQiF6W53qshSXO 2ZIr6sWMijkwksYewp5fQWHc8+awaPs/2n7byFJCdJc9ApjsDeVvl6vl5 qQPTn3S8KZjjtKlUErgW7wi+8LktkN59+O0QBtvxG2cgPDvvWaybNhIiy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="378278585" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="378278585" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2023 23:45:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="853615289" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="853615289" Received: from unknown (HELO dpdkserver..) ([10.239.252.174]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2023 23:45:26 -0700 From: Yiding Zhou To: dev@dpdk.org Cc: Yiding Zhou , stable@dpdk.org, Kuan Xu Subject: [PATCH] net/iavf: fix port stats not cleared Date: Wed, 30 Aug 2023 14:54:51 +0800 Message-Id: <20230830065451.2976544-1-yidingx.zhou@intel.com> X-Mailer: git-send-email 2.34.1 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 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