diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-02-24 16:10:42 -0800 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-02-24 16:10:42 -0800 |
commit | 8bf009bf8ab4d4b638f3e41f33572c4238b40748 (patch) | |
tree | 7b3eac9da4164b9e467560258b53725a25494a80 /tests | |
parent | 8f79bb4d3999d993424e9578342b4130d10a556c (diff) | |
download | openvswitch-8bf009bf8ab4d4b638f3e41f33572c4238b40748.tar.gz |
xlate: Always recirculate after an MPLS POP to a non-MPLS ethertype.
So far we have tried to optimize MPLS POP action not to recirculate
unless later matching actually needs the inner headers. This made the
code complex and error-prone. Also the cases where this optimization
would have been useful seem rare, as one would typically want to do
something else with the inner packet than blindly send it to some
output port.
With this change multiple consecutive MPLS POPs do not need
recirculation in between, so even if the blind output case is now
little bit less optimal, the multiple POP case is correspondingly
faster with this change.
Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mpls-xlate.at | 14 | ||||
-rw-r--r-- | tests/ofproto-dpif.at | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/mpls-xlate.at b/tests/mpls-xlate.at index 1c1886f12..7df52f513 100644 --- a/tests/mpls-xlate.at +++ b/tests/mpls-xlate.at @@ -24,7 +24,12 @@ AT_CHECK([tail -1 stdout], [0], dnl Test MPLS pop AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=20,tc=0,ttl=64,bos=1)'], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], - [Datapath actions: pop_mpls(eth_type=0x800),100 + [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x1) +]) + +AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(1),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) +AT_CHECK([tail -1 stdout], [0], + [Datapath actions: 100 ]) dnl Setup multiple MPLS tags. @@ -47,12 +52,7 @@ AT_CHECK([tail -1 stdout], [0], dnl Double MPLS pop AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=60,tc=0,ttl=64,bos=0,label=50,tc=0,ttl=64,bos=1)'], [0], [stdout]) AT_CHECK([tail -1 stdout], [0], - [Datapath actions: pop_mpls(eth_type=0x8847),recirc(0x1) -]) - -AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(1),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=50,tc=0,ttl=64,bos=0)'], [0], [stdout]) -AT_CHECK([tail -1 stdout], [0], - [Datapath actions: pop_mpls(eth_type=0x800),recirc(0x2) + [Datapath actions: pop_mpls(eth_type=0x8847),pop_mpls(eth_type=0x800),recirc(0x2) ]) AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'recirc_id(2),in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=47,tos=0,ttl=64,frag=no)'], [0], [stdout]) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index fcb971666..bf6661d91 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -6398,7 +6398,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00: sleep 1 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout_keep_actions], [0], [dnl 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:push_mpls(label=11,tc=3,ttl=64,bos=0,eth_type=0x8847),2 -recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions:pop_mpls(eth_type=0x800),2 +recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions:pop_mpls(eth_type=0x800),recirc(0x1) +recirc_id=0x1,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, actions:2 ]) OVS_VSWITCHD_STOP AT_CLEANUP |