From patchwork Tue Oct 31 07:04:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 133637 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 EDCE84324D; Tue, 31 Oct 2023 07:56:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B85204027F; Tue, 31 Oct 2023 07:56:03 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9ED7E400EF; Tue, 31 Oct 2023 07:56:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698735362; x=1730271362; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0viGzSr1nCsAEj/oUHrLHTfNw///uFX5Xvt5H8IWztk=; b=GhjkXJ4BrSKBrv58zWzRgz3lPzEdJLo0OvuwvToS6WUKDnhIuUCiNdQw BaQaXX+4mtBKY8RQUlKOf2Shrp6sLvwwVXxmF0knWuVtxSO2wrpNguTvk 7bGfWzVAyRXo7eRA01T/MwRKE2yMWbs/okw1gNu5NE28dcJ+NkobjDdAM z3KZhcxHjlYpVg0a7CrFjbiQOcGSeSSA9v0kX/PM4ljypUHR96KZxUCAS HIE+9+cXZ4q6Bqg35pjx77W2ZlNKyvHrDCfwq2jFm2Cyww4yNCd8aT8Fc eL1NlhHRIOb6lBTJ4Ye+PoRhAxita8vAdv7d0GI3ijt1elVVUxfMQtaJE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="387108058" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="387108058" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 23:56:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="884110737" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="884110737" Received: from unknown (HELO zhichao-dpdk..) ([10.239.252.103]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 23:55:57 -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] net/ice: fix DCF port statistics not cleared Date: Tue, 31 Oct 2023 15:04:26 +0800 Message-Id: <20231031070426.843086-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 As the kernel driver does not reset the statistics after exiting testpmd, the previous statistics being retained the next time testpmd is started. Call 'ice_dcf_stats_reset' during the initialization of the DCF 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 --- 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; }