1*e6550b3eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2a6a5580cSJeff Kirsher /*
3a6a5580cSJeff Kirsher  * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
4a6a5580cSJeff Kirsher  * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
5a6a5580cSJeff Kirsher  */
6a6a5580cSJeff Kirsher 
7a6a5580cSJeff Kirsher #ifndef _VNIC_STATS_H_
8a6a5580cSJeff Kirsher #define _VNIC_STATS_H_
9a6a5580cSJeff Kirsher 
10a6a5580cSJeff Kirsher /* Tx statistics */
11a6a5580cSJeff Kirsher struct vnic_tx_stats {
12a6a5580cSJeff Kirsher 	u64 tx_frames_ok;
13a6a5580cSJeff Kirsher 	u64 tx_unicast_frames_ok;
14a6a5580cSJeff Kirsher 	u64 tx_multicast_frames_ok;
15a6a5580cSJeff Kirsher 	u64 tx_broadcast_frames_ok;
16a6a5580cSJeff Kirsher 	u64 tx_bytes_ok;
17a6a5580cSJeff Kirsher 	u64 tx_unicast_bytes_ok;
18a6a5580cSJeff Kirsher 	u64 tx_multicast_bytes_ok;
19a6a5580cSJeff Kirsher 	u64 tx_broadcast_bytes_ok;
20a6a5580cSJeff Kirsher 	u64 tx_drops;
21a6a5580cSJeff Kirsher 	u64 tx_errors;
22a6a5580cSJeff Kirsher 	u64 tx_tso;
23a6a5580cSJeff Kirsher 	u64 rsvd[16];
24a6a5580cSJeff Kirsher };
25a6a5580cSJeff Kirsher 
26a6a5580cSJeff Kirsher /* Rx statistics */
27a6a5580cSJeff Kirsher struct vnic_rx_stats {
28a6a5580cSJeff Kirsher 	u64 rx_frames_ok;
29a6a5580cSJeff Kirsher 	u64 rx_frames_total;
30a6a5580cSJeff Kirsher 	u64 rx_unicast_frames_ok;
31a6a5580cSJeff Kirsher 	u64 rx_multicast_frames_ok;
32a6a5580cSJeff Kirsher 	u64 rx_broadcast_frames_ok;
33a6a5580cSJeff Kirsher 	u64 rx_bytes_ok;
34a6a5580cSJeff Kirsher 	u64 rx_unicast_bytes_ok;
35a6a5580cSJeff Kirsher 	u64 rx_multicast_bytes_ok;
36a6a5580cSJeff Kirsher 	u64 rx_broadcast_bytes_ok;
37a6a5580cSJeff Kirsher 	u64 rx_drop;
38a6a5580cSJeff Kirsher 	u64 rx_no_bufs;
39a6a5580cSJeff Kirsher 	u64 rx_errors;
40a6a5580cSJeff Kirsher 	u64 rx_rss;
41a6a5580cSJeff Kirsher 	u64 rx_crc_errors;
42a6a5580cSJeff Kirsher 	u64 rx_frames_64;
43a6a5580cSJeff Kirsher 	u64 rx_frames_127;
44a6a5580cSJeff Kirsher 	u64 rx_frames_255;
45a6a5580cSJeff Kirsher 	u64 rx_frames_511;
46a6a5580cSJeff Kirsher 	u64 rx_frames_1023;
47a6a5580cSJeff Kirsher 	u64 rx_frames_1518;
48a6a5580cSJeff Kirsher 	u64 rx_frames_to_max;
49a6a5580cSJeff Kirsher 	u64 rsvd[16];
50a6a5580cSJeff Kirsher };
51a6a5580cSJeff Kirsher 
5258feff07SGovindarajulu Varadarajan /* Generic statistics */
5358feff07SGovindarajulu Varadarajan struct vnic_gen_stats {
5458feff07SGovindarajulu Varadarajan 	u64 dma_map_error;
5558feff07SGovindarajulu Varadarajan };
5658feff07SGovindarajulu Varadarajan 
57a6a5580cSJeff Kirsher struct vnic_stats {
58a6a5580cSJeff Kirsher 	struct vnic_tx_stats tx;
59a6a5580cSJeff Kirsher 	struct vnic_rx_stats rx;
60a6a5580cSJeff Kirsher };
61a6a5580cSJeff Kirsher 
62a6a5580cSJeff Kirsher #endif /* _VNIC_STATS_H_ */
63