\f
/* Public functions. */
-/* xxx Temporary to get around "." delimiter ovs-vswitchd.conf problem in
- * xxx port.c. */
+/* Adds the name of each interface used by a bridge, including local and
+ * internal ports, to 'svec'. */
void
bridge_get_ifaces(struct svec *svec)
{
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 robustness, in case the administrator moves around datapath ports behind
- * our back, we re-check all the datapath port numbers here. */
+ * our back, we re-check all the datapath port numbers here.
+ *
+ * This function will set the 'dp_ifidx' members of interfaces that have
+ * disappeared to -1, so only call this function from a context where those
+ * 'struct iface's will be removed from the bridge. Otherwise, the -1
+ * 'dp_ifidx'es will cause trouble later when we try to send them to the
+ * datapath, which doesn't support UINT16_MAX+1 ports. */
static void
bridge_fetch_dp_ifaces(struct bridge *br)
{