[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK6E8=fEmv6kQk8S=bvk6NMFUNx9bqmsiRYgJ9y8nqQU58swZw@mail.gmail.com>
Date: Tue, 2 Nov 2021 12:36:25 -0700
From: Yuchung Cheng <ycheng@...gle.com>
To: Ахмат Каракотов
<hmukos@...dex-team.ru>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Lawrence Brakmo <brakmo@...com>,
Alexander Azimov <mitradir@...dex-team.ru>,
Neal Cardwell <ncardwell@...gle.com>, netdev@...r.kernel.org,
zeil@...dex-team.ru
Subject: Re: [PATCH v2] tcp: Use BPF timeout setting for SYN ACK RTO
On Tue, Nov 2, 2021 at 12:13 PM Ахмат Каракотов <hmukos@...dex-team.ru> wrote:
>
> > On Nov 2, 2021, at 21:57, Yuchung Cheng <ycheng@...gle.com> wrote:
> >
> >> 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;
> >
> > why not just set to TCP_TIMEOUT_INIT to avoid setting it again in
> > inet_reqsk_alloc?
> >
>
> I tried, however net/request_sock.h does not include net/tcp.h and
> after trying to include it I got lots of errors. So I thought that
> request_sock is not supposed to know anything about TCP. If I'm
> wrong than what would be the best way to reference this constant?
> Should I just redefine it in net/request_sock.h?
Your explanation makes sense. it'd not be good to put TCP_TIMEOUT_INIT
in req_sk since it's supposed to be less protocol-specific. so
never-mind my comment.
Powered by blists - more mailing lists