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:
5584cd7
)
tcp: bpf: Support bpf_getsockopt for TCP_BPF_DELACK_MAX
author
Jason Xing
<kerneljasonxing@gmail.com>
Wed, 12 Mar 2025 15:35:22 +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 delayed ack
max time 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-4-kerneljasonxing@gmail.com
net/core/filter.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/filter.c
b/net/core/filter.c
index 4d34d35af5c788106250d5974a35288c17461e92..46ae8eb7a03cbf70090637fa018f9bea85a5788e 100644
(file)
--- a/
net/core/filter.c
+++ b/
net/core/filter.c
@@
-5301,6
+5301,12
@@
static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
memcpy(optval, &rto_min_us, optlen);
break;
}
+ case TCP_BPF_DELACK_MAX: {
+ int delack_max_us = jiffies_to_usecs(inet_csk(sk)->icsk_delack_max);
+
+ memcpy(optval, &delack_max_us, optlen);
+ break;
+ }
default:
return -EINVAL;
}