iscsi_target_stat.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef ISCSI_TARGET_STAT_H
  2. #define ISCSI_TARGET_STAT_H
  3. /*
  4. * For struct iscsi_tiqn->tiqn_wwn default groups
  5. */
  6. extern struct config_item_type iscsi_stat_instance_cit;
  7. extern struct config_item_type iscsi_stat_sess_err_cit;
  8. extern struct config_item_type iscsi_stat_tgt_attr_cit;
  9. extern struct config_item_type iscsi_stat_login_cit;
  10. extern struct config_item_type iscsi_stat_logout_cit;
  11. /*
  12. * For struct iscsi_session->se_sess default groups
  13. */
  14. extern struct config_item_type iscsi_stat_sess_cit;
  15. /* iSCSI session error types */
  16. #define ISCSI_SESS_ERR_UNKNOWN 0
  17. #define ISCSI_SESS_ERR_DIGEST 1
  18. #define ISCSI_SESS_ERR_CXN_TIMEOUT 2
  19. #define ISCSI_SESS_ERR_PDU_FORMAT 3
  20. /* iSCSI session error stats */
  21. struct iscsi_sess_err_stats {
  22. spinlock_t lock;
  23. u32 digest_errors;
  24. u32 cxn_timeout_errors;
  25. u32 pdu_format_errors;
  26. u32 last_sess_failure_type;
  27. char last_sess_fail_rem_name[224];
  28. } ____cacheline_aligned;
  29. /* iSCSI login failure types (sub oids) */
  30. #define ISCSI_LOGIN_FAIL_OTHER 2
  31. #define ISCSI_LOGIN_FAIL_REDIRECT 3
  32. #define ISCSI_LOGIN_FAIL_AUTHORIZE 4
  33. #define ISCSI_LOGIN_FAIL_AUTHENTICATE 5
  34. #define ISCSI_LOGIN_FAIL_NEGOTIATE 6
  35. /* iSCSI login stats */
  36. struct iscsi_login_stats {
  37. spinlock_t lock;
  38. u32 accepts;
  39. u32 other_fails;
  40. u32 redirects;
  41. u32 authorize_fails;
  42. u32 authenticate_fails;
  43. u32 negotiate_fails; /* used for notifications */
  44. u64 last_fail_time; /* time stamp (jiffies) */
  45. u32 last_fail_type;
  46. int last_intr_fail_ip_family;
  47. struct sockaddr_storage last_intr_fail_sockaddr;
  48. char last_intr_fail_name[224];
  49. } ____cacheline_aligned;
  50. /* iSCSI logout stats */
  51. struct iscsi_logout_stats {
  52. spinlock_t lock;
  53. u32 normal_logouts;
  54. u32 abnormal_logouts;
  55. } ____cacheline_aligned;
  56. #endif /*** ISCSI_TARGET_STAT_H ***/