[ovs-dev] [PATCH] ovsdb-idlc: Return expected sequence number while setting conditions.

Ilya Maximets i.maximets at ovn.org
Tue Nov 10 12:18:11 UTC 2020


ovsdb_idl_set_condition() returns a sequence number that can be used to
check if the requested conditions are acknowledged by the server.
However, database bindings do not return this value to the user, making
it impossible to check if the conditions are accepted.

Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
---
 ovsdb/ovsdb-idlc.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 698fe25f3..b13195606 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -389,7 +389,7 @@ bool %(s)s_is_updated(const struct %(s)s *, enum %(s)s_column_id);
                 args = ['%(type)s%(name)s' % member for member in members]
             print('%s);' % ', '.join(args))
 
-            print('void %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName})
+            print('unsigned int %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName})
 
         print("")
 
@@ -1416,10 +1416,10 @@ struct %(s)s *
         print("\nstruct ovsdb_idl_column %s_columns[%s_N_COLUMNS];" % (
             structName, structName.upper()))
         print("""
-void
+unsigned int
 %(s)s_set_condition(struct ovsdb_idl *idl, struct ovsdb_idl_condition *condition)
 {
-    ovsdb_idl_set_condition(idl, &%(p)stable_%(tl)s, condition);
+    return ovsdb_idl_set_condition(idl, &%(p)stable_%(tl)s, condition);
 }""" % {'p': prefix,
         's': structName,
         'tl': tableName.lower()})
-- 
2.25.4



More information about the dev mailing list