Re: [PATCH rdma-core 10/11] libbnxtre: Add support for SRQ in user lib

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

 



On Sat, Jan 28, 2017 at 05:13:41PM -0500, Devesh Sharma wrote:
> This patch adds support for shared receive
> queue. Following are the changes:
>  - Add ABI for user/kernel information exchange.
>  - Add function to handle SRQ ARMing and DB-ring.
>  - Add function to create/destroy SRQ.
>  - Add function to query/modify SRQ.
>  - Add function to post RQE on a SRQ.
>
> 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/abi.h   |  27 +++++
>  providers/bnxtre/db.c    |  18 ++++
>  providers/bnxtre/main.h  |  20 +++-
>  providers/bnxtre/verbs.c | 261 +++++++++++++++++++++++++++++++++++++++++------
>  4 files changed, 288 insertions(+), 38 deletions(-)
>
> diff --git a/providers/bnxtre/abi.h b/providers/bnxtre/abi.h
> index 451af08..e6fb9e4 100644
> --- a/providers/bnxtre/abi.h
> +++ b/providers/bnxtre/abi.h
> @@ -216,6 +216,7 @@ struct bnxt_re_mr_resp {
>  	struct ibv_reg_mr_resp resp;
>  };
>
> +/* CQ */
>  struct bnxt_re_cq_req {
>  	struct ibv_create_cq cmd;
>  	__u64 cq_va;
> @@ -263,6 +264,7 @@ struct bnxt_re_term_cqe {
>  	__u64 rsvd1;
>  };
>
> +/* QP */
>  struct bnxt_re_qp_req {
>  	struct ibv_create_qp cmd;
>  	__u64 qpsva;
> @@ -354,6 +356,19 @@ struct bnxt_re_rqe {
>  	__u64 rsvd[2];
>  };
>
> +/* SRQ */
> +struct bnxt_re_srq_req {
> +	struct ibv_create_srq cmd;
> +	__u64 srqva;
> +	__u64 srq_handle;
> +};
> +
> +struct bnxt_re_srq_resp {
> +	struct ibv_create_srq_resp resp;
> +	__u32 srqid;
> +	__u32 rsvd;
> +};
> +
>  struct bnxt_re_srqe {
>  	__u32 srq_tag; /* 20 bits are valid */
>  	__u32 rsvd1;
> @@ -384,6 +399,18 @@ static inline uint32_t bnxt_re_get_rqe_hdr_sz(void)
>  	return sizeof(struct bnxt_re_brqe) + sizeof(struct bnxt_re_rqe);
>  }
>
> +static inline uint32_t bnxt_re_get_srqe_hdr_sz(void)
> +{
> +	return sizeof(struct bnxt_re_brqe) + sizeof(struct bnxt_re_srqe);
> +}
> +
> +static inline uint32_t bnxt_re_get_srqe_sz(void)
> +{
> +	return sizeof(struct bnxt_re_brqe) +
> +	       sizeof(struct bnxt_re_srqe) +

You introduced the inline function exactly for this.

> +	       BNXT_RE_MAX_INLINE_SIZE;
> +}
> +

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