All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Machata <petrm@mellanox.com>
To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: davem@davemloft.net, shuah@kernel.org, idosch@mellanox.com
Subject: [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test
Date: Thu, 31 May 2018 19:52:20 +0200	[thread overview]
Message-ID: <0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com> (raw)
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Add a reusable full test that toggles STP state of a given bridge port
and checks that the mirroring reacts appropriately. The test will be
used by bridge tests in follow-up patches.

Signed-off-by: Petr Machata <petrm@mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_lib.sh     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
index 92ef6dd..619b469 100644
--- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
@@ -96,3 +96,35 @@ full_test_span_gre_dir_vlan()
 {
 	full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2
 }
+
+full_test_span_gre_stp_ips()
+{
+	local tundev=$1; shift
+	local nbpdev=$1; shift
+	local what=$1; shift
+	local ip1=$1; shift
+	local ip2=$1; shift
+	local h3mac=$(mac_get $h3)
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state disabled
+	sleep 1
+	fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state forwarding
+	sleep 1
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: STP state ($tcflags)"
+}
+
+full_test_span_gre_stp()
+{
+	full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2
+}
-- 
2.4.11

WARNING: multiple messages have this Message-ID (diff)
From: petrm at mellanox.com (Petr Machata)
Subject: [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test
Date: Thu, 31 May 2018 19:52:20 +0200	[thread overview]
Message-ID: <0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com> (raw)
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Add a reusable full test that toggles STP state of a given bridge port
and checks that the mirroring reacts appropriately. The test will be
used by bridge tests in follow-up patches.

Signed-off-by: Petr Machata <petrm at mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_lib.sh     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
index 92ef6dd..619b469 100644
--- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
@@ -96,3 +96,35 @@ full_test_span_gre_dir_vlan()
 {
 	full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2
 }
+
+full_test_span_gre_stp_ips()
+{
+	local tundev=$1; shift
+	local nbpdev=$1; shift
+	local what=$1; shift
+	local ip1=$1; shift
+	local ip2=$1; shift
+	local h3mac=$(mac_get $h3)
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state disabled
+	sleep 1
+	fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state forwarding
+	sleep 1
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: STP state ($tcflags)"
+}
+
+full_test_span_gre_stp()
+{
+	full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2
+}
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: petrm@mellanox.com (Petr Machata)
Subject: [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test
Date: Thu, 31 May 2018 19:52:20 +0200	[thread overview]
Message-ID: <0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com> (raw)
Message-ID: <20180531175220.pmwP4P1KDgDWsuwvSAwoOU4JblMxvKz5sQjDEVRK1Ns@z> (raw)
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

Add a reusable full test that toggles STP state of a given bridge port
and checks that the mirroring reacts appropriately. The test will be
used by bridge tests in follow-up patches.

Signed-off-by: Petr Machata <petrm at mellanox.com>
---
 .../selftests/net/forwarding/mirror_gre_lib.sh     | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
index 92ef6dd..619b469 100644
--- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
@@ -96,3 +96,35 @@ full_test_span_gre_dir_vlan()
 {
 	full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2
 }
+
+full_test_span_gre_stp_ips()
+{
+	local tundev=$1; shift
+	local nbpdev=$1; shift
+	local what=$1; shift
+	local ip1=$1; shift
+	local ip2=$1; shift
+	local h3mac=$(mac_get $h3)
+
+	RET=0
+
+	mirror_install $swp1 ingress $tundev "matchall $tcflags"
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state disabled
+	sleep 1
+	fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	bridge link set dev $nbpdev state forwarding
+	sleep 1
+	quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2
+
+	mirror_uninstall $swp1 ingress
+
+	log_test "$what: STP state ($tcflags)"
+}
+
+full_test_span_gre_stp()
+{
+	full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2
+}
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-05-31 17:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 17:51 [PATCH net-next 0/9] Test mirror-to-gretap with bridge in UL Petr Machata
2018-05-31 17:51 ` Petr Machata
2018-05-31 17:51 ` petrm
2018-05-31 17:52 ` [PATCH net-next 1/9] selftests: forwarding: lib: Move here vlan_capture_{,un}install() Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 2/9] selftests: forwarding: mirror_lib: Move here do_test_span_vlan_dir_ips() Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 3/9] selftests: forwarding: mirror_lib: skip_hw the VLAN capture Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` Petr Machata [this message]
2018-05-31 17:52   ` [PATCH net-next 4/9] selftests: forwarding: mirror_gre_lib: Add STP test Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 5/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Fix tunnel name Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 6/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Test final config Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 7/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Rename two tests Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 8/9] selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-05-31 17:52 ` [PATCH net-next 9/9] selftests: forwarding: mirror_gre_bridge_1d_vlan: Add STP test Petr Machata
2018-05-31 17:52   ` Petr Machata
2018-05-31 17:52   ` petrm
2018-06-01 18:11 ` [PATCH net-next 0/9] Test mirror-to-gretap with bridge in UL David Miller
2018-06-01 18:11   ` David Miller
2018-06-01 18:11   ` davem

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=0651437857445ed3bf6fc4a99faf56f02733f46b.1527788672.git.petrm@mellanox.com \
    --to=petrm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.