Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixlv.h
Show All 32 Lines | |||||
/*$FreeBSD$*/ | /*$FreeBSD$*/ | ||||
#ifndef _IXLV_H_ | #ifndef _IXLV_H_ | ||||
#define _IXLV_H_ | #define _IXLV_H_ | ||||
#include "ixlv_vc_mgr.h" | #include "ixlv_vc_mgr.h" | ||||
#define IXLV_AQ_MAX_ERR 30 | #define IXLV_AQ_MAX_ERR 200 | ||||
#define IXLV_MAX_INIT_WAIT 120 | |||||
#define IXLV_MAX_FILTERS 128 | #define IXLV_MAX_FILTERS 128 | ||||
#define IXLV_MAX_QUEUES 16 | #define IXLV_MAX_QUEUES 16 | ||||
#define IXLV_AQ_TIMEOUT (1 * hz) | #define IXLV_AQ_TIMEOUT (1 * hz) | ||||
#define IXLV_CALLOUT_TIMO (hz / 50) /* 20 msec */ | #define IXLV_CALLOUT_TIMO (hz / 50) /* 20 msec */ | ||||
#define IXLV_FLAG_AQ_ENABLE_QUEUES (u32)(1 << 0) | #define IXLV_FLAG_AQ_ENABLE_QUEUES (u32)(1 << 0) | ||||
#define IXLV_FLAG_AQ_DISABLE_QUEUES (u32)(1 << 1) | #define IXLV_FLAG_AQ_DISABLE_QUEUES (u32)(1 << 1) | ||||
#define IXLV_FLAG_AQ_ADD_MAC_FILTER (u32)(1 << 2) | #define IXLV_FLAG_AQ_ADD_MAC_FILTER (u32)(1 << 2) | ||||
Show All 23 Lines | #define IXLV_PRINTF_VF_OFFLOAD_FLAGS \ | ||||
"\4I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ" \ | "\4I40E_VIRTCHNL_VF_OFFLOAD_RSS_AQ" \ | ||||
"\5I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG" \ | "\5I40E_VIRTCHNL_VF_OFFLOAD_RSS_REG" \ | ||||
"\6I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR" \ | "\6I40E_VIRTCHNL_VF_OFFLOAD_WB_ON_ITR" \ | ||||
"\21I40E_VIRTCHNL_VF_OFFLOAD_VLAN" \ | "\21I40E_VIRTCHNL_VF_OFFLOAD_VLAN" \ | ||||
"\22I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING" \ | "\22I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING" \ | ||||
"\23I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2" \ | "\23I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2" \ | ||||
"\24I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF" | "\24I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF" | ||||
static MALLOC_DEFINE(M_IXLV, "ixlv", "ixlv driver allocations"); | |||||
/* Driver state */ | /* Driver state */ | ||||
enum ixlv_state_t { | enum ixlv_state_t { | ||||
IXLV_START, | IXLV_START, | ||||
IXLV_FAILED, | IXLV_FAILED, | ||||
IXLV_RESET_REQUIRED, | IXLV_RESET_REQUIRED, | ||||
IXLV_RESET_PENDING, | IXLV_RESET_PENDING, | ||||
IXLV_VERSION_CHECK, | IXLV_VERSION_CHECK, | ||||
IXLV_GET_RESOURCES, | IXLV_GET_RESOURCES, | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | struct ixlv_sc { | ||||
bool link_up; | bool link_up; | ||||
enum virtchnl_link_speed link_speed; | enum virtchnl_link_speed link_speed; | ||||
struct mtx mtx; | struct mtx mtx; | ||||
u32 qbase; | u32 qbase; | ||||
u32 admvec; | u32 admvec; | ||||
struct timeout_task timeout; | struct timeout_task timeout; | ||||
#ifdef notyet | |||||
struct task aq_irq; | struct task aq_irq; | ||||
struct task aq_sched; | struct task aq_sched; | ||||
struct taskqueue *tq; | #endif | ||||
struct ixl_vsi vsi; | struct ixl_vsi vsi; | ||||
/* Filter lists */ | /* Filter lists */ | ||||
struct mac_list *mac_filters; | struct mac_list *mac_filters; | ||||
struct vlan_list *vlan_filters; | struct vlan_list *vlan_filters; | ||||
/* Promiscuous mode */ | /* Promiscuous mode */ | ||||
Show All 23 Lines | #endif | ||||
/* Misc stats maintained by the driver */ | /* Misc stats maintained by the driver */ | ||||
u64 watchdog_events; | u64 watchdog_events; | ||||
u64 admin_irq; | u64 admin_irq; | ||||
u8 aq_buffer[IXL_AQ_BUF_SZ]; | u8 aq_buffer[IXL_AQ_BUF_SZ]; | ||||
}; | }; | ||||
#define IXLV_CORE_LOCK_ASSERT(sc) mtx_assert(&(sc)->mtx, MA_OWNED) | |||||
/* | /* | ||||
** This checks for a zero mac addr, something that will be likely | ** This checks for a zero mac addr, something that will be likely | ||||
** unless the Admin on the Host has created one. | ** unless the Admin on the Host has created one. | ||||
*/ | */ | ||||
static inline bool | static inline bool | ||||
ixlv_check_ether_addr(u8 *addr) | ixlv_check_ether_addr(u8 *addr) | ||||
{ | { | ||||
bool status = TRUE; | bool status = TRUE; | ||||
if ((addr[0] == 0 && addr[1]== 0 && addr[2] == 0 && | if ((addr[0] == 0 && addr[1]== 0 && addr[2] == 0 && | ||||
addr[3] == 0 && addr[4]== 0 && addr[5] == 0)) | addr[3] == 0 && addr[4]== 0 && addr[5] == 0)) | ||||
status = FALSE; | status = FALSE; | ||||
return (status); | return (status); | ||||
} | } | ||||
/* | /* | ||||
** VF Common function prototypes | ** VF Common function prototypes | ||||
*/ | */ | ||||
void ixlv_if_init(if_ctx_t ctx); | |||||
int ixlv_send_api_ver(struct ixlv_sc *); | int ixlv_send_api_ver(struct ixlv_sc *); | ||||
int ixlv_verify_api_ver(struct ixlv_sc *); | int ixlv_verify_api_ver(struct ixlv_sc *); | ||||
int ixlv_send_vf_config_msg(struct ixlv_sc *); | int ixlv_send_vf_config_msg(struct ixlv_sc *); | ||||
int ixlv_get_vf_config(struct ixlv_sc *); | int ixlv_get_vf_config(struct ixlv_sc *); | ||||
void ixlv_init(void *); | void ixlv_init(void *); | ||||
int ixlv_reinit_locked(struct ixlv_sc *); | int ixlv_reinit_locked(struct ixlv_sc *); | ||||
void ixlv_configure_queues(struct ixlv_sc *); | void ixlv_configure_queues(struct ixlv_sc *); | ||||
void ixlv_enable_queues(struct ixlv_sc *); | void ixlv_enable_queues(struct ixlv_sc *); | ||||
Show All 23 Lines |