From: Jakub Kicinski <kuba@kernel.org>
To: Zak Kemble <zakkemble@gmail.com>
Cc: Doug Berger <opendmb@gmail.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] net: bcmgenet: switch to use 64bit statistics
Date: Fri, 16 May 2025 17:52:31 -0700 [thread overview]
Message-ID: <20250516175231.4049a53d@kernel.org> (raw)
In-Reply-To: <20250515145142.1415-2-zakkemble@gmail.com>
On Thu, 15 May 2025 15:51:40 +0100 Zak Kemble wrote:
> @@ -2315,7 +2358,7 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
> if (unlikely(!(dma_flag & DMA_EOP) || !(dma_flag & DMA_SOP))) {
> netif_err(priv, rx_status, dev,
> "dropping fragmented packet!\n");
> - ring->errors++;
> + BCMGENET_STATS64_INC(stats, fragmented_errors);
Please refrain from adding new counters in the conversion patch.
> dev_kfree_skb_any(skb);
> goto next;
> }
> @@ -3402,6 +3455,7 @@ static void bcmgenet_dump_tx_queue(struct bcmgenet_tx_ring *ring)
> static void bcmgenet_timeout(struct net_device *dev, unsigned int txqueue)
> {
> struct bcmgenet_priv *priv = netdev_priv(dev);
> + struct bcmgenet_tx_stats64 *stats = &priv->tx_rings[txqueue].stats64;
> u32 int1_enable = 0;
> unsigned int q;
Please maintain the coding style of declaring variables from longest
line to shortest. If there are dependencies the init should happen
in the body of the function.
> -static struct net_device_stats *bcmgenet_get_stats(struct net_device *dev)
> +static void bcmgenet_get_stats64(struct net_device *dev,
> + struct rtnl_link_stats64 *stats)
the indent is way off here, in general please try to fit in 80chars
unless the readability suffers.
--
pw-bot: cr
next prev parent reply other threads:[~2025-05-17 0:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 14:51 [PATCH v2 0/3] net: bcmgenet: 64bit stats and expose more stats in ethtool Zak Kemble
2025-05-15 14:51 ` [PATCH v2 1/3] net: bcmgenet: switch to use 64bit statistics Zak Kemble
2025-05-17 0:52 ` Jakub Kicinski [this message]
2025-05-19 11:37 ` Zak Kemble
2025-05-15 14:51 ` [PATCH v2 2/3] net: bcmgenet: count hw discarded packets in missed stat Zak Kemble
2025-05-15 14:51 ` [PATCH v2 3/3] net: bcmgenet: expose more stats in ethtool Zak Kemble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250516175231.4049a53d@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=zakkemble@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox