Skip to content

Commit

Permalink
Merge "if any label Change for the bridge route happen rebake for the…
Browse files Browse the repository at this point in the history
… label is not happening due to that always pointing to old label. Added Changes to handle the label change upon bridge route notify." into R3.2
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 23, 2016
2 parents 94e7fa8 + 80b06fb commit fdeeb68
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions src/vnsw/agent/oper/mirror_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ bool MirrorTable::UnresolvedMirrorVrf(const VrfEntry *vrf,
}
// if the Unresolved remote mac is present it will return the entry
MirrorEntry*
MirrorTable::UnresolvedMirrorEntry(VrfEntry *vrf, const MacAddress & mac,
MirrorTable::GetMirrorEntry(VrfEntry *vrf, const MacAddress & mac,
VrfMirrorEntryList &list) {
VrfMirrorEntryList::iterator it = list.find(vrf->GetName());
if (it == list.end()) {
Expand All @@ -471,13 +471,22 @@ void MirrorTable::BridgeRouteTableNotify(DBTablePartBase *partition,
if (bridge_rt->IsDeleted()) {
ResyncResolvedMirrorEntry(bridge_rt->vrf());
} else {
MirrorEntry *mirror_entry = UnresolvedMirrorEntry(bridge_rt->vrf(),
bridge_rt->mac(),
unresolved_entry_list_);
if (mirror_entry &&
mirror_entry->mirror_flags_ ==
MirrorEntry *unresolved_mirror_entry = GetMirrorEntry(bridge_rt->vrf(),
bridge_rt->mac(),
unresolved_entry_list_);
MirrorEntry *resolved_mirror_entry = GetMirrorEntry(bridge_rt->vrf(),
bridge_rt->mac(),
resolved_entry_list_);
// Check for Both resolved and unresolved list for Change in route
if (unresolved_mirror_entry &&
unresolved_mirror_entry->mirror_flags_ ==
MirrorEntryData::DynamicNH_Without_JuniperHdr) {
ResyncUnresolvedMirrorEntry(bridge_rt->vrf());
} else if (resolved_mirror_entry &&
((resolved_mirror_entry->vni_ != bridge_rt->GetActiveLabel()) ||
(resolved_mirror_entry->nh_ !=
bridge_rt->GetActivePath()->nexthop()))) {
ResyncResolvedMirrorEntry(bridge_rt->vrf());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/vnsw/agent/oper/mirror_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ class MirrorTable : public AgentDBTable {
void UnRegisterBridgeRouteTableListener(const VrfEntry *entry,
MirrorVrfState *state);
bool UnresolvedMirrorVrf(const VrfEntry *vrf, VrfMirrorEntryList &list);
MirrorEntry* UnresolvedMirrorEntry(VrfEntry *vrf, const MacAddress & mac,
VrfMirrorEntryList &list);
MirrorEntry* GetMirrorEntry(VrfEntry *vrf, const MacAddress & mac,
VrfMirrorEntryList &list);
static MirrorEntryData::MirrorEntryFlags
DecodeMirrorFlag (const std::string &nh_mode, bool juniper_header);
void DeleteMirrorVrf(MirrorEntry *entry);
Expand Down

0 comments on commit fdeeb68

Please sign in to comment.