#ifndef __BNXT_QPLIB_RES_H__
#define __BNXT_QPLIB_RES_H__
extern const struct bnxt_qplib_gid bnxt_qplib_gid_zero;
#define CHIP_NUM_57508 …
#define CHIP_NUM_57504 …
#define CHIP_NUM_57502 …
#define CHIP_NUM_58818 …
#define CHIP_NUM_57608 …
#define BNXT_QPLIB_DBR_VALID …
#define BNXT_QPLIB_DBR_EPOCH_SHIFT …
#define BNXT_QPLIB_DBR_TOGGLE_SHIFT …
struct bnxt_qplib_drv_modes { … };
enum bnxt_re_toggle_modes { … };
struct bnxt_qplib_chip_ctx { … };
struct bnxt_qplib_db_pacing_data { … };
#define BNXT_QPLIB_DBR_PF_DB_OFFSET …
#define BNXT_QPLIB_DBR_VF_DB_OFFSET …
#define PTR_CNT_PER_PG …
#define PTR_MAX_IDX_PER_PG …
#define PTR_PG(x) …
#define PTR_IDX(x) …
#define HWQ_CMP(idx, hwq) …
#define HWQ_FREE_SLOTS(hwq) …
enum bnxt_qplib_hwq_type { … };
#define MAX_PBL_LVL_0_PGS …
#define MAX_PBL_LVL_1_PGS …
#define MAX_PBL_LVL_1_PGS_SHIFT …
#define MAX_PBL_LVL_1_PGS_FOR_LVL_2 …
#define MAX_PBL_LVL_2_PGS …
#define MAX_PDL_LVL_SHIFT …
enum bnxt_qplib_pbl_lvl { … };
#define ROCE_PG_SIZE_4K …
#define ROCE_PG_SIZE_8K …
#define ROCE_PG_SIZE_64K …
#define ROCE_PG_SIZE_2M …
#define ROCE_PG_SIZE_8M …
#define ROCE_PG_SIZE_1G …
enum bnxt_qplib_hwrm_pg_size { … };
struct bnxt_qplib_reg_desc { … };
struct bnxt_qplib_pbl { … };
struct bnxt_qplib_sg_info { … };
struct bnxt_qplib_hwq_attr { … };
struct bnxt_qplib_hwq { … };
struct bnxt_qplib_db_info { … };
enum bnxt_qplib_db_info_flags_mask { … };
enum bnxt_qplib_db_epoch_flag_shift { … };
struct bnxt_qplib_pd_tbl { … };
struct bnxt_qplib_sgid_tbl { … };
enum { … };
struct bnxt_qplib_dpi { … };
struct bnxt_qplib_dpi_tbl { … };
struct bnxt_qplib_stats { … };
struct bnxt_qplib_vf_res { … };
#define BNXT_QPLIB_MAX_QP_CTX_ENTRY_SIZE …
#define BNXT_QPLIB_MAX_SRQ_CTX_ENTRY_SIZE …
#define BNXT_QPLIB_MAX_CQ_CTX_ENTRY_SIZE …
#define BNXT_QPLIB_MAX_MRW_CTX_ENTRY_SIZE …
#define MAX_TQM_ALLOC_REQ …
#define MAX_TQM_ALLOC_BLK_SIZE …
struct bnxt_qplib_tqm_ctx { … };
struct bnxt_qplib_ctx { … };
struct bnxt_qplib_res { … };
static inline bool bnxt_qplib_is_chip_gen_p7(struct bnxt_qplib_chip_ctx *cctx)
{ … }
static inline bool bnxt_qplib_is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx)
{ … }
static inline bool bnxt_qplib_is_chip_gen_p5_p7(struct bnxt_qplib_chip_ctx *cctx)
{ … }
static inline u8 bnxt_qplib_get_hwq_type(struct bnxt_qplib_res *res)
{ … }
static inline u8 bnxt_qplib_get_ring_type(struct bnxt_qplib_chip_ctx *cctx)
{ … }
static inline u8 bnxt_qplib_base_pg_size(struct bnxt_qplib_hwq *hwq)
{ … }
static inline void *bnxt_qplib_get_qe(struct bnxt_qplib_hwq *hwq,
u32 indx, u64 *pg)
{ … }
static inline void *bnxt_qplib_get_prod_qe(struct bnxt_qplib_hwq *hwq, u32 idx)
{ … }
#define to_bnxt_qplib(ptr, type, member) …
struct bnxt_qplib_pd;
struct bnxt_qplib_dev_attr;
void bnxt_qplib_free_hwq(struct bnxt_qplib_res *res,
struct bnxt_qplib_hwq *hwq);
int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
struct bnxt_qplib_hwq_attr *hwq_attr);
int bnxt_qplib_alloc_pd(struct bnxt_qplib_res *res,
struct bnxt_qplib_pd *pd);
int bnxt_qplib_dealloc_pd(struct bnxt_qplib_res *res,
struct bnxt_qplib_pd_tbl *pd_tbl,
struct bnxt_qplib_pd *pd);
int bnxt_qplib_alloc_dpi(struct bnxt_qplib_res *res,
struct bnxt_qplib_dpi *dpi,
void *app, u8 type);
int bnxt_qplib_dealloc_dpi(struct bnxt_qplib_res *res,
struct bnxt_qplib_dpi *dpi);
void bnxt_qplib_cleanup_res(struct bnxt_qplib_res *res);
int bnxt_qplib_init_res(struct bnxt_qplib_res *res);
void bnxt_qplib_free_res(struct bnxt_qplib_res *res);
int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, struct pci_dev *pdev,
struct net_device *netdev,
struct bnxt_qplib_dev_attr *dev_attr);
void bnxt_qplib_free_ctx(struct bnxt_qplib_res *res,
struct bnxt_qplib_ctx *ctx);
int bnxt_qplib_alloc_ctx(struct bnxt_qplib_res *res,
struct bnxt_qplib_ctx *ctx,
bool virt_fn, bool is_p5);
int bnxt_qplib_map_db_bar(struct bnxt_qplib_res *res);
void bnxt_qplib_unmap_db_bar(struct bnxt_qplib_res *res);
int bnxt_qplib_determine_atomics(struct pci_dev *dev);
static inline void bnxt_qplib_hwq_incr_prod(struct bnxt_qplib_db_info *dbinfo,
struct bnxt_qplib_hwq *hwq, u32 cnt)
{ … }
static inline void bnxt_qplib_hwq_incr_cons(u32 max_elements, u32 *cons, u32 cnt,
u32 *dbinfo_flags)
{ … }
static inline void bnxt_qplib_ring_db32(struct bnxt_qplib_db_info *info,
bool arm)
{ … }
#define BNXT_QPLIB_INIT_DBHDR(xid, type, indx, toggle) …
static inline void bnxt_qplib_ring_db(struct bnxt_qplib_db_info *info,
u32 type)
{ … }
static inline void bnxt_qplib_ring_prod_db(struct bnxt_qplib_db_info *info,
u32 type)
{ … }
static inline void bnxt_qplib_armen_db(struct bnxt_qplib_db_info *info,
u32 type)
{ … }
static inline void bnxt_qplib_srq_arm_db(struct bnxt_qplib_db_info *info,
u32 th)
{ … }
static inline void bnxt_qplib_ring_nq_db(struct bnxt_qplib_db_info *info,
struct bnxt_qplib_chip_ctx *cctx,
bool arm)
{ … }
static inline bool _is_ext_stats_supported(u16 dev_cap_flags)
{ … }
static inline bool _is_hw_retx_supported(u16 dev_cap_flags)
{ … }
#define BNXT_RE_HW_RETX(a) …
static inline bool _is_host_msn_table(u16 dev_cap_ext_flags2)
{ … }
static inline u8 bnxt_qplib_dbr_pacing_en(struct bnxt_qplib_chip_ctx *cctx)
{ … }
#endif