[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240509204047.149e226e@kernel.org>
Date: Thu, 9 May 2024 20:40:47 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Justin Lai <justinlai0215@...ltek.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>, <andrew@...n.ch>,
<jiri@...nulli.us>, <horms@...nel.org>, <pkshih@...ltek.com>,
<larry.chiu@...ltek.com>
Subject: Re: [PATCH net-next v18 10/13] rtase: Implement ethtool function
On Wed, 8 May 2024 20:39:42 +0800 Justin Lai wrote:
> + data[0] = le64_to_cpu(counters->tx_packets);
> + data[1] = le64_to_cpu(counters->rx_packets);
> + data[2] = le64_to_cpu(counters->tx_errors);
> + data[3] = le32_to_cpu(counters->rx_errors);
> + data[4] = le16_to_cpu(counters->rx_missed);
> + data[5] = le16_to_cpu(counters->align_errors);
> + data[6] = le32_to_cpu(counters->tx_one_collision);
> + data[7] = le32_to_cpu(counters->tx_multi_collision);
> + data[8] = le64_to_cpu(counters->rx_unicast);
> + data[9] = le64_to_cpu(counters->rx_broadcast);
> + data[10] = le32_to_cpu(counters->rx_multicast);
> + data[11] = le16_to_cpu(counters->tx_aborted);
> + data[12] = le16_to_cpu(counters->tx_underun);
Please limit stats you report in ethtool -S to just the stats for which
proper interfaces don't exist. Don't duplicate what's already reported
via rtase_get_stats64(), also take a look at what can be reported via
various *_stats members of struct ethtool_ops.
Powered by blists - more mailing lists