On Wed, Mar 04, 2015 at 11:25:52AM -0800, Justin Pettit wrote: > Signed-off-by: Justin Pettit <jpet...@nicira.com>
This comment might be even better if it made it clearer how transactions work. Maybe "The caller must have started a transaction with ovsdb_idl_txn_create()." I see that you used the same wording elsewhere too: > +/* Deletes 'row' from table "%(t)s". 'row' may be freed, so it must not be > + * accessed afterward. > + * > + * A transaction must be in progress. */ > void > %(s)s_delete(const struct %(s)s *row) > { > ovsdb_idl_txn_delete(&row->header_); > } Here, s/generate/generated/: > + * The new row is assigned a randomly generate provisional UUID. > + * ovsdb-server will assign a different UUID when 'txn' is committed, > + * but the IDL will replace any uses of the provisional UUID in the > + * data to be to be committed by the UUID assigned by ovsdb-server. */ > struct %(s)s * > %(s)s_insert(struct ovsdb_idl_txn *txn) > { > return %(s)s_cast(ovsdb_idl_txn_insert(txn, > &%(p)stable_classes[%(P)sTABLE_%(T)s], NULL)); > -} > -''' % {'s': structName, > - 'p': prefix, > - 'P': prefix.upper(), > - 'T': tableName.upper()} > +}''' % {'s': structName, > + 'p': prefix, > + 'P': prefix.upper(), > + 't': tableName, > + 'T': tableName.upper()} > > # Verify functions. > for columnName, column in sorted(table.columns.iteritems()): > print ''' Acked-by: Ben Pfaff <b...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev