It's harder to pass around a tag_set than a single tag. This simplifies
the upcoming commits that begin to restore full ovs-vswitchd functionality
on the "wdp" branch.
long long int now = time_msec();
if (sw->ml) {
- mac_learning_run(sw->ml, NULL);
+ mac_learning_run(sw->ml);
}
/* If we're waiting for more replies, keeping waiting for up to 10 s. */
}
}
-void
-mac_learning_run(struct mac_learning *ml, struct tag_set *set)
+tag_type
+mac_learning_run(struct mac_learning *ml)
{
struct mac_entry *e;
+ tag_type tags = 0;
+
while (get_lru(ml, &e) && time_now() >= e->expires) {
COVERAGE_INC(mac_learning_expired);
- if (set) {
- tag_set_add(set, e->tag);
- }
+ tags |= e->tag;
free_mac_entry(ml, e);
}
+ return tags;
}
void
uint16_t vlan, tag_type *tag,
bool *is_grat_arp_locked);
void mac_learning_flush(struct mac_learning *);
-void mac_learning_run(struct mac_learning *, struct tag_set *);
+tag_type mac_learning_run(struct mac_learning *);
void mac_learning_wait(struct mac_learning *);
#endif /* mac-learning.h */