aboutsummaryrefslogtreecommitdiff
path: root/vswitchd/ovs-brcompatd.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-06-09 13:17:51 -0700
committerBen Pfaff <blp@nicira.com>2010-06-15 10:45:13 -0700
commitcc86ea5a03a320476a89e9a13f9539c0146fac43 (patch)
tree27cb302ce200ac6352b6460eab6ab3c7b65b851a /vswitchd/ovs-brcompatd.c
parent5a24315000c6615ef8d14e9a9f377b01c26a10f8 (diff)
brcompatd: Remove commented-out code.
This code was never converted from the configuration database to OVSDB. In the subsequent months the lack of it has not caused any problems, so this commit deletes it.
Diffstat (limited to 'vswitchd/ovs-brcompatd.c')
-rw-r--r--vswitchd/ovs-brcompatd.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index 29503015..a182b492 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -280,68 +280,6 @@ get_bridge_ports(const struct ovsrec_bridge *br, struct svec *ports,
do_get_bridge_parts(br, ports, vlan, false);
}
-#if 0
-/* Go through the configuration file and remove any ports that no longer
- * exist associated with a bridge. */
-static void
-prune_ports(void)
-{
- int i, j;
- struct svec bridges, delete;
-
- if (cfg_lock(NULL, 0)) {
- /* Couldn't lock config file. */
- return;
- }
-
- svec_init(&bridges);
- svec_init(&delete);
- cfg_get_subsections(&bridges, "bridge");
- for (i=0; i<bridges.n; i++) {
- const char *br_name = bridges.names[i];
- struct svec ifaces;
-
- /* Check that each bridge interface exists. */
- svec_init(&ifaces);
- get_bridge_ifaces(br_name, &ifaces, -1);
- for (j = 0; j < ifaces.n; j++) {
- const char *iface_name = ifaces.names[j];
-
- /* The local port and internal ports are created and destroyed by
- * ovs-vswitchd itself, so don't bother checking for them at all.
- * In practice, they might not exist if ovs-vswitchd hasn't
- * finished reloading since the configuration file was updated. */
- if (!strcmp(iface_name, br_name)
- || cfg_get_bool(0, "iface.%s.internal", iface_name)) {
- continue;
- }
-
- if (!netdev_exists(iface_name)) {
- VLOG_INFO_RL(&rl, "removing dead interface %s from %s",
- iface_name, br_name);
- svec_add(&delete, iface_name);
- }
- }
- svec_destroy(&ifaces);
- }
- svec_destroy(&bridges);
-
- if (delete.n) {
- size_t i;
-
- for (i = 0; i < delete.n; i++) {
- cfg_del_match("bridge.*.port=%s", delete.names[i]);
- cfg_del_match("bonding.*.slave=%s", delete.names[i]);
- }
- reload_config();
- cfg_unlock();
- } else {
- cfg_unlock();
- }
- svec_destroy(&delete);
-}
-#endif
-
static struct ovsdb_idl_txn *
txn_from_openvswitch(const struct ovsrec_open_vswitch *ovs)
{
@@ -1417,10 +1355,6 @@ main(int argc, char *argv[])
*/
if (ovs && prune_timeout) {
rtnl_recv_update(idl, ovs);
-#if 0
- prune_ports();
-#endif
-
nl_sock_wait(rtnl_sock, POLLIN);
poll_timer_wait(prune_timeout);
}