xref: /illumos-gate/usr/src/uts/common/sys/fibre-channel/fca/oce/oce_stat.h (revision 5f8171005a0c33f3c67f7da52d41c2362c3fd891)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2009 Emulex.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * Statistic specific data structures and function prototypes
29  */
30 
31 #ifndef	_OCE_STAT_H_
32 #define	_OCE_STAT_H_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <oce_hw_eth.h>
39 #include <oce_impl.h>
40 
41 struct oce_stat {
42 	kstat_named_t rx_bytes_hi;
43 	kstat_named_t rx_bytes_lo;
44 	kstat_named_t rx_frames;
45 	kstat_named_t rx_errors;
46 	kstat_named_t rx_drops;
47 
48 	kstat_named_t tx_bytes_hi;
49 	kstat_named_t tx_bytes_lo;
50 	kstat_named_t tx_frames;
51 	kstat_named_t tx_errors;
52 
53 	kstat_named_t rx_unicast_frames;
54 	kstat_named_t rx_multicast_frames;
55 	kstat_named_t rx_broadcast_frames;
56 	kstat_named_t rx_crc_errors;
57 
58 	kstat_named_t rx_alignment_symbol_errors;
59 	kstat_named_t rx_in_range_errors;
60 	kstat_named_t rx_out_range_errors;
61 	kstat_named_t rx_frame_too_long;
62 	kstat_named_t rx_address_match_errors;
63 
64 	kstat_named_t rx_pause_frames;
65 	kstat_named_t rx_control_frames;
66 	kstat_named_t rx_ip_checksum_errs;
67 	kstat_named_t rx_tcp_checksum_errs;
68 	kstat_named_t rx_udp_checksum_errs;
69 	kstat_named_t rx_fifo_overflow;
70 	kstat_named_t rx_input_fifo_overflow;
71 
72 	kstat_named_t tx_unicast_frames;
73 	kstat_named_t tx_multicast_frames;
74 	kstat_named_t tx_broadcast_frames;
75 	kstat_named_t tx_pause_frames;
76 	kstat_named_t tx_control_frames;
77 };
78 
79 int oce_stat_init(struct oce_dev *dev);
80 void oce_stat_fini(struct oce_dev *dev);
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* _OCE_STAT_H_ */
87