Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | struct ixl_vf { | ||||
uint8_t mac[ETHER_ADDR_LEN]; | uint8_t mac[ETHER_ADDR_LEN]; | ||||
uint16_t vf_num; | uint16_t vf_num; | ||||
struct sysctl_ctx_list ctx; | struct sysctl_ctx_list ctx; | ||||
}; | }; | ||||
/* Physical controller structure */ | /* Physical controller structure */ | ||||
struct ixl_pf { | struct ixl_pf { | ||||
/* | |||||
** VSI - Stations: | |||||
** These are the traffic class holders, and | |||||
** will have a stack interface and queues | |||||
** associated with them. | |||||
** NOTE: for now using just one, so embed it. | |||||
** also, to make it interchangeable place it _first_ | |||||
*/ | |||||
struct ixl_vsi vsi; | |||||
struct i40e_hw hw; | struct i40e_hw hw; | ||||
struct i40e_osdep osdep; | struct i40e_osdep osdep; | ||||
struct device *dev; | device_t dev; | ||||
struct resource *pci_mem; | struct resource *pci_mem; | ||||
struct resource *msix_mem; | |||||
/* | /* | ||||
* Interrupt resources: this set is | * Interrupt resources: this set is | ||||
* either used for legacy, or for Link | * either used for legacy, or for Link | ||||
* when doing MSIX | * when doing MSIX | ||||
*/ | */ | ||||
void *tag; | |||||
struct resource *res; | |||||
struct callout timer; | |||||
int msix; | int msix; | ||||
int if_flags; | int if_flags; | ||||
struct mtx pf_mtx; | |||||
u32 qbase; | u32 qbase; | ||||
u32 admvec; | u32 admvec; | ||||
struct task adminq; | |||||
struct taskqueue *tq; | |||||
bool link_up; | bool link_up; | ||||
u32 link_speed; | u32 link_speed; | ||||
int advertised_speed; | int advertised_speed; | ||||
int fc; /* local flow ctrl setting */ | int fc; /* local flow ctrl setting */ | ||||
/* | |||||
** Network interfaces | |||||
** These are the traffic class holders, and | |||||
** will have a stack interface and queues | |||||
** associated with them. | |||||
** NOTE: The PF has only a single interface, | |||||
** so it is embedded in the PF struct. | |||||
*/ | |||||
struct ixl_vsi vsi; | |||||
/* Misc stats maintained by the driver */ | /* Misc stats maintained by the driver */ | ||||
u64 watchdog_events; | u64 watchdog_events; | ||||
u64 admin_irq; | u64 admin_irq; | ||||
/* Statistics from hw */ | /* Statistics from hw */ | ||||
struct i40e_hw_port_stats stats; | struct i40e_hw_port_stats stats; | ||||
struct i40e_hw_port_stats stats_offsets; | struct i40e_hw_port_stats stats_offsets; | ||||
bool stat_offsets_loaded; | bool stat_offsets_loaded; | ||||
Show All 17 Lines | |||||
#define I40E_VC_DEBUG(pf, level, ...) \ | #define I40E_VC_DEBUG(pf, level, ...) \ | ||||
do { \ | do { \ | ||||
if ((pf)->vc_debug_lvl >= (level)) \ | if ((pf)->vc_debug_lvl >= (level)) \ | ||||
device_printf((pf)->dev, __VA_ARGS__); \ | device_printf((pf)->dev, __VA_ARGS__); \ | ||||
} while (0) | } while (0) | ||||
#define i40e_send_vf_nack(pf, vf, op, st) \ | #define i40e_send_vf_nack(pf, vf, op, st) \ | ||||
ixl_send_vf_nack_msg((pf), (vf), (op), (st), __FILE__, __LINE__) | ixl_send_vf_nack_msg((pf), (vf), (op), (st), __FILE__, __LINE__) | ||||
#define IXL_PF_LOCK_INIT(_sc, _name) \ | |||||
mtx_init(&(_sc)->pf_mtx, _name, "IXL PF Lock", MTX_DEF) | |||||
#define IXL_PF_LOCK(_sc) mtx_lock(&(_sc)->pf_mtx) | |||||
#define IXL_PF_UNLOCK(_sc) mtx_unlock(&(_sc)->pf_mtx) | |||||
#define IXL_PF_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->pf_mtx) | |||||
#define IXL_PF_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->pf_mtx, MA_OWNED) | |||||
#endif /* _IXL_PF_H_ */ | #endif /* _IXL_PF_H_ */ |