mbox series

[ovs-dev,v2,0/8] Refactor OVSDB IDL into two layers

Message ID 20201202062341.1367060-1-blp@ovn.org
Headers show
Series Refactor OVSDB IDL into two layers | expand

Message

Ben Pfaff Dec. 2, 2020, 6:23 a.m. UTC
This series breaks the IDL into two layers: the IDL proper, whose
interface to its client is unchanged, and a low-level library called
the OVSDB "client synchronization" (CS) library.  There are two
reasons for this change.  First, the IDL is big and complicated and
I think that this change factors out some of that complication into
a simpler lower layer.  Second, the OVN northd implementation based
on DDlog can benefit from the client synchronization library even
though it would actually be made increasingly complicated by the IDL.

v1->v2:
  - Add a few patches with trivial bug fixes and improvements to idl.
  - Make ovsdb-cs data structures exactly reproduce the ordering
    that the idl previously used, so that the behavior is exactly
    the same.  This fixes the behavior in the ovn-controller.  I am
    pretty convinced that there is a bug in the idl regarding change
    tracking, but these patches will not make it better or worse.
    There are lots of idl patches flying around on the mailing list
    currently; maybe one of those fixes the real problem.

Ben Pfaff (8):
  jsonrpc: Avoid disconnecting prematurely due to long poll intervals.
  ovsdb-idl: Avoid redundant clearing and parsing of received data.
  ovsdb-idl: Fix memory leak sending messages without a session.
  ovsdb-idl: Remove prototype for function that is not defined or used.
  ovsdb-idl: Improve prototypes.
  ovsdb-idl: Add comment.
  ovsdb-cs: New module that factors out code from ovsdb-idl.
  ovsdb-idl: Break into two layers.

 lib/automake.mk          |    2 +
 lib/jsonrpc.c            |    5 +-
 lib/ovsdb-cs.c           | 2279 ++++++++++++++++++++++++++++++++++++
 lib/ovsdb-cs.h           |  199 ++++
 lib/ovsdb-idl-provider.h |    8 +-
 lib/ovsdb-idl.c          | 2374 +++++++-------------------------------
 lib/ovsdb-idl.h          |    5 +-
 lib/reconnect.c          |   25 +-
 lib/reconnect.h          |    1 +
 tests/test-reconnect.c   |    1 +
 10 files changed, 2943 insertions(+), 1956 deletions(-)
 create mode 100644 lib/ovsdb-cs.c
 create mode 100644 lib/ovsdb-cs.h