Netdev List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@mellanox.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"roopa@cumulusnetworks.com" <roopa@cumulusnetworks.com>,
	mlxsw <mlxsw@mellanox.com>, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 2/4] selftests: forwarding: Add a test case for ARP decapsulation
Date: Mon, 21 Jan 2019 13:22:53 +0000	[thread overview]
Message-ID: <20190121132231.25507-3-idosch@mellanox.com> (raw)
In-Reply-To: <20190121132231.25507-1-idosch@mellanox.com>

Verify that ARP packets are correctly decapsulated by the ingress VTEP
by removing the neighbours configured on both VLAN interfaces and
running a ping test.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
---
 .../net/forwarding/vxlan_asymmetric.sh         | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
index 21828970ab89..909426c25585 100755
--- a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
+++ b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
@@ -93,6 +93,7 @@
 
 ALL_TESTS="
 	ping_ipv4
+	arp_decap
 "
 NUM_NETIFS=6
 source lib.sh
@@ -465,6 +466,23 @@ ping_ipv4()
 	ping_test $h2 10.1.1.102 ": local->remote vid 20->vid 10"
 }
 
+arp_decap()
+{
+	# Repeat the ping tests, but without populating the neighbours. This
+	# makes sure we correctly decapsulate ARP packets
+	log_info "deleting neighbours from vlan interfaces"
+
+	ip neigh del 10.1.1.102 dev vlan10
+	ip neigh del 10.1.2.102 dev vlan20
+
+	ping_ipv4
+
+	ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \
+		dev vlan10 extern_learn
+	ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \
+		dev vlan20 extern_learn
+}
+
 trap cleanup EXIT
 
 setup_prepare
-- 
2.20.1


  parent reply	other threads:[~2019-01-21 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 13:22 [PATCH net-next 0/4] selftests: forwarding: Add tests for VXLAN routing Ido Schimmel
2019-01-21 13:22 ` [PATCH net-next 1/4] selftests: forwarding: Add a test for VXLAN asymmetric routing Ido Schimmel
2019-01-21 13:22 ` Ido Schimmel [this message]
2019-01-21 13:22 ` [PATCH net-next 4/4] selftests: forwarding: Add a test for VXLAN symmetric routing Ido Schimmel
2019-01-21 13:22 ` [PATCH net-next 3/4] selftests: forwarding: Add a test case for ARP suppression Ido Schimmel
2019-01-23  4:41 ` [PATCH net-next 0/4] selftests: forwarding: Add tests for VXLAN routing David Miller

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=20190121132231.25507-3-idosch@mellanox.com \
    --to=idosch@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.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