[PATCHv2 net-next 0/6] selftests: net: configure rp_filter in setup_ns

Hangbin Liu posted 6 patches 7 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20250508081910.84216-1-liuhangbin@gmail.com
tools/testing/selftests/net/bareudp.sh        | 49 ++---------
tools/testing/selftests/net/fib_rule_tests.sh |  3 -
tools/testing/selftests/net/fib_tests.sh      |  3 -
tools/testing/selftests/net/icmp_redirect.sh  |  2 -
tools/testing/selftests/net/lib.sh            |  2 +
.../testing/selftests/net/mptcp/mptcp_lib.sh  |  2 -
.../selftests/net/netfilter/br_netfilter.sh   |  3 -
.../selftests/net/netfilter/bridge_brouter.sh |  2 -
.../selftests/net/netfilter/conntrack_vrf.sh  |  3 -
tools/testing/selftests/net/netfilter/ipvs.sh |  6 --
.../selftests/net/netfilter/nft_fib.sh        |  2 -
.../selftests/net/netfilter/nft_nat_zones.sh  |  2 -
.../testing/selftests/net/netfilter/rpath.sh  | 18 ++--
.../selftests/net/srv6_end_dt46_l3vpn_test.sh |  5 --
.../selftests/net/srv6_end_dt4_l3vpn_test.sh  |  5 --
.../net/srv6_end_next_csid_l3vpn_test.sh      | 77 ++++-------------
.../net/srv6_end_x_next_csid_l3vpn_test.sh    | 83 +++++--------------
.../net/srv6_hencap_red_l3vpn_test.sh         | 74 ++++-------------
.../net/srv6_hl2encap_red_l2vpn_test.sh       | 83 +++++--------------
19 files changed, 90 insertions(+), 334 deletions(-)
[PATCHv2 net-next 0/6] selftests: net: configure rp_filter in setup_ns
Posted by Hangbin Liu 7 months, 1 week ago
Some distributions enable rp_filter globally by default, which can interfere
with various test cases. To address this, many tests explicitly disable
rp_filter within their scripts.

To avoid duplication and ensure consistent behavior across tests, this patch
moves the rp_filter configuration into setup_ns, applied immediately after a
new namespace is created. This change ensures that all namespace-based tests
inherit the appropriate rp_filter settings, simplifying individual test
scripts and improving maintainability.

v2: fix srv6_hl2encap_red_l2vpn_test.sh test failure (Jakub Kicinski)

Hangbin Liu (6):
  selftests: net: disable rp_filter after namespace initialization
  selftests: net: remove redundant rp_filter configuration
  selftests: net: use setup_ns for bareudp testing
  selftests: net: use setup_ns for SRv6 tests and remove rp_filter
    configuration
  selftests: netfilter: remove rp_filter configuration
  selftests: mptcp: remove rp_filter configuration

 tools/testing/selftests/net/bareudp.sh        | 49 ++---------
 tools/testing/selftests/net/fib_rule_tests.sh |  3 -
 tools/testing/selftests/net/fib_tests.sh      |  3 -
 tools/testing/selftests/net/icmp_redirect.sh  |  2 -
 tools/testing/selftests/net/lib.sh            |  2 +
 .../testing/selftests/net/mptcp/mptcp_lib.sh  |  2 -
 .../selftests/net/netfilter/br_netfilter.sh   |  3 -
 .../selftests/net/netfilter/bridge_brouter.sh |  2 -
 .../selftests/net/netfilter/conntrack_vrf.sh  |  3 -
 tools/testing/selftests/net/netfilter/ipvs.sh |  6 --
 .../selftests/net/netfilter/nft_fib.sh        |  2 -
 .../selftests/net/netfilter/nft_nat_zones.sh  |  2 -
 .../testing/selftests/net/netfilter/rpath.sh  | 18 ++--
 .../selftests/net/srv6_end_dt46_l3vpn_test.sh |  5 --
 .../selftests/net/srv6_end_dt4_l3vpn_test.sh  |  5 --
 .../net/srv6_end_next_csid_l3vpn_test.sh      | 77 ++++-------------
 .../net/srv6_end_x_next_csid_l3vpn_test.sh    | 83 +++++--------------
 .../net/srv6_hencap_red_l3vpn_test.sh         | 74 ++++-------------
 .../net/srv6_hl2encap_red_l2vpn_test.sh       | 83 +++++--------------
 19 files changed, 90 insertions(+), 334 deletions(-)

-- 
2.46.0
Re: [PATCHv2 net-next 0/6] selftests: net: configure rp_filter in setup_ns
Posted by patchwork-bot+netdevbpf@kernel.org 7 months ago
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  8 May 2025 08:19:04 +0000 you wrote:
> Some distributions enable rp_filter globally by default, which can interfere
> with various test cases. To address this, many tests explicitly disable
> rp_filter within their scripts.
> 
> To avoid duplication and ensure consistent behavior across tests, this patch
> moves the rp_filter configuration into setup_ns, applied immediately after a
> new namespace is created. This change ensures that all namespace-based tests
> inherit the appropriate rp_filter settings, simplifying individual test
> scripts and improving maintainability.
> 
> [...]

Here is the summary with links:
  - [PATCHv2,net-next,1/6] selftests: net: disable rp_filter after namespace initialization
    https://git.kernel.org/netdev/net-next/c/ce17831f8e97
  - [PATCHv2,net-next,2/6] selftests: net: remove redundant rp_filter configuration
    https://git.kernel.org/netdev/net-next/c/50ad88d57631
  - [PATCHv2,net-next,3/6] selftests: net: use setup_ns for bareudp testing
    https://git.kernel.org/netdev/net-next/c/69ea46e7d00e
  - [PATCHv2,net-next,4/6] selftests: net: use setup_ns for SRv6 tests and remove rp_filter configuration
    https://git.kernel.org/netdev/net-next/c/3f68f59e9593
  - [PATCHv2,net-next,5/6] selftests: netfilter: remove rp_filter configuration
    https://git.kernel.org/netdev/net-next/c/7c8b89ec506e
  - [PATCHv2,net-next,6/6] selftests: mptcp: remove rp_filter configuration
    https://git.kernel.org/netdev/net-next/c/b83d98c1db29

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCHv2 net-next 0/6] selftests: net: configure rp_filter in setup_ns
Posted by MPTCP CI 7 months, 1 week ago
Hi Hangbin,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/14902280970

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/4395dffc7a5a
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=960799


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)