summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRYAN D. MOATS <rmoats@us.ibm.com>2016-03-11 15:06:17 -0600
committerBen Pfaff <blp@ovn.org>2016-03-22 14:34:33 -0700
commitc88b940ec14225178deb47129b2cd1f398c363e5 (patch)
tree49b2d41cc17ee3ac86addd4accc10eebbd7e514f /lib
parent6977df7228b928459eb69bcdca5746619d4881a3 (diff)
downloadopenvswitch-c88b940ec14225178deb47129b2cd1f398c363e5.tar.gz
ovsdb-idl: Present tracked changes in increasing change number order.
Currently changes are added to the front of the track list, so they are looped through in LIFO order. Incremental processing is more efficient with a FIFO presentation, so (1) add new changes to the back of the track list, and (2) move updated changes to the back of the track list Signed-off-by: RYAN D. MOATS <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ovsdb-idl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 976921698..bfc133be5 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -1367,10 +1367,11 @@ ovsdb_idl_row_change__(struct ovsdb_idl_row *row, const struct json *row_json,
= row->table->change_seqno[change]
= row->table->idl->change_seqno + 1;
if (table->modes[column_idx] & OVSDB_IDL_TRACK) {
- if (list_is_empty(&row->track_node)) {
- list_push_front(&row->table->track_list,
- &row->track_node);
+ if (!list_is_empty(&row->track_node)) {
+ list_remove(&row->track_node);
}
+ list_push_back(&row->table->track_list,
+ &row->track_node);
if (!row->updated) {
row->updated = bitmap_allocate(class->n_columns);
}
@@ -1589,7 +1590,7 @@ ovsdb_idl_row_destroy(struct ovsdb_idl_row *row)
= row->table->idl->change_seqno + 1;
}
if (list_is_empty(&row->track_node)) {
- list_push_front(&row->table->track_list, &row->track_node);
+ list_push_back(&row->table->track_list, &row->track_node);
}
}
}