Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/if_hnvar.h
Show All 28 Lines | |||||
#ifndef _IF_HNVAR_H_ | #ifndef _IF_HNVAR_H_ | ||||
#define _IF_HNVAR_H_ | #define _IF_HNVAR_H_ | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <dev/hyperv/include/vmbus.h> | #include <dev/hyperv/include/vmbus.h> | ||||
#include <dev/hyperv/netvsc/if_hnreg.h> | #include <dev/hyperv/netvsc/if_hnreg.h> | ||||
struct netvsc_dev_; | struct hn_softc; | ||||
struct vmbus_channel; | struct vmbus_channel; | ||||
struct hn_send_ctx; | struct hn_send_ctx; | ||||
typedef void (*hn_sent_callback_t) | typedef void (*hn_sent_callback_t) | ||||
(struct hn_send_ctx *, struct netvsc_dev_ *, | (struct hn_send_ctx *, struct hn_softc *, | ||||
struct vmbus_channel *, const void *, int); | struct vmbus_channel *, const void *, int); | ||||
struct hn_send_ctx { | struct hn_send_ctx { | ||||
hn_sent_callback_t hn_cb; | hn_sent_callback_t hn_cb; | ||||
void *hn_cbarg; | void *hn_cbarg; | ||||
uint32_t hn_chim_idx; | uint32_t hn_chim_idx; | ||||
int hn_chim_sz; | int hn_chim_sz; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | hn_nvs_send_sglist(struct vmbus_channel *chan, struct vmbus_gpa sg[], int sglen, | ||||
void *nvs_msg, int nvs_msglen, struct hn_send_ctx *sndc) | void *nvs_msg, int nvs_msglen, struct hn_send_ctx *sndc) | ||||
{ | { | ||||
return (vmbus_chan_send_sglist(chan, sg, sglen, nvs_msg, nvs_msglen, | return (vmbus_chan_send_sglist(chan, sg, sglen, nvs_msg, nvs_msglen, | ||||
(uint64_t)(uintptr_t)sndc)); | (uint64_t)(uintptr_t)sndc)); | ||||
} | } | ||||
void hn_nvs_sent_xact(struct hn_send_ctx *sndc, | void hn_nvs_sent_xact(struct hn_send_ctx *sndc, | ||||
struct netvsc_dev_ *net_dev, struct vmbus_channel *chan, | struct hn_softc *sc, struct vmbus_channel *chan, | ||||
const void *data, int dlen); | const void *data, int dlen); | ||||
void hn_chim_free(struct netvsc_dev_ *net_dev, uint32_t chim_idx); | uint32_t hn_chim_alloc(struct hn_softc *sc); | ||||
void hn_chim_free(struct hn_softc *sc, uint32_t chim_idx); | |||||
#endif /* !_IF_HNVAR_H_ */ | #endif /* !_IF_HNVAR_H_ */ |