Thread (28 messages) 28 messages, 2 authors, 2019-07-01

Re: [PATCH v2 net-next 16/19] ionic: Add driver stats

From: Shannon Nelson <hidden>
Date: 2019-07-01 18:06:43

On 6/29/19 11:53 AM, Jakub Kicinski wrote:
On Fri, 28 Jun 2019 14:39:31 -0700, Shannon Nelson wrote:
quoted
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 <redacted>
quoted
+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.
quoted
+
+#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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help