public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Vince Bridgers <vbridgers2013@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"pawel.moll@arm.com" <pawel.moll@arm.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>, Rob Landley <rob@landley.net>
Subject: Re: [PATCH net-next v3 5/9] Altera TSE: Add Miscellaneous Files for Altera Ethernet Driver
Date: Wed, 12 Mar 2014 15:26:37 -0700	[thread overview]
Message-ID: <1394663197.3915.61.camel@joe-AO722> (raw)
In-Reply-To: <1394658856.20857.7.camel@deadeye.wl.decadent.org.uk>

On Wed, 2014-03-12 at 21:14 +0000, Ben Hutchings wrote:
> These look like the statistic names specified in IEEE 802.3.  I would
> support a general move to using standard names for MAC stats in Ethernet
> drivers, because they are quite clearly defined and widely implemented
> in hardware.  However, that is not the current practice in most Linux
> drivers.

Hey Ben.

Maybe something like this would be a start?

Change the actual #defines/strings to taste.

Maybe this shouldn't be in uapi or maybe in if_ether.h

---
 include/uapi/linux/ethtool.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index fd161e9..24b8b51 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -498,6 +498,36 @@ struct ethtool_pauseparam {
 
 #define ETH_GSTRING_LEN		32
 
+#define ETH_GSTRING_RX_PKTS		"rx_packets"
+#define ETH_GSTRING_RX_BYTES		"rx_bytes"
+#define ETH_GSTRING_RX_TOTAL_BYTES	"rx_total_bytes"
+#define ETH_GSTRING_RX_TOTAL_PKTS	"rx_total_packets"
+#define ETH_GSTRING_RX_CRC_ERRS		"rx_crc_errors"
+#define ETH_GSTRING_RX_ALIGN_ERRS	"rx_align_errors"
+#define ETH_GSTRING_RX_PAUSE		"rx_pause"
+#define ETH_GSTRING_RX_ERRS		"rx_errors"
+#define ETH_GSTRING_RX_UNICAST		"rx_unicast"
+#define ETH_GSTRING_RX_MULTICAST	"rx_multicast"
+#define ETH_GSTRING_RX_BROADCAST	"rx_broadcast"
+#define ETH_GSTRING_RX_FIFO_DROPS	"rx_fifo_drops"
+#define ETH_GSTRING_RX_UNDERSIZE	"rx_undersize"
+#define ETH_GSTRING_RX_OVERSIZE		"rx_oversize"
+#define ETH_GSTRING_RX_DUPLICATES	"rx_duplicates"
+#define ETH_GSTRING_RX_DROPPED		"rx_dropped"
+#define ETH_GSTRING_RX_FRAGMENTS	"rx_fragments"
+
+#define ETH_GSTRING_TX_PKTS		"tx_packets"
+#define ETH_GSTRING_TX_BYTES		"tx_bytes"
+#define ETH_GSTRING_TX_TOTAL_BYTES	"tx_total_bytes"
+#define ETH_GSTRING_TX_TOTAL_PKTS	"tx_total_packets"
+#define ETH_GSTRING_TX_PAUSE		"tx_pause"
+#define ETH_GSTRING_TX_ERRS		"tx_errors"
+#define ETH_GSTRING_TX_DISCARDS		"tx_discards"
+#define ETH_GSTRING_TX_UNICAST		"tx_unicast"
+#define ETH_GSTRING_TX_MULTICAST	"tx_multicast"
+#define ETH_GSTRING_TX_BROADCAST	"tx_broadcast"
+#define ETH_GSTRING_TX_DROPPED		"tx_dropped"
+
 /**
  * enum ethtool_stringset - string set ID
  * @ETH_SS_TEST: Self-test result names, for use with %ETHTOOL_TEST

  parent reply	other threads:[~2014-03-12 22:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 22:43 [PATCH net-next v3 0/9] Altera Triple Speed Ethernet (TSE) Driver Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 2/9] Documentation: networking: Add Altera Ethernet (TSE) Documentation Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 3/9] Altera TSE: Add Altera Ethernet Driver MSGDMA File Components Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 4/9] Altera TSE: Add Altera Ethernet Driver SGDMA file components Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 5/9] Altera TSE: Add Miscellaneous Files for Altera Ethernet Driver Vince Bridgers
2014-03-11 22:59   ` Joe Perches
2014-03-12  0:28     ` Vince Bridgers
2014-03-12 21:14       ` Ben Hutchings
2014-03-12 21:27         ` Joe Perches
2014-03-12 22:26         ` Joe Perches [this message]
2014-03-13  0:28           ` Ben Hutchings
2014-03-13  0:42             ` Vince Bridgers
     [not found]               ` <CAOwfj2M6p55s6exrW1y55tddzHd1PvBOW6RpWfFK2hTjmYi=hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-13  3:46                 ` Joe Perches
2014-03-11 22:43 ` [PATCH net-next v3 6/9] Altera TSE: Add main and header file " Vince Bridgers
2014-03-12  0:45   ` Joe Perches
2014-03-12 15:25     ` Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 7/9] Altera TSE: Add Altera Ethernet Driver Makefile and Kconfig Vince Bridgers
     [not found] ` <1394577791-6547-1-git-send-email-vbridgers2013-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-11 22:43   ` [PATCH net-next v3 1/9] dts: Add bindings for the Altera Triple Speed Ethernet driver Vince Bridgers
2014-03-11 22:43   ` [PATCH net-next v3 8/9] MAINTAINERS: Add entry for Altera Triple Speed Ethernet Driver Vince Bridgers
2014-03-11 22:43 ` [PATCH net-next v3 9/9] net: ethernet: Change Ethernet Makefile and Kconfig for Altera TSE driver Vince Bridgers

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=1394663197.3915.61.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=ben@decadent.org.uk \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-doc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=vbridgers2013@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