summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ibmvnic.h
diff options
context:
space:
mode:
authorJohn Allen <jallen@linux.vnet.ibm.com>2017-08-02 16:44:14 -0500
committerDavid S. Miller <davem@davemloft.net>2017-08-03 09:33:05 -0700
commit3d52b5949d0311c4b7bc4c223918fee0f5c0dc39 (patch)
treec74acc72e78820b451366d05c3b8890edb9d84a8 /drivers/net/ethernet/ibm/ibmvnic.h
parentd06c3583c2cf6c27a56ee05aa128a950e31b224a (diff)
ibmvnic: Implement per-queue statistics reporting
Add counters to report number of packets, bytes, and dropped packets for each transmit queue and number of packets, bytes, and interrupts for each receive queue. Modify ethtool callbacks to report the new statistics. Signed-off-by: John Allen <jallen@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmvnic.h')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
index 8eff6e15f4bb..d02257ccc377 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -166,6 +166,20 @@ struct ibmvnic_statistics {
u8 reserved[72];
} __packed __aligned(8);
+#define NUM_TX_STATS 3
+struct ibmvnic_tx_queue_stats {
+ u64 packets;
+ u64 bytes;
+ u64 dropped_packets;
+};
+
+#define NUM_RX_STATS 3
+struct ibmvnic_rx_queue_stats {
+ u64 packets;
+ u64 bytes;
+ u64 interrupts;
+};
+
struct ibmvnic_acl_buffer {
__be32 len;
__be32 version;
@@ -956,6 +970,9 @@ struct ibmvnic_adapter {
int tx_send_failed;
int tx_map_failed;
+ struct ibmvnic_tx_queue_stats *tx_stats_buffers;
+ struct ibmvnic_rx_queue_stats *rx_stats_buffers;
+
int phys_link_state;
int logical_link_state;