Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/netvsc/hv_net_vsc.h
Show First 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | |||||
#define TRANSPORT_TYPE_NOT_IP 0 | #define TRANSPORT_TYPE_NOT_IP 0 | ||||
#define TRANSPORT_TYPE_IPV4_TCP ((TYPE_IPV4 << 16) | TYPE_TCP) | #define TRANSPORT_TYPE_IPV4_TCP ((TYPE_IPV4 << 16) | TYPE_TCP) | ||||
#define TRANSPORT_TYPE_IPV4_UDP ((TYPE_IPV4 << 16) | TYPE_UDP) | #define TRANSPORT_TYPE_IPV4_UDP ((TYPE_IPV4 << 16) | TYPE_UDP) | ||||
#define TRANSPORT_TYPE_IPV6_TCP ((TYPE_IPV6 << 16) | TYPE_TCP) | #define TRANSPORT_TYPE_IPV6_TCP ((TYPE_IPV6 << 16) | TYPE_TCP) | ||||
#define TRANSPORT_TYPE_IPV6_UDP ((TYPE_IPV6 << 16) | TYPE_UDP) | #define TRANSPORT_TYPE_IPV6_UDP ((TYPE_IPV6 << 16) | TYPE_UDP) | ||||
typedef struct { | typedef struct { | ||||
uint8_t mac_addr[6]; /* Assumption unsigned long */ | uint8_t mac_addr[ETHER_ADDR_LEN]; | ||||
uint8_t link_state; | uint32_t link_state; | ||||
} netvsc_device_info; | } netvsc_device_info; | ||||
#define HN_XACT_REQ_PGCNT 2 | #define HN_XACT_REQ_PGCNT 2 | ||||
#define HN_XACT_RESP_PGCNT 2 | #define HN_XACT_RESP_PGCNT 2 | ||||
#define HN_XACT_REQ_SIZE (HN_XACT_REQ_PGCNT * PAGE_SIZE) | #define HN_XACT_REQ_SIZE (HN_XACT_REQ_PGCNT * PAGE_SIZE) | ||||
#define HN_XACT_RESP_SIZE (HN_XACT_RESP_PGCNT * PAGE_SIZE) | #define HN_XACT_RESP_SIZE (HN_XACT_RESP_PGCNT * PAGE_SIZE) | ||||
#ifndef HN_USE_TXDESC_BUFRING | #ifndef HN_USE_TXDESC_BUFRING | ||||
▲ Show 20 Lines • Show All 96 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; | ||||
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 32 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); | ||||
int hv_nv_on_device_add(struct hn_softc *sc, struct hn_rx_ring *rxr); | int hv_nv_on_device_add(struct hn_softc *sc, 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); | |||||
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__ */ | ||||