ofproto-dpif: Minor need_revalidate tweaks.
[sliver-openvswitch.git] / ofproto / ofproto-dpif.c
index 986f9a7..2eaec82 100644 (file)
@@ -1520,6 +1520,8 @@ port_destruct(struct ofport *port_)
     char namebuf[NETDEV_VPORT_NAME_BUFSIZE];
     const char *dp_port_name;
 
+    ofproto->backer->need_revalidate = REV_RECONFIGURE;
+
     dp_port_name = netdev_vport_get_dpif_port(port->up.netdev, namebuf,
                                               sizeof namebuf);
     if (dpif_port_exists(ofproto->backer->dpif, dp_port_name)) {
@@ -1530,7 +1532,6 @@ port_destruct(struct ofport *port_)
         if (!port->tnl_port) {
             dpif_port_del(ofproto->backer->dpif, port->odp_port);
         }
-        ofproto->backer->need_revalidate = REV_RECONFIGURE;
     }
 
     if (port->peer) {
@@ -1545,7 +1546,6 @@ port_destruct(struct ofport *port_)
     tnl_port_del(port->tnl_port);
     sset_find_and_delete(&ofproto->ports, devname);
     sset_find_and_delete(&ofproto->ghost_ports, devname);
-    ofproto->backer->need_revalidate = REV_RECONFIGURE;
     bundle_remove(port_);
     set_cfm(port_, NULL);
     set_bfd(port_, NULL);
@@ -1572,7 +1572,8 @@ port_modified(struct ofport *port_)
 
     if (port->tnl_port && tnl_port_reconfigure(&port->up, port->odp_port,
                                                &port->tnl_port)) {
-        ofproto_dpif_cast(port->up.ofproto)->backer->need_revalidate = true;
+        ofproto_dpif_cast(port->up.ofproto)->backer->need_revalidate =
+            REV_RECONFIGURE;
     }
 
     ofport_update_peer(port);
@@ -2859,7 +2860,7 @@ ofport_update_peer(struct ofport_dpif *ofport)
     }
 
     backer = ofproto_dpif_cast(ofport->up.ofproto)->backer;
-    backer->need_revalidate = true;
+    backer->need_revalidate = REV_RECONFIGURE;
 
     if (ofport->peer) {
         ofport->peer->peer = NULL;
@@ -5779,9 +5780,12 @@ ofproto_unixctl_fdb_show(struct unixctl_conn *conn, int argc OVS_UNUSED,
     ds_put_cstr(&ds, " port  VLAN  MAC                Age\n");
     LIST_FOR_EACH (e, lru_node, &ofproto->ml->lrus) {
         struct ofbundle *bundle = e->port.p;
-        ds_put_format(&ds, "%5d  %4d  "ETH_ADDR_FMT"  %3d\n",
-                      ofbundle_get_a_port(bundle)->odp_port,
-                      e->vlan, ETH_ADDR_ARGS(e->mac),
+        char name[OFP_MAX_PORT_NAME_LEN];
+
+        ofputil_port_to_string(ofbundle_get_a_port(bundle)->up.ofp_port,
+                               name, sizeof name);
+        ds_put_format(&ds, "%5s  %4d  "ETH_ADDR_FMT"  %3d\n",
+                      name, e->vlan, ETH_ADDR_ARGS(e->mac),
                       mac_entry_age(ofproto->ml, e));
     }
     unixctl_command_reply(conn, ds_cstr(&ds));