From: Max Gurtovoy <maxg@mellanox.com>
To: linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de,
loberman@redhat.com, bvanassche@acm.org,
linux-rdma@vger.kernel.org
Cc: rgirase@redhat.com, vladimirk@mellanox.com, shlomin@mellanox.com,
leonro@mellanox.com, dledford@redhat.com, jgg@mellanox.com,
oren@mellanox.com, kbusch@kernel.org,
Max Gurtovoy <maxg@mellanox.com>,
idanb@mellanox.com
Subject: [PATCH v2 2/5] nvmet-rdma: add srq pointer to rdma_cmd
Date: Wed, 18 Mar 2020 17:02:54 +0200 [thread overview]
Message-ID: <20200318150257.198402-3-maxg@mellanox.com> (raw)
In-Reply-To: <20200318150257.198402-1-maxg@mellanox.com>
This is a preparetion patch for the SRQ per completion vector feature.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
drivers/nvme/target/rdma.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index 37d262a..04062af 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -38,6 +38,7 @@ struct nvmet_rdma_cmd {
struct scatterlist inline_sg[NVMET_RDMA_MAX_INLINE_SGE];
struct nvme_command *nvme_cmd;
struct nvmet_rdma_queue *queue;
+ struct ib_srq *srq;
};
enum {
@@ -461,8 +462,8 @@ static int nvmet_rdma_post_recv(struct nvmet_rdma_device *ndev,
cmd->sge[0].addr, cmd->sge[0].length,
DMA_FROM_DEVICE);
- if (ndev->srq)
- ret = ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
+ if (cmd->srq)
+ ret = ib_post_srq_recv(cmd->srq, &cmd->wr, NULL);
else
ret = ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
@@ -882,6 +883,7 @@ static int nvmet_rdma_init_srq(struct nvmet_rdma_device *ndev)
ndev->srq_size = srq_size;
for (i = 0; i < srq_size; i++) {
+ ndev->srq_cmds[i].srq = srq;
ret = nvmet_rdma_post_recv(ndev, &ndev->srq_cmds[i]);
if (ret)
goto out_free_cmds;
--
1.8.3.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-03-18 15:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 15:02 [PATCH v2 0/5] nvmet-rdma/srpt: SRQ per completion vector Max Gurtovoy
2020-03-18 15:02 ` [PATCH v2 1/5] IB/core: add a simple SRQ pool per PD Max Gurtovoy
2020-03-20 5:59 ` Sagi Grimberg
2020-03-20 13:21 ` Max Gurtovoy
2020-03-20 14:27 ` Leon Romanovsky
2020-03-18 15:02 ` Max Gurtovoy [this message]
2020-03-18 23:32 ` [PATCH v2 2/5] nvmet-rdma: add srq pointer to rdma_cmd Jason Gunthorpe
2020-03-19 8:48 ` Max Gurtovoy
2020-03-19 9:14 ` Leon Romanovsky
2020-03-19 10:55 ` Max Gurtovoy
2020-03-19 11:54 ` Jason Gunthorpe
2020-03-19 14:08 ` Konstantin Ryabitsev
2020-03-19 21:58 ` Konstantin Ryabitsev
2020-03-19 4:05 ` Bart Van Assche
2020-03-18 15:02 ` [PATCH v2 3/5] nvmet-rdma: use SRQ per completion vector Max Gurtovoy
2020-03-19 4:09 ` Bart Van Assche
2020-03-19 9:15 ` Max Gurtovoy
2020-03-19 11:56 ` Jason Gunthorpe
2020-03-19 12:48 ` Max Gurtovoy
2020-03-19 13:53 ` Jason Gunthorpe
2020-03-19 14:49 ` Bart Van Assche
[not found] ` <50dd8f5d-d092-54bc-236d-1e702fb95240@mellanox.com>
[not found] ` <6e3cc1c4-b24e-f607-42b3-5b83dd8c312c@mellanox.com>
2020-03-19 16:27 ` Max Gurtovoy
2020-03-20 5:47 ` Sagi Grimberg
2020-03-18 15:02 ` [PATCH v2 4/5] RDMA/srpt: use ib_alloc_cq instead of ib_alloc_cq_any Max Gurtovoy
2020-03-19 4:15 ` Bart Van Assche
2020-03-18 15:02 ` [PATCH v2 5/5] RDMA/srpt: use SRQ per completion vector Max Gurtovoy
2020-03-19 4:20 ` Bart Van Assche
2020-03-19 4:02 ` [PATCH v2 0/5] nvmet-rdma/srpt: " Bart Van Assche
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=20200318150257.198402-3-maxg@mellanox.com \
--to=maxg@mellanox.com \
--cc=bvanassche@acm.org \
--cc=dledford@redhat.com \
--cc=hch@lst.de \
--cc=idanb@mellanox.com \
--cc=jgg@mellanox.com \
--cc=kbusch@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=oren@mellanox.com \
--cc=rgirase@redhat.com \
--cc=sagi@grimberg.me \
--cc=shlomin@mellanox.com \
--cc=vladimirk@mellanox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).