All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
@ 2026-03-16 16:44 Maurizio Lombardi
  2026-03-26 16:44 ` Maurizio Lombardi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2026-03-16 16:44 UTC (permalink / raw)
  To: kbusch; +Cc: linux-nvme, hare, sagi, mlombard

When an NVMe/TCP connection shuts down, the underlying
TCP socket can enter the TCP_CLOSING state (state 11).
Currently, the nvmet_tcp_state_change() callback does not
explicitly handle this state, which results in harmless but
noisy kernel warnings:

nvmet_tcp: queue 2 unhandled state 11

Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
TCP_LAST_ACK to silently ignore the state transition.

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

diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index acc71a26733f..ce497843b979 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1667,6 +1667,7 @@ static void nvmet_tcp_state_change(struct sock *sk)
 	switch (sk->sk_state) {
 	case TCP_FIN_WAIT2:
 	case TCP_LAST_ACK:
+	case TCP_CLOSING:
 		break;
 	case TCP_FIN_WAIT1:
 	case TCP_CLOSE_WAIT:
-- 
2.53.0



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

* Re: [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
  2026-03-16 16:44 [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
@ 2026-03-26 16:44 ` Maurizio Lombardi
  2026-06-10 14:47 ` Maurizio Lombardi
  2026-06-10 15:17 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2026-03-26 16:44 UTC (permalink / raw)
  To: Maurizio Lombardi, kbusch; +Cc: linux-nvme, hare, sagi, mlombard

On Mon Mar 16, 2026 at 5:44 PM CET, Maurizio Lombardi wrote:
> When an NVMe/TCP connection shuts down, the underlying
> TCP socket can enter the TCP_CLOSING state (state 11).
> Currently, the nvmet_tcp_state_change() callback does not
> explicitly handle this state, which results in harmless but
> noisy kernel warnings:
>
> nvmet_tcp: queue 2 unhandled state 11
>
> Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
> TCP_LAST_ACK to silently ignore the state transition.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
>  drivers/nvme/target/tcp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> index acc71a26733f..ce497843b979 100644
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -1667,6 +1667,7 @@ static void nvmet_tcp_state_change(struct sock *sk)
>  	switch (sk->sk_state) {
>  	case TCP_FIN_WAIT2:
>  	case TCP_LAST_ACK:
> +	case TCP_CLOSING:
>  		break;
>  	case TCP_FIN_WAIT1:
>  	case TCP_CLOSE_WAIT:

Gentle ping on this one.

Thanks,
Maurizio


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

* Re: [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
  2026-03-16 16:44 [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
  2026-03-26 16:44 ` Maurizio Lombardi
@ 2026-06-10 14:47 ` Maurizio Lombardi
  2026-06-10 15:17 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2026-06-10 14:47 UTC (permalink / raw)
  To: Maurizio Lombardi, kbusch; +Cc: linux-nvme, hare, sagi, mlombard

On Mon Mar 16, 2026 at 5:44 PM CET, Maurizio Lombardi wrote:
> When an NVMe/TCP connection shuts down, the underlying
> TCP socket can enter the TCP_CLOSING state (state 11).
> Currently, the nvmet_tcp_state_change() callback does not
> explicitly handle this state, which results in harmless but
> noisy kernel warnings:
>
> nvmet_tcp: queue 2 unhandled state 11
>
> Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
> TCP_LAST_ACK to silently ignore the state transition.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
>  drivers/nvme/target/tcp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> index acc71a26733f..ce497843b979 100644
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -1667,6 +1667,7 @@ static void nvmet_tcp_state_change(struct sock *sk)
>  	switch (sk->sk_state) {
>  	case TCP_FIN_WAIT2:
>  	case TCP_LAST_ACK:
> +	case TCP_CLOSING:
>  		break;
>  	case TCP_FIN_WAIT1:
>  	case TCP_CLOSE_WAIT:

Ping, it looks this patch has been forgotten
Can I get some reviews?

Maurizio


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

* Re: [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
  2026-03-16 16:44 [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
  2026-03-26 16:44 ` Maurizio Lombardi
  2026-06-10 14:47 ` Maurizio Lombardi
@ 2026-06-10 15:17 ` Keith Busch
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2026-06-10 15:17 UTC (permalink / raw)
  To: Maurizio Lombardi; +Cc: linux-nvme, hare, sagi, mlombard

On Mon, Mar 16, 2026 at 05:44:41PM +0100, Maurizio Lombardi wrote:
> When an NVMe/TCP connection shuts down, the underlying
> TCP socket can enter the TCP_CLOSING state (state 11).
> Currently, the nvmet_tcp_state_change() callback does not
> explicitly handle this state, which results in harmless but
> noisy kernel warnings:
> 
> nvmet_tcp: queue 2 unhandled state 11
> 
> Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
> TCP_LAST_ACK to silently ignore the state transition.

Thanks, applied to nvme-7.2.


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

end of thread, other threads:[~2026-06-10 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 16:44 [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
2026-03-26 16:44 ` Maurizio Lombardi
2026-06-10 14:47 ` Maurizio Lombardi
2026-06-10 15:17 ` Keith Busch

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.