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).
Since the datapath flows cache the result of the learn execution, we have
to postpone decreasing the counters until the ukey is deleted, otherwise
we could allow more packets than the limit prescribes.
The beginning of the series implements the new Openflow interface and
updates the documentation.
The fourth commit implements a map that keeps the counters.
The sixth commit implements the actual logic and the last commit has some
basic tests.
Daniele Di Proietto (7):
ofp-actions: Factor out decode_LEARN_common().
ofp-actions: Add limit to learn action.
ofproto-dpif-xlate: Create XC_LEARN entry after learning.
ofproto: New cookie-counters module.
ofproto-dpif-upcall: Encapsulate 'struct recirc_refs' into struct
'ukey_refs'.
ofproto: Implement learning limit.
tests: Add learn action with limit tests.
include/openvswitch/ofp-actions.h | 12 +++
lib/learn.c | 28 +++++
lib/odp-util.h | 6 +-
lib/ofp-actions.c | 212 ++++++++++++++++++++++++++++--------
ofproto/automake.mk | 2 +
ofproto/cookie-counters.c | 216 +++++++++++++++++++++++++++++++++++++
ofproto/cookie-counters.h | 85 +++++++++++++++
ofproto/ofproto-dpif-upcall.c | 64 +++++++----
ofproto/ofproto-dpif-xlate-cache.c | 6 +-
ofproto/ofproto-dpif-xlate-cache.h | 1 +
ofproto/ofproto-dpif-xlate.c | 53 +++++++--
ofproto/ofproto-dpif-xlate.h | 3 +
ofproto/ofproto-dpif.c | 9 +-
ofproto/ofproto-dpif.h | 2 +-
ofproto/ofproto-provider.h | 17 ++-
ofproto/ofproto.c | 42 ++++++--
tests/learn.at | 175 ++++++++++++++++++++++++++++++
tests/ofp-actions.at | 14 +++
utilities/ovs-ofctl.8.in | 19 ++++
19 files changed, 877 insertions(+), 89 deletions(-)
create mode 100644 ofproto/cookie-counters.c
create mode 100644 ofproto/cookie-counters.h
--
2.11.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev