This patch series implements conditional monitoring by introducing an OVSDB RFC extension with 2 new JSON-RPC methods: "monitor_cond" and "monitor_cond_change". Specification of this extension is defined in the ovsdb-server (1) man page. Monitor2 is now merged into monitor_cond. A monitor_cond session with an empty condition, will behave exactly like monitor2 and will get update2 notifications on all rows.
This patch series is also available on: https://github.com/liranschour/ovs.git branch monitor_cond_ovn. OVN: Last patch in this series is a RFC for OVN usage of conditional monitoring. Performance evaluation: OVN is the main candidate for conditional monitoring usage. It is clear that conditional monitoring reduces computation on the ovn-controller (client) side due to the reduced size of flow tables and update messages. Performance evaluation shows up to 75% computation reduction. However, performance evaluation shows also a reduction in computation on the SB ovsdb-server side proportional to the degree that each logical network is spread over physical hosts in the DC. Evaluation shows that in a realistic scenarios there is a computation reduction also in the server side. Evaluation on simulated environment of 50 hosts and 1000 logical ports shows the following results (cycles #): LN spread over # hosts| master | patch | change ------------------------------------------------------------- 1 | 24597200127 | 24339235374 | 1.0% 6 | 23788521572 | 19145229352 | 19.5% 12 | 23886405758 | 17913143176 | 25.0% 18 | 25812686279 | 23675094540 | 8.2% 24 | 28414671499 | 24770202308 | 12.8% 30 | 31487218890 | 28397543436 | 9.8% 36 | 36116993930 | 34105388739 | 5.5% 42 | 37898342465 | 38647139083 | -1.9% 48 | 41637996229 | 41846616306 | -0.5% 50 | 41679995357 | 43455565977 | -4.2% Changes: -------- V8-->V9: --------- * Rebase due to chages in master. * Bug fixes. V7-->V8: --------- * Bug fix: on ovsdb-idl.c, call to poll_immediate_wake() on add_clause(). * Add datapath column to MAC_Binding table. * OVN: re-write usage of conditional monitoring. Remove unused lport clauses. * Minor fixes. V6 --> V7: ----------- * Change ovsdb-idl API to include only add and remove clause from condition. * IDL maintain and track conditions. Send monitor_cond_change on condition change. * Due to IDL API change, OVN does not maintain and track condition. * Report column duplication on ovsdv_monitor_add_column(). * Split added documentation according to patches. * Add to testing for monitor_cond_change method in ovsdb-client via unixctl command. * An update, if any, as a result of a condition change, will be sent to the client before the reply to the "monitor_cond_update" request. * Minor fixes due to review. Liran Schour (12): ovsdb: create column index mapping between ovsdb row to monitor row ovsdb: add conditions utilities to support monitor_cond ovsdb: allow unmonitored columns in condition evaluation ovsdb: generate update notifications for monitor_cond session ovsdb: enable jsonrpc-server to service "monitor_cond_change" request ovsdb: optimize match_any_clause() condition evaluation ovsdb-client: support monitor-cond method lib: add to ovsdb-idl monitor_id python: move Python idl to work with monitor_cond lib: add monitor_cond_change API to C IDL lib ovn: Add datapath column to the MAC_Binding table RFC OVN: Implementation of conditional monitoring usage NEWS | 3 +- lib/automake.mk | 2 + lib/ovsdb-condition.c | 47 ++++ lib/ovsdb-condition.h | 45 +++ lib/ovsdb-idl-provider.h | 2 + lib/ovsdb-idl.c | 250 +++++++++++++++-- lib/ovsdb-idl.h | 30 ++ ovn/controller/automake.mk | 4 +- ovn/controller/binding.c | 38 ++- ovn/controller/binding.h | 4 +- ovn/controller/filter.c | 211 ++++++++++++++ ovn/controller/filter.h | 33 +++ ovn/controller/ovn-controller.c | 14 +- ovn/controller/patch.c | 7 +- ovn/controller/pinctrl.c | 1 + ovn/ovn-sb.ovsschema | 6 +- ovn/ovn-sb.xml | 3 + ovsdb/condition.c | 300 +++++++++++++++++++- ovsdb/condition.h | 58 ++-- ovsdb/execution.c | 10 +- ovsdb/jsonrpc-server.c | 233 +++++++++++++--- ovsdb/jsonrpc-server.h | 2 +- ovsdb/monitor.c | 592 ++++++++++++++++++++++++++++++++++------ ovsdb/monitor.h | 46 +++- ovsdb/ovsdb-client.1.in | 37 ++- ovsdb/ovsdb-client.c | 98 +++++-- ovsdb/ovsdb-idlc.in | 364 +++++++++++++++++++++++- ovsdb/ovsdb-server.1.in | 221 +++++++++++++-- ovsdb/ovsdb-server.c | 20 +- ovsdb/query.c | 6 +- ovsdb/replication.c | 4 +- python/ovs/db/data.py | 16 +- python/ovs/db/idl.py | 190 +++++++++++-- tests/ovn-controller.at | 3 + tests/ovn.at | 1 + tests/ovs-vswitchd.at | 8 +- tests/ovsdb-condition.at | 41 +++ tests/ovsdb-idl.at | 243 ++++++++++++++++- tests/ovsdb-monitor.at | 251 +++++++++++++++++ tests/test-ovsdb.c | 292 +++++++++++++++++++- tests/test-ovsdb.py | 34 +++ 41 files changed, 3449 insertions(+), 321 deletions(-) create mode 100644 lib/ovsdb-condition.c create mode 100644 lib/ovsdb-condition.h create mode 100644 ovn/controller/filter.c create mode 100644 ovn/controller/filter.h -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev