public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change()
@ 2022-08-29 12:40 Maurizio Lombardi
  2022-08-30  7:01 ` Sagi Grimberg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2022-08-29 12:40 UTC (permalink / raw)
  To: sagi; +Cc: linux-nvme, hch, kbusch

TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing
so we can ignore them and avoid printing the "unhandled state"
warning message.

[ 1298.852386] nvmet_tcp: queue 2 unhandled state 5
[ 1298.879112] nvmet_tcp: queue 7 unhandled state 5
[ 1298.884253] nvmet_tcp: queue 8 unhandled state 5
[ 1298.889475] nvmet_tcp: queue 9 unhandled state 5

v2: Do not call nvmet_tcp_schedule_release_queue(), just ignore
the fin_wait2 and last_ack states.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
 drivers/nvme/target/tcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 5f9303232e86..3ee106ca7fe8 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1523,6 +1523,9 @@ static void nvmet_tcp_state_change(struct sock *sk)
 		goto done;
 
 	switch (sk->sk_state) {
+	case TCP_FIN_WAIT2:
+	case TCP_LAST_ACK:
+		break;
 	case TCP_FIN_WAIT1:
 	case TCP_CLOSE_WAIT:
 	case TCP_CLOSE:
-- 
2.31.1



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

* Re: [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change()
  2022-08-29 12:40 [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() Maurizio Lombardi
@ 2022-08-30  7:01 ` Sagi Grimberg
  2022-08-30  7:35 ` Chaitanya Kulkarni
  2022-08-31  4:58 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2022-08-30  7:01 UTC (permalink / raw)
  To: Maurizio Lombardi; +Cc: linux-nvme, hch, kbusch

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>


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

* Re: [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change()
  2022-08-29 12:40 [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() Maurizio Lombardi
  2022-08-30  7:01 ` Sagi Grimberg
@ 2022-08-30  7:35 ` Chaitanya Kulkarni
  2022-08-31  4:58 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2022-08-30  7:35 UTC (permalink / raw)
  To: Maurizio Lombardi, sagi@grimberg.me
  Cc: linux-nvme@lists.infradead.org, hch@lst.de, kbusch@kernel.org

On 8/29/22 05:40, Maurizio Lombardi wrote:
> TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing
> so we can ignore them and avoid printing the "unhandled state"
> warning message.
> 
> [ 1298.852386] nvmet_tcp: queue 2 unhandled state 5
> [ 1298.879112] nvmet_tcp: queue 7 unhandled state 5
> [ 1298.884253] nvmet_tcp: queue 8 unhandled state 5
> [ 1298.889475] nvmet_tcp: queue 9 unhandled state 5
> 
> v2: Do not call nvmet_tcp_schedule_release_queue(), just ignore
> the fin_wait2 and last_ack states.
> 
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck





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

* Re: [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change()
  2022-08-29 12:40 [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() Maurizio Lombardi
  2022-08-30  7:01 ` Sagi Grimberg
  2022-08-30  7:35 ` Chaitanya Kulkarni
@ 2022-08-31  4:58 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-08-31  4:58 UTC (permalink / raw)
  To: Maurizio Lombardi; +Cc: sagi, linux-nvme, hch, kbusch

Thanks,

applied to nvme-6.0.


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

end of thread, other threads:[~2022-08-31  4:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29 12:40 [PATCH v2] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() Maurizio Lombardi
2022-08-30  7:01 ` Sagi Grimberg
2022-08-30  7:35 ` Chaitanya Kulkarni
2022-08-31  4:58 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox