From 9e2b844d6069944d048fc376fe14cbd7cdcc714d Mon Sep 17 00:00:00 2001 From: Amey Narkhede Date: Wed, 17 Feb 2021 15:44:00 +0530 Subject: [PATCH] linux-5.0.0: Add virtio-scsi bindings virtio-scsi bindings are needed for implementing vhost-user-scsi device Signed-off-by: Amey Narkhede --- src/bindings_v5_0_0/mod.rs | 1 + src/bindings_v5_0_0/virtio_scsi.rs | 803 +++++++++++++++++++++++++++++ 2 files changed, 804 insertions(+) create mode 100644 src/bindings_v5_0_0/virtio_scsi.rs diff --git a/src/bindings_v5_0_0/mod.rs b/src/bindings_v5_0_0/mod.rs index 65cabd6..0fe498c 100644 --- a/src/bindings_v5_0_0/mod.rs +++ b/src/bindings_v5_0_0/mod.rs @@ -9,3 +9,4 @@ pub mod virtio_blk; pub mod virtio_net; pub mod virtio_ring; +pub mod virtio_scsi; diff --git a/src/bindings_v5_0_0/virtio_scsi.rs b/src/bindings_v5_0_0/virtio_scsi.rs new file mode 100644 index 0000000..7a4d056 --- /dev/null +++ b/src/bindings_v5_0_0/virtio_scsi.rs @@ -0,0 +1,803 @@ +/* automatically generated by rust-bindgen */ + +pub const __BITS_PER_LONG: u32 = 64; +pub const __FD_SETSIZE: u32 = 1024; +pub const VIRTIO_SCSI_CDB_DEFAULT_SIZE: u32 = 32; +pub const VIRTIO_SCSI_SENSE_DEFAULT_SIZE: u32 = 96; +pub const VIRTIO_SCSI_CDB_SIZE: u32 = 32; +pub const VIRTIO_SCSI_SENSE_SIZE: u32 = 96; +pub const VIRTIO_SCSI_F_INOUT: u32 = 0; +pub const VIRTIO_SCSI_F_HOTPLUG: u32 = 1; +pub const VIRTIO_SCSI_F_CHANGE: u32 = 2; +pub const VIRTIO_SCSI_F_T10_PI: u32 = 3; +pub const VIRTIO_SCSI_S_OK: u32 = 0; +pub const VIRTIO_SCSI_S_OVERRUN: u32 = 1; +pub const VIRTIO_SCSI_S_ABORTED: u32 = 2; +pub const VIRTIO_SCSI_S_BAD_TARGET: u32 = 3; +pub const VIRTIO_SCSI_S_RESET: u32 = 4; +pub const VIRTIO_SCSI_S_BUSY: u32 = 5; +pub const VIRTIO_SCSI_S_TRANSPORT_FAILURE: u32 = 6; +pub const VIRTIO_SCSI_S_TARGET_FAILURE: u32 = 7; +pub const VIRTIO_SCSI_S_NEXUS_FAILURE: u32 = 8; +pub const VIRTIO_SCSI_S_FAILURE: u32 = 9; +pub const VIRTIO_SCSI_S_FUNCTION_SUCCEEDED: u32 = 10; +pub const VIRTIO_SCSI_S_FUNCTION_REJECTED: u32 = 11; +pub const VIRTIO_SCSI_S_INCORRECT_LUN: u32 = 12; +pub const VIRTIO_SCSI_T_TMF: u32 = 0; +pub const VIRTIO_SCSI_T_AN_QUERY: u32 = 1; +pub const VIRTIO_SCSI_T_AN_SUBSCRIBE: u32 = 2; +pub const VIRTIO_SCSI_T_TMF_ABORT_TASK: u32 = 0; +pub const VIRTIO_SCSI_T_TMF_ABORT_TASK_SET: u32 = 1; +pub const VIRTIO_SCSI_T_TMF_CLEAR_ACA: u32 = 2; +pub const VIRTIO_SCSI_T_TMF_CLEAR_TASK_SET: u32 = 3; +pub const VIRTIO_SCSI_T_TMF_I_T_NEXUS_RESET: u32 = 4; +pub const VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET: u32 = 5; +pub const VIRTIO_SCSI_T_TMF_QUERY_TASK: u32 = 6; +pub const VIRTIO_SCSI_T_TMF_QUERY_TASK_SET: u32 = 7; +pub const VIRTIO_SCSI_T_EVENTS_MISSED: u32 = 2147483648; +pub const VIRTIO_SCSI_T_NO_EVENT: u32 = 0; +pub const VIRTIO_SCSI_T_TRANSPORT_RESET: u32 = 1; +pub const VIRTIO_SCSI_T_ASYNC_NOTIFY: u32 = 2; +pub const VIRTIO_SCSI_T_PARAM_CHANGE: u32 = 3; +pub const VIRTIO_SCSI_EVT_RESET_HARD: u32 = 0; +pub const VIRTIO_SCSI_EVT_RESET_RESCAN: u32 = 1; +pub const VIRTIO_SCSI_EVT_RESET_REMOVED: u32 = 2; +pub const VIRTIO_SCSI_S_SIMPLE: u32 = 0; +pub const VIRTIO_SCSI_S_ORDERED: u32 = 1; +pub const VIRTIO_SCSI_S_HEAD: u32 = 2; +pub const VIRTIO_SCSI_S_ACA: u32 = 3; +pub type __s8 = ::std::os::raw::c_schar; +pub type __u8 = ::std::os::raw::c_uchar; +pub type __s16 = ::std::os::raw::c_short; +pub type __u16 = ::std::os::raw::c_ushort; +pub type __s32 = ::std::os::raw::c_int; +pub type __u32 = ::std::os::raw::c_uint; +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fd_set { + pub fds_bits: [::std::os::raw::c_ulong; 16usize], +} +#[test] +fn bindgen_test_layout___kernel_fd_set() { + assert_eq!( + ::std::mem::size_of::<__kernel_fd_set>(), + 128usize, + concat!("Size of: ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fd_set>(), + 8usize, + concat!("Alignment of ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fd_set), + "::", + stringify!(fds_bits) + ) + ); +} +pub type __kernel_sighandler_t = + ::std::option::Option; +pub type __kernel_key_t = ::std::os::raw::c_int; +pub type __kernel_mqd_t = ::std::os::raw::c_int; +pub type __kernel_old_uid_t = ::std::os::raw::c_ushort; +pub type __kernel_old_gid_t = ::std::os::raw::c_ushort; +pub type __kernel_old_dev_t = ::std::os::raw::c_ulong; +pub type __kernel_long_t = ::std::os::raw::c_long; +pub type __kernel_ulong_t = ::std::os::raw::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = ::std::os::raw::c_uint; +pub type __kernel_pid_t = ::std::os::raw::c_int; +pub type __kernel_ipc_pid_t = ::std::os::raw::c_int; +pub type __kernel_uid_t = ::std::os::raw::c_uint; +pub type __kernel_gid_t = ::std::os::raw::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = ::std::os::raw::c_int; +pub type __kernel_uid32_t = ::std::os::raw::c_uint; +pub type __kernel_gid32_t = ::std::os::raw::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fsid_t { + pub val: [::std::os::raw::c_int; 2usize], +} +#[test] +fn bindgen_test_layout___kernel_fsid_t() { + assert_eq!( + ::std::mem::size_of::<__kernel_fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fsid_t), + "::", + stringify!(val) + ) + ); +} +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = ::std::os::raw::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = ::std::os::raw::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = ::std::os::raw::c_int; +pub type __kernel_clockid_t = ::std::os::raw::c_int; +pub type __kernel_caddr_t = *mut ::std::os::raw::c_char; +pub type __kernel_uid16_t = ::std::os::raw::c_ushort; +pub type __kernel_gid16_t = ::std::os::raw::c_ushort; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = ::std::os::raw::c_uint; +pub type __virtio16 = __u16; +pub type __virtio32 = __u32; +pub type __virtio64 = __u64; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_cmd_req { + pub lun: [__u8; 8usize], + pub tag: __virtio64, + pub task_attr: __u8, + pub prio: __u8, + pub crn: __u8, + pub cdb: [__u8; 32usize], +} +#[test] +fn bindgen_test_layout_virtio_scsi_cmd_req() { + assert_eq!( + ::std::mem::size_of::(), + 51usize, + concat!("Size of: ", stringify!(virtio_scsi_cmd_req)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_cmd_req)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lun as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(lun) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(tag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).task_attr as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(task_attr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).prio as *const _ as usize }, + 17usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(prio) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).crn as *const _ as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(crn) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).cdb as *const _ as usize }, + 19usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req), + "::", + stringify!(cdb) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_cmd_req_pi { + pub lun: [__u8; 8usize], + pub tag: __virtio64, + pub task_attr: __u8, + pub prio: __u8, + pub crn: __u8, + pub pi_bytesout: __virtio32, + pub pi_bytesin: __virtio32, + pub cdb: [__u8; 32usize], +} +#[test] +fn bindgen_test_layout_virtio_scsi_cmd_req_pi() { + assert_eq!( + ::std::mem::size_of::(), + 59usize, + concat!("Size of: ", stringify!(virtio_scsi_cmd_req_pi)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_cmd_req_pi)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lun as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(lun) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(tag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).task_attr as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(task_attr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).prio as *const _ as usize }, + 17usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(prio) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).crn as *const _ as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(crn) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pi_bytesout as *const _ as usize + }, + 19usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(pi_bytesout) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pi_bytesin as *const _ as usize + }, + 23usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(pi_bytesin) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).cdb as *const _ as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_req_pi), + "::", + stringify!(cdb) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone)] +pub struct virtio_scsi_cmd_resp { + pub sense_len: __virtio32, + pub resid: __virtio32, + pub status_qualifier: __virtio16, + pub status: __u8, + pub response: __u8, + pub sense: [__u8; 96usize], +} +#[test] +fn bindgen_test_layout_virtio_scsi_cmd_resp() { + assert_eq!( + ::std::mem::size_of::(), + 108usize, + concat!("Size of: ", stringify!(virtio_scsi_cmd_resp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_cmd_resp)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sense_len as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(sense_len) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).resid as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(resid) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).status_qualifier as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(status_qualifier) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).status as *const _ as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(status) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).response as *const _ as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(response) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sense as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_cmd_resp), + "::", + stringify!(sense) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_ctrl_tmf_req { + pub type_: __virtio32, + pub subtype: __virtio32, + pub lun: [__u8; 8usize], + pub tag: __virtio64, +} +#[test] +fn bindgen_test_layout_virtio_scsi_ctrl_tmf_req() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(virtio_scsi_ctrl_tmf_req)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_ctrl_tmf_req)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_tmf_req), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).subtype as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_tmf_req), + "::", + stringify!(subtype) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lun as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_tmf_req), + "::", + stringify!(lun) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_tmf_req), + "::", + stringify!(tag) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_ctrl_tmf_resp { + pub response: __u8, +} +#[test] +fn bindgen_test_layout_virtio_scsi_ctrl_tmf_resp() { + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(virtio_scsi_ctrl_tmf_resp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_ctrl_tmf_resp)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).response as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_tmf_resp), + "::", + stringify!(response) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_ctrl_an_req { + pub type_: __virtio32, + pub lun: [__u8; 8usize], + pub event_requested: __virtio32, +} +#[test] +fn bindgen_test_layout_virtio_scsi_ctrl_an_req() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(virtio_scsi_ctrl_an_req)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_ctrl_an_req)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_an_req), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lun as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_an_req), + "::", + stringify!(lun) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).event_requested as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_an_req), + "::", + stringify!(event_requested) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_ctrl_an_resp { + pub event_actual: __virtio32, + pub response: __u8, +} +#[test] +fn bindgen_test_layout_virtio_scsi_ctrl_an_resp() { + assert_eq!( + ::std::mem::size_of::(), + 5usize, + concat!("Size of: ", stringify!(virtio_scsi_ctrl_an_resp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_ctrl_an_resp)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).event_actual as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_an_resp), + "::", + stringify!(event_actual) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).response as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_ctrl_an_resp), + "::", + stringify!(response) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_event { + pub event: __virtio32, + pub lun: [__u8; 8usize], + pub reason: __virtio32, +} +#[test] +fn bindgen_test_layout_virtio_scsi_event() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(virtio_scsi_event)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_event)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_event), + "::", + stringify!(event) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).lun as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_event), + "::", + stringify!(lun) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).reason as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_event), + "::", + stringify!(reason) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct virtio_scsi_config { + pub num_queues: __virtio32, + pub seg_max: __virtio32, + pub max_sectors: __virtio32, + pub cmd_per_lun: __virtio32, + pub event_info_size: __virtio32, + pub sense_size: __virtio32, + pub cdb_size: __virtio32, + pub max_channel: __virtio16, + pub max_target: __virtio16, + pub max_lun: __virtio32, +} +#[test] +fn bindgen_test_layout_virtio_scsi_config() { + assert_eq!( + ::std::mem::size_of::(), + 36usize, + concat!("Size of: ", stringify!(virtio_scsi_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(virtio_scsi_config)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).num_queues as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(num_queues) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).seg_max as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(seg_max) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).max_sectors as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(max_sectors) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).cmd_per_lun as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(cmd_per_lun) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).event_info_size as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(event_info_size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).sense_size as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(sense_size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).cdb_size as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(cdb_size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).max_channel as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(max_channel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).max_target as *const _ as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(max_target) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).max_lun as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(virtio_scsi_config), + "::", + stringify!(max_lun) + ) + ); +}