Re: [PATCH bpf] selftests/bpf: enable mptcp before testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 10, 2023 at 05:22:24PM +0100, Matthieu Baerts wrote:
> Hi Hangbin Liu,
> 
> On 10/02/2023 10:32, Hangbin Liu wrote:
> > Some distros may not enable mptcp by default. Enable it before start the
> > mptcp server. To use the {read/write}_int_sysctl() functions, I moved
> > them to test_progs.c
> > 
> > Fixes: 8039d353217c ("selftests/bpf: Add MPTCP test base")
> > Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
> > ---
> >  .../testing/selftests/bpf/prog_tests/mptcp.c  | 15 ++++++-
> 
> Thank you for the patch!
> 
> The modifications linked to MPTCP look good to me.
> 
> But I don't think it is needed here: I maybe didn't look properly at
> 'bpf/test_progs.c' file but I think each program from 'prog_tests'
> directory is executed in a dedicated netns, no?
> 
> I don't have an environment ready to validate that but if yes, it means
> that on a "vanilla" kernel, net.mptcp.enabled sysctl knob should be set
> to 1. In this case, this modification would be specific to these distros
> patching MPTCP code to disable it by default. It might then be better to
> add this patch next to the one disabling MPTCP by default, no? (or
> revert it to have MPTCP available by default for the applications asking
> for it :) )

I think this issue looks like the rp_filter setting. The default rp_filter is 0.
But many distros set it to 1 for safety reason. Thus there are some fixes for
the rp_filter setting like this one. e.g.

[Liu@Laptop-X1 net]$ git log --oneline tools/testing/selftests/net | grep rp_filter
f6071e5e3961 selftests/fib_tests: Rework fib_rp_filter_test()
d8e336f77e3b selftests: mptcp: turn rp_filter off on each NIC
e86580235708 selftests: set conf.all.rp_filter=0 in bareudp.sh
1ccd58331f6f selftests: disable rp_filter when testing bareudp
71a0e29e9940 selftests: forwarding: Add missing 'rp_filter' configuration
bcf7ddb0186d selftests: disable rp_filter for icmp_redirect.sh
adb701d6cfa4 selftests: add a test case for rp_filter
42801298386c selftests: forwarding: mirror_gre_nh: Unset rp_filter on host VRF
27a2628b3c24 selftests: forwarding: mirror_gre_vlan_bridge_1q: Unset rp_filter

Thanks
Hangbin



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux