The bonding code neglected to call netdev_monitor_poll() on its
monitor during bond_run(). Thus carrier changes would be
permanently queued in the monitor, preventing it from ever allowing
poll_loop to sleep.
bond->miimon_next_update = time_msec() + bond->miimon_interval;
}
+ if (bond->monitor) {
+ netdev_monitor_flush(bond->monitor);
+ }
+
/* Enable slaves based on link status and LACP feedback. */
HMAP_FOR_EACH (slave, hmap_node, &bond->slaves) {
bond_link_status_update(slave, tags);
}
}
+/* Clears all notifications from 'monitor'. May be called instead of
+ * netdev_monitor_poll() by clients which don't care specifically which netdevs
+ * have changed. */
+void
+netdev_monitor_flush(struct netdev_monitor *monitor)
+{
+ sset_clear(&monitor->changed_netdevs);
+}
+
/* Registers with the poll loop to wake up from the next call to poll_block()
* when netdev_monitor_poll(monitor) would indicate that a device has
* changed. */
int netdev_monitor_add(struct netdev_monitor *, struct netdev *);
void netdev_monitor_remove(struct netdev_monitor *, struct netdev *);
int netdev_monitor_poll(struct netdev_monitor *, char **devnamep);
+void netdev_monitor_flush(struct netdev_monitor *);
void netdev_monitor_poll_wait(const struct netdev_monitor *);
#ifdef __cplusplus