[ovs-dev] [monitor2 v2 4/9] lib: add diff and apply diff APIs for ovsdb_datum
Ben Pfaff
blp at ovn.org
Mon Nov 30 03:12:39 UTC 2015
On Tue, Nov 24, 2015 at 02:16:01PM -0800, Andy Zhou wrote:
> From: Andy Zhou <azhou at nicira.com>
>
> When an OVSDB column change its value, it is more efficient to only
> send what has changed, rather than sending the entire new copy.
> This is analogous to software programmer send patches rather than
> the entire source file.
>
> For columns store a single element, the "diff" datum is the same
> as the "new" datum.
>
> For columns that store set or map, it is only necessary to send the
> information about the elements changed (including addition or removal).
> The "diff" for those types are all elements that are changed.
>
> Those APIs are mainly used for implementing a new OVSDB server
> "update2" JSON-RPC notification, which encodes modifications
> of a column with the contents of those "diff"s. Later patch implements
> the "update2" notification.
>
> Signed-off-by: Andy Zhou <azhou at nicira.com>
>
> ---
> v1->v2: Change ovsdb_datum_diff() and ovsdb_datum_apply_diff() API
> to accept the 'diff' rather than create the object within
> the function.
>
> Change test to print the diff object and resulting object
> after applying diff
Thanks Andy.
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev
mailing list