Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/if_hnreg.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* NVS versions. | * NVS versions. | ||||
*/ | */ | ||||
#define HN_NVS_VERSION_1 0x00002 | #define HN_NVS_VERSION_1 0x00002 | ||||
#define HN_NVS_VERSION_2 0x30002 | #define HN_NVS_VERSION_2 0x30002 | ||||
#define HN_NVS_VERSION_4 0x40000 | #define HN_NVS_VERSION_4 0x40000 | ||||
#define HN_NVS_VERSION_5 0x50000 | #define HN_NVS_VERSION_5 0x50000 | ||||
#define HN_NVS_VERSION_6 0x60000 | |||||
#define HN_NVS_VERSION_61 0x60001 | |||||
#define HN_NVS_RXBUF_SIG 0xcafe | #define HN_NVS_RXBUF_SIG 0xcafe | ||||
#define HN_NVS_CHIM_SIG 0xface | #define HN_NVS_CHIM_SIG 0xface | ||||
#define HN_NVS_CHIM_IDX_INVALID 0xffffffff | #define HN_NVS_CHIM_IDX_INVALID 0xffffffff | ||||
#define HN_NVS_RNDIS_MTYPE_DATA 0 | #define HN_NVS_RNDIS_MTYPE_DATA 0 | ||||
#define HN_NVS_RNDIS_MTYPE_CTRL 1 | #define HN_NVS_RNDIS_MTYPE_CTRL 1 | ||||
Show All 37 Lines | struct hn_nvs_hdr { | ||||
uint32_t nvs_type; | uint32_t nvs_type; | ||||
} __packed; | } __packed; | ||||
struct hn_nvs_init { | struct hn_nvs_init { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_INIT */ | uint32_t nvs_type; /* HN_NVS_TYPE_INIT */ | ||||
uint32_t nvs_ver_min; | uint32_t nvs_ver_min; | ||||
uint32_t nvs_ver_max; | uint32_t nvs_ver_max; | ||||
uint8_t nvs_rsvd[20]; | uint8_t nvs_rsvd[20]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_init) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_init) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_init_resp { | struct hn_nvs_init_resp { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_INIT_RESP */ | uint32_t nvs_type; /* HN_NVS_TYPE_INIT_RESP */ | ||||
uint32_t nvs_ver; /* deprecated */ | uint32_t nvs_ver; /* deprecated */ | ||||
uint32_t nvs_rsvd; | uint32_t nvs_rsvd; | ||||
uint32_t nvs_status; /* HN_NVS_STATUS_ */ | uint32_t nvs_status; /* HN_NVS_STATUS_ */ | ||||
} __packed; | } __packed; | ||||
/* No reponse */ | /* No reponse */ | ||||
struct hn_nvs_ndis_conf { | struct hn_nvs_ndis_conf { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_NDIS_CONF */ | uint32_t nvs_type; /* HN_NVS_TYPE_NDIS_CONF */ | ||||
uint32_t nvs_mtu; | uint32_t nvs_mtu; | ||||
uint32_t nvs_rsvd; | uint32_t nvs_rsvd; | ||||
uint64_t nvs_caps; /* HN_NVS_NDIS_CONF_ */ | uint64_t nvs_caps; /* HN_NVS_NDIS_CONF_ */ | ||||
uint8_t nvs_rsvd1[12]; | uint8_t nvs_rsvd1[12]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_ndis_conf) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_ndis_conf) >= HN_NVS_REQSIZE_MIN); | ||||
#define HN_NVS_NDIS_CONF_SRIOV 0x0004 | #define HN_NVS_NDIS_CONF_SRIOV 0x0004 | ||||
#define HN_NVS_NDIS_CONF_VLAN 0x0008 | #define HN_NVS_NDIS_CONF_VLAN 0x0008 | ||||
#define HN_NVS_NDIS_CONF_RSC 0x0080 | |||||
/* No response */ | /* No response */ | ||||
struct hn_nvs_ndis_init { | struct hn_nvs_ndis_init { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_NDIS_INIT */ | uint32_t nvs_type; /* HN_NVS_TYPE_NDIS_INIT */ | ||||
uint32_t nvs_ndis_major; /* NDIS_VERSION_MAJOR_ */ | uint32_t nvs_ndis_major; /* NDIS_VERSION_MAJOR_ */ | ||||
uint32_t nvs_ndis_minor; /* NDIS_VERSION_MINOR_ */ | uint32_t nvs_ndis_minor; /* NDIS_VERSION_MINOR_ */ | ||||
uint8_t nvs_rsvd[20]; | uint8_t nvs_rsvd[20]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_ndis_init) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_ndis_init) >= HN_NVS_REQSIZE_MIN); | ||||
#define HN_NVS_DATAPATH_SYNTH 0 | #define HN_NVS_DATAPATH_SYNTH 0 | ||||
#define HN_NVS_DATAPATH_VF 1 | #define HN_NVS_DATAPATH_VF 1 | ||||
/* No response */ | /* No response */ | ||||
struct hn_nvs_datapath { | struct hn_nvs_datapath { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_SET_DATAPATH */ | uint32_t nvs_type; /* HN_NVS_TYPE_SET_DATAPATH */ | ||||
uint32_t nvs_active_path;/* HN_NVS_DATAPATH_* */ | uint32_t nvs_active_path;/* HN_NVS_DATAPATH_* */ | ||||
uint32_t nvs_rsvd[6]; | uint32_t nvs_rsvd[6]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_datapath) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_datapath) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_rxbuf_conn { | struct hn_nvs_rxbuf_conn { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONN */ | uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONN */ | ||||
uint32_t nvs_gpadl; /* RXBUF vmbus GPADL */ | uint32_t nvs_gpadl; /* RXBUF vmbus GPADL */ | ||||
uint16_t nvs_sig; /* HN_NVS_RXBUF_SIG */ | uint16_t nvs_sig; /* HN_NVS_RXBUF_SIG */ | ||||
uint8_t nvs_rsvd[22]; | uint8_t nvs_rsvd[22]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_rxbuf_conn) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_rxbuf_conn) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_rxbuf_sect { | struct hn_nvs_rxbuf_sect { | ||||
uint32_t nvs_start; | uint32_t nvs_start; | ||||
uint32_t nvs_slotsz; | uint32_t nvs_slotsz; | ||||
uint32_t nvs_slotcnt; | uint32_t nvs_slotcnt; | ||||
uint32_t nvs_end; | uint32_t nvs_end; | ||||
} __packed; | } __packed; | ||||
struct hn_nvs_rxbuf_connresp { | struct hn_nvs_rxbuf_connresp { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONNRESP */ | uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_CONNRESP */ | ||||
uint32_t nvs_status; /* HN_NVS_STATUS_ */ | uint32_t nvs_status; /* HN_NVS_STATUS_ */ | ||||
uint32_t nvs_nsect; /* # of elem in nvs_sect */ | uint32_t nvs_nsect; /* # of elem in nvs_sect */ | ||||
struct hn_nvs_rxbuf_sect nvs_sect[]; | struct hn_nvs_rxbuf_sect nvs_sect[]; | ||||
} __packed; | } __packed; | ||||
/* No response */ | /* No response */ | ||||
struct hn_nvs_rxbuf_disconn { | struct hn_nvs_rxbuf_disconn { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_DISCONN */ | uint32_t nvs_type; /* HN_NVS_TYPE_RXBUF_DISCONN */ | ||||
uint16_t nvs_sig; /* HN_NVS_RXBUF_SIG */ | uint16_t nvs_sig; /* HN_NVS_RXBUF_SIG */ | ||||
uint8_t nvs_rsvd[26]; | uint8_t nvs_rsvd[26]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_rxbuf_disconn) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_rxbuf_disconn) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_chim_conn { | struct hn_nvs_chim_conn { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_CONN */ | uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_CONN */ | ||||
uint32_t nvs_gpadl; /* chimney buf vmbus GPADL */ | uint32_t nvs_gpadl; /* chimney buf vmbus GPADL */ | ||||
uint16_t nvs_sig; /* NDIS_NVS_CHIM_SIG */ | uint16_t nvs_sig; /* NDIS_NVS_CHIM_SIG */ | ||||
uint8_t nvs_rsvd[22]; | uint8_t nvs_rsvd[22]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_chim_conn) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_chim_conn) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_chim_connresp { | struct hn_nvs_chim_connresp { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_CONNRESP */ | uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_CONNRESP */ | ||||
uint32_t nvs_status; /* HN_NVS_STATUS_ */ | uint32_t nvs_status; /* HN_NVS_STATUS_ */ | ||||
uint32_t nvs_sectsz; /* section size */ | uint32_t nvs_sectsz; /* section size */ | ||||
} __packed; | } __packed; | ||||
/* No response */ | /* No response */ | ||||
struct hn_nvs_chim_disconn { | struct hn_nvs_chim_disconn { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_DISCONN */ | uint32_t nvs_type; /* HN_NVS_TYPE_CHIM_DISCONN */ | ||||
uint16_t nvs_sig; /* HN_NVS_CHIM_SIG */ | uint16_t nvs_sig; /* HN_NVS_CHIM_SIG */ | ||||
uint8_t nvs_rsvd[26]; | uint8_t nvs_rsvd[26]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_chim_disconn) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_chim_disconn) >= HN_NVS_REQSIZE_MIN); | ||||
#define HN_NVS_SUBCH_OP_ALLOC 1 | #define HN_NVS_SUBCH_OP_ALLOC 1 | ||||
struct hn_nvs_subch_req { | struct hn_nvs_subch_req { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_SUBCH_REQ */ | uint32_t nvs_type; /* HN_NVS_TYPE_SUBCH_REQ */ | ||||
uint32_t nvs_op; /* HN_NVS_SUBCH_OP_ */ | uint32_t nvs_op; /* HN_NVS_SUBCH_OP_ */ | ||||
uint32_t nvs_nsubch; | uint32_t nvs_nsubch; | ||||
uint8_t nvs_rsvd[20]; | uint8_t nvs_rsvd[20]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_subch_req) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_subch_req) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_subch_resp { | struct hn_nvs_subch_resp { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_SUBCH_RESP */ | uint32_t nvs_type; /* HN_NVS_TYPE_SUBCH_RESP */ | ||||
uint32_t nvs_status; /* HN_NVS_STATUS_ */ | uint32_t nvs_status; /* HN_NVS_STATUS_ */ | ||||
uint32_t nvs_nsubch; | uint32_t nvs_nsubch; | ||||
} __packed; | } __packed; | ||||
struct hn_nvs_rndis { | struct hn_nvs_rndis { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_RNDIS */ | uint32_t nvs_type; /* HN_NVS_TYPE_RNDIS */ | ||||
uint32_t nvs_rndis_mtype;/* HN_NVS_RNDIS_MTYPE_ */ | uint32_t nvs_rndis_mtype;/* HN_NVS_RNDIS_MTYPE_ */ | ||||
/* | /* | ||||
* Chimney sending buffer index and size. | * Chimney sending buffer index and size. | ||||
* | * | ||||
* NOTE: | * NOTE: | ||||
* If nvs_chim_idx is set to HN_NVS_CHIM_IDX_INVALID | * If nvs_chim_idx is set to HN_NVS_CHIM_IDX_INVALID | ||||
* and nvs_chim_sz is set to 0, then chimney sending | * and nvs_chim_sz is set to 0, then chimney sending | ||||
* buffer is _not_ used by this RNDIS message. | * buffer is _not_ used by this RNDIS message. | ||||
*/ | */ | ||||
uint32_t nvs_chim_idx; | uint32_t nvs_chim_idx; | ||||
uint32_t nvs_chim_sz; | uint32_t nvs_chim_sz; | ||||
uint8_t nvs_rsvd[16]; | uint8_t nvs_rsvd[16]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_rndis) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_rndis) >= HN_NVS_REQSIZE_MIN); | ||||
struct hn_nvs_rndis_ack { | struct hn_nvs_rndis_ack { | ||||
uint32_t nvs_type; /* HN_NVS_TYPE_RNDIS_ACK */ | uint32_t nvs_type; /* HN_NVS_TYPE_RNDIS_ACK */ | ||||
uint32_t nvs_status; /* HN_NVS_STATUS_ */ | uint32_t nvs_status; /* HN_NVS_STATUS_ */ | ||||
uint8_t nvs_rsvd[24]; | uint8_t nvs_rsvd[24]; | ||||
uint8_t nvs_msg_pad[8]; | |||||
} __packed; | } __packed; | ||||
CTASSERT(sizeof(struct hn_nvs_rndis_ack) >= HN_NVS_REQSIZE_MIN); | CTASSERT(sizeof(struct hn_nvs_rndis_ack) >= HN_NVS_REQSIZE_MIN); | ||||
/* | /* | ||||
* RNDIS extension | * RNDIS extension | ||||
*/ | */ | ||||
/* Per-packet hash info */ | /* Per-packet hash info */ | ||||
Show All 13 Lines |