From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/3] nvmet-rdma: use SRQ per completion vector
Date: Wed, 6 Sep 2017 12:38:16 +0200 [thread overview]
Message-ID: <20170906103816.GB24667@lst.de> (raw)
In-Reply-To: <1504609157-3004-3-git-send-email-maxg@mellanox.com>
> @@ -104,18 +107,25 @@ struct nvmet_rdma_queue {
>
> int idx;
> int host_qid;
> + int comp_vector;
How will this interact with these changes:
http://git.infradead.org/users/hch/rdma.git/shortlog/refs/heads/rdma-cq.2
which I'd really like to see in?
> +struct nvmet_rdma_srq {
> + struct ib_srq *srq;
> + struct nvmet_rdma_cmd *srq_cmds;
> + size_t srq_size;
Please kill the srq_ prefix, given that it's already implied by the
structure.
> +static void nvmet_rdma_destroy_srq(struct nvmet_rdma_srq *nsrq)
> +{
> + if (!nsrq)
> + return;
We should never get here with a null pointer, right?
> srq_attr.attr.max_wr = srq_size;
> @@ -808,27 +838,57 @@ static int nvmet_rdma_init_srq(struct nvmet_rdma_device *ndev)
> * non-shared receive queues.
> */
> pr_info("SRQ requested but not supported.\n");
> + kfree(nsrq);
> return 0;
goto out_free_nsrq..
> + ndev->srqs[index] = nsrq;
Move this to the caller so that we don't need to pass in the index.
> + ndev->srqs = kzalloc(srq_count * sizeof(*ndev->srqs), GFP_KERNEL);
kcalloc / kmalloc_array?
> + if (ndev->srqs && ndev->srqs[queue->comp_vector % ndev->srq_count]) {
ndev->srqs[queue->comp_vector % ndev->srq_count] should always be
non-NULL, right?
next prev parent reply other threads:[~2017-09-06 10:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 10:59 [PATCH 0/3] nvmet-rdma: SRQ per completion vector Max Gurtovoy
2017-09-05 10:59 ` [PATCH 1/3] nvmet-rdma: use srq pointer in rdma_cmd Max Gurtovoy
2017-09-06 10:30 ` Christoph Hellwig
2017-09-05 10:59 ` [PATCH 2/3] nvmet-rdma: use SRQ per completion vector Max Gurtovoy
2017-09-06 10:38 ` Christoph Hellwig [this message]
2017-09-06 14:57 ` Sagi Grimberg
2017-09-07 12:03 ` Christoph Hellwig
2017-09-06 14:50 ` Sagi Grimberg
2017-09-07 10:47 ` Max Gurtovoy
2017-09-05 10:59 ` [PATCH 3/3] nvmet-rdma: add module parameter for SRQ size Max Gurtovoy
2017-09-06 10:39 ` Christoph Hellwig
2017-09-06 15:02 ` Sagi Grimberg
2017-09-06 14:40 ` [PATCH 0/3] nvmet-rdma: SRQ per completion vector Sagi Grimberg
2017-11-07 14:40 ` Max Gurtovoy
2017-11-08 10:07 ` Sagi Grimberg
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=20170906103816.GB24667@lst.de \
--to=hch@lst.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox