X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ovsdb%2Ftable.h;h=fab9c5b6378dbc1415def951a19699a43186c64b;hb=c5cf10598f8c9f4428291e9df3ecd72a05fb1ccf;hp=8e933438613561f6a9a99d8f0962b6f17922c776;hpb=29d7226e8b17ce1891aaba8f3009715b24fa664f;p=sliver-openvswitch.git diff --git a/ovsdb/table.h b/ovsdb/table.h index 8e9334386..fab9c5b63 100644 --- a/ovsdb/table.h +++ b/ovsdb/table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011 Nicira Networks +/* Copyright (c) 2009, 2010, 2011 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,8 @@ struct ovsdb_table_schema { struct shash columns; /* Contains "struct ovsdb_column *"s. */ unsigned int max_rows; /* Maximum number of rows. */ bool is_root; /* Part of garbage collection root set? */ + struct ovsdb_column_set *indexes; + size_t n_indexes; }; struct ovsdb_table_schema *ovsdb_table_schema_create( @@ -55,6 +57,11 @@ struct ovsdb_table { struct ovsdb_table_schema *schema; struct ovsdb_txn_table *txn_table; /* Only if table is in a transaction. */ struct hmap rows; /* Contains "struct ovsdb_row"s. */ + + /* An array of schema->n_indexes hmaps, each of which contains "struct + * ovsdb_row"s. Each of the hmap_nodes in indexes[i] are at index 'i' at + * the end of struct ovsdb_row, following the 'fields' member. */ + struct hmap *indexes; }; struct ovsdb_table *ovsdb_table_create(struct ovsdb_table_schema *);