From patchwork Thu Nov 2 01:50:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 133746 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 987D143267; Thu, 2 Nov 2023 02:42:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3850142DE9; Thu, 2 Nov 2023 02:42:24 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 606E940282; Thu, 2 Nov 2023 02:42:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698889342; x=1730425342; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mlLkiLoDwyUhC/g29DecD/ewvffWXPovVac1ZdQ4NnU=; b=bzzbFDLpoDOFxJxNihPvyiA3hF/NJT72fDyOVuB2mVIMa458XBtPkal3 2pm7Hp0HAplpF8v3+J88dxSdiQCuwOqFvzoVnCNJfJGnBHQu45+VuLLCf eRPDxUMBVcpL4Ynnr+PtzD6pTxa2Z732jsAuTZzYC3L0sU1TcVwsFoCxo PvwEFgod4tUcTAwsiDp11BIOssaWHus0sGGdiPjkwb8quV3duNKgW2wtz RptdxvDx6dxwFyfq/Z9O71HshISmK3/oBA9uoSMdXNi2VHcxGINNafkc8 dLloaY5kz8iK8VtCGpihHLPy16ZnncNb5s2VqSey82EzXWCOJae3O2lG+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10881"; a="419729384" X-IronPort-AV: E=Sophos;i="6.03,270,1694761200"; d="scan'208";a="419729384" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2023 18:42:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10881"; a="764755210" X-IronPort-AV: E=Sophos;i="6.03,270,1694761200"; d="scan'208";a="764755210" Received: from unknown (HELO zhichao-dpdk..) ([10.239.252.103]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2023 18:42:18 -0700 From: Zhichao Zeng To: dev@dpdk.org Cc: stable@dpdk.org, tingtingx.liao@intel.com, Zhichao Zeng , Qiming Yang , Qi Zhang , Haiyue Wang Subject: [PATCH v2] net/ice: fix DCF port statistics not cleared Date: Thu, 2 Nov 2023 09:50:47 +0800 Message-Id: <20231102015047.1633325-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231031070426.843086-1-zhichaox.zeng@intel.com> References: <20231031070426.843086-1-zhichaox.zeng@intel.com> 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 Call 'ice_dcf_stats_reset' during the initialization of the DCF port in order to clear any statistics that may exist from the last use of the DCF and to avoid statistics errors. Fixes: 7564d5509611 ("net/ice: add DCF hardware initialization") Cc: stable@dpdk.org Signed-off-by: Zhichao Zeng Acked-by: Qi Zhang --- v2: modify git log --- drivers/net/ice/ice_dcf_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index 065ec728c2..29699c2c32 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -1937,6 +1937,8 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev) return -1; } + ice_dcf_stats_reset(eth_dev); + dcf_config_promisc(adapter, false, false); return 0; }