]> git.proxmox.com Git - mirror_ovs.git/commit - tests/ofp-actions.at
ofp-actions: Add limit to learn action.
authorDaniele Di Proietto <diproiettod@vmware.com>
Fri, 10 Mar 2017 23:44:40 +0000 (15:44 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 16 Mar 2017 20:42:26 +0000 (13:42 -0700)
commit4c71600d2256641b927e04b75e95751355e799f8
tree0f8393fa951fa4076dfe195864cc67638e64730c
parent2ce5f3114b4c2054b9071e5b139a0a33f50986c3
ofp-actions: Add limit to learn action.

This commit adds a new feature to the learn actions: the possibility to
limit the number of learned flows.

To be compatible with users of the old learn action, a new structure is
introduced as well as a new OpenFlow raw action number.

There's a small corner case when we have to delete the ukey.  This
happens when:
* The learned rule has expired (or has been deleted).
* The ukey that learned the rule is still in the datapath.
* No packets hit the datapath flow recently.
In this case we cannot relearn the rule (because there are no new
packets), and the actions might depend on the learn execution, so the
only option is to delete the ukey.  I don't think this has big
performance implications since it's done only for ukey with no traffic.

We could also slowpath it, but that will cause an action upcall and the
correct datapath actions will be installed later by a revalidator.  If
we delete the ukey, the next upcall will be a miss upcall and that will
immediatedly install the correct datapath flow.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
14 files changed:
NEWS
include/openvswitch/ofp-actions.h
lib/learn.c
lib/ofp-actions.c
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif-xlate-cache.c
ofproto/ofproto-dpif-xlate-cache.h
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/learn.at
tests/ofp-actions.at
utilities/ovs-ofctl.8.in