netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
	Felix Maurer <fmaurer@redhat.com>,
	Nicolas Rybowski <nicolas.rybowski@tessares.net>,
	Davide Caratti <dcaratti@redhat.com>
Subject: Re: [PATCH bpf] selftests/bpf: enable mptcp before testing
Date: Mon, 13 Feb 2023 12:10:18 +0800	[thread overview]
Message-ID: <Y+m4KufriYKd39ot@Laptop-X1> (raw)
In-Reply-To: <6f0a72ee-ec30-8c97-0285-6c53db3d4477@tessares.net>

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@gmail.com>
> > ---
> >  .../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

  reply	other threads:[~2023-02-13  4:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  9:32 [PATCH bpf] selftests/bpf: enable mptcp before testing Hangbin Liu
2023-02-10 16:22 ` Matthieu Baerts
2023-02-13  4:10   ` Hangbin Liu [this message]
2023-02-13 16:28     ` Matthieu Baerts
2023-02-14  3:11       ` Hangbin Liu
2023-02-14 19:22         ` Martin KaFai Lau
2023-02-15  3:43           ` Hangbin Liu
2023-02-15  9:58             ` Matthieu Baerts
2023-02-16  8:13               ` Hangbin Liu
2023-02-17  7:04                 ` Martin KaFai Lau
2023-02-17  7:35                   ` Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+m4KufriYKd39ot@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=fmaurer@redhat.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=matthieu.baerts@tessares.net \
    --cc=mykolal@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.rybowski@tessares.net \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).