X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fofproto-dpif.at;h=bfb4bb3a02e99832bb923caf02f49828aa3fffb4;hb=98b07853dfd6046938c41937d60ce693437c1f25;hp=ea3602016561cceffc51c54953adb7b99e77d292;hpb=0585f7a88c7773737095e0eb2cf0f1222c0fed2e;p=sliver-openvswitch.git diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index ea3602016..bfb4bb3a0 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2875,3 +2875,64 @@ unixctl_received 0.4/sec 0.033/sec 0.0047/sec total: 17 OVS_VSWITCHD_STOP AT_CLEANUP + +AT_BANNER([ofproto-dpif - flow translation resource limits]) + +AT_SETUP([ofproto-dpif - infinite resubmit]) +OVS_VSWITCHD_START +AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3]) +AT_CHECK([ovs-appctl ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'], + [0], [stdout]) +AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop +]) +AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log], + [0], [1 +]) +OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"]) +AT_CLEANUP + +AT_SETUP([ofproto-dpif - exponential resubmit chain]) +OVS_VSWITCHD_START +ADD_OF_PORTS([br0], 1) +(for i in `seq 1 64`; do + j=`expr $i + 1` + echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" + done + echo "in_port=65, actions=local") > flows + AT_CHECK([ovs-ofctl add-flows br0 flows]) +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout]) +AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1 +]) +OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"]) +AT_CLEANUP + +AT_SETUP([ofproto-dpif - too many output actions]) +OVS_VSWITCHD_START +ADD_OF_PORTS([br0], 1) +(for i in `seq 1 12`; do + j=`expr $i + 1` + echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" + done + echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows + AT_CHECK([ovs-ofctl add-flows br0 flows]) +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout]) +AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1 +]) +OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"]) +AT_CLEANUP + +AT_SETUP([ofproto-dpif - stack too deep]) +OVS_VSWITCHD_START +ADD_OF_PORTS([br0], 1) +(for i in `seq 1 12`; do + j=`expr $i + 1` + echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" + done + push="push:NXM_NX_REG0[[]]" + echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows + AT_CHECK([ovs-ofctl add-flows br0 flows]) +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout]) +AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1 +]) +OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"]) +AT_CLEANUP