[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250516175231.4049a53d@kernel.org>
Date: Fri, 16 May 2025 17:52:31 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Zak Kemble <zakkemble@...il.com>
Cc: Doug Berger <opendmb@...il.com>, Florian Fainelli
<florian.fainelli@...adcom.com>, Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, Andrew Lunn
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] net: bcmgenet: switch to use 64bit statistics
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
Powered by blists - more mailing lists