Skip to content

Commit c8ef06d

Browse files
committed
Revert changes from PR#3937
Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
1 parent 59964f7 commit c8ef06d

3 files changed

Lines changed: 0 additions & 50 deletions

File tree

orchagent/muxorch.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ void MuxCable::updateNeighborFromEvent(NextHopKey nh, bool add)
697697
{
698698
mux_orch_->removeNexthop(nh);
699699
}
700-
nbr_handler_->update(nh, tnh, add, state_);
701700
updateRoutesForNextHop(nh);
702701
}
703702

@@ -790,7 +789,6 @@ void MuxNbrHandler::update(NextHopKey nh, sai_object_id_t tunnelId, bool add, Mu
790789
}
791790

792791
gRouteOrch->updateNextHopRoutes(nh, num_routes);
793-
gNeighOrch->increaseNextHopRefCount(nh, num_routes);
794792
break;
795793
case MuxState::MUX_STATE_STANDBY:
796794
neighbors_[nh.ip_address] = tunnelId;
@@ -811,9 +809,6 @@ void MuxNbrHandler::update(NextHopKey nh, sai_object_id_t tunnelId, bool add, Mu
811809
nh.ip_address.to_string().c_str(), nh.alias.c_str());
812810
}
813811

814-
gRouteOrch->updateNextHopRoutes(nh, num_routes);
815-
gNeighOrch->decreaseNextHopRefCount(nh, num_routes);
816-
gNeighOrch->disableNeighbor(nh);
817812
updateTunnelRoute(nh, true);
818813
gRouteOrch->updateNextHopRoutes(nh, num_routes);
819814
break;
@@ -2055,26 +2050,6 @@ bool MuxOrch::handleMuxCfg(const Request& request)
20552050
(MuxCable(port_name, srv_ip, srv_ip6, mux_peer_switch_, cable_type));
20562051
addSkipNeighbors(skip_neighbors);
20572052

2058-
// Add neighbors that were learned before this mux port was configured.
2059-
NeighborTable m_neighbors;
2060-
gNeighOrch->getMuxNeighborsForPort(port_name, m_neighbors);
2061-
for (const auto &entry : m_neighbors)
2062-
{
2063-
bool nexthop_found = containsNextHop(entry.first);
2064-
bool is_skip_neighbor = isSkipNeighbor(entry.first.ip_address);
2065-
if (!nexthop_found && !is_skip_neighbor)
2066-
{
2067-
SWSS_LOG_NOTICE("Neighbor %s on %s learned before mux port %s configured. updating...",
2068-
entry.first.ip_address.to_string().c_str(),
2069-
entry.second.mac.to_string().c_str(),
2070-
port_name.c_str()
2071-
);
2072-
2073-
NeighborUpdate neighbor_update = {entry.first, entry.second.mac, 1};
2074-
updateNeighbor(neighbor_update);
2075-
}
2076-
}
2077-
20782053
SWSS_LOG_NOTICE("Mux entry for port '%s' was added, cable type %d", port_name.c_str(), cable_type);
20792054
}
20802055
else

orchagent/neighorch.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -907,30 +907,6 @@ void NeighOrch::doTask(Consumer &consumer)
907907
}
908908
}
909909

910-
/* Gets all neighbor entries tied to a given mux port */
911-
void NeighOrch::getMuxNeighborsForPort(string port_name, NeighborTable& m_neighbors)
912-
{
913-
SWSS_LOG_INFO("Getting mux neighbors on %s", port_name.c_str());
914-
915-
MuxOrch* mux_orch = gDirectory.get<MuxOrch*>();
916-
string mux_port_name;
917-
for (const auto &entry : m_syncdNeighbors)
918-
{
919-
// Check if mux port exists for given neighbor entry
920-
mux_port_name = "";
921-
if (!mux_orch->getMuxPort(entry.second.mac, entry.first.alias, mux_port_name) || mux_port_name.empty())
922-
{
923-
continue;
924-
}
925-
926-
// Add to m_neighbors if entry found
927-
if (mux_port_name == port_name)
928-
{
929-
m_neighbors.insert(entry);
930-
}
931-
}
932-
}
933-
934910
bool NeighOrch::addNeighbor(NeighborContext& ctx)
935911
{
936912
SWSS_LOG_ENTER();

orchagent/neighorch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class NeighOrch : public Orch, public Subject, public Observer
107107
void resolveNeighbor(const NeighborEntry &);
108108
void updateSrv6Nexthop(const NextHopKey &, const sai_object_id_t &);
109109
bool ifChangeInformRemoteNextHop(const string &, bool);
110-
void getMuxNeighborsForPort(string port_name, NeighborTable &m_neighbors);
111110

112111
private:
113112
PortsOrch *m_portsOrch;

0 commit comments

Comments
 (0)