static void iface_destroy(struct iface *);
static struct iface *iface_lookup(const struct bridge *, const char *name);
static struct iface *iface_from_dp_ifidx(const struct bridge *,
static void iface_destroy(struct iface *);
static struct iface *iface_lookup(const struct bridge *, const char *name);
static struct iface *iface_from_dp_ifidx(const struct bridge *,
static int
reconfigure_iface(const struct ovsrec_interface *iface_cfg)
{
return set_up_iface(iface_cfg, false);
}
static int
reconfigure_iface(const struct ovsrec_interface *iface_cfg)
{
return set_up_iface(iface_cfg, false);
}
/* iterate_and_prune_ifaces() callback function that opens the network device
* for 'iface', if it is not already open, and retrieves the interface's MAC
/* iterate_and_prune_ifaces() callback function that opens the network device
* for 'iface', if it is not already open, and retrieves the interface's MAC
const struct ovsrec_bridge *br_cfg = node->data;
if (!shash_find_data(&old_br, br_name)) {
br = bridge_create(br_name);
const struct ovsrec_bridge *br_cfg = node->data;
if (!shash_find_data(&old_br, br_name)) {
br = bridge_create(br_name);
- /* Attempt to create the network interface in case it
- * doesn't exist yet. */
- error = iface ? create_iface(iface->cfg) : 0;
- if (error) {
- VLOG_WARN("could not create iface %s: %s\n", if_name,
- strerror(error));
- continue;
- }
-
error = dpif_port_add(br->dpif, if_name,
internal ? ODP_PORT_INTERNAL : 0, NULL);
if (error == EFBIG) {
error = dpif_port_add(br->dpif, if_name,
internal ? ODP_PORT_INTERNAL : 0, NULL);
if (error == EFBIG) {
if (!opts.active_timeout) {
opts.active_timeout = -1;
} else if (opts.active_timeout < 0) {
if (!opts.active_timeout) {
opts.active_timeout = -1;
} else if (opts.active_timeout < 0) {
- opts.active_timeout = 0;
+ VLOG_WARN("bridge %s: active timeout interval set to negative "
+ "value, using default instead (%d seconds)", br->name,
+ NF_ACTIVE_TIMEOUT_DEFAULT);
+ opts.active_timeout = -1;
if (bridge_get_controller(ovs_cfg, br)) {
char local_name[IF_NAMESIZE];
int error;
error = dpif_port_get_name(br->dpif, ODPP_LOCAL,
local_name, sizeof local_name);
if (bridge_get_controller(ovs_cfg, br)) {
char local_name[IF_NAMESIZE];
int error;
error = dpif_port_get_name(br->dpif, ODPP_LOCAL,
local_name, sizeof local_name);
- if (!error) {
- shash_add_once(&new_ports, local_name, NULL);
+ if (!error && !shash_find(&new_ports, local_name)) {
+ VLOG_WARN("bridge %s: controller specified but no local port "
+ "(port named %s) defined",
+ br->name, local_name);
}
SHASH_FOR_EACH (node, &new_ifaces) {
const struct ovsrec_interface *if_cfg = node->data;
}
SHASH_FOR_EACH (node, &new_ifaces) {
const struct ovsrec_interface *if_cfg = node->data;
+ /* Attempt to create the network interface in case it
+ * doesn't exist yet. */
+ error = set_up_iface(if_cfg, true);
+ if (error) {
+ VLOG_WARN("could not create iface %s: %s\n", iface->name,
+ strerror(error));
+ }
+
VLOG_DBG("attached network device %s to port %s", iface->name, port->name);
bridge_flush(port->bridge);
VLOG_DBG("attached network device %s to port %s", iface->name, port->name);
bridge_flush(port->bridge);