]> git.proxmox.com Git - mirror_ovs.git/blobdiff - ofproto/ofproto.c
ofproto: Infra for table versioning.
[mirror_ovs.git] / ofproto / ofproto.c
index b5424b9f4fc960c3214d635847589068b1fe6fa0..716fbfa304736661ab38e6c0bf1028fcdd974147 100644 (file)
@@ -527,6 +527,7 @@ ofproto_create(const char *datapath_name, const char *datapath_type,
     ofproto->eviction_group_timer = LLONG_MIN;
     ofproto->tables = NULL;
     ofproto->n_tables = 0;
+    ofproto->tables_version = CLS_MIN_VERSION;
     hindex_init(&ofproto->cookies);
     hmap_init(&ofproto->learned_cookies);
     list_init(&ofproto->expirable);
@@ -577,6 +578,10 @@ ofproto_create(const char *datapath_name, const char *datapath_type,
     ofproto->meters = xzalloc((ofproto->meter_features.max_meters + 1)
                               * sizeof(struct meter *));
 
+    /* Set the initial tables version. */
+    ofproto->ofproto_class->set_tables_version(ofproto,
+                                               ofproto->tables_version);
+
     *ofprotop = ofproto;
     return 0;
 }