iscsi-target: Add iSCSI fabric support for target v4.1
[deliverable/linux.git] / drivers / target / iscsi / iscsi_target_stat.h
1 #ifndef ISCSI_TARGET_STAT_H
2 #define ISCSI_TARGET_STAT_H
3
4 /*
5 * For struct iscsi_tiqn->tiqn_wwn default groups
6 */
7 extern struct config_item_type iscsi_stat_instance_cit;
8 extern struct config_item_type iscsi_stat_sess_err_cit;
9 extern struct config_item_type iscsi_stat_tgt_attr_cit;
10 extern struct config_item_type iscsi_stat_login_cit;
11 extern struct config_item_type iscsi_stat_logout_cit;
12
13 /*
14 * For struct iscsi_session->se_sess default groups
15 */
16 extern struct config_item_type iscsi_stat_sess_cit;
17
18 /* iSCSI session error types */
19 #define ISCSI_SESS_ERR_UNKNOWN 0
20 #define ISCSI_SESS_ERR_DIGEST 1
21 #define ISCSI_SESS_ERR_CXN_TIMEOUT 2
22 #define ISCSI_SESS_ERR_PDU_FORMAT 3
23
24 /* iSCSI session error stats */
25 struct iscsi_sess_err_stats {
26 spinlock_t lock;
27 u32 digest_errors;
28 u32 cxn_timeout_errors;
29 u32 pdu_format_errors;
30 u32 last_sess_failure_type;
31 char last_sess_fail_rem_name[224];
32 } ____cacheline_aligned;
33
34 /* iSCSI login failure types (sub oids) */
35 #define ISCSI_LOGIN_FAIL_OTHER 2
36 #define ISCSI_LOGIN_FAIL_REDIRECT 3
37 #define ISCSI_LOGIN_FAIL_AUTHORIZE 4
38 #define ISCSI_LOGIN_FAIL_AUTHENTICATE 5
39 #define ISCSI_LOGIN_FAIL_NEGOTIATE 6
40
41 /* iSCSI login stats */
42 struct iscsi_login_stats {
43 spinlock_t lock;
44 u32 accepts;
45 u32 other_fails;
46 u32 redirects;
47 u32 authorize_fails;
48 u32 authenticate_fails;
49 u32 negotiate_fails; /* used for notifications */
50 u64 last_fail_time; /* time stamp (jiffies) */
51 u32 last_fail_type;
52 int last_intr_fail_ip_family;
53 unsigned char last_intr_fail_ip_addr[IPV6_ADDRESS_SPACE];
54 char last_intr_fail_name[224];
55 } ____cacheline_aligned;
56
57 /* iSCSI logout stats */
58 struct iscsi_logout_stats {
59 spinlock_t lock;
60 u32 normal_logouts;
61 u32 abnormal_logouts;
62 } ____cacheline_aligned;
63
64 #endif /*** ISCSI_TARGET_STAT_H ***/
This page took 0.032506 seconds and 5 git commands to generate.