All of lore.kernel.org
 help / color / mirror / Atom feed
* nvme-tcp: invalid h2cdata pdus in response to r2t
@ 2022-02-23 23:39 Jonathan Nicklin
  2022-02-24  9:22 ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Nicklin @ 2022-02-23 23:39 UTC (permalink / raw)
  To: linux-nvme

As recently as 5.16.10, when a target issues an r2t, the host driver
responds with an h2c pdu of whatever length was requested. If the
requested r2t length exceeds MAXH2CDATA, the response causes a fatal
transport error.

In reviewing the code, the driver does not appear to generate multiple
h2c pdus in response to an R2T. We're a bit confused because commit
1d3ef9c3a39e seems to indicate that the code behaves otherwise.

I can see there was some discussion and work on this back in November.
Is there any plan to incorporate the fix? If so, is this likely to
make its way into LTS kernels?

Thanks,
-Jonathan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-tcp: invalid h2cdata pdus in response to r2t
  2022-02-23 23:39 nvme-tcp: invalid h2cdata pdus in response to r2t Jonathan Nicklin
@ 2022-02-24  9:22 ` Sagi Grimberg
  2022-02-24 23:10   ` Jonathan Nicklin
  0 siblings, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2022-02-24  9:22 UTC (permalink / raw)
  To: Jonathan Nicklin, linux-nvme


> As recently as 5.16.10, when a target issues an r2t, the host driver
> responds with an h2c pdu of whatever length was requested. If the
> requested r2t length exceeds MAXH2CDATA, the response causes a fatal
> transport error.
> 
> In reviewing the code, the driver does not appear to generate multiple
> h2c pdus in response to an R2T. We're a bit confused because commit
> 1d3ef9c3a39e seems to indicate that the code behaves otherwise.

Yes

> 
> I can see there was some discussion and work on this back in November.
> Is there any plan to incorporate the fix? If so, is this likely to
> make its way into LTS kernels?

We'll need to see if it applies cleanly... If you have specific desire
you can send a backport to a specific LTS to stable kernels.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-tcp: invalid h2cdata pdus in response to r2t
  2022-02-24  9:22 ` Sagi Grimberg
@ 2022-02-24 23:10   ` Jonathan Nicklin
  2022-03-13 21:28     ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Nicklin @ 2022-02-24 23:10 UTC (permalink / raw)
  To: Sagi Grimberg; +Cc: linux-nvme

Good news. The patch applies cleanly with offsets. And, I can confirm
that the host driver issues multiple data h2c pdus correctly. The
various combinations of digest options work as well.

Of course, there are options for target implementations to avoid the
need to send r2ts, but in the interest of correctness and
interoperability, it seems valuable to fix this bug. Whether or not to
shepherd this through to other kernels is a different question...

On Thu, Feb 24, 2022 at 4:22 AM Sagi Grimberg <sagi@grimberg.me> wrote:
>
>
> > As recently as 5.16.10, when a target issues an r2t, the host driver
> > responds with an h2c pdu of whatever length was requested. If the
> > requested r2t length exceeds MAXH2CDATA, the response causes a fatal
> > transport error.
> >
> > In reviewing the code, the driver does not appear to generate multiple
> > h2c pdus in response to an R2T. We're a bit confused because commit
> > 1d3ef9c3a39e seems to indicate that the code behaves otherwise.
>
> Yes
>
> >
> > I can see there was some discussion and work on this back in November.
> > Is there any plan to incorporate the fix? If so, is this likely to
> > make its way into LTS kernels?
>
> We'll need to see if it applies cleanly... If you have specific desire
> you can send a backport to a specific LTS to stable kernels.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-tcp: invalid h2cdata pdus in response to r2t
  2022-02-24 23:10   ` Jonathan Nicklin
@ 2022-03-13 21:28     ` Sagi Grimberg
  2022-03-21 18:05       ` Jonathan Nicklin
  0 siblings, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2022-03-13 21:28 UTC (permalink / raw)
  To: Jonathan Nicklin; +Cc: linux-nvme



> Good news. The patch applies cleanly with offsets. And, I can confirm
> that the host driver issues multiple data h2c pdus correctly. The
> various combinations of digest options work as well.
> 
> Of course, there are options for target implementations to avoid the
> need to send r2ts, but in the interest of correctness and
> interoperability, it seems valuable to fix this bug. Whether or not to
> shepherd this through to other kernels is a different question...

Did you happen to look if this patch was picked up by stable?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nvme-tcp: invalid h2cdata pdus in response to r2t
  2022-03-13 21:28     ` Sagi Grimberg
@ 2022-03-21 18:05       ` Jonathan Nicklin
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Nicklin @ 2022-03-21 18:05 UTC (permalink / raw)
  To: Sagi Grimberg; +Cc: linux-nvme

Yes. It appears that the patch came in with 5.16.15.


On Sun, Mar 13, 2022 at 5:28 PM Sagi Grimberg <sagi@grimberg.me> wrote:
>
>
>
> > Good news. The patch applies cleanly with offsets. And, I can confirm
> > that the host driver issues multiple data h2c pdus correctly. The
> > various combinations of digest options work as well.
> >
> > Of course, there are options for target implementations to avoid the
> > need to send r2ts, but in the interest of correctness and
> > interoperability, it seems valuable to fix this bug. Whether or not to
> > shepherd this through to other kernels is a different question...
>
> Did you happen to look if this patch was picked up by stable?


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-21 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 23:39 nvme-tcp: invalid h2cdata pdus in response to r2t Jonathan Nicklin
2022-02-24  9:22 ` Sagi Grimberg
2022-02-24 23:10   ` Jonathan Nicklin
2022-03-13 21:28     ` Sagi Grimberg
2022-03-21 18:05       ` Jonathan Nicklin

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.