@@ -5827,8 +5827,8 @@ for dl_src in 00 01; do
58275827done
58285828sleep 1 # wait for the datapath flow installed
58295829AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5830- recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5831- recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5830+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5831+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
58325832])
58335833
58345834OVS_VSWITCHD_STOP
@@ -5866,8 +5866,8 @@ for dl_src in 00 01; do
58665866done
58675867sleep 1 # wait for the datapath flow installed
58685868AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5869- recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5870- recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5869+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5870+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
58715871])
58725872
58735873OVS_VSWITCHD_STOP
@@ -5922,8 +5922,8 @@ dummy@ovs-dummy: hit:13 missed:2
59225922])
59235923
59245924AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5925- recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5926- recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5925+ recirc_id=0,ip,in_port=100,vlan_tci=0x0000, nw_frag=no, actions:101,3,2
5926+ recirc_id=0,ip,in_port=101,vlan_tci=0x0000, nw_frag=no, actions:100,2,3
59275927])
59285928
59295929AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
@@ -5987,7 +5987,7 @@ dummy@ovs-dummy: hit:0 missed:1
59875987])
59885988
59895989AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5990- recirc_id=0,ip,in_port=100,nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2
5990+ recirc_id=0,ip,in_port=100,vlan_tci=0x0000, nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2
59915991])
59925992
59935993AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
@@ -6030,7 +6030,7 @@ sleep 1
60306030AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
60316031sleep 1
60326032AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6033- recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
6033+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_frag=no, actions: <del>
60346034])
60356035OVS_VSWITCHD_STOP
60366036AT_CLEANUP
@@ -6047,8 +6047,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
60476047AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
60486048sleep 1
60496049AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6050- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6051- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
6050+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6051+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
60526052])
60536053OVS_VSWITCHD_STOP
60546054AT_CLEANUP
@@ -6066,8 +6066,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
60666066AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
60676067sleep 1
60686068AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6069- recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6070- recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6069+ recirc_id=0,icmp,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.4,nw_frag=no, actions: <del>
6070+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
60716071])
60726072OVS_VSWITCHD_STOP
60736073AT_CLEANUP
@@ -6085,8 +6085,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
60856085AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1,dst=2001:db8:3c4d:1:2:3:4:1,label=0,proto=99,tclass=0x70,hlimit=64,frag=no)'])
60866086sleep 1
60876087AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6088- recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
6089- recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del>
6088+ recirc_id=0,ipv6,in_port=1,vlan_tci=0x0000, ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
6089+ recirc_id=0,ipv6,in_port=1,vlan_tci=0x0000, ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del>
60906090])
60916091OVS_VSWITCHD_STOP
60926092AT_CLEANUP
@@ -6104,7 +6104,7 @@ sleep 1
61046104AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
61056105sleep 1
61066106AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6107- recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
6107+ recirc_id=0,icmp,in_port=1,vlan_tci=0x0000, nw_frag=no,icmp_type=0x8/0xff, actions: <del>
61086108])
61096109OVS_VSWITCHD_STOP
61106110AT_CLEANUP
@@ -6137,8 +6137,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
61376137AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
61386138sleep 1
61396139AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6140- recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del>
6141- recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
6140+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del>
6141+ recirc_id=0,mpls,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
61426142])
61436143OVS_VSWITCHD_STOP
61446144AT_CLEANUP
@@ -6271,8 +6271,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
62716271AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
62726272sleep 1
62736273AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6274- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6275- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
6274+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6275+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
62766276])
62776277OVS_VSWITCHD_STOP
62786278AT_CLEANUP
@@ -6291,8 +6291,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
629162911,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
62926292sleep 1
62936293AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6294- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6295- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6294+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6295+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
62966296])
62976297OVS_VSWITCHD_STOP
62986298AT_CLEANUP
@@ -6310,8 +6310,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
63106310AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
63116311sleep 1
63126312AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6313- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6314- recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6313+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6314+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
63156315])
63166316OVS_VSWITCHD_STOP
63176317AT_CLEANUP
@@ -6334,7 +6334,7 @@ sleep 1
63346334AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
63356335sleep 1
63366336AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6337- recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
6337+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_frag=no, actions: <del>
63386338])
63396339OVS_VSWITCHD_STOP
63406340AT_CLEANUP
@@ -6376,8 +6376,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
63766376AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
63776377sleep 1
63786378AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6379- recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6380- recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6379+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.2,nw_frag=no, actions: <del>
6380+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.4,nw_frag=no, actions: <del>
63816381])
63826382OVS_VSWITCHD_STOP
63836383AT_CLEANUP
@@ -6394,8 +6394,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
63946394AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
63956395sleep 1
63966396AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6397- recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6398- recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6397+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.2,nw_frag=no, actions: <del>
6398+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.4,nw_frag=no, actions: <del>
63996399])
64006400OVS_VSWITCHD_STOP
64016401AT_CLEANUP
@@ -6453,9 +6453,9 @@ sleep 1
64536453AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
64546454sleep 1
64556455AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6456- recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
6457- recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6458- recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6456+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_ecn=1,nw_frag=no, actions: <del>
6457+ recirc_id=0,ip,in_port=3,vlan_tci=0x0000, nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6458+ recirc_id=0,ip,in_port=3,vlan_tci=0x0000, nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
64596459])
64606460OVS_VSWITCHD_STOP
64616461AT_CLEANUP
@@ -6473,8 +6473,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
64736473AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
64746474sleep 1
64756475AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6476- recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6477- recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6476+ recirc_id=0,icmp,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6477+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
64786478])
64796479OVS_VSWITCHD_STOP
64806480AT_CLEANUP
@@ -6494,8 +6494,8 @@ dnl The first packet is essentially a no-op, as the new destination MAC is the
64946494dnl same as the original. The second entry actually updates the destination
64956495dnl MAC.
64966496AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6497- recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6498- recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2
6497+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6498+ recirc_id=0,ip,in_port=1,vlan_tci=0x0000, dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2
64996499])
65006500OVS_VSWITCHD_STOP
65016501AT_CLEANUP
@@ -7059,3 +7059,77 @@ dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_i
70597059])
70607060OVS_VSWITCHD_STOP
70617061AT_CLEANUP
7062+
7063+ # Tests in place modification of installed datapath flows with vlans.
7064+ AT_SETUP([ofproto-dpif - in place modification (vlan)])
7065+ OVS_VSWITCHD_START(
7066+ [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7067+ AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7068+
7069+ AT_CHECK([ovs-ofctl del-flows br0])
7070+ AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:local])
7071+
7072+ ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7073+
7074+ ovs-appctl time/stop
7075+
7076+ # Check that a correct datapath flow is created.
7077+ for i in 1 2 3; do
7078+ ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
7079+ done
7080+
7081+ AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7082+ recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:100
7083+ ])
7084+
7085+ # Delete the flow. Then check that the datapath flow is modified to
7086+ # drop the packets. A modified flow inherits the stats, a new
7087+ # datapath flow would start from sero.
7088+ AT_CHECK([ovs-ofctl del-flows br0])
7089+
7090+ ovs-appctl time/warp 500
7091+ ovs-appctl time/warp 500
7092+
7093+ for i in 1 2 3; do
7094+ ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
7095+ done
7096+
7097+ AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7098+ recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:drop
7099+ ])
7100+
7101+ # Add a flow that matches the non-presence of a vlan tag, and check
7102+ # that the datapath flow is modified accordingly.
7103+ AT_CHECK([ovs-ofctl add-flow br0 in_port=1,vlan_tci=0x0000/0x1fff,actions=output:local])
7104+
7105+ ovs-appctl time/warp 500
7106+ ovs-appctl time/warp 500
7107+
7108+ for i in 1 2 3; do
7109+ ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
7110+ done
7111+
7112+ AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7113+ recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7114+ ])
7115+
7116+ # Check that VLAN packets will not hit the same datapath megaflow.
7117+ for i in 1 2 3; do
7118+ ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x1234))'
7119+ done
7120+
7121+ AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7122+ recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7123+ recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=99/0x0,pcp=7/0x0),encap(eth_type(0x1234)), packets:2, bytes:120, used:0.0s, actions:drop
7124+ ])
7125+
7126+ # Check that the new flow matches the CFI bit, while both vid and pcp
7127+ # are wildcarded.
7128+ AT_CHECK([cat ovs-vswitchd.log | grep '\(modify\)\|\(flow_add\)' | STRIP_UFID ], [0], [dnl
7129+ dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0x0000,dl_type=0x1234, actions:100
7130+ dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x1234)
7131+ dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x1234), actions:100
7132+ dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0xf063/0x1000,dl_type=0x1234, actions:drop
7133+ ])
7134+ OVS_VSWITCHD_STOP
7135+ AT_CLEANUP
0 commit comments