1427fcaf8Stim szeto /*
2427fcaf8Stim szeto  * CDDL HEADER START
3427fcaf8Stim szeto  *
4427fcaf8Stim szeto  * The contents of this file are subject to the terms of the
5427fcaf8Stim szeto  * Common Development and Distribution License (the "License").
6427fcaf8Stim szeto  * You may not use this file except in compliance with the License.
7427fcaf8Stim szeto  *
8427fcaf8Stim szeto  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9427fcaf8Stim szeto  * or http://www.opensolaris.org/os/licensing.
10427fcaf8Stim szeto  * See the License for the specific language governing permissions
11427fcaf8Stim szeto  * and limitations under the License.
12427fcaf8Stim szeto  *
13427fcaf8Stim szeto  * When distributing Covered Code, include this CDDL HEADER in each
14427fcaf8Stim szeto  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15427fcaf8Stim szeto  * If applicable, add the following below this CDDL HEADER, with the
16427fcaf8Stim szeto  * fields enclosed by brackets "[]" replaced with your own identifying
17427fcaf8Stim szeto  * information: Portions Copyright [yyyy] [name of copyright owner]
18427fcaf8Stim szeto  *
19427fcaf8Stim szeto  * CDDL HEADER END
20427fcaf8Stim szeto  */
21427fcaf8Stim szeto /*
22427fcaf8Stim szeto  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23427fcaf8Stim szeto  * Use is subject to license terms.
24427fcaf8Stim szeto  */
25427fcaf8Stim szeto #ifndef _STMF_STATS_H
26427fcaf8Stim szeto #define	_STMF_STATS_H
27427fcaf8Stim szeto 
28427fcaf8Stim szeto #ifdef	__cplusplus
29427fcaf8Stim szeto extern "C" {
30427fcaf8Stim szeto #endif
31427fcaf8Stim szeto 
32*61dfa509SRick McNeal #include <sys/portif.h>
33*61dfa509SRick McNeal 
34427fcaf8Stim szeto typedef struct stmf_kstat_itl_info {
35427fcaf8Stim szeto 	kstat_named_t		i_rport_name;
36427fcaf8Stim szeto 	kstat_named_t		i_rport_alias;
37427fcaf8Stim szeto 	kstat_named_t		i_lport_name;
38427fcaf8Stim szeto 	kstat_named_t		i_lport_alias;
39427fcaf8Stim szeto 	kstat_named_t		i_protocol;
40427fcaf8Stim szeto 	kstat_named_t		i_lu_guid;
41427fcaf8Stim szeto 	kstat_named_t		i_lu_alias;
42427fcaf8Stim szeto 	kstat_named_t		i_lu_number;
43427fcaf8Stim szeto 	kstat_named_t		i_task_waitq_elapsed;
44427fcaf8Stim szeto 	kstat_named_t		i_task_read_elapsed;
45427fcaf8Stim szeto 	kstat_named_t		i_task_write_elapsed;
46427fcaf8Stim szeto 	kstat_named_t		i_lu_read_elapsed;
47427fcaf8Stim szeto 	kstat_named_t		i_lu_write_elapsed;
48427fcaf8Stim szeto 	kstat_named_t		i_lport_read_elapsed;
49427fcaf8Stim szeto 	kstat_named_t		i_lport_write_elapsed;
50427fcaf8Stim szeto } stmf_kstat_itl_info_t;
51427fcaf8Stim szeto 
52427fcaf8Stim szeto typedef struct stmf_kstat_lu_info {
53427fcaf8Stim szeto 	kstat_named_t		i_lun_guid;
54427fcaf8Stim szeto 	kstat_named_t		i_lun_alias;
55427fcaf8Stim szeto } stmf_kstat_lu_info_t;
56427fcaf8Stim szeto 
57427fcaf8Stim szeto typedef struct stmf_kstat_tgt_info {
58427fcaf8Stim szeto 	kstat_named_t		i_tgt_name;
59427fcaf8Stim szeto 	kstat_named_t		i_tgt_alias;
60427fcaf8Stim szeto 	kstat_named_t		i_protocol;
61427fcaf8Stim szeto } stmf_kstat_tgt_info_t;
62427fcaf8Stim szeto 
63*61dfa509SRick McNeal #define	STMF_RPORT_INFO_LIMIT 8
64*61dfa509SRick McNeal 
65*61dfa509SRick McNeal typedef struct stmf_kstat_rport_info {
66*61dfa509SRick McNeal     kstat_named_t i_rport_name;
67*61dfa509SRick McNeal     kstat_named_t i_protocol;
68*61dfa509SRick McNeal     kstat_named_t i_rport_uinfo[STMF_RPORT_INFO_LIMIT];
69*61dfa509SRick McNeal } stmf_kstat_rport_info_t;
70*61dfa509SRick McNeal 
71*61dfa509SRick McNeal typedef struct stmf_kstat_rport_estat {
72*61dfa509SRick McNeal 	kstat_named_t i_rport_read_latency;
73*61dfa509SRick McNeal 	kstat_named_t i_rport_write_latency;
74*61dfa509SRick McNeal 	kstat_named_t i_nread_tasks;
75*61dfa509SRick McNeal 	kstat_named_t i_nwrite_tasks;
76*61dfa509SRick McNeal } stmf_kstat_rport_estat_t;
77*61dfa509SRick McNeal 
78427fcaf8Stim szeto #ifdef	__cplusplus
79427fcaf8Stim szeto }
80427fcaf8Stim szeto #endif
81427fcaf8Stim szeto 
82427fcaf8Stim szeto #endif /* _STMF_STATS_H */
83