\f
/* Public functions. */
+/* xxx Temporary to get around "." delimiter vswitchd.conf problem in
+ * xxx port.c. */
+void
+bridge_get_ifaces(struct svec *svec)
+{
+ struct bridge *br, *next;
+ size_t i, j;
+
+ LIST_FOR_EACH_SAFE (br, next, struct bridge, node, &all_bridges) {
+ bridge_fetch_dp_ifaces(br);
+ for (i = 0; i < br->n_ports; i++) {
+ struct port *port = br->ports[i];
+
+ for (j = 0; j < port->n_ifaces; j++) {
+ struct iface *iface = port->ifaces[j];
+ if (iface->dp_ifidx < 0) {
+ VLOG_ERR("%s interface not in dp%u, ignoring",
+ iface->name, dpif_id(&br->dpif));
+ } else {
+ if (iface->dp_ifidx != ODPP_LOCAL) {
+ svec_add(svec, iface->name);
+ }
+ }
+ }
+ }
+ }
+}
+
/* The caller must already have called cfg_read(). */
void
bridge_init(void)
#include <stddef.h>
#include "list.h"
+struct svec;
+
void bridge_init(void);
void bridge_reconfigure(void);
int bridge_run(void);
void bridge_wait(void);
bool bridge_exists(const char *);
uint64_t bridge_get_datapathid(const char *name);
+void bridge_get_ifaces(struct svec *svec);
#endif /* bridge.h */
#include <config.h>
+#include "bridge.h"
#include "cfg.h"
#include "netdev.h"
#include "port.h"
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;
+
+ svec_init(&ports);
+ bridge_get_ifaces(&ports);
+ for (i=0; i<ports.n; i++) {
+ set_ingress_policing(ports.names[i]);
+ }
+#else
struct svec new_cfg;
struct svec new_ports;
int i;
svec_swap(&new_ports, &all_ports);
svec_destroy(&new_ports);
+#endif
}