mbox series

[bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports

Message ID 20250311085437.14703-1-kerneljasonxing@gmail.com (mailing list archive)
Headers show
Series tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports | expand

Message

Jason Xing March 11, 2025, 8:54 a.m. UTC
Introduce bpf_sol_tcp_getsockopt() helper.

Add bpf_getsockopt for RTO MIN and DELACK MAX.

Add setsockopt/getsockopt for RTO MIN and DELACK MAX.

Add corresponding selftests for bpf.

v2
Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
1. add bpf getsockopt common helper
2. target bpf-next net branch

Jason Xing (6):
  bpf: introduce bpf_sol_tcp_getsockopt to support TCP_BPF flags
  tcp: bpf: support bpf_getsockopt for TCP_BPF_RTO_MIN
  tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX
  tcp: support TCP_RTO_MIN_US for set/getsockopt use
  tcp: support TCP_DELACK_MAX_US for set/getsockopt use
  selftests: add bpf_set/getsockopt() for TCP_BPF_DELACK_MAX and
    TCP_BPF_RTO_MIN

 Documentation/networking/ip-sysctl.rst        |  4 +-
 include/net/tcp.h                             |  2 +-
 include/uapi/linux/tcp.h                      |  2 +
 net/core/filter.c                             | 45 ++++++++++++++-----
 net/ipv4/tcp.c                                | 32 ++++++++++++-
 net/ipv4/tcp_output.c                         |  2 +-
 .../selftests/bpf/progs/setget_sockopt.c      |  2 +
 7 files changed, 71 insertions(+), 18 deletions(-)

Comments

Martin KaFai Lau March 11, 2025, 6:39 p.m. UTC | #1
On 3/11/25 4:07 AM, Jason Xing wrote:
> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
>>
>> Dear patch submitter,
>>
>> CI has tested the following submission:
>> Status:     FAILURE
>> Name:       [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/getsockopt supports
>> Patchwork:  https://patchwork.kernel.org/project/netdevbpf/list/?series=942617&state=*
>> Matrix:     https://github.com/kernel-patches/bpf/actions/runs/13784214269
>>
>> Failed jobs:
>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548852334
>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548853075
>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548829871
>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/runs/13784214269/job/38548830246
> 
> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that

It cannot apply, so it applied to bpf-next/net.

I just confirmed by first checking this:
https://github.com/kernel-patches/bpf/pulls

then find your patches and figure out bpf-net_base:
https://github.com/kernel-patches/bpf/pull/8649

> says the patch can not be applied. Could it be possible that CI
> applied it on the wrong branch? I targeted the net branch.
> 
> I have no clue this series is affecting the following tests

The test is changing the exact same test setget_sockopt and it failed, so it 
should be suspicious enough to look at the details of the bpf CI report.

The report said it failed in aarch64 and s390 but x86 seems to be fine.
When the test failed, it pretty much failed on all tests. It looks like some of 
the new set/getsockopt checks failed in these two archs. A blind guess is the 
jiffies part.


> (./test_progs -t setget_sockopt). It seems it has nothing to do with
> this series. And I'm unable to reproduce it locally.
Martin KaFai Lau March 11, 2025, 6:44 p.m. UTC | #2
On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> On 3/11/25 4:07 AM, Jason Xing wrote:
>> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
>>>
>>> Dear patch submitter,
>>>
>>> CI has tested the following submission:
>>> Status:     FAILURE
>>> Name:       [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/ 
>>> getsockopt supports
>>> Patchwork:  https://patchwork.kernel.org/project/netdevbpf/list/? 
>>> series=942617&state=*
>>> Matrix:     https://github.com/kernel-patches/bpf/actions/runs/13784214269
>>>
>>> Failed jobs:
>>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/ 
>>> runs/13784214269/job/38548852334
>>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/ 
>>> actions/runs/13784214269/job/38548853075
>>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/ 
>>> runs/13784214269/job/38548829871
>>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/ 
>>> runs/13784214269/job/38548830246
>>
>> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
> 
> It cannot apply, so it applied to bpf-next/net.
> 
> I just confirmed by first checking this:
> https://github.com/kernel-patches/bpf/pulls
> 
> then find your patches and figure out bpf-net_base:
> https://github.com/kernel-patches/bpf/pull/8649
> 
>> says the patch can not be applied. Could it be possible that CI
>> applied it on the wrong branch? I targeted the net branch.
>>
>> I have no clue this series is affecting the following tests
> 
> The test is changing the exact same test setget_sockopt and it failed, so it 
> should be suspicious enough to look at the details of the bpf CI report.
> 
> The report said it failed in aarch64 and s390 but x86 seems to be fine.
> When the test failed, it pretty much failed on all tests. It looks like some of 
> the new set/getsockopt checks failed in these two archs. A blind guess is the 
> jiffies part.

and forgot to mention that you can run bpf CI before posting. This may be easier 
to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The 
section "How do I run BPF CI on my changes before sending them out for review?"

> 
> 
>> (./test_progs -t setget_sockopt). It seems it has nothing to do with
>> this series. And I'm unable to reproduce it locally.
>
Eric Dumazet March 12, 2025, 4:57 a.m. UTC | #3
On Tue, Mar 11, 2025 at 9:56 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> Introduce bpf_sol_tcp_getsockopt() helper.
>
> Add bpf_getsockopt for RTO MIN and DELACK MAX.
>
> Add setsockopt/getsockopt for RTO MIN and DELACK MAX.
>
> Add corresponding selftests for bpf.
>
> v2
> Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
> 1. add bpf getsockopt common helper
> 2. target bpf-next net branch

Some of us are busy attending netdev conference.

Please split this series in two, one for pure TCP changes and one
other for BPF, and send it after the netdev conference ends.

It is not because BPF stuff is added that suddenly a series can escape
TCP maintainers attention.

Thank you
Jason Xing March 12, 2025, 5:13 a.m. UTC | #4
On Wed, Mar 12, 2025 at 5:57 AM Eric Dumazet <edumazet@google.com> wrote:
>
> On Tue, Mar 11, 2025 at 9:56 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
> >
> > Introduce bpf_sol_tcp_getsockopt() helper.
> >
> > Add bpf_getsockopt for RTO MIN and DELACK MAX.
> >
> > Add setsockopt/getsockopt for RTO MIN and DELACK MAX.
> >
> > Add corresponding selftests for bpf.
> >
> > v2
> > Link: https://lore.kernel.org/all/20250309123004.85612-1-kerneljasonxing@gmail.com/
> > 1. add bpf getsockopt common helper
> > 2. target bpf-next net branch
>
> Some of us are busy attending netdev conference.
>
> Please split this series in two, one for pure TCP changes and one
> other for BPF, and send it after the netdev conference ends.

No problem. I will handle the BPF part first.

>
> It is not because BPF stuff is added that suddenly a series can escape
> TCP maintainers attention.

Oh, it is obviously not my intention :) The netdev parts are
definitely needed TCP maintainers ack for sure :)

Thanks,
Jason
Jason Xing March 12, 2025, 6:50 a.m. UTC | #5
On Tue, Mar 11, 2025 at 7:44 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>
> On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> > On 3/11/25 4:07 AM, Jason Xing wrote:
> >> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
> >>>
> >>> Dear patch submitter,
> >>>
> >>> CI has tested the following submission:
> >>> Status:     FAILURE
> >>> Name:       [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/
> >>> getsockopt supports
> >>> Patchwork:  https://patchwork.kernel.org/project/netdevbpf/list/?
> >>> series=942617&state=*
> >>> Matrix:     https://github.com/kernel-patches/bpf/actions/runs/13784214269
> >>>
> >>> Failed jobs:
> >>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548852334
> >>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/
> >>> actions/runs/13784214269/job/38548853075
> >>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548829871
> >>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> >>> runs/13784214269/job/38548830246
> >>
> >> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
> >
> > It cannot apply, so it applied to bpf-next/net.
> >
> > I just confirmed by first checking this:
> > https://github.com/kernel-patches/bpf/pulls
> >
> > then find your patches and figure out bpf-net_base:
> > https://github.com/kernel-patches/bpf/pull/8649
> >
> >> says the patch can not be applied. Could it be possible that CI
> >> applied it on the wrong branch? I targeted the net branch.
> >>
> >> I have no clue this series is affecting the following tests
> >
> > The test is changing the exact same test setget_sockopt and it failed, so it
> > should be suspicious enough to look at the details of the bpf CI report.
> >
> > The report said it failed in aarch64 and s390 but x86 seems to be fine.
> > When the test failed, it pretty much failed on all tests. It looks like some of
> > the new set/getsockopt checks failed in these two archs. A blind guess is the
> > jiffies part.
>
> and forgot to mention that you can run bpf CI before posting. This may be easier
> to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The
> section "How do I run BPF CI on my changes before sending them out for review?"

Thanks for the pointer.

Let me try one patch by one patch. Having checked the series itself, I
still have no clue. You said jiffies part. What is that? Could you
please point out a file name or configuration so that I can follow you
and then do some tests?

Thanks,
Jason
Jason Xing March 12, 2025, 12:25 p.m. UTC | #6
On Wed, Mar 12, 2025 at 7:50 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> On Tue, Mar 11, 2025 at 7:44 PM Martin KaFai Lau <martin.lau@linux.dev> wrote:
> >
> > On 3/11/25 11:39 AM, Martin KaFai Lau wrote:
> > > On 3/11/25 4:07 AM, Jason Xing wrote:
> > >> On Tue, Mar 11, 2025 at 10:26 AM <bot+bpf-ci@kernel.org> wrote:
> > >>>
> > >>> Dear patch submitter,
> > >>>
> > >>> CI has tested the following submission:
> > >>> Status:     FAILURE
> > >>> Name:       [bpf-next,v2,0/6] tcp: add some RTO MIN and DELACK MAX {bpf_}set/
> > >>> getsockopt supports
> > >>> Patchwork:  https://patchwork.kernel.org/project/netdevbpf/list/?
> > >>> series=942617&state=*
> > >>> Matrix:     https://github.com/kernel-patches/bpf/actions/runs/13784214269
> > >>>
> > >>> Failed jobs:
> > >>> test_progs-aarch64-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548852334
> > >>> test_progs_no_alu32-aarch64-gcc: https://github.com/kernel-patches/bpf/
> > >>> actions/runs/13784214269/job/38548853075
> > >>> test_progs-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548829871
> > >>> test_progs_no_alu32-s390x-gcc: https://github.com/kernel-patches/bpf/actions/
> > >>> runs/13784214269/job/38548830246
> > >>
> > >> I see https://netdev.bots.linux.dev/static/nipa/942617/apply/desc that
> > >
> > > It cannot apply, so it applied to bpf-next/net.
> > >
> > > I just confirmed by first checking this:
> > > https://github.com/kernel-patches/bpf/pulls
> > >
> > > then find your patches and figure out bpf-net_base:
> > > https://github.com/kernel-patches/bpf/pull/8649
> > >
> > >> says the patch can not be applied. Could it be possible that CI
> > >> applied it on the wrong branch? I targeted the net branch.
> > >>
> > >> I have no clue this series is affecting the following tests
> > >
> > > The test is changing the exact same test setget_sockopt and it failed, so it
> > > should be suspicious enough to look at the details of the bpf CI report.
> > >
> > > The report said it failed in aarch64 and s390 but x86 seems to be fine.
> > > When the test failed, it pretty much failed on all tests. It looks like some of
> > > the new set/getsockopt checks failed in these two archs. A blind guess is the
> > > jiffies part.
> >
> > and forgot to mention that you can run bpf CI before posting. This may be easier
> > to test other archs. Take a look at Documentation/bpf/bpf_devel_QA.rst. The
> > section "How do I run BPF CI on my changes before sending them out for review?"
>
> Thanks for the pointer.
>
> Let me try one patch by one patch. Having checked the series itself, I
> still have no clue. You said jiffies part. What is that? Could you
> please point out a file name or configuration so that I can follow you
> and then do some tests?

Oh, I realized that. Maybe I need to adjust the test and expected
value in the selftests to make it compatible with different HZ values
in those arch configs.

Thanks,
Jason