[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211025203521.13507-5-hmukos@yandex-team.ru>
Date: Mon, 25 Oct 2021 23:35:21 +0300
From: Akhmat Karakotov <hmukos@...dex-team.ru>
To: netdev@...r.kernel.org
Cc: eric.dumazet@...il.com, tom@...bertland.com,
mitradir@...dex-team.ru, zeil@...dex-team.ru, hmukos@...dex-team.ru
Subject: [RFC PATCH net-next 4/4] tcp: change SYN ACK retransmit behaviour to account for rehash
Disabling rehash behavior did not affect SYN ACK retransmits because hash
was forcefully changed bypassing the sk_rethink_hash function. This patch
adds a condition which checks for rehash mode before resetting hash.
Signed-off-by: Akhmat Karakotov <hmukos@...dex-team.ru>
---
net/ipv4/tcp_output.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 6d72f3ea48c4..7d54bbe00cde 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -4108,7 +4108,8 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req)
struct flowi fl;
int res;
- tcp_rsk(req)->txhash = net_tx_rndhash();
+ if (sk->sk_txrehash == SOCK_TXREHASH_ENABLED)
+ tcp_rsk(req)->txhash = net_tx_rndhash();
res = af_ops->send_synack(sk, NULL, &fl, req, NULL, TCP_SYNACK_NORMAL,
NULL);
if (!res) {
--
2.17.1
Powered by blists - more mailing lists