Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_net_vsc.h
Show First 20 Lines • Show All 1,005 Lines • ▼ Show 20 Lines | struct hn_rx_ring { | ||||
u_long hn_lro_tried; | u_long hn_lro_tried; | ||||
u_long hn_small_pkts; | u_long hn_small_pkts; | ||||
} __aligned(CACHE_LINE_SIZE); | } __aligned(CACHE_LINE_SIZE); | ||||
#define HN_TRUST_HCSUM_IP 0x0001 | #define HN_TRUST_HCSUM_IP 0x0001 | ||||
#define HN_TRUST_HCSUM_TCP 0x0002 | #define HN_TRUST_HCSUM_TCP 0x0002 | ||||
#define HN_TRUST_HCSUM_UDP 0x0004 | #define HN_TRUST_HCSUM_UDP 0x0004 | ||||
struct hn_tx_ring { | |||||
struct mtx hn_txlist_spin; | |||||
struct hn_txdesc_list hn_txlist; | |||||
int hn_txdesc_cnt; | |||||
int hn_txdesc_avail; | |||||
int hn_txeof; | |||||
int hn_sched_tx; | |||||
struct taskqueue *hn_tx_taskq; | |||||
struct task hn_start_task; | |||||
struct task hn_txeof_task; | |||||
struct mtx hn_tx_lock; | |||||
struct hn_softc *hn_sc; | |||||
int hn_direct_tx_size; | |||||
int hn_tx_chimney_size; | |||||
bus_dma_tag_t hn_tx_data_dtag; | |||||
uint64_t hn_csum_assist; | |||||
u_long hn_no_txdescs; | |||||
u_long hn_send_failed; | |||||
u_long hn_txdma_failed; | |||||
u_long hn_tx_collapsed; | |||||
u_long hn_tx_chimney; | |||||
/* Rarely used stuffs */ | |||||
struct hn_txdesc *hn_txdesc; | |||||
bus_dma_tag_t hn_tx_rndis_dtag; | |||||
struct sysctl_oid *hn_tx_sysctl_tree; | |||||
} __aligned(CACHE_LINE_SIZE); | |||||
/* | /* | ||||
* 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; | ||||
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; | ||||
struct hv_device *hn_dev_obj; | struct hv_device *hn_dev_obj; | ||||
netvsc_dev *net_dev; | netvsc_dev *net_dev; | ||||
struct hn_txdesc *hn_txdesc; | |||||
bus_dma_tag_t hn_tx_data_dtag; | |||||
bus_dma_tag_t hn_tx_rndis_dtag; | |||||
int hn_tx_chimney_size; | |||||
int hn_tx_chimney_max; | |||||
uint64_t hn_csum_assist; | |||||
struct mtx hn_txlist_spin; | |||||
struct hn_txdesc_list hn_txlist; | |||||
int hn_txdesc_cnt; | |||||
int hn_txdesc_avail; | |||||
int hn_txeof; | |||||
int hn_sched_tx; | |||||
int hn_direct_tx_size; | |||||
struct taskqueue *hn_tx_taskq; | |||||
struct task hn_start_task; | |||||
struct task hn_txeof_task; | |||||
int hn_rx_ring_cnt; | int hn_rx_ring_cnt; | ||||
struct hn_rx_ring *hn_rx_ring; | struct hn_rx_ring *hn_rx_ring; | ||||
u_long hn_no_txdescs; | int hn_tx_ring_cnt; | ||||
u_long hn_send_failed; | struct hn_tx_ring *hn_tx_ring; | ||||
u_long hn_txdma_failed; | int hn_tx_chimney_max; | ||||
u_long hn_tx_collapsed; | struct taskqueue *hn_tx_taskq; | ||||
u_long hn_tx_chimney; | struct sysctl_oid *hn_tx_sysctl_tree; | ||||
} hn_softc_t; | } hn_softc_t; | ||||
/* | /* | ||||
* 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); | ||||
Show All 12 Lines |