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>
This commit is contained in:
Tobias Waldekranz 2022-02-03 11:16:57 +01:00 коммит произвёл David S. Miller
Родитель d352b20f41
Коммит 0811975917
4 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -28,8 +28,9 @@ h2_destroy()
switch_create()
{
# 10 Seconds ageing time.
ip link add dev br0 type bridge vlan_filtering 1 ageing_time 1000 \
ip link add dev br0 type bridge \
vlan_filtering 1 \
ageing_time $LOW_AGEING_TIME \
mcast_snooping 0
ip link set dev $swp1 master br0

Просмотреть файл

@ -27,8 +27,9 @@ h2_destroy()
switch_create()
{
# 10 Seconds ageing time.
ip link add dev br0 type bridge ageing_time 1000 mcast_snooping 0
ip link add dev br0 type bridge \
ageing_time $LOW_AGEING_TIME \
mcast_snooping 0
ip link set dev $swp1 master br0
ip link set dev $swp2 master br0

Просмотреть файл

@ -41,6 +41,8 @@ NETIF_CREATE=yes
# Timeout (in seconds) before ping exits regardless of how many packets have
# been sent or received
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
# filter by software/hardware
TC_FLAG=skip_hw

Просмотреть файл

@ -24,6 +24,7 @@ PING_COUNT=${PING_COUNT:=10}
PING_TIMEOUT=${PING_TIMEOUT:=5}
WAIT_TIMEOUT=${WAIT_TIMEOUT:=20}
INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600}
LOW_AGEING_TIME=${LOW_AGEING_TIME:=1000}
REQUIRE_JQ=${REQUIRE_JQ:=yes}
REQUIRE_MZ=${REQUIRE_MZ:=yes}