On Wed, Jan 13, 2016 at 05:44:16PM +0530, Saloni Jain wrote: > Hi Ben, > > Thanks for the review. > Regarding the test case, I want to clarify few points : > > # OFPT_TABLE_STATUS, OFPTR_VACANCY_UP > if test X"$1" = X"OFPTR_VACANCY_UP"; then shift; > ovs-vsctl -- --id=@t1 create Flow_Table flow-limit=10 -- set bridge > br0 flow_tables:1=@t1 > ovs-ofctl -O OpenFlow14 mod-table br0 1 vacancy:20,80 > ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=1,actions=2 > ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=2,actions=2 > ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=3,actions=2 > ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=4,actions=2 > ovs-ofctl -O OpenFlow14 add-flow br0 table=1,in_port=5,actions=2 > echo >>expout "OFPT_TABLE_STATUS (OF1.4): reason=VACANCY_UP > table_desc:- > table 1: > eviction=off eviction_flags=OTHER|IMPORTANCE|LIFETIME > vacancy=on vacancy_down=20% vacancy_up=80% vacancy=10%" > fi > > The above test case is for OFPT_TABLE_STATUS message. OFPT_TABLE_STATUS > consists of table_desc also. > As per the specification, if the switch sends OFPT_TABLE_STATUS with reason > VACANCY_UP then further messages with VACANCY_UP reasons are stopped until > VACANCY_DOWN reason comes. > In the above test case, table limit is set to be 10 and 5 flows are added, > also values of vacancy down and vacancy up are 20% and 80% respectively. > So in this case OFPT_TABLE_STATUS (OF1.4): reason=VACANCY_UP is sent when > first flow is added as in this case current Vacancy is 10% which is less than > Vacancy down threshold value 20%. Further TABLE_STATUS messages are stopped > until VACANCY_DOWN reason comes up which will occur when the current vacancy > is greater than or equal to vacancy up threshold value 80%.
The misunderstanding here is the definition of "vacancy". Vacancy is the amount of free space, so when the first flow is added, the vacancy is 90%, not 10%. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev