[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2502f12c-54ad-4c47-b9ef-6e5985903c1e@lunn.ch>
Date: Mon, 28 Oct 2024 13:56:37 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Moon Yeounsu <yyyynoom@...il.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: dlink: add get_ethtool_stats in ethtool
On Sun, Oct 27, 2024 at 04:26:53AM +0900, Moon Yeounsu wrote:
> This patch implement `get_ethtool_stats` to support `ethtool -S`.
>
> Before applying the patch:
> $ ethtool -S enp36s0
> > no stats available
>
> After applying the patch:
> $ ethtool -S enp36s0
> > NIC statistics:
> tx_jumbo_frames: 0
> rx_jumbo_frames: 0
> tcp_checksum_errors: 0
> udp_checksum_errors: 0
> ip_checksum_errors: 0
> tx_packets: 0
> rx_packets: 74
> tx_bytes: 0
> rx_bytes: 14212
> single_collisions: 0
> multi_collisions: 0
> late_collisions: 0
> rx_frames_too_long_errors: 0
> rx_in_range_length_errors: 776
> rx_frames_check_seq_errors: 0
> rx_frames_lost_errors: 0
> tx_frames_abort: 0
> tx_carrier_sense_errors: 0
> tx_multicast_bytes: 0
> rx_multicast_bytes: 360
> tx_multicast_frames: 0
> rx_multicast_frames: 6
> tx_broadcast_frames: 0
> rx_broadcast_frames: 68
> tx_mac_control_frames: 0
> rx_mac_control_frames: 0
> tx_frames_deferred: 0
> tx_frames_excessive_deferral: 0
>
> Tested-on: D-Link DGE-550T Rev-A3
> Signed-off-by: Moon Yeounsu <yyyynoom@...il.com>
> ---
> drivers/net/ethernet/dlink/dl2k.c | 229 ++++++++++++++++++------------
We can see there is a lot of code being deleted here, yet you are
adding support for stats. It would be good to explain in the commit
message what is really happening here.
> + DEFINE_STATS(rmon_collisions, EtherStatsCollisions, u32),
> + DEFINE_STATS(rmon_crc_align_errors, EtherStatsCRCAlignErrors, u32),
> + DEFINE_STATS(rmon_under_size_packets, EtherStatsUndersizePkts, u32),
> + DEFINE_STATS(rmon_fragments, EtherStatsFragments, u32),
> + DEFINE_STATS(rmon_jabbers, EtherStatsJabbers, u32),
Please report the standard RMON statistics via ethtool_rmon_stats. The
unstructured ethtool -S without groups should be used for statistics
which do not fit any of the well defined groups.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists