struct hmap bundles; /* Contains "struct ofbundle"s. */
struct mac_learning *ml;
bool has_bonded_bundles;
+ bool lacp_enabled;
struct mbridge *mbridge;
/* Facets. */
ofproto->ml = mac_learning_create(MAC_ENTRY_DEFAULT_IDLE_TIME);
ofproto->mbridge = mbridge_create();
ofproto->has_bonded_bundles = false;
+ ofproto->lacp_enabled = false;
ovs_mutex_init(&ofproto->stats_mutex);
ovs_mutex_init(&ofproto->vsp_mutex);
run(struct ofproto *ofproto_)
{
struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
- struct ofbundle *bundle;
uint64_t new_seq;
int error;
ofproto->change_seq = new_seq;
}
- HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
- bundle_run(bundle);
+ if (ofproto->lacp_enabled || ofproto->has_bonded_bundles) {
+ struct ofbundle *bundle;
+
+ HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
+ bundle_run(bundle);
+ }
}
stp_run(ofproto);
wait(struct ofproto *ofproto_)
{
struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
- struct ofbundle *bundle;
if (ofproto_get_flow_restore_wait()) {
return;
if (ofproto->ipfix) {
dpif_ipfix_wait(ofproto->ipfix);
}
- HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
- bundle_wait(bundle);
+ if (ofproto->lacp_enabled || ofproto->has_bonded_bundles) {
+ struct ofbundle *bundle;
+
+ HMAP_FOR_EACH (bundle, hmap_node, &ofproto->bundles) {
+ bundle_wait(bundle);
+ }
}
if (ofproto->netflow) {
netflow_wait(ofproto->netflow);
/* LACP. */
if (s->lacp) {
+ ofproto->lacp_enabled = true;
if (!bundle->lacp) {
ofproto->backer->need_revalidate = REV_RECONFIGURE;
bundle->lacp = lacp_create();