From aed0c16396efe46ee2a4828543d251a820339fce Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 14 May 2009 12:33:34 -0700 Subject: [PATCH] vswitch: Give up hope that the config file delimiter will be changed. This code originally assumed that it could iterate over all the subsections of "port" in the configuration file to obtain the names of network devices, but this didn't work because "." is both the configuration file section delimiter and a valid (and fairly common) character in network device names. So it was changed to use a different technique with the hope that the original code could be restored when the configuration file syntax was changed. Now we've agreed that the configuration file syntax is not going to change before we change to a different configuration model entirely, so this commit deletes the original code (which was #if'd out, not deleted). Another reason to do this is to kill off some warnings due to unused functions and variables. --- vswitchd/port.c | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/vswitchd/port.c b/vswitchd/port.c index a600be62..f3d05140 100644 --- a/vswitchd/port.c +++ b/vswitchd/port.c @@ -37,10 +37,6 @@ #define THIS_MODULE VLM_port #include "vlog.h" -static struct svec port_cfg = SVEC_EMPTY_INITIALIZER; -static struct svec all_ports = SVEC_EMPTY_INITIALIZER; - - static int set_ingress_policing(const char *port_name) { @@ -52,20 +48,6 @@ set_ingress_policing(const char *port_name) return netdev_nodev_set_policing(port_name, kbits_rate, kbits_burst); } -static int -set_port_config(const char *port_name) -{ - set_ingress_policing(port_name); - - return 0; -} - -static void -strip_port_config(const char *port_name) -{ - netdev_nodev_set_policing(port_name, 0, 0); -} - void port_init(void) { @@ -75,10 +57,6 @@ port_init(void) void port_reconfigure(void) { -#if 1 - /* xxx Hack to get around interfaces with a "." in their name, since - * xxx that is the delimiter in vswitchd.conf. Once the delimiter - * xxx is changed, this portion of the code can be removed. */ struct svec ports; int i; @@ -87,36 +65,4 @@ port_reconfigure(void) for (i=0; i