Commit 08119759 authored by Tobias Waldekranz's avatar Tobias Waldekranz Committed by David S. Miller

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: default avatarTobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d352b20f
...@@ -28,8 +28,9 @@ h2_destroy() ...@@ -28,8 +28,9 @@ h2_destroy()
switch_create() switch_create()
{ {
# 10 Seconds ageing time. ip link add dev br0 type bridge \
ip link add dev br0 type bridge vlan_filtering 1 ageing_time 1000 \ vlan_filtering 1 \
ageing_time $LOW_AGEING_TIME \
mcast_snooping 0 mcast_snooping 0
ip link set dev $swp1 master br0 ip link set dev $swp1 master br0
......
...@@ -27,8 +27,9 @@ h2_destroy() ...@@ -27,8 +27,9 @@ h2_destroy()
switch_create() switch_create()
{ {
# 10 Seconds ageing time. ip link add dev br0 type bridge \
ip link add dev br0 type bridge ageing_time 1000 mcast_snooping 0 ageing_time $LOW_AGEING_TIME \
mcast_snooping 0
ip link set dev $swp1 master br0 ip link set dev $swp1 master br0
ip link set dev $swp2 master br0 ip link set dev $swp2 master br0
......
...@@ -41,6 +41,8 @@ NETIF_CREATE=yes ...@@ -41,6 +41,8 @@ NETIF_CREATE=yes
# Timeout (in seconds) before ping exits regardless of how many packets have # Timeout (in seconds) before ping exits regardless of how many packets have
# been sent or received # been sent or received
PING_TIMEOUT=5 PING_TIMEOUT=5
# Minimum ageing_time (in centiseconds) supported by hardware
LOW_AGEING_TIME=1000
# Flag for tc match, supposed to be skip_sw/skip_hw which means do not process # Flag for tc match, supposed to be skip_sw/skip_hw which means do not process
# filter by software/hardware # filter by software/hardware
TC_FLAG=skip_hw TC_FLAG=skip_hw
......
...@@ -24,6 +24,7 @@ PING_COUNT=${PING_COUNT:=10} ...@@ -24,6 +24,7 @@ PING_COUNT=${PING_COUNT:=10}
PING_TIMEOUT=${PING_TIMEOUT:=5} PING_TIMEOUT=${PING_TIMEOUT:=5}
WAIT_TIMEOUT=${WAIT_TIMEOUT:=20} WAIT_TIMEOUT=${WAIT_TIMEOUT:=20}
INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600} INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600}
LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000}
REQUIRE_JQ=${REQUIRE_JQ:=yes} REQUIRE_JQ=${REQUIRE_JQ:=yes}
REQUIRE_MZ=${REQUIRE_MZ:=yes} REQUIRE_MZ=${REQUIRE_MZ:=yes}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment