Hi Ben, # This is the last patch which includes test case for replace-flows command to validate addition of the importance parameter in a # rule as per OF14.Also attaching the patch file which includes all the four patches[1-4] for you reference. --- This patch adds a test case for testing the replace-flows after addition of importance parameter in a rule in accordance with OpenFlow Specs 1.4.
Signed-off-by: Rishi Bamba <rishi.ba...@tcs.com> --- tests/ovs-ofctl.at | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index c6990f8..564c480 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -2658,3 +2658,28 @@ NXST_FLOW reply: OVS_VSWITCHD_STOP AT_CLEANUP + + +dnl Importance parameter added in OF1.4. +dnl This validates whether flows with importance +dnl parameter are getting replaced with "replace-flows" or +dnl not by validating dump-flows output after replace with the expected output. + +AT_SETUP([ovs-ofctl replace-flows with importance]) +OVS_VSWITCHD_START + +dnl Add flows to br0 with importance via OF1.1+. For more details refer "ovs-ofctl rule with importance" test case. +for i in {1..8}; do echo "dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt +AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 add-flows.txt]) + +dnl Replace some flows in the bridge. +for i in {1..8..2}; do echo "dl_vlan=$i,importance=`expr $i + 10`,actions=drop"; done > replace-flows.txt +AT_CHECK([ovs-ofctl -O OpenFlow13 replace-flows br0 replace-flows.txt]) + +dnl Dump them and compare the dump flows output against the expected output. +for i in `seq 1 8`; do if [[ `expr $i % 2` -eq 1 ]]; then importance=`expr $i + 10`; else importance=$i; fi; echo " importance=$importance, dl_vlan=$i actions=drop"; done | sort > expout +AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort], + [0], [expout]) + +OVS_VSWITCHD_STOP +AT_CLEANUP -- 2.1.1 Thank You Regards Rishi ----- Original Message ----- From: "Rishi Bamba" <rishi.ba...@tcsin.com> To: "Ben Pfaff" <b...@nicira.com> Cc: dev@openvswitch.org, "partha datta" <partha.da...@tcs.com>, "deepankar gupta" <deepankar.gu...@tcs.com> Sent: Friday, October 10, 2014 7:24:48 PM Subject: [PATCH 3/4] ovs-ofctl:Enhanced diff-flows & replace-flows(OF14) Hi Ben, --- This patch enhances the diff-flows & replace-flows CLI that takes into account the addition of importance parameter in a rule as per the OpenFlow Specs 1.4. ----- Original Message ----- From: "Rishi Bamba" <rishi.ba...@tcsin.com> To: "Ben Pfaff" <b...@nicira.com> Cc: dev@openvswitch.org, "partha datta" <partha.da...@tcs.com>, "deepankar gupta" <deepankar.gu...@tcs.com> Sent: Friday, October 10, 2014 7:20:14 PM Subject: [PATCH 2/4] ovs-ofctl:To set importance of a rule for eviction(OF14) Hi Ben, # In reference to the [Patch 1/4] This patch includes the Design file changes as suggested and test cases for add-flow and dump-flow # CLI in order to perform testing of the importance parameter in a rule for different protocols of OpenFlow. --- This patch enables a user to set importance for a new rule via add-flow OF1.1+ in the OVS and display the same via dump-flows command OF1.1+ . The changes are made in accordance with OpenFlow 1.4 specs to implement Eviction on the basis of "importance". #Changes made to DESIGN and added test cases ----- Original Message ----- From: "Rishi Bamba" <rishi.ba...@tcsin.com> To: "Ben Pfaff" <b...@nicira.com> Cc: dev@openvswitch.org, "partha datta" <partha.da...@tcs.com>, "deepankar gupta" <deepankar.gu...@tcs.com> Sent: Friday, October 10, 2014 7:11:45 PM Subject: Re: [PATCH 1/4] ovs-ofctl:To set importance of a rule for eviction(OF14) Hi Ben, # Thank you for reviewing the patch.As per the comments received ,all the changes are made and incorporated for this patch i.e Clang # compiler doesn't report any error now and all the test cases are successful including the one added by us for the same.Also along # with this patch sending three other patches related to the addition of importance in a rule which includes the changes as asked by # you plus replace-flows and diff-flows CLI enhancement after the addition of "importance" parameter in a rule as per OF14. --- This patch enables a user to set importance for a new rule via add-flow OF1.1+ in the OVS and display the same via dump-flows command OF1.1+ . The changes are made in accordance with OpenFlow 1.4 specs to implement Eviction on the basis of "importance". =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev