aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/sunvnet_common.h
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@oracle.com>2017-03-14 10:24:40 -0700
committerDavid S. Miller <davem@davemloft.net>2017-03-16 20:29:54 -0700
commit0f512c84544b9a8f8de53b6f4bc0c372c45d8693 (patch)
tree848642bf531b53e4700e226796c091468dcd7f50 /drivers/net/ethernet/sun/sunvnet_common.h
parentldmvsw: better use of link up and down on ldom vswitch (diff)
downloadlinux-dev-0f512c84544b9a8f8de53b6f4bc0c372c45d8693.tar.xz
linux-dev-0f512c84544b9a8f8de53b6f4bc0c372c45d8693.zip
sunvnet: add stats to track ldom to ldom packets and bytes
In this driver, there is a "port" created for the connection to each of the other ldoms; a netdev queue is mapped to each port, and they are collected under a single netdev. The generic netdev statistics show us all the traffic in and out of our network device, but don't show individual queue/port stats. This patch breaks out the traffic counts for the individual ports and gives us a little view into the state of those connections. Orabug: 25190537 Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet_common.h')
-rw-r--r--drivers/net/ethernet/sun/sunvnet_common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet_common.h b/drivers/net/ethernet/sun/sunvnet_common.h
index b21ef4704bd1..c0fac03cb87a 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.h
+++ b/drivers/net/ethernet/sun/sunvnet_common.h
@@ -35,6 +35,19 @@ struct vnet_tx_entry {
struct vnet;
+struct vnet_port_stats {
+ /* keep them all the same size */
+ u32 rx_bytes;
+ u32 tx_bytes;
+ u32 rx_packets;
+ u32 tx_packets;
+ u32 event_up;
+ u32 event_reset;
+ u32 q_placeholder;
+};
+
+#define NUM_VNET_PORT_STATS (sizeof(struct vnet_port_stats) / sizeof(u32))
+
/* Structure to describe a vnet-port or vsw-port in the MD.
* If the vsw bit is set, this structure represents a vswitch
* port, and the net_device can be found from ->dev. If the
@@ -44,6 +57,8 @@ struct vnet;
struct vnet_port {
struct vio_driver_state vio;
+ struct vnet_port_stats stats;
+
struct hlist_node hash;
u8 raddr[ETH_ALEN];
unsigned switch_port:1;