netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: netdev@vger.kernel.org
Cc: roopa@nvidia.com, kuba@kernel.org,
	bridge@lists.linux-foundation.org,
	Nikolay Aleksandrov <nikolay@nvidia.com>
Subject: [PATCH net-next 10/16] selftests: net: bridge: add test for igmpv3 exc -> is_include report
Date: Tue, 27 Oct 2020 20:59:28 +0200	[thread overview]
Message-ID: <20201027185934.227040-11-razor@blackwall.org> (raw)
In-Reply-To: <20201027185934.227040-1-razor@blackwall.org>

From: Nikolay Aleksandrov <nikolay@nvidia.com>

The test checks for the following case:
    state          report        result                  action
   EXCLUDE (X,Y)  IS_IN (A)     EXCLUDE (X+A,Y-A)       (A)=GMI

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
---
 .../selftests/net/forwarding/bridge_igmp.sh   | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/bridge_igmp.sh b/tools/testing/selftests/net/forwarding/bridge_igmp.sh
index d786e75abe2c..b2b0f7d7e860 100755
--- a/tools/testing/selftests/net/forwarding/bridge_igmp.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_igmp.sh
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 ALL_TESTS="v2reportleave_test v3include_test v3inc_allow_test v3inc_is_include_test \
-	   v3inc_is_exclude_test v3inc_to_exclude_test v3exc_allow_test"
+	   v3inc_is_exclude_test v3inc_to_exclude_test v3exc_allow_test v3exc_is_include_test"
 NUM_NETIFS=4
 CHECK_TC="yes"
 TEST_GROUP="239.10.10.10"
@@ -15,6 +15,8 @@ ALL_MAC="01:00:5e:00:00:01"
 MZPKT_IS_INC="22:00:9d:de:00:00:00:01:01:00:00:03:ef:0a:0a:0a:c0:00:02:01:c0:00:02:02:c0:00:02:03"
 # IGMPv3 is_in report: grp 239.10.10.10 is_include 192.0.2.10,192.0.2.11,192.0.2.12
 MZPKT_IS_INC2="22:00:9d:c3:00:00:00:01:01:00:00:03:ef:0a:0a:0a:c0:00:02:0a:c0:00:02:0b:c0:00:02:0c"
+# IGMPv3 is_in report: grp 239.10.10.10 is_include 192.0.2.20,192.0.2.30
+MZPKT_IS_INC3="22:00:5f:b4:00:00:00:01:01:00:00:02:ef:0a:0a:0a:c0:00:02:14:c0:00:02:1e"
 # IGMPv3 allow report: grp 239.10.10.10 allow 192.0.2.10,192.0.2.11,192.0.2.12
 MZPKT_ALLOW="22:00:99:c3:00:00:00:01:05:00:00:03:ef:0a:0a:0a:c0:00:02:0a:c0:00:02:0b:c0:00:02:0c"
 # IGMPv3 allow report: grp 239.10.10.10 allow 192.0.2.20,192.0.2.30
@@ -436,6 +438,29 @@ v3exc_allow_test()
 	v3cleanup $swp1 $TEST_GROUP
 }
 
+v3exc_is_include_test()
+{
+	RET=0
+	local X=("192.0.2.1" "192.0.2.2" "192.0.2.20" "192.0.2.30")
+	local Y=("192.0.2.21")
+
+	v3exclude_prepare $h1 $ALL_MAC $ALL_GROUP
+
+	$MZ $h1 -c 1 -b $ALL_MAC -B $ALL_GROUP -t ip "proto=2,p=$MZPKT_IS_INC3" -q
+	sleep 1
+	check_sg_entries "is_include" "${X[@]}" "${Y[@]}"
+
+	check_sg_state 0 "${X[@]}"
+	check_sg_state 1 "${Y[@]}"
+
+	check_sg_fwding 1 "${X[@]}" 192.0.2.100
+	check_sg_fwding 0 "${Y[@]}"
+
+	log_test "IGMPv3 report $TEST_GROUP exclude -> is_include"
+
+	v3cleanup $swp1 $TEST_GROUP
+}
+
 trap cleanup EXIT
 
 setup_prepare
-- 
2.25.4


  parent reply	other threads:[~2020-10-27 19:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 18:59 [PATCH net-next 00/16] selftests: net: bridge: add tests for IGMPv3 Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 01/16] selftests: net: bridge: rename current igmp tests to igmpv2 Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 02/16] selftests: net: bridge: igmp: add support for packet source address Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 03/16] selftests: net: bridge: igmp: check for specific udp ip protocol Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 04/16] selftests: net: bridge: igmp: add IGMPv3 entries' state helpers Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 05/16] selftests: net: bridge: add tests for igmpv3 is_include and inc -> allow reports Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 06/16] selftests: net: bridge: add test for igmpv3 inc -> is_include report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 07/16] selftests: net: bridge: add test for igmpv3 inc -> is_exclude report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 08/16] selftests: net: bridge: add test for igmpv3 inc -> to_exclude report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 09/16] selftests: net: bridge: add test for igmpv3 exc -> allow report Nikolay Aleksandrov
2020-10-27 18:59 ` Nikolay Aleksandrov [this message]
2020-10-27 18:59 ` [PATCH net-next 11/16] selftests: net: bridge: add test for igmpv3 exc -> is_exclude report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 12/16] selftests: net: bridge: add test for igmpv3 exc -> to_exclude report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 13/16] selftests: net: bridge: add test for igmpv3 inc -> block report Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 14/16] selftests: net: bridge: add test for igmpv3 exc " Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 15/16] selftests: net: bridge: add test for igmpv3 exclude timeout Nikolay Aleksandrov
2020-10-27 18:59 ` [PATCH net-next 16/16] selftests: net: bridge: add test for igmpv3 *,g auto-add Nikolay Aleksandrov
2020-10-30 17:53 ` [PATCH net-next 00/16] selftests: net: bridge: add tests for IGMPv3 Jakub Kicinski

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=20201027185934.227040-11-razor@blackwall.org \
    --to=razor@blackwall.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.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).