[ovs-dev] [PATCH v8 02/10] Present tracked changes in increasing change number order
Ryan Moats
us.ibm.com at oc7146733065.ibm.com
Wed Mar 9 19:44:26 UTC 2016
From: RYAN D. MOATS <rmoats at us.ibm.com>
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 at us.ibm.com>
---
lib/ovsdb-idl.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 4cb1c81..5dc8565 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -1350,10 +1350,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);
}
@@ -1572,7 +1573,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);
}
}
}
--
1.7.1
More information about the dev
mailing list