Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 1 | #ifndef TARGET_CORE_MIB_H |
| 2 | #define TARGET_CORE_MIB_H |
| 3 | |
| 4 | typedef enum { |
| 5 | SCSI_INST_INDEX, |
| 6 | SCSI_DEVICE_INDEX, |
| 7 | SCSI_AUTH_INTR_INDEX, |
| 8 | SCSI_INDEX_TYPE_MAX |
| 9 | } scsi_index_t; |
| 10 | |
| 11 | struct scsi_index_table { |
| 12 | spinlock_t lock; |
| 13 | u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX]; |
| 14 | } ____cacheline_aligned; |
| 15 | |
| 16 | /* SCSI Port stats */ |
| 17 | struct scsi_port_stats { |
| 18 | u64 cmd_pdus; |
| 19 | u64 tx_data_octets; |
| 20 | u64 rx_data_octets; |
| 21 | } ____cacheline_aligned; |
| 22 | |
| 23 | extern int init_scsi_target_mib(void); |
| 24 | extern void remove_scsi_target_mib(void); |
| 25 | extern void init_scsi_index_table(void); |
| 26 | extern u32 scsi_get_new_index(scsi_index_t); |
| 27 | |
| 28 | #endif /*** TARGET_CORE_MIB_H ***/ |