]> git.proxmox.com Git - ovs.git/commitdiff
ofproto: Do not signal revalidation for group mods twice.
authorJarno Rajahalme <jarno@ovn.org>
Tue, 20 Sep 2016 18:38:59 +0000 (11:38 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Tue, 20 Sep 2016 18:38:59 +0000 (11:38 -0700)
The new group mod implementation signals revalidation through
'->set_tables_version()', so the separate '->group_modify()' is no
longer needed.  The ofproto-provider API is changed to allow
'group_modify' to be NULL.

Fixes: 5d08a275cd ("ofproto: Make groups versioned.")
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
ofproto/ofproto-dpif.c
ofproto/ofproto.c

index 295bf097b0edddf6445ecc5af47bef37b485ae11..0282ebdfb9f6bc540677ecae28115017476b6f3a 100644 (file)
@@ -4555,14 +4555,6 @@ group_destruct(struct ofgroup *group_)
     ovs_mutex_destroy(&group->stats_mutex);
 }
 
-static void
-group_modify(struct ofgroup *group_)
-{
-    struct ofproto_dpif *ofproto = ofproto_dpif_cast(group_->ofproto);
-
-    ofproto->backer->need_revalidate = REV_FLOW_TABLE;
-}
-
 static enum ofperr
 group_get_stats(const struct ofgroup *group_, struct ofputil_group_stats *ogs)
 {
@@ -5929,7 +5921,7 @@ const struct ofproto_class ofproto_dpif_class = {
     group_construct,            /* group_construct */
     group_destruct,             /* group_destruct */
     group_dealloc,              /* group_dealloc */
-    group_modify,               /* group_modify */
+    NULL,                       /* group_modify */
     group_get_stats,            /* group_get_stats */
     get_datapath_version,       /* get_datapath_version */
 };
index 364cab2339edbb03b67372c05c3cdc8eb1ba7762..93a24be350aef4e1eb543c06856d7723f1120346 100755 (executable)
@@ -7098,7 +7098,8 @@ ofproto_group_mod_finish(struct ofproto *ofproto,
     struct ofgroup *new_group = ogm->new_group;
     struct ofgroup *old_group;
 
-    if (new_group && group_collection_n(&ogm->old_groups)) {
+    if (new_group && group_collection_n(&ogm->old_groups) &&
+        ofproto->ofproto_class->group_modify) {
         /* Modify a group. */
         ovs_assert(group_collection_n(&ogm->old_groups) == 1);