diff mbox series

[v2,2/5] nvmet-rdma: add srq pointer to rdma_cmd

Message ID 20200318150257.198402-3-maxg@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series None | expand

Commit Message

Max Gurtovoy March 18, 2020, 3:02 p.m. UTC
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(-)

Comments

Jason Gunthorpe March 18, 2020, 11:32 p.m. UTC | #1
On Wed, Mar 18, 2020 at 05:02:54PM +0200, Max Gurtovoy wrote:
> 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(-)

Max, how are you sending these emails, and why don't they thread
properly on patchworks:

https://patchwork.kernel.org/project/linux-rdma/list/?series=258271

This patch is missing from the series

v1 had the same issue

Very strange. Can you fix it?

Jason
Bart Van Assche March 19, 2020, 4:05 a.m. UTC | #2
On 2020-03-18 08:02, Max Gurtovoy wrote:
> This is a preparetion patch for the SRQ per completion vector feature.
            ^^^^^^^^^^^
            preparation?

Thanks,

Bart.
Max Gurtovoy March 19, 2020, 8:48 a.m. UTC | #3
On 3/19/2020 1:32 AM, Jason Gunthorpe wrote:
> On Wed, Mar 18, 2020 at 05:02:54PM +0200, Max Gurtovoy wrote:
>> 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(-)
> Max, how are you sending these emails, and why don't they thread
> properly on patchworks:
>
> https://patchwork.kernel.org/project/linux-rdma/list/?series=258271
>
> This patch is missing from the series
>
> v1 had the same issue
>
> Very strange. Can you fix it?

I'm using "git send-email".

Should I use some special flags or CC another email for it ?

How do you suggest sending patches so we'll see it on patchworks ?

>
> Jason
Leon Romanovsky March 19, 2020, 9:14 a.m. UTC | #4
On Thu, Mar 19, 2020 at 10:48:22AM +0200, Max Gurtovoy wrote:
>
> On 3/19/2020 1:32 AM, Jason Gunthorpe wrote:
> > On Wed, Mar 18, 2020 at 05:02:54PM +0200, Max Gurtovoy wrote:
> > > 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(-)
> > Max, how are you sending these emails, and why don't they thread
> > properly on patchworks:
> >
> > https://patchwork.kernel.org/project/linux-rdma/list/?series=258271
> >
> > This patch is missing from the series
> >
> > v1 had the same issue
> >
> > Very strange. Can you fix it?
>
> I'm using "git send-email".
>
> Should I use some special flags or CC another email for it ?
>
> How do you suggest sending patches so we'll see it on patchworks ?

It can be related to your SMTP relay, I see that you are sending
patches through labmailer, and it is known as unreliable. Use the
same SMTP server as you are using to send emails.

Thanks

>
> >
> > Jason
Max Gurtovoy March 19, 2020, 10:55 a.m. UTC | #5
On 3/19/2020 11:14 AM, Leon Romanovsky wrote:
> On Thu, Mar 19, 2020 at 10:48:22AM +0200, Max Gurtovoy wrote:
>> On 3/19/2020 1:32 AM, Jason Gunthorpe wrote:
>>> On Wed, Mar 18, 2020 at 05:02:54PM +0200, Max Gurtovoy wrote:
>>>> 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(-)
>>> Max, how are you sending these emails, and why don't they thread
>>> properly on patchworks:
>>>
>>> https://patchwork.kernel.org/project/linux-rdma/list/?series=258271
>>>
>>> This patch is missing from the series
>>>
>>> v1 had the same issue
>>>
>>> Very strange. Can you fix it?
>> I'm using "git send-email".
>>
>> Should I use some special flags or CC another email for it ?
>>
>> How do you suggest sending patches so we'll see it on patchworks ?
> It can be related to your SMTP relay, I see that you are sending
> patches through labmailer, and it is known as unreliable. Use the
> same SMTP server as you are using to send emails.

I'll use it in V3.

Thanks.


>
> Thanks
>
>>> Jason
Jason Gunthorpe March 19, 2020, 11:54 a.m. UTC | #6
On Thu, Mar 19, 2020 at 10:48:22AM +0200, Max Gurtovoy wrote:
> 
> On 3/19/2020 1:32 AM, Jason Gunthorpe wrote:
> > On Wed, Mar 18, 2020 at 05:02:54PM +0200, Max Gurtovoy wrote:
> > > 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(-)
> > Max, how are you sending these emails, and why don't they thread
> > properly on patchworks:
> > 
> > https://patchwork.kernel.org/project/linux-rdma/list/?series=258271
> > 
> > This patch is missing from the series
> > 
> > v1 had the same issue
> > 
> > Very strange. Can you fix it?
> 
> I'm using "git send-email".
> 
> Should I use some special flags or CC another email for it ?
> 
> How do you suggest sending patches so we'll see it on patchworks ?

I looked at these mails and they seem properly threaded/etc.

I've added Konstantin, perhaps he knows why patchworks is acting
weird here?

Jason
Konstantin Ryabitsev March 19, 2020, 2:08 p.m. UTC | #7
On Thu, Mar 19, 2020 at 08:54:31AM -0300, Jason Gunthorpe wrote:
> > > Max, how are you sending these emails, and why don't they thread
> > > properly on patchworks:
> > > 
> > > https://patchwork.kernel.org/project/linux-rdma/list/?series=258271
> > > 
> > > This patch is missing from the series
> > > 
> > > v1 had the same issue
> > > 
> > > Very strange. Can you fix it?
> > 
> > I'm using "git send-email".
> > 
> > Should I use some special flags or CC another email for it ?
> > 
> > How do you suggest sending patches so we'll see it on patchworks ?
> 
> I looked at these mails and they seem properly threaded/etc.
> 
> I've added Konstantin, perhaps he knows why patchworks is acting
> weird here?

Not sure. Everything appears to be properly threaded. I see 2/5 arriving 
at precisely the same time as the cover letter, so 2/5 probably got 
processed before 0/5. I have no idea if that actually matters to 
patchwork -- a whole bunch of series would break if arrival ordering was 
that important. At least I assume that would be the case.

I'll check with upstream.

-K
Konstantin Ryabitsev March 19, 2020, 9:58 p.m. UTC | #8
On Thu, Mar 19, 2020 at 08:54:31AM -0300, Jason Gunthorpe wrote:
> > I'm using "git send-email".
> > 
> > Should I use some special flags or CC another email for it ?
> > 
> > How do you suggest sending patches so we'll see it on patchworks ?
> 
> I looked at these mails and they seem properly threaded/etc.
> 
> I've added Konstantin, perhaps he knows why patchworks is acting
> weird here?

Looks like it's hitting a race condition in patchwork that will be fixed 
in the next release.

Until then, you can grab these patches from lore.kernel.org (e.g. with 
b4), though it won't help with git-patchwork-bot integration.

-K
diff mbox series

Patch

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;