Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/ctl_ioctl.h
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | |||||
#define CTL_MAX_TARGETS 1 | #define CTL_MAX_TARGETS 1 | ||||
/* | /* | ||||
* Maximum target ID we support. | * Maximum target ID we support. | ||||
*/ | */ | ||||
#define CTL_MAX_TARGID 15 | #define CTL_MAX_TARGID 15 | ||||
/* | /* | ||||
* Maximum number of LUNs we support at the moment. MUST be a power of 2. | |||||
*/ | |||||
#define CTL_MAX_LUNS 1024 | |||||
/* | |||||
* Maximum number of initiators per port. | * Maximum number of initiators per port. | ||||
*/ | */ | ||||
#define CTL_MAX_INIT_PER_PORT 2048 | #define CTL_MAX_INIT_PER_PORT 2048 | ||||
/* | |||||
* Maximum number of ports registered at one time. | |||||
*/ | |||||
#define CTL_MAX_PORTS 256 | |||||
/* | |||||
* Maximum number of initiators we support. | |||||
*/ | |||||
#define CTL_MAX_INITIATORS (CTL_MAX_INIT_PER_PORT * CTL_MAX_PORTS) | |||||
/* Hopefully this won't conflict with new misc devices that pop up */ | /* Hopefully this won't conflict with new misc devices that pop up */ | ||||
#define CTL_MINOR 225 | #define CTL_MINOR 225 | ||||
/* Legacy statistics accumulated for every port for every LU. */ | /* Legacy statistics accumulated for every port for every LU. */ | ||||
//#define CTL_LEGACY_STATS 1 | //#define CTL_LEGACY_STATS 1 | ||||
typedef enum { | typedef enum { | ||||
CTL_DELAY_TYPE_NONE, | CTL_DELAY_TYPE_NONE, | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | struct ctl_lun_io_port_stats { | ||||
struct bintime dma_time[CTL_STATS_NUM_TYPES]; | struct bintime dma_time[CTL_STATS_NUM_TYPES]; | ||||
}; | }; | ||||
struct ctl_lun_io_stats { | struct ctl_lun_io_stats { | ||||
uint8_t device_type; | uint8_t device_type; | ||||
uint64_t lun_number; | uint64_t lun_number; | ||||
uint32_t blocksize; | uint32_t blocksize; | ||||
ctl_lun_stats_flags flags; | ctl_lun_stats_flags flags; | ||||
struct ctl_lun_io_port_stats ports[CTL_MAX_PORTS]; | struct ctl_lun_io_port_stats *ports; | ||||
}; | }; | ||||
struct ctl_stats { | struct ctl_stats { | ||||
int alloc_len; /* passed to kernel */ | int alloc_len; /* passed to kernel */ | ||||
struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */ | struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */ | ||||
int fill_len; /* passed to userland */ | int fill_len; /* passed to userland */ | ||||
int num_luns; /* passed to userland */ | int num_luns; /* passed to userland */ | ||||
ctl_stats_status status; /* passed to userland */ | ctl_stats_status status; /* passed to userland */ | ||||
▲ Show 20 Lines • Show All 695 Lines • Show Last 20 Lines |