linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Maurizio Lombardi <mlombard@redhat.com>
To: sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org, hch@lst.de, kbusch@kernel.org
Subject: [PATCH] nvme-target tcp: fix unhandled tcp states in nvmet_tcp_state_change()
Date: Tue,  2 Aug 2022 17:19:22 +0200	[thread overview]
Message-ID: <20220802151922.480571-1-mlombard@redhat.com> (raw)

TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing
so it's safe to call nvmet_tcp_schedule_release_queue() 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

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

diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 5f9303232e86..b06a58eb02fc 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1524,6 +1524,8 @@ static void nvmet_tcp_state_change(struct sock *sk)
 
 	switch (sk->sk_state) {
 	case TCP_FIN_WAIT1:
+	case TCP_FIN_WAIT2:
+	case TCP_LAST_ACK:
 	case TCP_CLOSE_WAIT:
 	case TCP_CLOSE:
 		/* FALLTHRU */
-- 
2.31.1



             reply	other threads:[~2022-08-02 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 15:19 Maurizio Lombardi [this message]
2022-08-10 13:07 ` [PATCH] nvme-target tcp: fix unhandled tcp states in nvmet_tcp_state_change() 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=20220802151922.480571-1-mlombard@redhat.com \
    --to=mlombard@redhat.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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).