Skip to content

Commit

Permalink
bnxt_re/lib: Add WR API send functions
Browse files Browse the repository at this point in the history
Add the support for the following WR API send
functions
- wr_rdma_write
- wr_rdma_write_imm
- wr_send
- wr_send_imm
- wr_rdma_read
- wr_atomic_cmp_swp
- wr_atomic_fetch_add

Signed-off-by: Chandramohan Akula <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
  • Loading branch information
chandramohan-akula authored and selvintxavier committed Jan 8, 2025
1 parent 22beb6f commit 10e2f7f
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/bnxt_re/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ static const struct verbs_context_ops bnxt_re_cntx_ops = {
.create_ah = bnxt_re_create_ah,
.destroy_ah = bnxt_re_destroy_ah,
.free_context = bnxt_re_free_context,

.create_qp_ex = bnxt_re_create_qp_ex,
};

static inline bool bnxt_re_is_chip_gen_p7(struct bnxt_re_chip_ctx *cctx)
Expand Down
19 changes: 19 additions & 0 deletions providers/bnxt_re/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ struct bnxt_re_joint_queue {
uint32_t last_idx;
};

/* WR API post send data */
struct bnxt_re_wr_send_qp {
struct bnxt_re_bsqe *cur_hdr;
struct bnxt_re_send *cur_sqe;
uint32_t cur_wqe_cnt;
uint32_t cur_slot_cnt;
uint32_t cur_swq_idx;
uint8_t cur_opcode;
bool cur_push_wqe;
unsigned int cur_push_size;
int error;
};

#define STATIC_WQE_NUM_SLOTS 8
#define SEND_SGE_MIN_SLOTS 3
#define MSG_LEN_ADJ_TO_BYTES 15
#define SLOTS_RSH_TO_NUM_WQE 4

struct bnxt_re_qp {
struct verbs_qp vqp;
struct ibv_qp *ibvqp;
Expand Down Expand Up @@ -214,6 +232,7 @@ struct bnxt_re_qp {
uint16_t max_push_sz;
uint8_t qptyp;
struct bnxt_re_mem *mem;
struct bnxt_re_wr_send_qp wr_sq;
};

struct bnxt_re_mr {
Expand Down
Loading

0 comments on commit 10e2f7f

Please sign in to comment.