Skip to content

Commit

Permalink
Merge "Hash parameters not reflected in route sometimes."
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 1, 2016
2 parents 552dad3 + df8c506 commit 76f64fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/vnsw/agent/controller/controller_peer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ void AgentXmppChannel::ReceiveV4V6Update(XmlPugi *pugi) {

static void GetEcmpHashFieldsToUse(ItemType *item,
EcmpLoadBalance &ecmp_load_balance) {
ecmp_load_balance.ResetAll();
if (item->entry.load_balance.load_balance_decision.empty() ||
item->entry.load_balance.load_balance_decision !=
LoadBalanceDecision)
Expand Down
8 changes: 8 additions & 0 deletions src/vnsw/agent/oper/ecmp_load_balance.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ class EcmpLoadBalance {
}
}

void ResetAll() {
for (uint8_t field_type = ((uint8_t) EcmpLoadBalance::SOURCE_MAC);
field_type < ((uint8_t) EcmpLoadBalance::NUM_HASH_FIELDS);
field_type++) {
hash_fields_to_use_[field_type] = false;
}
}

bool AllSet() const {
for (uint8_t field_type = ((uint8_t) EcmpLoadBalance::SOURCE_MAC);
field_type < ((uint8_t) EcmpLoadBalance::NUM_HASH_FIELDS);
Expand Down

0 comments on commit 76f64fb

Please sign in to comment.