[ovs-dev] [PATCH 3/3] ovsdb-idl: Enhance conditional monitoring API

Andy Zhou azhou at ovn.org
Fri Jan 6 22:43:36 UTC 2017


On Wed, Jan 4, 2017 at 4:00 PM, Ben Pfaff <blp at ovn.org> wrote:

> On Tue, Dec 20, 2016 at 01:47:17AM -0800, Andy Zhou wrote:
> > To allow client to know when the conditional monitoring changes
> > has been accepted by the OVSDB server and the 'idl' contents has
> > been updated to match the new conditions.
> >
> > Signed-off-by: Andy Zhou <azhou at ovn.org>
>
> The API seems a little suboptimal, in that:
>         uint64_t seqno = ovsdb_idl_set_condition(idl, tc, &cond);
>         uint64_t seqno2 = ovsdb_idl_set_condition(idl, tc, &cond);
>         if (seqno2 == UINT_MAX) {
>             ovs_fatal(0, "condition unchanged");
>         }
> will always abort with "condition unchanged", I think.
>
> Is there a simple solution?
>

I did not think of this calling sequence. Thanks for the review.

How about simply return current seqno  in case 'ovsdb_idl_set_condition()
does not
change current condition?  I have sent out a v2 that implements this
change.


More information about the dev mailing list