All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: <zyjzyj2000@gmail.com>, <linux-rdma@vger.kernel.org>,
	Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH 3/4] Providers/rxe: Implement ibv_create_cq_ex verb
Date: Thu, 12 Nov 2020 10:03:18 -0400	[thread overview]
Message-ID: <20201112140318.GH2620339@nvidia.com> (raw)
In-Reply-To: <20201106230122.17411-4-rpearson@hpe.com>

On Fri, Nov 06, 2020 at 05:01:21PM -0600, Bob Pearson wrote:
> @@ -171,6 +197,10 @@ struct rxe_alloc_context_resp {
>  	__aligned_u64		driver_cap;
>  };
>  
> +struct rxe_create_cq_cmd {
> +	__aligned_u64 is_ex;
> +};

would be cleaer to call this 'wc_format' or something more specific;

u8 wc_format
u8 reserved[7]

Is fine

> @@ -210,15 +352,129 @@ static struct ibv_cq *rxe_create_cq(struct ibv_context *context, int cqe,
>  	cq->queue = mmap(NULL, resp.mi.size, PROT_READ | PROT_WRITE, MAP_SHARED,
>  			 context->cmd_fd, resp.mi.offset);
>  	if ((void *)cq->queue == MAP_FAILED) {
> -		ibv_cmd_destroy_cq(&cq->ibv_cq);
> +		ibv_cmd_destroy_cq(&cq->vcq.cq);
> +		free(cq);
> +		return NULL;
> +	}
> +
> +	cq->wc_size = 1ULL << cq->queue->log2_elem_size;
> +
> +	if (cq->wc_size < sizeof(struct ib_uverbs_wc)) {
> +		fprintf(stderr, "cq wc size too small %ld need %ld\n",
> +			cq->wc_size, sizeof(struct ib_uverbs_wc));

No prints like this in libraries

Seems reasonable other wise

Jason

  reply	other threads:[~2020-11-12 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 23:01 [PATCH 0/4] Provider/rxe: Implement extended verbs APIs Bob Pearson
2020-11-06 23:01 ` [PATCH 1/4] Provider/rxe: Exchange capabilities with driver Bob Pearson
2020-11-06 23:01 ` [PATCH 2/4] Provider/rxe: Implement ibv_query_device_ex verb Bob Pearson
2020-11-12 14:00   ` Jason Gunthorpe
2020-11-06 23:01 ` [PATCH 3/4] Providers/rxe: Implement ibv_create_cq_ex verb Bob Pearson
2020-11-12 14:03   ` Jason Gunthorpe [this message]
2020-11-06 23:01 ` [PATCH 4/4] Providers/rxe: Implement ibv_create_qp_ex verb Bob Pearson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201112140318.GH2620339@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearson@hpe.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.