nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
Subsystems (2)
PATCH 1/1 nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
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.
--- drivers/nvme/target/tcp.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/target/tcp.c +1 -0
@@ -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 :
Signature · 1 line
2.53.0
Quoted 21 lines · Maurizio Lombardi
When an NVMe/TCP connection shuts down, the underlying TCP socket can enter the
TCP_CLOSINGstate (state 11). Currently, thenvmet_tcp_state_change()callback does not explicitly handle this state, which results in harmless but noisy kernel warnings:
nvmet_tcp: queue 2 unhandled state 11Add
TCP_CLOSINGto the switch statement alongsideTCP_FIN_WAIT2andTCP_LAST_ACKto silently ignore the state transition.Signed-off-by Maurizio Lombardi <[email protected]>--- drivers/nvme/target/tcp.c | 1 + 1 file changed, 1 insertion(+)drivers/nvme/target/tcp.c +0
-0
drivers/nvme/target/tcp.c static void nvmet_tcp_state_change(struct sock *sk) · line 1673
Quoted 7 lines
drivers/nvme/target/tcp.c +1
-0@@ -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
Quoted 21 lines · Maurizio Lombardi
When an NVMe/TCP connection shuts down, the underlying TCP socket can enter the
TCP_CLOSINGstate (state 11). Currently, thenvmet_tcp_state_change()callback does not explicitly handle this state, which results in harmless but noisy kernel warnings:
nvmet_tcp: queue 2 unhandled state 11Add
TCP_CLOSINGto the switch statement alongsideTCP_FIN_WAIT2andTCP_LAST_ACKto silently ignore the state transition.Signed-off-by Maurizio Lombardi <[email protected]>--- drivers/nvme/target/tcp.c | 1 + 1 file changed, 1 insertion(+)drivers/nvme/target/tcp.c +0
-0
drivers/nvme/target/tcp.c static void nvmet_tcp_state_change(struct sock *sk) · line 1673
Quoted 7 lines
drivers/nvme/target/tcp.c +1
-0@@ -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
Quoted 10 lines · Maurizio Lombardi
When an NVMe/TCP connection shuts down, the underlying TCP socket can enter the
TCP_CLOSINGstate (state 11). Currently, thenvmet_tcp_state_change()callback does not explicitly handle this state, which results in harmless but noisy kernel warnings:
nvmet_tcp: queue 2 unhandled state 11Add
TCP_CLOSINGto the switch statement alongsideTCP_FIN_WAIT2andTCP_LAST_ACKto silently ignore the state transition.
Thanks, applied to nvme-7.2.