From: Tobias Waldekranz <tobias@waldekranz.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: netdev@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
Ido Schimmel <idosch@nvidia.com>, Amit Cohen <amcohen@nvidia.com>,
David Ahern <dsahern@kernel.org>,
Hangbin Liu <liuhangbin@gmail.com>,
Stephen Suryaputra <ssuryaextr@gmail.com>,
Petr Machata <petrm@nvidia.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Guillaume Nault <gnault@redhat.com>,
Po-Hsu Lin <po-hsu.lin@canonical.com>,
Danielle Ratson <danieller@nvidia.com>,
Baowen Zheng <baowen.zheng@corigine.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 5/5] selftests: net: bridge: Parameterize ageing timeout
Date: Mon, 31 Jan 2022 16:46:55 +0100 [thread overview]
Message-ID: <20220131154655.1614770-6-tobias@waldekranz.com> (raw)
In-Reply-To: <20220131154655.1614770-1-tobias@waldekranz.com>
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>
---
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh | 5 +++--
.../testing/selftests/net/forwarding/bridge_vlan_unaware.sh | 5 +++--
.../selftests/net/forwarding/forwarding.config.sample | 2 ++
tools/testing/selftests/net/forwarding/lib.sh | 1 +
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
index b90dff8d3a94..64bd00fe9a4f 100755
--- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh
@@ -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
diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh
index c15c6c85c984..1c8a26046589 100755
--- a/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_vlan_unaware.sh
@@ -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
diff --git a/tools/testing/selftests/net/forwarding/forwarding.config.sample b/tools/testing/selftests/net/forwarding/forwarding.config.sample
index b0980a2efa31..4a546509de90 100644
--- a/tools/testing/selftests/net/forwarding/forwarding.config.sample
+++ b/tools/testing/selftests/net/forwarding/forwarding.config.sample
@@ -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
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 7da783d6f453..e7e434a4758b 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -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}
--
2.25.1
next prev parent reply other threads:[~2022-01-31 15:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220131154655.1614770-1-tobias@waldekranz.com>
2022-01-31 15:46 ` [PATCH net-next 1/5] net: dsa: mv88e6xxx: Improve isolation of standalone ports Tobias Waldekranz
2022-02-01 17:06 ` Vladimir Oltean
2022-02-01 17:20 ` Vladimir Oltean
2022-02-01 19:56 ` Tobias Waldekranz
2022-02-01 20:11 ` Vladimir Oltean
2022-02-01 21:22 ` Tobias Waldekranz
2022-02-03 13:56 ` Vladimir Oltean
2022-02-03 16:01 ` Marek Behún
2022-02-03 16:40 ` Vladimir Oltean
2022-01-31 15:46 ` [PATCH net-next 2/5] net: dsa: mv88e6xxx: Support policy entries in the VTU Tobias Waldekranz
2022-01-31 15:46 ` [PATCH net-next 3/5] net: dsa: mv88e6xxx: Enable port policy support on 6097 Tobias Waldekranz
2022-01-31 15:46 ` [PATCH net-next 4/5] net: dsa: mv88e6xxx: Improve multichip isolation of standalone ports Tobias Waldekranz
2022-02-01 17:55 ` Vladimir Oltean
2022-02-01 21:08 ` Tobias Waldekranz
2022-01-31 15:46 ` Tobias Waldekranz [this message]
2022-01-31 17:01 ` [PATCH net-next 5/5] selftests: net: bridge: Parameterize ageing timeout Petr Machata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220131154655.1614770-6-tobias@waldekranz.com \
--to=tobias@waldekranz.com \
--cc=amcohen@nvidia.com \
--cc=baowen.zheng@corigine.com \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gnault@redhat.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=po-hsu.lin@canonical.com \
--cc=shuah@kernel.org \
--cc=ssuryaextr@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).