[ovs-dev] [PATCH v3 5/7] system-traffic: 802.1ad: Add vlan_limit test case.

Eric Garver e at erig.me
Thu Sep 15 00:26:43 UTC 2016


Verify that vlan_limit works as expected and preserves legacy dl_type
matching behavior.

Signed-off-by: Eric Garver <e at erig.me>
---
 tests/system-traffic.at | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index bb0cb02804f9..5c6084a792f7 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -3080,3 +3080,38 @@ ovs-ofctl -O OpenFlow15 dump-group-stats br0
 
 OVS_TRAFFIC_VSWITCHD_STOP
 AT_CLEANUP
+
+
+AT_SETUP([802.1ad - vlan_limit])
+OVS_TRAFFIC_VSWITCHD_START()
+OVS_CHECK_8021AD()
+
+dnl Drop the vlan limit to verify backward compatibility with old ethertype
+dnl matching behavior.
+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:vlan-limit=1])
+
+ADD_NAMESPACES(at_ns0, at_ns1)
+
+ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
+ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
+
+ADD_SVLAN(p0, at_ns0, 4094, "10.255.2.1/24")
+ADD_SVLAN(p1, at_ns1, 4094, "10.255.2.2/24")
+
+ADD_CVLAN(p0.4094, at_ns0, 100, "10.2.2.1/24")
+ADD_CVLAN(p1.4094, at_ns1, 100, "10.2.2.2/24")
+
+AT_DATA([flows.txt], [dnl
+priority=1 action=normal
+priority=200 dl_type=0x8100 action=drop
+])
+
+AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
+
+OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.255.2.2])
+
+dnl CVLAN traffic should match the flow and drop
+NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 10.2.2.2], [1], [ignore])
+
+OVS_TRAFFIC_VSWITCHD_STOP
+AT_CLEANUP
-- 
2.5.5




More information about the dev mailing list