ofproto-dpif: Revalidate on cfm and lacp addition.
authorEthan Jackson <ethan@nicira.com>
Thu, 15 Sep 2011 22:27:22 +0000 (15:27 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 15 Sep 2011 22:40:54 +0000 (15:40 -0700)
The introduction of cfm or lacp objects to ofproto, requires the
removal of all flows which originate from the newly "special"
in_port.

ofproto/ofproto-dpif.c

index 88ec2c0..98bcc74 100644 (file)
@@ -836,6 +836,10 @@ set_cfm(struct ofport *ofport_, const struct cfm_settings *s)
         error = 0;
     } else {
         if (!ofport->cfm) {
+            struct ofproto_dpif *ofproto;
+
+            ofproto = ofproto_dpif_cast(ofport->up.ofproto);
+            ofproto->need_revalidate = true;
             ofport->cfm = cfm_create(netdev_get_name(ofport->up.netdev));
         }
 
@@ -1069,6 +1073,7 @@ bundle_set(struct ofproto *ofproto_, void *aux,
     /* LACP. */
     if (s->lacp) {
         if (!bundle->lacp) {
+            ofproto->need_revalidate = true;
             bundle->lacp = lacp_create();
         }
         lacp_configure(bundle->lacp, s->lacp);