Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_qmgr.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
#define IXL_MAX_SCATTERED_QUEUES 16 | #define IXL_MAX_SCATTERED_QUEUES 16 | ||||
#define IXL_MAX_CONTIGUOUS_QUEUES_XL710 64 | #define IXL_MAX_CONTIGUOUS_QUEUES_XL710 64 | ||||
#define IXL_MAX_CONTIGUOUS_QUEUES_X722 128 | #define IXL_MAX_CONTIGUOUS_QUEUES_X722 128 | ||||
/* Structures */ | /* Structures */ | ||||
/* Manager */ | /* Manager */ | ||||
struct ixl_pf_qmgr_qinfo { | struct ixl_pf_qmgr_qinfo { | ||||
bool allocated; | u8 allocated; | ||||
bool tx_enabled; | u8 tx_enabled; | ||||
bool rx_enabled; | u8 rx_enabled; | ||||
bool tx_configured; | u8 tx_configured; | ||||
bool rx_configured; | u8 rx_configured; | ||||
}; | }; | ||||
struct ixl_pf_qmgr { | struct ixl_pf_qmgr { | ||||
u16 num_queues; | u16 num_queues; | ||||
struct ixl_pf_qmgr_qinfo *qinfo; | struct ixl_pf_qmgr_qinfo *qinfo; | ||||
}; | }; | ||||
/* Tag */ | /* Tag */ | ||||
enum ixl_pf_qmgr_qalloc_type { | enum ixl_pf_qmgr_qalloc_type { | ||||
IXL_PF_QALLOC_CONTIGUOUS, | IXL_PF_QALLOC_CONTIGUOUS, | ||||
IXL_PF_QALLOC_SCATTERED | IXL_PF_QALLOC_SCATTERED | ||||
}; | }; | ||||
struct ixl_pf_qtag { | struct ixl_pf_qtag { | ||||
struct ixl_pf_qmgr *qmgr; | struct ixl_pf_qmgr *qmgr; | ||||
enum ixl_pf_qmgr_qalloc_type type; | enum ixl_pf_qmgr_qalloc_type type; | ||||
union { | |||||
u16 qidx[IXL_MAX_SCATTERED_QUEUES]; | u16 qidx[IXL_MAX_SCATTERED_QUEUES]; | ||||
u16 first_qidx; | |||||
}; | |||||
u16 num_allocated; | u16 num_allocated; | ||||
u16 num_active; | u16 num_active; | ||||
}; | }; | ||||
/* Public manager functions */ | /* Public manager functions */ | ||||
int ixl_pf_qmgr_init(struct ixl_pf_qmgr *qmgr, u16 num_queues); | int ixl_pf_qmgr_init(struct ixl_pf_qmgr *qmgr, u16 num_queues); | ||||
void ixl_pf_qmgr_destroy(struct ixl_pf_qmgr *qmgr); | void ixl_pf_qmgr_destroy(struct ixl_pf_qmgr *qmgr); | ||||
Show All 24 Lines |