This series implements the possibility to have a limit on the number of flows learned by a learn action. After the learn action execution the pipeline can read the result (to know if the limit was exceeded).
v2->v3: * When the learned rule expired and there are no packets, instead of slowpathing the ukey, delete it. This should make the next upcall a miss upcall and ovs should immediately install a flow. Suggested by Joe (thanks!). * NXAST_RAW_LEARN2 is now subtype 45 instead of 44. v1->v2: * 'limit' counts both learn flows and flows installed by controller, suggested by Ben. * Don't keep a reference to the counter in ukeys * Squash tests, openflow interface changes and ofproto implementation into a single commit * The new cookie-counters module is not used anymore, therefore it's removed * Fix memory leak in ofproto_flow_mod_learn(): we have to call ofproto_flow_mod_uninit() if we don't call ofproto_flow_mod_learn_start(). * Simplify ofp-actions changes according to Ben comments(thanks!) Daniele Di Proietto (3): ofproto-dpif-xlate: Create XC_LEARN entry after learning. ofp-actions: Factor out decode_LEARN_{common,spec}(). ofp-actions: Add limit to learn action. include/openvswitch/ofp-actions.h | 12 +++ lib/learn.c | 24 +++++ lib/ofp-actions.c | 146 ++++++++++++++++++++++++---- ofproto/ofproto-dpif-upcall.c | 4 + ofproto/ofproto-dpif-xlate-cache.c | 3 +- ofproto/ofproto-dpif-xlate-cache.h | 1 + ofproto/ofproto-dpif-xlate.c | 46 +++++++-- ofproto/ofproto-dpif-xlate.h | 3 + ofproto/ofproto-provider.h | 3 +- ofproto/ofproto.c | 46 +++++++-- tests/learn.at | 191 +++++++++++++++++++++++++++++++++++++ tests/ofp-actions.at | 14 +++ utilities/ovs-ofctl.8.in | 16 ++++ 13 files changed, 474 insertions(+), 35 deletions(-) -- 2.11.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev