Support bpf_getsockopt if application tries to know what the RTO MIN of this socket is. Signed-off-by: Jason Xing <kerneljasonxing@xxxxxxxxx> --- net/core/filter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/core/filter.c b/net/core/filter.c index 2932de5cc57c..4d34d35af5c7 100644 --- 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; } -- 2.43.5