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 /* Copyright © 2003-2011 Emulex. All rights reserved. */
23
24 /*
25 * Statistic specific data structures and function prototypes
26 */
27
28 #ifndef _OCE_STAT_H_
29 #define _OCE_STAT_H_
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #include <oce_hw_eth.h>
36 #include <oce_impl.h>
37
38 struct oce_stat {
39 kstat_named_t rx_bytes_hi;
40 kstat_named_t rx_bytes_lo;
41 kstat_named_t rx_frames;
42 kstat_named_t rx_errors;
43 kstat_named_t rx_drops;
55 kstat_named_t rx_alignment_symbol_errors;
56 kstat_named_t rx_in_range_errors;
57 kstat_named_t rx_out_range_errors;
58 kstat_named_t rx_frame_too_long;
59 kstat_named_t rx_address_match_errors;
60
61 kstat_named_t rx_pause_frames;
62 kstat_named_t rx_control_frames;
63 kstat_named_t rx_ip_checksum_errs;
64 kstat_named_t rx_tcp_checksum_errs;
65 kstat_named_t rx_udp_checksum_errs;
66 kstat_named_t rx_fifo_overflow;
67 kstat_named_t rx_input_fifo_overflow;
68
69 kstat_named_t tx_unicast_frames;
70 kstat_named_t tx_multicast_frames;
71 kstat_named_t tx_broadcast_frames;
72 kstat_named_t tx_pause_frames;
73 kstat_named_t tx_control_frames;
74
75
76 kstat_named_t rx_drops_no_pbuf;
77 kstat_named_t rx_drops_no_txpb;
78 kstat_named_t rx_drops_no_erx_descr;
79 kstat_named_t rx_drops_no_tpre_descr;
80 kstat_named_t rx_drops_too_many_frags;
81 kstat_named_t rx_drops_invalid_ring;
82 kstat_named_t rx_drops_mtu;
83
84 kstat_named_t rx_dropped_too_small;
85 kstat_named_t rx_dropped_too_short;
86 kstat_named_t rx_dropped_header_too_small;
87 kstat_named_t rx_dropped_tcp_length;
88 kstat_named_t rx_dropped_runt;
89
90 kstat_named_t rx_drops_no_fragments;
91 };
92
93 int oce_stat_init(struct oce_dev *dev);
94 void oce_stat_fini(struct oce_dev *dev);
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif /* _OCE_STAT_H_ */
|
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 (c) 2009-2012 Emulex. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27
28
29 /*
30 * Statistic specific data structures and function prototypes
31 */
32
33 #ifndef _OCE_STAT_H_
34 #define _OCE_STAT_H_
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #include <oce_hw_eth.h>
41 #include <oce_impl.h>
42
43 struct oce_stat {
44 kstat_named_t rx_bytes_hi;
45 kstat_named_t rx_bytes_lo;
46 kstat_named_t rx_frames;
47 kstat_named_t rx_errors;
48 kstat_named_t rx_drops;
60 kstat_named_t rx_alignment_symbol_errors;
61 kstat_named_t rx_in_range_errors;
62 kstat_named_t rx_out_range_errors;
63 kstat_named_t rx_frame_too_long;
64 kstat_named_t rx_address_match_errors;
65
66 kstat_named_t rx_pause_frames;
67 kstat_named_t rx_control_frames;
68 kstat_named_t rx_ip_checksum_errs;
69 kstat_named_t rx_tcp_checksum_errs;
70 kstat_named_t rx_udp_checksum_errs;
71 kstat_named_t rx_fifo_overflow;
72 kstat_named_t rx_input_fifo_overflow;
73
74 kstat_named_t tx_unicast_frames;
75 kstat_named_t tx_multicast_frames;
76 kstat_named_t tx_broadcast_frames;
77 kstat_named_t tx_pause_frames;
78 kstat_named_t tx_control_frames;
79
80 kstat_named_t rx_drops_no_pbuf;
81 kstat_named_t rx_drops_no_txpb;
82 kstat_named_t rx_drops_no_erx_descr;
83 kstat_named_t rx_drops_no_tpre_descr;
84 kstat_named_t rx_drops_too_many_frags;
85 kstat_named_t rx_drops_invalid_ring;
86 kstat_named_t rx_drops_mtu;
87
88 kstat_named_t rx_dropped_too_small;
89 kstat_named_t rx_dropped_too_short;
90 kstat_named_t rx_dropped_header_too_small;
91 kstat_named_t rx_dropped_tcp_length;
92 kstat_named_t rx_dropped_runt;
93
94 kstat_named_t rx_drops_no_fragments;
95
96 kstat_named_t rx_priority_pause_frames;
97 kstat_named_t pmem_fifo_overflow_drop;
98 kstat_named_t jabber_events;
99 kstat_named_t forwarded_packets;
100 };
101
102 int oce_stat_init(struct oce_dev *dev);
103 void oce_stat_fini(struct oce_dev *dev);
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif /* _OCE_STAT_H_ */
|