#ifndef __BNXT_QPLIB_FP_H__
#define __BNXT_QPLIB_FP_H__
#include <rdma/bnxt_re-abi.h>
struct sq_ud_ext_hdr { … };
struct sq_raw_ext_hdr { … };
struct sq_rdma_ext_hdr { … };
struct sq_atomic_ext_hdr { … };
struct sq_fr_pmr_ext_hdr { … };
struct sq_bind_ext_hdr { … };
struct rq_ext_hdr { … };
struct bnxt_qplib_srq { … };
struct bnxt_qplib_sge { … };
#define BNXT_QPLIB_QP_MAX_SGL …
struct bnxt_qplib_swq { … };
struct bnxt_qplib_swqe { … };
struct bnxt_qplib_q { … };
struct bnxt_qplib_qp { … };
#define BNXT_QPLIB_MAX_CQE_ENTRY_SIZE …
#define CQE_CNT_PER_PG …
#define CQE_MAX_IDX_PER_PG …
#define CQE_PG(x) …
#define CQE_IDX(x) …
#define ROCE_CQE_CMP_V …
#define CQE_CMP_VALID(hdr, pass) …
static inline u32 __bnxt_qplib_get_avail(struct bnxt_qplib_hwq *hwq)
{ … }
static inline bool bnxt_qplib_queue_full(struct bnxt_qplib_q *que,
u8 slots)
{ … }
struct bnxt_qplib_cqe { … };
#define BNXT_QPLIB_QUEUE_START_PERIOD …
struct bnxt_qplib_cq { … };
#define BNXT_QPLIB_MAX_IRRQE_ENTRY_SIZE …
#define BNXT_QPLIB_MAX_ORRQE_ENTRY_SIZE …
#define IRD_LIMIT_TO_IRRQ_SLOTS(x) …
#define IRRQ_SLOTS_TO_IRD_LIMIT(s) …
#define ORD_LIMIT_TO_ORRQ_SLOTS(x) …
#define ORRQ_SLOTS_TO_ORD_LIMIT(s) …
#define BNXT_QPLIB_MAX_NQE_ENTRY_SIZE …
#define NQE_CNT_PER_PG …
#define NQE_MAX_IDX_PER_PG …
#define NQE_PG(x) …
#define NQE_IDX(x) …
#define NQE_CMP_VALID(hdr, pass) …
#define BNXT_QPLIB_NQE_MAX_CNT …
#define NQ_CONS_PCI_BAR_REGION …
#define NQ_DB_KEY_CP …
#define NQ_DB_IDX_VALID …
#define NQ_DB_IRQ_DIS …
#define NQ_DB_CP_FLAGS_REARM …
#define NQ_DB_CP_FLAGS …
struct bnxt_qplib_nq_db { … };
cqn_handler_t;
srqn_handler_t;
struct bnxt_qplib_nq { … };
struct bnxt_qplib_nq_work { … };
void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill);
void bnxt_qplib_disable_nq(struct bnxt_qplib_nq *nq);
int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
int msix_vector, bool need_init);
int bnxt_qplib_enable_nq(struct pci_dev *pdev, struct bnxt_qplib_nq *nq,
int nq_idx, int msix_vector, int bar_reg_offset,
cqn_handler_t cqn_handler,
srqn_handler_t srq_handler);
int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
struct bnxt_qplib_srq *srq);
int bnxt_qplib_modify_srq(struct bnxt_qplib_res *res,
struct bnxt_qplib_srq *srq);
int bnxt_qplib_query_srq(struct bnxt_qplib_res *res,
struct bnxt_qplib_srq *srq);
void bnxt_qplib_destroy_srq(struct bnxt_qplib_res *res,
struct bnxt_qplib_srq *srq);
int bnxt_qplib_post_srq_recv(struct bnxt_qplib_srq *srq,
struct bnxt_qplib_swqe *wqe);
int bnxt_qplib_create_qp1(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp);
int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp);
int bnxt_qplib_modify_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp);
int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp);
int bnxt_qplib_destroy_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp);
void bnxt_qplib_clean_qp(struct bnxt_qplib_qp *qp);
void bnxt_qplib_free_qp_res(struct bnxt_qplib_res *res,
struct bnxt_qplib_qp *qp);
void *bnxt_qplib_get_qp1_sq_buf(struct bnxt_qplib_qp *qp,
struct bnxt_qplib_sge *sge);
void *bnxt_qplib_get_qp1_rq_buf(struct bnxt_qplib_qp *qp,
struct bnxt_qplib_sge *sge);
u32 bnxt_qplib_get_rq_prod_index(struct bnxt_qplib_qp *qp);
dma_addr_t bnxt_qplib_get_qp_buf_from_index(struct bnxt_qplib_qp *qp,
u32 index);
void bnxt_qplib_post_send_db(struct bnxt_qplib_qp *qp);
int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
struct bnxt_qplib_swqe *wqe);
void bnxt_qplib_post_recv_db(struct bnxt_qplib_qp *qp);
int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp,
struct bnxt_qplib_swqe *wqe);
int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq);
int bnxt_qplib_resize_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq,
int new_cqes);
void bnxt_qplib_resize_cq_complete(struct bnxt_qplib_res *res,
struct bnxt_qplib_cq *cq);
int bnxt_qplib_destroy_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq);
int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe,
int num, struct bnxt_qplib_qp **qp);
bool bnxt_qplib_is_cq_empty(struct bnxt_qplib_cq *cq);
void bnxt_qplib_req_notify_cq(struct bnxt_qplib_cq *cq, u32 arm_type);
void bnxt_qplib_free_nq(struct bnxt_qplib_nq *nq);
int bnxt_qplib_alloc_nq(struct bnxt_qplib_res *res, struct bnxt_qplib_nq *nq);
void bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp);
void bnxt_qplib_acquire_cq_locks(struct bnxt_qplib_qp *qp,
unsigned long *flags);
void bnxt_qplib_release_cq_locks(struct bnxt_qplib_qp *qp,
unsigned long *flags);
int bnxt_qplib_process_flush_list(struct bnxt_qplib_cq *cq,
struct bnxt_qplib_cqe *cqe,
int num_cqes);
void bnxt_qplib_flush_cqn_wq(struct bnxt_qplib_qp *qp);
void bnxt_re_synchronize_nq(struct bnxt_qplib_nq *nq);
static inline void *bnxt_qplib_get_swqe(struct bnxt_qplib_q *que, u32 *swq_idx)
{ … }
static inline void bnxt_qplib_swq_mod_start(struct bnxt_qplib_q *que, u32 idx)
{ … }
static inline u32 bnxt_qplib_get_depth(struct bnxt_qplib_q *que)
{ … }
static inline u32 bnxt_qplib_set_sq_size(struct bnxt_qplib_q *que, u8 wqe_mode)
{ … }
static inline u32 bnxt_qplib_set_sq_max_slot(u8 wqe_mode)
{ … }
static inline u32 bnxt_qplib_set_rq_max_slot(u32 wqe_size)
{ … }
static inline u16 __xlate_qfd(u16 delta, u16 wqe_bytes)
{ … }
static inline u16 bnxt_qplib_calc_ilsize(struct bnxt_qplib_swqe *wqe, u16 max)
{ … }
static inline __le64 bnxt_re_update_msn_tbl(u32 st_idx, u32 npsn, u32 start_psn)
{ … }
#endif