projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49f6713
)
tcp: bpf: Support bpf_getsockopt for TCP_BPF_RTO_MIN
author
Jason Xing
<kerneljasonxing@gmail.com>
Wed, 12 Mar 2025 15:35:21 +0000
(16:35 +0100)
committer
Martin KaFai Lau
<martin.lau@kernel.org>
Thu, 13 Mar 2025 21:30:39 +0000
(14:30 -0700)
Support bpf_getsockopt if application tries to know what the RTO MIN
of this socket is.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link:
https://patch.msgid.link/20250312153523.9860-3-kerneljasonxing@gmail.com
net/core/filter.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/filter.c
b/net/core/filter.c
index 2932de5cc57cedc9490705a382c1211d77e1be78..4d34d35af5c788106250d5974a35288c17461e92 100644
(file)
--- a/
net/core/filter.c
+++ b/
net/core/filter.c
@@
-5295,6
+5295,12
@@
static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
memcpy(optval, &cb_flags, optlen);
break;
}
+ case TCP_BPF_RTO_MIN: {
+ int rto_min_us = jiffies_to_usecs(inet_csk(sk)->icsk_rto_min);
+
+ memcpy(optval, &rto_min_us, optlen);
+ break;
+ }
default:
return -EINVAL;
}