Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: bridge: Parameterize ageing timeout

Allow the ageing timeout that is set on bridges to be customized from
forwarding.config. This allows the tests to be run on hardware which
does not support a 10s timeout (e.g. mv88e6xxx).

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Tobias Waldekranz and committed by
David S. Miller
08119759 d352b20f

+9 -4
+3 -2
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
··· 28 28 29 29 switch_create() 30 30 { 31 - # 10 Seconds ageing time. 32 - ip link add dev br0 type bridge vlan_filtering 1 ageing_time 1000 \ 31 + ip link add dev br0 type bridge \ 32 + vlan_filtering 1 \ 33 + ageing_time $LOW_AGEING_TIME \ 33 34 mcast_snooping 0 34 35 35 36 ip link set dev $swp1 master br0
+3 -2
tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh
··· 27 27 28 28 switch_create() 29 29 { 30 - # 10 Seconds ageing time. 31 - ip link add dev br0 type bridge ageing_time 1000 mcast_snooping 0 30 + ip link add dev br0 type bridge \ 31 + ageing_time $LOW_AGEING_TIME \ 32 + mcast_snooping 0 32 33 33 34 ip link set dev $swp1 master br0 34 35 ip link set dev $swp2 master br0
+2
tools/testing/selftests/net/forwarding/forwarding.config.sample
··· 41 41 # Timeout (in seconds) before ping exits regardless of how many packets have 42 42 # been sent or received 43 43 PING_TIMEOUT=5 44 + # Minimum ageing_time (in centiseconds) supported by hardware 45 + LOW_AGEING_TIME=1000 44 46 # Flag for tc match, supposed to be skip_sw/skip_hw which means do not process 45 47 # filter by software/hardware 46 48 TC_FLAG=skip_hw
+1
tools/testing/selftests/net/forwarding/lib.sh
··· 24 24 PING_TIMEOUT=${PING_TIMEOUT:=5} 25 25 WAIT_TIMEOUT=${WAIT_TIMEOUT:=20} 26 26 INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600} 27 + LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000} 27 28 REQUIRE_JQ=${REQUIRE_JQ:=yes} 28 29 REQUIRE_MZ=${REQUIRE_MZ:=yes} 29 30