diff options
author | Menglong Dong <imagedong@tencent.com> | 2023-08-11 10:55:27 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-13 12:21:37 +0100 |
commit | e2142825c120d4317abf7160a0fc34b3de532586 (patch) | |
tree | 0689682aa43833ae1414c7b94557034b61ad2f48 /include/net | |
parent | 3e6860ec3a2252249e310b0e6e88e2258171b3d0 (diff) | |
download | linux-e2142825c120d4317abf7160a0fc34b3de532586.tar.gz linux-e2142825c120d4317abf7160a0fc34b3de532586.tar.bz2 linux-e2142825c120d4317abf7160a0fc34b3de532586.zip |
net: tcp: send zero-window ACK when no memory
For now, skb will be dropped when no memory, which makes client keep
retrans util timeout and it's not friendly to the users.
In this patch, we reply an ACK with zero-window in this case to update
the snd_wnd of the sender to 0. Therefore, the sender won't timeout the
connection and will probe the zero-window with the retransmits.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/inet_connection_sock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index c2b15f7e5516..be3c858a2ebb 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -164,7 +164,8 @@ enum inet_csk_ack_state_t { ICSK_ACK_TIMER = 2, ICSK_ACK_PUSHED = 4, ICSK_ACK_PUSHED2 = 8, - ICSK_ACK_NOW = 16 /* Send the next ACK immediately (once) */ + ICSK_ACK_NOW = 16, /* Send the next ACK immediately (once) */ + ICSK_ACK_NOMEM = 32, }; void inet_csk_init_xmit_timers(struct sock *sk, |