]> git.proxmox.com Git - ovs.git/commitdiff
ovsdb-idl: Improve comment on ovsdb_idl_txn_write[_clone]().
authorBen Pfaff <blp@ovn.org>
Wed, 31 Aug 2016 18:34:53 +0000 (11:34 -0700)
committerBen Pfaff <blp@ovn.org>
Wed, 19 Oct 2016 18:39:11 +0000 (11:39 -0700)
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
lib/ovsdb-idl.c

index 3dbf0f7c92cc5687da0614dcdb65d8696eafbb7b..ffee4b6cff89129cc77f2264425e9c20d82b160a 100644 (file)
@@ -3080,23 +3080,6 @@ ovsdb_idl_txn_complete(struct ovsdb_idl_txn *txn,
     hmap_remove(&txn->idl->outstanding_txns, &txn->hmap_node);
 }
 
-/* Writes 'datum' to the specified 'column' in 'row_'.  Updates both 'row_'
- * itself and the structs derived from it (e.g. the "struct ovsrec_*", for
- * ovs-vswitchd).
- *
- * 'datum' must have the correct type for its column.  The IDL does not check
- * that it meets schema constraints, but ovsdb-server will do so at commit time
- * so it had better be correct.
- *
- * A transaction must be in progress.  Replication of 'column' must not have
- * been disabled (by calling ovsdb_idl_omit()).
- *
- * Usually this function is used indirectly through one of the "set" functions
- * generated by ovsdb-idlc.
- *
- * Takes ownership of what 'datum' points to (and in some cases destroys that
- * data before returning) but makes a copy of 'datum' itself.  (Commonly
- * 'datum' is on the caller's stack.) */
 static void
 ovsdb_idl_txn_write__(const struct ovsdb_idl_row *row_,
                       const struct ovsdb_idl_column *column,
@@ -3172,6 +3155,23 @@ discard_datum:
     }
 }
 
+/* Writes 'datum' to the specified 'column' in 'row_'.  Updates both 'row_'
+ * itself and the structs derived from it (e.g. the "struct ovsrec_*", for
+ * ovs-vswitchd).
+ *
+ * 'datum' must have the correct type for its column.  The IDL does not check
+ * that it meets schema constraints, but ovsdb-server will do so at commit time
+ * so it had better be correct.
+ *
+ * A transaction must be in progress.  Replication of 'column' must not have
+ * been disabled (by calling ovsdb_idl_omit()).
+ *
+ * Usually this function is used indirectly through one of the "set" functions
+ * generated by ovsdb-idlc.
+ *
+ * Takes ownership of what 'datum' points to (and in some cases destroys that
+ * data before returning) but makes a copy of 'datum' itself.  (Commonly
+ * 'datum' is on the caller's stack.) */
 void
 ovsdb_idl_txn_write(const struct ovsdb_idl_row *row,
                     const struct ovsdb_idl_column *column,
@@ -3180,6 +3180,8 @@ ovsdb_idl_txn_write(const struct ovsdb_idl_row *row,
     ovsdb_idl_txn_write__(row, column, datum, true);
 }
 
+/* Similar to ovsdb_idl_txn_write(), except that the caller retains ownership
+ * of 'datum' and what it points to. */
 void
 ovsdb_idl_txn_write_clone(const struct ovsdb_idl_row *row,
                           const struct ovsdb_idl_column *column,