From: Jakub Kicinski <kuba@kernel.org>
To: Moon Yeounsu <yyyynoom@gmail.com>
Cc: 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 net-next v5] net: dlink: add support for reporting stats via `ethtool -S` and `ip -s -s link show`
Date: Tue, 10 Dec 2024 19:15:19 -0800 [thread overview]
Message-ID: <20241210191519.67a91a50@kernel.org> (raw)
In-Reply-To: <20241209092828.56082-2-yyyynoom@gmail.com>
On Mon, 9 Dec 2024 18:28:27 +0900 Moon Yeounsu wrote:
> + unsigned long flags;
> +
> + spin_lock_irqsave(&np->stats_lock, flags);
I believe spin_lock_bh() is sufficient here, no need to save IRQ flags.
> + u64 collisions = np->single_collisions + np->multi_collisions;
> + u64 tx_frames_abort = np->tx_frames_abort;
> + u64 tx_carrier_errors = np->tx_carrier_sense_errors;
Please don't mix code and variable declarations.
--
pw-bot: cr
next prev parent reply other threads:[~2024-12-11 3:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 9:28 [PATCH net-next v5] net: dlink: add support for reporting stats via `ethtool -S` and `ip -s -s link show` Moon Yeounsu
2024-12-11 3:15 ` Jakub Kicinski [this message]
2025-03-31 16:40 ` Moon Yeounsu
2025-03-31 21:25 ` Jakub Kicinski
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=20241210191519.67a91a50@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yyyynoom@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.