Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_net_vsc.h
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | |||||
#define NETVSC_PACKET_SIZE PAGE_SIZE | #define NETVSC_PACKET_SIZE PAGE_SIZE | ||||
#define VRSS_SEND_TABLE_SIZE 16 | #define VRSS_SEND_TABLE_SIZE 16 | ||||
/* | /* | ||||
* Data types | * Data types | ||||
*/ | */ | ||||
/* | |||||
* Per netvsc channel-specific | |||||
*/ | |||||
typedef struct netvsc_dev_ { | |||||
struct hn_softc *sc; | |||||
/* Holds rndis device info */ | |||||
void *extension; | |||||
} netvsc_dev; | |||||
struct vmbus_channel; | struct vmbus_channel; | ||||
typedef void (*pfn_on_send_rx_completion)(struct vmbus_channel *, void *); | typedef void (*pfn_on_send_rx_completion)(struct vmbus_channel *, void *); | ||||
#define NETVSC_DEVICE_RING_BUFFER_SIZE (128 * PAGE_SIZE) | #define NETVSC_DEVICE_RING_BUFFER_SIZE (128 * PAGE_SIZE) | ||||
#define NETVSC_PACKET_MAXPAGE 32 | #define NETVSC_PACKET_MAXPAGE 32 | ||||
#define NETVSC_VLAN_PRIO_MASK 0xe000 | #define NETVSC_VLAN_PRIO_MASK 0xe000 | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | typedef struct hn_softc { | ||||
device_t hn_dev; | device_t hn_dev; | ||||
uint8_t hn_unit; | uint8_t hn_unit; | ||||
int hn_carrier; | int hn_carrier; | ||||
int hn_if_flags; | int hn_if_flags; | ||||
struct mtx hn_lock; | struct mtx hn_lock; | ||||
int hn_initdone; | int hn_initdone; | ||||
/* See hv_netvsc_drv_freebsd.c for rules on how to use */ | /* See hv_netvsc_drv_freebsd.c for rules on how to use */ | ||||
int temp_unusable; | int temp_unusable; | ||||
netvsc_dev *net_dev; | struct rndis_device_ *rndis_dev; | ||||
struct vmbus_channel *hn_prichan; | struct vmbus_channel *hn_prichan; | ||||
int hn_rx_ring_cnt; | int hn_rx_ring_cnt; | ||||
int hn_rx_ring_inuse; | int hn_rx_ring_inuse; | ||||
struct hn_rx_ring *hn_rx_ring; | struct hn_rx_ring *hn_rx_ring; | ||||
int hn_tx_ring_cnt; | int hn_tx_ring_cnt; | ||||
int hn_tx_ring_inuse; | int hn_tx_ring_inuse; | ||||
Show All 26 Lines | |||||
/* | /* | ||||
* Externs | * Externs | ||||
*/ | */ | ||||
extern int hv_promisc_mode; | extern int hv_promisc_mode; | ||||
struct hn_send_ctx; | struct hn_send_ctx; | ||||
void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); | void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); | ||||
netvsc_dev *hv_nv_on_device_add(struct hn_softc *sc, | int hv_nv_on_device_add(struct hn_softc *sc, struct hn_rx_ring *rxr); | ||||
void *additional_info, struct hn_rx_ring *rxr); | |||||
int hv_nv_on_device_remove(struct hn_softc *sc, | int hv_nv_on_device_remove(struct hn_softc *sc, | ||||
boolean_t destroy_channel); | boolean_t destroy_channel); | ||||
int hv_nv_on_send(struct vmbus_channel *chan, uint32_t rndis_mtype, | int hv_nv_on_send(struct vmbus_channel *chan, uint32_t rndis_mtype, | ||||
struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); | struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); | ||||
void hv_nv_subchan_attach(struct vmbus_channel *chan, | void hv_nv_subchan_attach(struct vmbus_channel *chan, | ||||
struct hn_rx_ring *rxr); | struct hn_rx_ring *rxr); | ||||
#endif /* __HV_NET_VSC_H__ */ | #endif /* __HV_NET_VSC_H__ */ | ||||