Re: [PATCH rdma-core 04/11] libbnxtre: Add support for posting and polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 28, 2017 at 05:13:35PM -0500, Devesh Sharma wrote:
> This patch adds code to support ibv_post_recv(),
> ibv_post_send(), ibv_poll_cq() and ibv_arm_cq()
> routines. With this patch applications are able
> to enqueue RQE or WQE ring doorbells and poll for
> completions from CQ. Currently, this code do not
> support SRQ, UD service and and flush completions.
> Following are the major changes:
>
>  - Added most of the enums to handle device specific
>    opcodes, masks, shifts and data structures.
>  - Added a new file to define DB related routines.
>  - Added routines to handle circular queue operations.
>  - Added enums and few utility functions.
>  - Added bnxt_re_post_recv().
>  - Add code to build and post SQEs for RDMA-WRITE,
>    RDMA-READ, SEND through bnxt_re_post_send() routine.
>  - Fixed couple of bugs in create-qp and modify-qp.
>  - bnxt_re_create_qp() now check the limits.
>  - Add polling support for RC send completions.
>  - Add polling support for RC Recv completions.
>  - Add support to ARM completion queue.
>  - Cleanup CQ while QP is being destroyed.
>  - Add utility functions to convert chip specific
>    completion codes to IB stack specific codes.
>
> Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@xxxxxxxxxxxx>
> Signed-off-by: Somnath Kotur <somnath.kotur@xxxxxxxxxxxx>
> Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
> ---
>  providers/bnxtre/CMakeLists.txt |   1 +
>  providers/bnxtre/abi.h          | 189 +++++++++++-

Please use standard name for this file., there is long standing goal to
reuse kernel headers for this file.

It should be providername-abi.h (the same as in the kernel).

>  providers/bnxtre/db.c           |  92 ++++++
>  providers/bnxtre/main.c         |   1 +
>  providers/bnxtre/main.h         | 184 ++++++++++-
>  providers/bnxtre/memory.c       |   4 +
>  providers/bnxtre/memory.h       |  31 ++
>  providers/bnxtre/verbs.c        | 663 +++++++++++++++++++++++++++++++++++++---
>  8 files changed, 1124 insertions(+), 41 deletions(-)
>  create mode 100644 providers/bnxtre/db.c

<snip>

> +	qesize += (bnxt_re_get_sqe_hdr_sz() >> 4);
> +	hdr->rsv_ws_fl_wt |= (qesize & BNXT_RE_HDR_WS_MASK) <<
> +			      BNXT_RE_HDR_WS_SHIFT;
> +#if 0
> +	if (qp_typ == IBV_QPT_UD) {
> +	}
> +#endif

Please don't add dead code.

> +	return len;
> +}
> +
> +static int bnxt_re_build_rdma_sqe(struct bnxt_re_qp *qp, void *wqe,
> +				  struct ibv_send_wr *wr, uint8_t is_inline)
> +{
> +	struct bnxt_re_rdma *sqe = ((void *)wqe + sizeof(struct bnxt_re_bsqe));
> +	uint32_t len;
> +
> +	len = bnxt_re_build_send_sqe(qp, wqe, wr, is_inline);
> +	sqe->rva_lo = wr->wr.rdma.remote_addr & 0xFFFFFFFFUL;
> +	sqe->rva_hi = (wr->wr.rdma.remote_addr >> 32);
> +	sqe->rkey = wr->wr.rdma.rkey;
> +
> +	return len;

Return type mismatch.

> +}
> +

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux