From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 722AAC5B578 for ; Mon, 1 Jul 2019 05:47:21 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 0409920B7C for ; Mon, 1 Jul 2019 05:47:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="qqhTdLfI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0409920B7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA01A1B952; Mon, 1 Jul 2019 07:47:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 49C275680 for ; Mon, 1 Jul 2019 07:47:05 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x615jY08026572 for ; Sun, 30 Jun 2019 22:47:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=W/shgTZ2X9HnsPVp6w3dv0SjAFcogOmiYEGYDvevY9o=; b=qqhTdLfI+UoZ1vdUFx3T7o2NRTQONDewXA+4dPCpRLLgjYHl07EhuC52g+uMLa/1fmXK CFJl12+Df5uFFzcNgJ7am6sz1dCaUQph77BRlXY/wBqprf01eefdIxyTjXFvFTmVVYHy /OurMq4yjgJ/iLTv/9DxRTMJqLjmGBKU+0qWoIDS4FULTCziRB/hFBAjI0A6t4NpCN39 hR3jdoD+99ePd8zbZp2nwoXVOGpHJdZYNB+wHB8g0A5m8Empvazg9wHri5p0gNmtlPzq fY5zk51NPWv5z1zq5xhRqvFm2dat1rBOLVMtKVuhBRubPC/cFGFG/hJViIrBFWeVTC3r yA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2te5bn656s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 30 Jun 2019 22:47:04 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 30 Jun 2019 22:47:03 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 30 Jun 2019 22:47:03 -0700 Received: from pt-lxl0023.marvell.com (pt-lxl0023.marvell.com [10.5.213.12]) by maili.marvell.com (Postfix) with ESMTP id 78A1D3F704A; Sun, 30 Jun 2019 22:47:02 -0700 (PDT) From: To: CC: , Yuri Chipchev Date: Mon, 1 Jul 2019 11:00:23 +0300 Message-ID: <1561968024-16133-3-git-send-email-lironh@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561968024-16133-1-git-send-email-lironh@marvell.com> References: <1560434305-9359-1-git-send-email-lironh@marvell.com> <1561968024-16133-1-git-send-email-lironh@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-01_04:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 2/3] net/mvneta: reset stats during device initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yuri Chipchev reset device statistics on device initialization Signed-off-by: Yuri Chipchev Reviewed-by: Liron Himi Tested-by: Yuri Chipchev --- drivers/net/mvneta/mvneta_ethdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c index d6e64a8..f324d93 100644 --- a/drivers/net/mvneta/mvneta_ethdev.c +++ b/drivers/net/mvneta/mvneta_ethdev.c @@ -57,6 +57,8 @@ struct mvneta_ifnames { static int mvneta_dev_num; +static void mvneta_stats_reset(struct rte_eth_dev *dev); + /** * Deinitialize packet processor. */ @@ -359,6 +361,8 @@ mvneta_dev_start(struct rte_eth_dev *dev) } priv->ppio_id = priv->ppio->port_id; + mvneta_stats_reset(dev); + /* * In case there are some some stale uc/mc mac addresses flush them * here. It cannot be done during mvneta_dev_close() as port information -- 2.7.4