Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/hv_net_vsc.h
Show First 20 Lines • Show All 1,106 Lines • ▼ Show 20 Lines | |||||
#ifdef __LP64__ | #ifdef __LP64__ | ||||
#define BITS_PER_LONG 64 | #define BITS_PER_LONG 64 | ||||
#else | #else | ||||
#define BITS_PER_LONG 32 | #define BITS_PER_LONG 32 | ||||
#endif | #endif | ||||
typedef struct netvsc_packet_ { | typedef struct netvsc_packet_ { | ||||
uint8_t is_data_pkt; /* One byte */ | |||||
uint16_t vlan_tci; | uint16_t vlan_tci; | ||||
uint32_t status; | uint32_t status; | ||||
/* Completion */ | |||||
union { | |||||
struct { | |||||
uint64_t rx_completion_tid; | |||||
void *rx_completion_context; | |||||
/* This is no longer used */ | |||||
pfn_on_send_rx_completion on_rx_completion; | |||||
} rx; | |||||
struct { | |||||
uint64_t send_completion_tid; | |||||
void *send_completion_context; | |||||
/* Still used in netvsc and filter code */ | |||||
pfn_on_send_rx_completion on_send_completion; | |||||
} send; | |||||
} compl; | |||||
uint32_t send_buf_section_idx; | |||||
uint32_t send_buf_section_size; | |||||
void *rndis_mesg; | |||||
uint32_t tot_data_buf_len; | uint32_t tot_data_buf_len; | ||||
void *data; | void *data; | ||||
} netvsc_packet; | } netvsc_packet; | ||||
typedef struct { | typedef struct { | ||||
uint8_t mac_addr[6]; /* Assumption unsigned long */ | uint8_t mac_addr[6]; /* Assumption unsigned long */ | ||||
uint8_t link_state; | uint8_t link_state; | ||||
} netvsc_device_info; | } netvsc_device_info; | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | typedef struct hn_softc { | ||||
struct sysctl_oid *hn_tx_sysctl_tree; | struct sysctl_oid *hn_tx_sysctl_tree; | ||||
struct sysctl_oid *hn_rx_sysctl_tree; | struct sysctl_oid *hn_rx_sysctl_tree; | ||||
} hn_softc_t; | } hn_softc_t; | ||||
/* | /* | ||||
* Externs | * Externs | ||||
*/ | */ | ||||
extern int hv_promisc_mode; | extern int hv_promisc_mode; | ||||
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, | netvsc_dev *hv_nv_on_device_add(struct hn_softc *sc, | ||||
void *additional_info, 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, netvsc_packet *pkt, | int hv_nv_on_send(struct vmbus_channel *chan, bool is_data_pkt, | ||||
struct vmbus_gpa *gpa, int gpa_cnt); | struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); | ||||
int hv_nv_get_next_send_section(netvsc_dev *net_dev); | int hv_nv_get_next_send_section(netvsc_dev *net_dev); | ||||
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__ */ | ||||