Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/netvsc/hv_net_vsc.h
Show First 20 Lines • Show All 987 Lines • ▼ Show 20 Lines | |||||
typedef struct { | typedef struct { | ||||
uint8_t mac_addr[6]; /* Assumption unsigned long */ | uint8_t mac_addr[6]; /* Assumption unsigned long */ | ||||
hv_bool_uint8_t link_state; | hv_bool_uint8_t link_state; | ||||
} netvsc_device_info; | } netvsc_device_info; | ||||
struct hn_txdesc; | struct hn_txdesc; | ||||
SLIST_HEAD(hn_txdesc_list, hn_txdesc); | SLIST_HEAD(hn_txdesc_list, hn_txdesc); | ||||
struct hn_rx_ring { | |||||
struct lro_ctrl hn_lro; | |||||
/* Trust csum verification on host side */ | |||||
int hn_trust_hcsum; /* HN_TRUST_HCSUM_ */ | |||||
u_long hn_csum_ip; | |||||
u_long hn_csum_tcp; | |||||
u_long hn_csum_udp; | |||||
u_long hn_csum_trusted; | |||||
u_long hn_lro_tried; | |||||
u_long hn_small_pkts; | |||||
} __aligned(CACHE_LINE_SIZE); | |||||
#define HN_TRUST_HCSUM_IP 0x0001 | |||||
#define HN_TRUST_HCSUM_TCP 0x0002 | |||||
#define HN_TRUST_HCSUM_UDP 0x0004 | |||||
/* | /* | ||||
* Device-specific softc structure | * Device-specific softc structure | ||||
*/ | */ | ||||
typedef struct hn_softc { | typedef struct hn_softc { | ||||
struct ifnet *hn_ifp; | struct ifnet *hn_ifp; | ||||
struct ifmedia hn_media; | struct ifmedia hn_media; | ||||
device_t hn_dev; | device_t hn_dev; | ||||
uint8_t hn_unit; | uint8_t hn_unit; | ||||
Show All 20 Lines | typedef struct hn_softc { | ||||
int hn_txeof; | int hn_txeof; | ||||
int hn_sched_tx; | int hn_sched_tx; | ||||
int hn_direct_tx_size; | int hn_direct_tx_size; | ||||
struct taskqueue *hn_tx_taskq; | struct taskqueue *hn_tx_taskq; | ||||
struct task hn_start_task; | struct task hn_start_task; | ||||
struct task hn_txeof_task; | struct task hn_txeof_task; | ||||
struct lro_ctrl hn_lro; | int hn_rx_ring_cnt; | ||||
struct hn_rx_ring *hn_rx_ring; | |||||
/* Trust csum verification on host side */ | |||||
int hn_trust_hcsum; /* HN_TRUST_HCSUM_ */ | |||||
u_long hn_csum_ip; | |||||
u_long hn_csum_tcp; | |||||
u_long hn_csum_udp; | |||||
u_long hn_csum_trusted; | |||||
u_long hn_lro_tried; | |||||
u_long hn_small_pkts; | |||||
u_long hn_no_txdescs; | u_long hn_no_txdescs; | ||||
u_long hn_send_failed; | u_long hn_send_failed; | ||||
u_long hn_txdma_failed; | u_long hn_txdma_failed; | ||||
u_long hn_tx_collapsed; | u_long hn_tx_collapsed; | ||||
u_long hn_tx_chimney; | u_long hn_tx_chimney; | ||||
} hn_softc_t; | } hn_softc_t; | ||||
#define HN_TRUST_HCSUM_IP 0x0001 | |||||
#define HN_TRUST_HCSUM_TCP 0x0002 | |||||
#define HN_TRUST_HCSUM_UDP 0x0004 | |||||
/* | /* | ||||
* Externs | * Externs | ||||
*/ | */ | ||||
extern int hv_promisc_mode; | extern int hv_promisc_mode; | ||||
void netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status); | void netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status); | ||||
void netvsc_xmit_completion(void *context); | void netvsc_xmit_completion(void *context); | ||||
Show All 11 Lines |