From patchwork Thu Jun 17 09:49:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esben Haabendal X-Patchwork-Id: 12327197 X-Patchwork-Delegate: kuba@kernel.org 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 7F1F6C2B9F4 for ; Thu, 17 Jun 2021 09:49:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66B32613CE for ; Thu, 17 Jun 2021 09:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbhFQJvb (ORCPT ); Thu, 17 Jun 2021 05:51:31 -0400 Received: from first.geanix.com ([116.203.34.67]:41912 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231847AbhFQJv1 (ORCPT ); Thu, 17 Jun 2021 05:51:27 -0400 Received: from localhost (unknown [185.17.218.86]) by first.geanix.com (Postfix) with ESMTPSA id 648C64C3292; Thu, 17 Jun 2021 09:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1623923358; bh=aDM42wVtbFCJQul8ZRo2dGnWDMYAECSz7+N9SXJwEfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lPIb+TbAyDUb9X+kTt6qJiqah6OFv1RQPCh2F5hIfntOwc47MbXRhhCAUoT5vVdyB tiW2uMcB8lK544FeQpw1P+gLlQhlYMDoOO7sVCWwdaBL2zUqAnbdhFxoyhQHTrwwEp pZLEiVDhYmPQMtOqbyI1XU1wDHEJ7f+RY0/KFic5OK4BvNjhfjKMXg4NfCKGPvXYLx UfYcca/AfLRc/pm9cHjgn2c2rK+Byo5/G4bEI9hiEdgXtXCkVqWQnA7XqS/4eWTICn dByDs3dH8bUWo6ocK8MrF2Imj92TIYy+6vOzxaOnNEqbZLVAUFqCnxc9ujjbCiOORQ yj5hG63N7j73A== From: Esben Haabendal To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , Claudiu Manoil , "David S. Miller" , Jakub Kicinski Subject: [PATCH 2/6] net: gianfar: Extend statistics counters to 64-bit Date: Thu, 17 Jun 2021 11:49:17 +0200 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org No reason to wrap counter values at 2^32. Especially the bytes counters can wrap pretty fast on Gbit networks. Signed-off-by: Esben Haabendal --- drivers/net/ethernet/freescale/gianfar.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h index 5ea47df93e5e..d8ae5353e881 100644 --- a/drivers/net/ethernet/freescale/gianfar.h +++ b/drivers/net/ethernet/freescale/gianfar.h @@ -913,8 +913,8 @@ enum { * Per TX queue stats */ struct tx_q_stats { - unsigned long tx_packets; - unsigned long tx_bytes; + u64 tx_packets; + u64 tx_bytes; }; /** @@ -963,9 +963,9 @@ struct gfar_priv_tx_q { * Per RX queue stats */ struct rx_q_stats { - unsigned long rx_packets; - unsigned long rx_bytes; - unsigned long rx_dropped; + u64 rx_packets; + u64 rx_bytes; + u64 rx_dropped; }; struct gfar_rx_buff {