[ovs-dev] [PATCH v8] Implement OFPT_TABLE_STATUS Message.

Ben Pfaff blp at ovn.org
Tue Jan 12 19:01:12 UTC 2016


On Tue, Jan 05, 2016 at 04:45:12PM +0530, saloni.jain12 at gmail.com wrote:
> From: Saloni Jain <saloni.jain at tcs.com>
> 
> On change in a table state, the controller needs to be informed with
> the OFPT_TABLE_STATUS message. The message is sent with reason
> OFPTR_VACANCY_DOWN or OFPTR_VACANCY_UP in case of change in remaining
> space eventually crossing any one of the threshold.
> 
> Signed-off-by: Saloni Jain <saloni.jain at tcs.com>
> Co-authored-by: Rishi Bamba <rishi.bamba at tcs.com>
> Signed-off-by: Rishi Bamba <rishi.bamba at tcs.com>
> ---
> Difference between v7 <-> v8
> - Changes done in the calling of send_table_status() in add_flow_finish()
> - Rebased with latest master

I think that this implementation confuses "occupancy" with "vacancy".
Vacancy is the amount of space free.  One of the tests that it adds
illustrates the confusion.  The test exercises vacancies from 100%
(completely empty) to 50% (half full), but the expected output includes
a message that says vacancy is 10% (which is never true during the
test):

    # 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



More information about the dev mailing list