-update_tables_after_insertion(struct classifier *cls, struct cls_table *table,
- unsigned int new_priority)
-{
- if (new_priority == table->max_priority) {
- ++table->max_count;
- } else if (new_priority > table->max_priority) {
- struct cls_table *iter;
-
- table->max_priority = new_priority;
- table->max_count = 1;
-
- /* Possibly move 'table' earlier in the priority list. If we break out
- * of the loop, then 'table' should be moved just after that 'iter'.
- * If the loop terminates normally, then 'iter' will be the list head
- * and we'll move table just after that (e.g. to the front of the
- * list). */
- iter = table;
+update_subtables_after_insertion(struct classifier *cls,
+ struct cls_subtable *subtable,
+ unsigned int new_priority)
+{
+ if (new_priority == subtable->max_priority) {
+ ++subtable->max_count;
+ } else if (new_priority > subtable->max_priority) {
+ struct cls_subtable *iter;
+
+ subtable->max_priority = new_priority;
+ subtable->max_count = 1;
+
+ /* Possibly move 'subtable' earlier in the priority list. If we break
+ * out of the loop, then 'subtable' should be moved just after that
+ * 'iter'. If the loop terminates normally, then 'iter' will be the
+ * list head and we'll move subtable just after that (e.g. to the front
+ * of the list). */
+ iter = subtable;