On Fri, Feb 14, 2025 at 1:41 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > > On 2/13/25 7:09 PM, Jason Xing wrote: > > On Fri, Feb 14, 2025 at 10:14 AM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > >> > >> On 2/13/25 3:57 PM, Jason Xing wrote: > >>> On Fri, Feb 14, 2025 at 7:41 AM Stanislav Fomichev<stfomichev@xxxxxxxxx> wrote: > >>>> On 02/13, Jason Xing wrote: > >>>>> Support bpf_setsockopt() to set the maximum value of RTO for > >>>>> BPF program. > >>>>> > >>>>> Signed-off-by: Jason Xing<kerneljasonxing@xxxxxxxxx> > >>>>> --- > >>>>> Documentation/networking/ip-sysctl.rst | 3 ++- > >>>>> include/uapi/linux/bpf.h | 2 ++ > >>>>> net/core/filter.c | 6 ++++++ > >>>>> tools/include/uapi/linux/bpf.h | 2 ++ > >>>>> 4 files changed, 12 insertions(+), 1 deletion(-) > >>>>> > >>>>> diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst > >>>>> index 054561f8dcae..78eb0959438a 100644 > >>>>> --- a/Documentation/networking/ip-sysctl.rst > >>>>> +++ b/Documentation/networking/ip-sysctl.rst > >>>>> @@ -1241,7 +1241,8 @@ tcp_rto_min_us - INTEGER > >>>>> > >>>>> tcp_rto_max_ms - INTEGER > >>>>> Maximal TCP retransmission timeout (in ms). > >>>>> - Note that TCP_RTO_MAX_MS socket option has higher precedence. > >>>>> + Note that TCP_BPF_RTO_MAX and TCP_RTO_MAX_MS socket option have the > >>>>> + higher precedence for configuring this setting. > >>>> The cover letter needs more explanation about the motivation. > >> > >> +1 > >> > >> I haven't looked at the patches. The cover letter has no word on the use case. > > The question was your _use case_ in bpf. Not what the TCP_RTO_MAX_MS does. Your > current use case is to have bpf setting it after reading the tcp header option, > like the selftest in patch 3? Oops, I misunderstood the real situation of the tcp header option test. My intention is to bpf_setsockopt() just like setget_sockopt does. Thanks for reminding me. I will totally remove the header test in the next version. > > > > > I will add and copy some words from Eric's patch series :) > > > >>> I am targeting the net-next tree because of recent changes[1] made by > >>> Eric. It probably hasn't merged into the bpf-next tree. > >> > >> There is the bpf-next/net tree. It should have the needed changes. > > > > [1] was recently merged in the net-next tree, so the only one branch I > > can target is net-next. > > > > [1]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ae9b3c0e79bc > > > > Am I missing something? > > There is a net branch: > https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git But this branch hasn't included the rto max feature. I was trying to say that what I wrote is based on the rto max feature which only exists in the net-next tree for now. I wonder whether I need to introduce a new flag like this patch or reuse the TCP_RTO_MAX_MS socket option for bpf? Thanks, Jason