mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
selftests: forwarding: vxlan_bridge_1q_mc_ul: Drop useless sleeping
After fixing traffic matching in the previous patch, the test does not need
to use the sleep anymore. So drop vx_wait() altogether, migrate all callers
of vx{10,20}_create_wait() to the corresponding _create(), and drop the now
unused _create_wait() helpers.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/eabfe4fa12ae788cf3b8c5c876a989de81dfc3d3.1765289566.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
0c8b9a68b3
commit
514520b34b
@@ -253,13 +253,6 @@ vx_create()
|
||||
}
|
||||
export -f vx_create
|
||||
|
||||
vx_wait()
|
||||
{
|
||||
# Wait for all the ARP, IGMP etc. noise to settle down so that the
|
||||
# tunnel is clear for measurements.
|
||||
sleep 10
|
||||
}
|
||||
|
||||
vx10_create()
|
||||
{
|
||||
vx_create vx10 10 id 1000 "$@"
|
||||
@@ -272,18 +265,6 @@ vx20_create()
|
||||
}
|
||||
export -f vx20_create
|
||||
|
||||
vx10_create_wait()
|
||||
{
|
||||
vx10_create "$@"
|
||||
vx_wait
|
||||
}
|
||||
|
||||
vx20_create_wait()
|
||||
{
|
||||
vx20_create "$@"
|
||||
vx_wait
|
||||
}
|
||||
|
||||
ns_init_common()
|
||||
{
|
||||
local ns=$1; shift
|
||||
@@ -559,7 +540,7 @@ ipv4_nomcroute()
|
||||
# Install a misleading (S,G) rule to attempt to trick the system into
|
||||
# pushing the packets elsewhere.
|
||||
adf_install_broken_sg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$swp2"
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$swp2"
|
||||
do_test 4 10 0 "IPv4 nomcroute"
|
||||
}
|
||||
|
||||
@@ -567,7 +548,7 @@ ipv6_nomcroute()
|
||||
{
|
||||
# Like for IPv4, install a misleading (S,G).
|
||||
adf_install_broken_sg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$swp2"
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$swp2"
|
||||
do_test 6 10 0 "IPv6 nomcroute"
|
||||
}
|
||||
|
||||
@@ -586,35 +567,35 @@ ipv6_nomcroute_rx()
|
||||
ipv4_mcroute()
|
||||
{
|
||||
adf_install_sg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
do_test 4 10 10 "IPv4 mcroute"
|
||||
}
|
||||
|
||||
ipv6_mcroute()
|
||||
{
|
||||
adf_install_sg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
do_test 6 10 10 "IPv6 mcroute"
|
||||
}
|
||||
|
||||
ipv4_mcroute_rx()
|
||||
{
|
||||
adf_install_sg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
ipv4_do_test_rx 0 "IPv4 mcroute ping"
|
||||
}
|
||||
|
||||
ipv6_mcroute_rx()
|
||||
{
|
||||
adf_install_sg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
ipv6_do_test_rx 0 "IPv6 mcroute ping"
|
||||
}
|
||||
|
||||
ipv4_mcroute_changelink()
|
||||
{
|
||||
adf_install_sg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR"
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR"
|
||||
ip link set dev vx10 type vxlan mcroute
|
||||
sleep 1
|
||||
do_test 4 10 10 "IPv4 mcroute changelink"
|
||||
@@ -623,7 +604,7 @@ ipv4_mcroute_changelink()
|
||||
ipv6_mcroute_changelink()
|
||||
{
|
||||
adf_install_sg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
ip link set dev vx20 type vxlan mcroute
|
||||
sleep 1
|
||||
do_test 6 10 10 "IPv6 mcroute changelink"
|
||||
@@ -632,47 +613,47 @@ ipv6_mcroute_changelink()
|
||||
ipv4_mcroute_starg()
|
||||
{
|
||||
adf_install_starg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
do_test 4 10 10 "IPv4 mcroute (*,G)"
|
||||
}
|
||||
|
||||
ipv6_mcroute_starg()
|
||||
{
|
||||
adf_install_starg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
do_test 6 10 10 "IPv6 mcroute (*,G)"
|
||||
}
|
||||
|
||||
ipv4_mcroute_starg_rx()
|
||||
{
|
||||
adf_install_starg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
ipv4_do_test_rx 0 "IPv4 mcroute (*,G) ping"
|
||||
}
|
||||
|
||||
ipv6_mcroute_starg_rx()
|
||||
{
|
||||
adf_install_starg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
ipv6_do_test_rx 0 "IPv6 mcroute (*,G) ping"
|
||||
}
|
||||
|
||||
ipv4_mcroute_noroute()
|
||||
{
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
do_test 4 0 0 "IPv4 mcroute, no route"
|
||||
}
|
||||
|
||||
ipv6_mcroute_noroute()
|
||||
{
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
do_test 6 0 0 "IPv6 mcroute, no route"
|
||||
}
|
||||
|
||||
ipv4_mcroute_fdb()
|
||||
{
|
||||
adf_install_sg
|
||||
vx10_create_wait local 192.0.2.100 dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 dev "$IPMR" mcroute
|
||||
bridge fdb add dev vx10 \
|
||||
00:00:00:00:00:00 self static dst "$GROUP4" via "$IPMR"
|
||||
do_test 4 10 10 "IPv4 mcroute FDB"
|
||||
@@ -681,7 +662,7 @@ ipv4_mcroute_fdb()
|
||||
ipv6_mcroute_fdb()
|
||||
{
|
||||
adf_install_sg
|
||||
vx20_create_wait local 2001:db8:4::1 dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 dev "$IPMR" mcroute
|
||||
bridge -6 fdb add dev vx20 \
|
||||
00:00:00:00:00:00 self static dst "$GROUP6" via "$IPMR"
|
||||
do_test 6 10 10 "IPv6 mcroute FDB"
|
||||
@@ -691,7 +672,7 @@ ipv6_mcroute_fdb()
|
||||
ipv4_mcroute_fdb_oif0()
|
||||
{
|
||||
adf_install_sg
|
||||
vx10_create_wait local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.100 group "$GROUP4" dev "$IPMR" mcroute
|
||||
bridge fdb del dev vx10 00:00:00:00:00:00
|
||||
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
|
||||
do_test 4 10 10 "IPv4 mcroute oif=0"
|
||||
@@ -708,7 +689,7 @@ ipv6_mcroute_fdb_oif0()
|
||||
defer ip -6 route del table local multicast "$GROUP6/128" dev "$IPMR"
|
||||
|
||||
adf_install_sg
|
||||
vx20_create_wait local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:4::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
bridge -6 fdb del dev vx20 00:00:00:00:00:00
|
||||
bridge -6 fdb add dev vx20 00:00:00:00:00:00 self static dst "$GROUP6"
|
||||
do_test 6 10 10 "IPv6 mcroute oif=0"
|
||||
@@ -721,7 +702,7 @@ ipv4_mcroute_fdb_oif0_sep()
|
||||
adf_install_sg_sep
|
||||
|
||||
adf_ip_addr_add lo 192.0.2.120/28
|
||||
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
bridge fdb del dev vx10 00:00:00:00:00:00
|
||||
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
|
||||
do_test 4 10 10 "IPv4 mcroute TX!=RX oif=0"
|
||||
@@ -732,7 +713,7 @@ ipv4_mcroute_fdb_oif0_sep_rx()
|
||||
adf_install_sg_sep_rx lo
|
||||
|
||||
adf_ip_addr_add lo 192.0.2.120/28
|
||||
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
bridge fdb del dev vx10 00:00:00:00:00:00
|
||||
bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
|
||||
ipv4_do_test_rx 0 "IPv4 mcroute TX!=RX oif=0 ping"
|
||||
@@ -743,7 +724,7 @@ ipv4_mcroute_fdb_sep_rx()
|
||||
adf_install_sg_sep_rx lo
|
||||
|
||||
adf_ip_addr_add lo 192.0.2.120/28
|
||||
vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
vx10_create local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute
|
||||
bridge fdb del dev vx10 00:00:00:00:00:00
|
||||
bridge fdb add \
|
||||
dev vx10 00:00:00:00:00:00 self static dst "$GROUP4" via lo
|
||||
@@ -755,7 +736,7 @@ ipv6_mcroute_fdb_sep_rx()
|
||||
adf_install_sg_sep_rx "X$IPMR"
|
||||
|
||||
adf_ip_addr_add "X$IPMR" 2001:db8:5::1/64
|
||||
vx20_create_wait local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
vx20_create local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute
|
||||
bridge -6 fdb del dev vx20 00:00:00:00:00:00
|
||||
bridge -6 fdb add dev vx20 00:00:00:00:00:00 \
|
||||
self static dst "$GROUP6" via "X$IPMR"
|
||||
|
||||
Reference in New Issue
Block a user