{
if (iface->xf_ifidx >= 0) {
VLOG_DBG("%s has interface %s on port %d",
{
if (iface->xf_ifidx >= 0) {
VLOG_DBG("%s has interface %s on port %d",
iface->name, iface->xf_ifidx);
return true;
} else {
VLOG_ERR("%s interface not in %s, dropping",
iface->name, iface->xf_ifidx);
return true;
} else {
VLOG_ERR("%s interface not in %s, dropping",
* that port already belongs to a different datapath, so we must do all
* port deletions before any port additions. */
LIST_FOR_EACH (br, node, &all_bridges) {
* that port already belongs to a different datapath, so we must do all
* port deletions before any port additions. */
LIST_FOR_EACH (br, node, &all_bridges) {
if (!shash_find(&want_ifaces, p->devname)
&& strcmp(p->devname, br->name)) {
if (!shash_find(&want_ifaces, p->devname)
&& strcmp(p->devname, br->name)) {
struct shash cur_ifaces, want_ifaces;
/* Get the set of interfaces currently in this datapath. */
struct shash cur_ifaces, want_ifaces;
/* Get the set of interfaces currently in this datapath. */
/* Get the set of interfaces we want on this datapath. */
bridge_get_all_ifaces(br, &want_ifaces);
/* Get the set of interfaces we want on this datapath. */
bridge_get_all_ifaces(br, &want_ifaces);
- error = xfif_port_add(br->xfif, if_name,
- internal ? XFLOW_PORT_INTERNAL : 0, NULL);
+ error = wdp_port_add(br->wdp, if_name, internal, NULL);
error = ofproto_create(br_cfg->name, br_cfg->datapath_type, &bridge_ofhooks,
br, &br->ofproto);
if (error) {
VLOG_ERR("failed to create switch %s: %s", br_cfg->name,
strerror(error));
error = ofproto_create(br_cfg->name, br_cfg->datapath_type, &bridge_ofhooks,
br, &br->ofproto);
if (error) {
VLOG_ERR("failed to create switch %s: %s", br_cfg->name,
strerror(error));
if (error && error != ENOENT) {
VLOG_ERR("failed to delete %s: %s",
if (error && error != ENOENT) {
VLOG_ERR("failed to delete %s: %s",
ofproto_destroy(br->ofproto);
mac_learning_destroy(br->ml);
hmap_destroy(&br->ifaces);
ofproto_destroy(br->ofproto);
mac_learning_destroy(br->ml);
hmap_destroy(&br->ifaces);
*
* XXX perhaps we should synthesize a port ourselves in this case. */
if (bridge_get_controllers(br, NULL)) {
*
* XXX perhaps we should synthesize a port ourselves in this case. */
if (bridge_get_controllers(br, NULL)) {
- error = xfif_port_get_name(br->xfif, XFLOWP_LOCAL,
- local_name, sizeof local_name);
+ error = wdp_port_get_name(br->wdp, OFPP_LOCAL, &local_name);
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);
}
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);
}
- xfif_port_list(br->xfif, &xfif_ports, &n_xfif_ports);
- for (i = 0; i < n_xfif_ports; i++) {
- struct xflow_port *p = &xfif_ports[i];
+ wdp_port_list(br->wdp, &wdp_ports, &n_wdp_ports);
+ for (i = 0; i < n_wdp_ports; i++) {
+ struct wdp_port *p = &wdp_ports[i];
struct iface *iface = iface_lookup(br, p->devname);
if (iface) {
if (iface->xf_ifidx >= 0) {
VLOG_WARN("%s reported interface %s twice",
struct iface *iface = iface_lookup(br, p->devname);
if (iface) {
if (iface->xf_ifidx >= 0) {
VLOG_WARN("%s reported interface %s twice",
- xfif_name(br->xfif), p->devname);
- } else if (iface_from_xf_ifidx(br, p->port)) {
+ wdp_name(br->wdp), p->devname);
+ } else if (iface_from_xf_ifidx(
+ br, ofp_port_to_xflow_port(p->opp.port_no))) {
hmap_insert(&br->ifaces, &iface->xf_ifidx_node,
hash_int(iface->xf_ifidx, 0));
}
if (iface->cfg) {
hmap_insert(&br->ifaces, &iface->xf_ifidx_node,
hash_int(iface->xf_ifidx, 0));
}
if (iface->cfg) {