mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC
@ 2021-06-10  1:25 Yonglong Li
  2021-06-10 21:25 ` Mat Martineau
  2021-06-11 14:45 ` Matthieu Baerts
  0 siblings, 2 replies; 3+ messages in thread
From: Yonglong Li @ 2021-06-10  1:25 UTC (permalink / raw)
  To: mptcp
  Cc: pabeni, matthieu.baerts, mathew.j.martineau, geliangtang, Yonglong Li

To turn rp_filter off we should:
echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
 and
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
before NIC created.

Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>
---
 tools/testing/selftests/net/mptcp/simult_flows.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
index 3aeef3b..6b6336d 100755
--- a/tools/testing/selftests/net/mptcp/simult_flows.sh
+++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
@@ -60,6 +60,8 @@ setup()
 	for i in "$ns1" "$ns2" "$ns3";do
 		ip netns add $i || exit $ksft_skip
 		ip -net $i link set lo up
+		ip netns exec $1 sysctl -q net.ipv4.conf.all.rp_filter=0
+		ip netns exec $1 sysctl -q net.ipv4.conf.default.rp_filter=0
 	done
 
 	ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
@@ -80,7 +82,6 @@ setup()
 
 	ip netns exec "$ns1" ./pm_nl_ctl limits 1 1
 	ip netns exec "$ns1" ./pm_nl_ctl add 10.0.2.1 dev ns1eth2 flags subflow
-	ip netns exec "$ns1" sysctl -q net.ipv4.conf.all.rp_filter=0
 
 	ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
 	ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC
  2021-06-10  1:25 [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC Yonglong Li
@ 2021-06-10 21:25 ` Mat Martineau
  2021-06-11 14:45 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2021-06-10 21:25 UTC (permalink / raw)
  To: Yonglong Li; +Cc: mptcp, pabeni, matthieu.baerts, geliangtang

On Thu, 10 Jun 2021, Yonglong Li wrote:

> To turn rp_filter off we should:
> echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
> and
> echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
> before NIC created.
>
> Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>
> ---
> tools/testing/selftests/net/mptcp/simult_flows.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
> index 3aeef3b..6b6336d 100755
> --- a/tools/testing/selftests/net/mptcp/simult_flows.sh
> +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
> @@ -60,6 +60,8 @@ setup()
> 	for i in "$ns1" "$ns2" "$ns3";do
> 		ip netns add $i || exit $ksft_skip
> 		ip -net $i link set lo up
> +		ip netns exec $1 sysctl -q net.ipv4.conf.all.rp_filter=0
> +		ip netns exec $1 sysctl -q net.ipv4.conf.default.rp_filter=0
> 	done
>
> 	ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
> @@ -80,7 +82,6 @@ setup()
>
> 	ip netns exec "$ns1" ./pm_nl_ctl limits 1 1
> 	ip netns exec "$ns1" ./pm_nl_ctl add 10.0.2.1 dev ns1eth2 flags subflow
> -	ip netns exec "$ns1" sysctl -q net.ipv4.conf.all.rp_filter=0
>
> 	ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
> 	ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
> -- 
> 1.8.3.1

Looks good to me, thank you!

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC
  2021-06-10  1:25 [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC Yonglong Li
  2021-06-10 21:25 ` Mat Martineau
@ 2021-06-11 14:45 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2021-06-11 14:45 UTC (permalink / raw)
  To: Yonglong Li, mptcp; +Cc: pabeni, mathew.j.martineau, geliangtang

Hi Yonglong, Mat,

On 10/06/2021 03:25, Yonglong Li wrote:
> To turn rp_filter off we should:
> echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
>  and
> echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
> before NIC created.
> 
> Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>

Thank you for the patch and the review!

- 48aa051e5c6b: selftests: mptcp: turn rp_filter off on each NIC
- Results: 4e92195bd477..ea78893dca6c

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210611T144454
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210611T144454

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-11 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  1:25 [PATCH v2] selftests: mptcp: turn rp_filter off on each NIC Yonglong Li
2021-06-10 21:25 ` Mat Martineau
2021-06-11 14:45 ` Matthieu Baerts

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).