[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA+QEuQ+2gFNCqK_txG-Lsye5JmsoKUYHnsmOgK0LSoabc7yeQ@mail.gmail.com>
Date: Mon, 19 May 2025 12:37:54 +0100
From: Zak Kemble <zakkemble@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
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
Thanks, v3 is here
https://lore.kernel.org/all/20250519113257.1031-1-zakkemble@gmail.com/
On Sat, 17 May 2025 at 01:52, Jakub Kicinski <kuba@...nel.org> wrote:
>
> 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