The iface_tag name and comment implied that it was really just a copy of
the 'tag' member of struct iface, but in fact it has a completely different
purpose: it represents the binding of a bond_entry to a particular iface.
It is invalidated when the bond_entry has to be redirected to a different
iface, not when the iface itself changes. I hope that this commit helps
to clarify.
struct bond_entry {
int iface_idx; /* Index of assigned iface, or -1 if none. */
uint64_t tx_bytes; /* Count of bytes recently transmitted. */
struct bond_entry {
int iface_idx; /* Index of assigned iface, or -1 if none. */
uint64_t tx_bytes; /* Count of bytes recently transmitted. */
- tag_type iface_tag; /* Tag associated with iface_idx. */
+ tag_type tag; /* Tag for bond_entry<->iface association. */
return false;
}
e->iface_idx = iface->port_ifidx;
return false;
}
e->iface_idx = iface->port_ifidx;
- e->iface_tag = tag_create_random();
+ e->tag = tag_create_random();
iface = port->ifaces[e->iface_idx];
}
*dp_ifidx = iface->dp_ifidx;
iface = port->ifaces[e->iface_idx];
}
*dp_ifidx = iface->dp_ifidx;
to->tx_bytes += delta;
/* Arrange for flows to be revalidated. */
to->tx_bytes += delta;
/* Arrange for flows to be revalidated. */
- ofproto_revalidate(port->bridge->ofproto, hash->iface_tag);
+ ofproto_revalidate(port->bridge->ofproto, hash->tag);
hash->iface_idx = to->iface->port_ifidx;
hash->iface_idx = to->iface->port_ifidx;
- hash->iface_tag = tag_create_random();
+ hash->tag = tag_create_random();
}
entry = &port->bond_hash[hash];
}
entry = &port->bond_hash[hash];
- ofproto_revalidate(port->bridge->ofproto, entry->iface_tag);
+ ofproto_revalidate(port->bridge->ofproto, entry->tag);
entry->iface_idx = iface->port_ifidx;
entry->iface_idx = iface->port_ifidx;
- entry->iface_tag = tag_create_random();
+ entry->tag = tag_create_random();
unixctl_command_reply(conn, 200, "migrated");
}
unixctl_command_reply(conn, 200, "migrated");
}