[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7A1A33E9-663E-42B2-87B5-B09B14D15ED2@yandex-team.ru>
Date: Mon, 17 Jan 2022 18:26:45 +0300
From: Akhmat Karakotov <hmukos@...dex-team.ru>
To: Martin KaFai Lau <kafai@...com>
Cc: Lawrence Brakmo <brakmo@...com>,
Eric Dumazet <eric.dumazet@...il.com>,
Alexander Azimov <mitradir@...dex-team.ru>,
Neal Cardwell <ncardwell@...gle.com>, netdev@...r.kernel.org,
Yuchung Cheng <ycheng@...gle.com>, zeil@...dex-team.ru,
davem@...emloft.net
Subject: Re: [PATCH v3] tcp: Use BPF timeout setting for SYN ACK RTO
Dear David,
We got the patch acked couple of weeks ago, please let us know what further steps are required before merge.
Thanks, Akhmat.
> On Nov 4, 2021, at 04:06, Martin KaFai Lau <kafai@...com> wrote:
>
> On Wed, Nov 03, 2021 at 11:46:07PM +0300, Akhmat Karakotov wrote:
>> When setting RTO through BPF program, some SYN ACK packets were unaffected
>> and continued to use TCP_TIMEOUT_INIT constant. This patch adds timeout
>> option to struct request_sock. Option is initialized with TCP_TIMEOUT_INIT
>> and is reassigned through BPF using tcp_timeout_init call. SYN ACK
>> retransmits now use newly added timeout option.
>>
>> Signed-off-by: Akhmat Karakotov <hmukos@...dex-team.ru>
>> ---
>> include/net/request_sock.h | 2 ++
>> include/net/tcp.h | 2 +-
>> net/ipv4/inet_connection_sock.c | 4 +++-
>> net/ipv4/tcp_input.c | 8 +++++---
>> net/ipv4/tcp_minisocks.c | 12 +++++++++---
>> 5 files changed, 20 insertions(+), 8 deletions(-)
>>
>> diff --git a/include/net/request_sock.h b/include/net/request_sock.h
>> index 29e41ff3ec93..144c39db9898 100644
>> --- a/include/net/request_sock.h
>> +++ b/include/net/request_sock.h
>> @@ -70,6 +70,7 @@ struct request_sock {
>> struct saved_syn *saved_syn;
>> u32 secid;
>> u32 peer_secid;
>> + u32 timeout;
>> };
>>
>> static inline struct request_sock *inet_reqsk(const struct sock *sk)
>> @@ -104,6 +105,7 @@ reqsk_alloc(const struct request_sock_ops *ops, struct sock *sk_listener,
>> sk_node_init(&req_to_sk(req)->sk_node);
>> sk_tx_queue_clear(req_to_sk(req));
>> req->saved_syn = NULL;
>> + req->timeout = 0;
>> req->num_timeout = 0;
>> req->num_retrans = 0;
>> req->sk = NULL;
>> diff --git a/include/net/tcp.h b/include/net/tcp.h
>> index 3166dc15d7d6..e328d6735e38 100644
>> --- a/include/net/tcp.h
>> +++ b/include/net/tcp.h
>> @@ -2323,7 +2323,7 @@ static inline u32 tcp_timeout_init(struct sock *sk)
>>
>> if (timeout <= 0)
>> timeout = TCP_TIMEOUT_INIT;
>> - return timeout;
>> + return min_t(int, timeout, TCP_RTO_MAX);
> Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists