On 6/29/19 11:53 AM, Jakub Kicinski wrote:
On Fri, 28 Jun 2019 14:39:31 -0700, Shannon Nelson wrote:
Add in the detailed statistics for ethtool -S that the driver
keeps as it processes packets. Display of the additional
debug statistics can be enabled through the ethtool priv-flags
feature.
Signed-off-by: Shannon Nelson <snel...@pensando.io>
+static void ionic_get_strings(struct net_device *netdev,
+ u32 sset, u8 *buf)
+{
+ struct lif *lif = netdev_priv(netdev);
+
+ switch (sset) {
+ case ETH_SS_STATS:
+ ionic_get_stats_strings(lif, buf);
+ break;
+ case ETH_SS_PRIV_FLAGS:
+ memcpy(buf, ionic_priv_flags_strings,
+ PRIV_FLAGS_COUNT * ETH_GSTRING_LEN);
+ break;
+ case ETH_SS_TEST:
+ // IONIC_TODO
+ default:
+ netdev_err(netdev, "Invalid sset %d\n", sset);
Not really an error, as long as sset_count() returns a 0 nothing will
happen. Also you can drop the SS_TEST if you don't report it.
Sure.
+
+#endif // _IONIC_STATS_H_
Perhaps worth grepping the driver for C++ style comments?
Those nasty little things sneak in there when you're not looking, and
you try to get rid of them all, and there always seems to be one more
:-). Yes, I'll look again.
sln