Re: [PATCH v2] tcp: Use BPF timeout setting for SYN ACK RTO

3 messages, 2 authors, 2021-11-03 · open the first message on its own page

Re: [PATCH v2] tcp: Use BPF timeout setting for SYN ACK RTO

From: Ахмат Каракотов <hidden>
Date: 2021-11-02 19:13:29

On Nov 2, 2021, at 21:57, Yuchung Cheng [off-list ref] wrote:
quoted
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?

Re: [PATCH v2] tcp: Use BPF timeout setting for SYN ACK RTO

From: Yuchung Cheng <hidden>
Date: 2021-11-02 19:37:06

On Tue, Nov 2, 2021 at 12:13 PM Ахмат Каракотов [off-list ref] wrote:
quoted
On Nov 2, 2021, at 21:57, Yuchung Cheng [off-list ref] wrote:
quoted
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.

Re: [PATCH v2] tcp: Use BPF timeout setting for SYN ACK RTO

From: Yuchung Cheng <hidden>
Date: 2021-11-03 00:33:18

On Tue, Nov 2, 2021 at 12:36 PM Yuchung Cheng [off-list ref] wrote:
On Tue, Nov 2, 2021 at 12:13 PM Ахмат Каракотов [off-list ref] wrote:
quoted
quoted
On Nov 2, 2021, at 21:57, Yuchung Cheng [off-list ref] wrote:
quoted
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.
Forget to

Acked-by: Yuchung Cheng <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help