Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | struct vmbus_channel { | ||||
/* If this is a sub-channel */ | /* If this is a sub-channel */ | ||||
TAILQ_ENTRY(vmbus_channel) ch_sublink; /* sub-channel link */ | TAILQ_ENTRY(vmbus_channel) ch_sublink; /* sub-channel link */ | ||||
struct vmbus_channel *ch_prichan; /* owner primary chan */ | struct vmbus_channel *ch_prichan; /* owner primary chan */ | ||||
void *ch_bufring; /* TX+RX bufrings */ | void *ch_bufring; /* TX+RX bufrings */ | ||||
struct hyperv_dma ch_bufring_dma; | struct hyperv_dma ch_bufring_dma; | ||||
uint32_t ch_bufring_gpadl; | uint32_t ch_bufring_gpadl; | ||||
struct task ch_detach_task; | struct task ch_attach_task; /* run in ch_mgmt_tq */ | ||||
struct task ch_detach_task; /* run in ch_mgmt_tq */ | |||||
struct taskqueue *ch_mgmt_tq; | |||||
/* If this is a primary channel */ | |||||
TAILQ_ENTRY(vmbus_channel) ch_prilink; /* primary chan link */ | TAILQ_ENTRY(vmbus_channel) ch_prilink; /* primary chan link */ | ||||
TAILQ_ENTRY(vmbus_channel) ch_link; /* channel link */ | |||||
uint32_t ch_subidx; /* subchan index */ | uint32_t ch_subidx; /* subchan index */ | ||||
volatile uint32_t ch_stflags; /* atomic-op */ | volatile uint32_t ch_stflags; /* atomic-op */ | ||||
/* VMBUS_CHAN_ST_ */ | /* VMBUS_CHAN_ST_ */ | ||||
struct hyperv_guid ch_guid_type; | struct hyperv_guid ch_guid_type; | ||||
struct hyperv_guid ch_guid_inst; | struct hyperv_guid ch_guid_inst; | ||||
struct sysctl_ctx_list ch_sysctl_ctx; | struct sysctl_ctx_list ch_sysctl_ctx; | ||||
} __aligned(CACHE_LINE_SIZE); | } __aligned(CACHE_LINE_SIZE); | ||||
#define VMBUS_CHAN_ISPRIMARY(chan) ((chan)->ch_subidx == 0) | #define VMBUS_CHAN_ISPRIMARY(chan) ((chan)->ch_subidx == 0) | ||||
/* | /* | ||||
* If this flag is set, this channel's interrupt will be masked in ISR, | * If this flag is set, this channel's interrupt will be masked in ISR, | ||||
* and the RX bufring will be drained before this channel's interrupt is | * and the RX bufring will be drained before this channel's interrupt is | ||||
* unmasked. | * unmasked. | ||||
* | * | ||||
* This flag is turned on by default. Drivers can turn it off according | * This flag is turned on by default. Drivers can turn it off according | ||||
* to their own requirement. | * to their own requirement. | ||||
*/ | */ | ||||
#define VMBUS_CHAN_FLAG_BATCHREAD 0x0002 | #define VMBUS_CHAN_FLAG_BATCHREAD 0x0002 | ||||
#define VMBUS_CHAN_TXF_HASMNF 0x0001 | #define VMBUS_CHAN_TXF_HASMNF 0x0001 | ||||
#define VMBUS_CHAN_ST_OPENED_SHIFT 0 | #define VMBUS_CHAN_ST_OPENED_SHIFT 0 | ||||
#define VMBUS_CHAN_ST_ONPRIL_SHIFT 1 | |||||
#define VMBUS_CHAN_ST_ONSUBL_SHIFT 2 | |||||
#define VMBUS_CHAN_ST_ONLIST_SHIFT 3 | |||||
#define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT) | #define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT) | ||||
#define VMBUS_CHAN_ST_ONPRIL (1 << VMBUS_CHAN_ST_ONPRIL_SHIFT) | |||||
#define VMBUS_CHAN_ST_ONSUBL (1 << VMBUS_CHAN_ST_ONSUBL_SHIFT) | |||||
#define VMBUS_CHAN_ST_ONLIST (1 << VMBUS_CHAN_ST_ONLIST_SHIFT) | |||||
struct vmbus_softc; | struct vmbus_softc; | ||||
struct vmbus_message; | struct vmbus_message; | ||||
void vmbus_event_proc(struct vmbus_softc *, int); | void vmbus_event_proc(struct vmbus_softc *, int); | ||||
void vmbus_event_proc_compat(struct vmbus_softc *, int); | void vmbus_event_proc_compat(struct vmbus_softc *, int); | ||||
void vmbus_chan_msgproc(struct vmbus_softc *, | void vmbus_chan_msgproc(struct vmbus_softc *, | ||||
const struct vmbus_message *); | const struct vmbus_message *); | ||||
void vmbus_chan_destroy_all(struct vmbus_softc *); | void vmbus_chan_destroy_all(struct vmbus_softc *); | ||||
#endif /* !_VMBUS_CHANVAR_H_ */ | #endif /* !_VMBUS_CHANVAR_H_ */ |