netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v4] net: dlink: add support for reporting stats via `ethtool -S`
Date: Fri, 15 Nov 2024 16:48:52 -0800	[thread overview]
Message-ID: <20241115164852.0d46d6de@kernel.org> (raw)
In-Reply-To: <20241114151949.233170-2-yyyynoom@gmail.com>

On Fri, 15 Nov 2024 00:19:48 +0900 Moon Yeounsu wrote:
> -	dev->stats.rx_packets += dr32(FramesRcvOk);
> -	dev->stats.tx_packets += dr32(FramesXmtOk);
> -	dev->stats.rx_bytes += dr32(OctetRcvOk);
> -	dev->stats.tx_bytes += dr32(OctetXmtOk);
> -
> -	dev->stats.multicast = dr32(McstFramesRcvdOk);
> -	dev->stats.collisions += dr32(SingleColFrames)
> -			     +  dr32(MultiColFrames);
> -
> -	/* detailed tx errors */
> -	stat_reg = dr16(FramesAbortXSColls);
> -	dev->stats.tx_aborted_errors += stat_reg;
> -	dev->stats.tx_errors += stat_reg;
> -
> -	stat_reg = dr16(CarrierSenseErrors);
> -	dev->stats.tx_carrier_errors += stat_reg;
> -	dev->stats.tx_errors += stat_reg;

Maybe I'm lost in the macros again, but I dont see where you are
updating dev->stats now. 

Do basic stats still work?

ip -s -s link show
-- 
pw-bot: cr


      reply	other threads:[~2024-11-16  0:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 15:19 [PATCH net-next v4] net: dlink: add support for reporting stats via `ethtool -S` Moon Yeounsu
2024-11-16  0:48 ` Jakub Kicinski [this message]

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=20241115164852.0d46d6de@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).