[ovs-dev,3/5] system-traffic: 802.1ad: Add vlan_limit test case.

Submitted by Eric Garver on March 17, 2017, 8:13 p.m.

Details

Message ID 20170317201315.2708-4-e@erig.me
State Accepted
Delegated to: Joe Stringer
Headers show

Commit Message

Eric Garver March 17, 2017, 8:13 p.m.
Verify that vlan_limit works as expected and preserves legacy dl_type
matching behavior.

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

Patch hide | download patch | download mbox

diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index 72e421150bea..3c9e3f410e0c 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -3473,3 +3473,33 @@  ovs-ofctl -O OpenFlow15 dump-group-stats br0
 
 OVS_TRAFFIC_VSWITCHD_STOP
 AT_CLEANUP
+
+AT_BANNER([802.1ad])
+
+AT_SETUP([802.1ad - vlan_limit])
+OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
+OVS_CHECK_8021AD()
+
+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_CHECK([ovs-ofctl add-flow br0 "priority=1 action=normal"])
+
+OVS_WAIT_UNTIL([ip netns exec at_ns0 ping -c 1 10.2.2.2])
+
+dnl CVLAN traffic should match the flow and drop
+AT_CHECK([ovs-appctl revalidator/purge])
+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:vlan-limit=1])
+AT_CHECK([ovs-ofctl add-flow br0 "priority=100 dl_type=0x8100 action=drop"])
+NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 10.2.2.2], [1], [ignore])
+
+OVS_TRAFFIC_VSWITCHD_STOP
+AT_CLEANUP