rib: consolidate RibManager::FaceIdSet into Rib
refs #4731
Change-Id: Ic78f44e8a504ebf1490dfc1ee4f0fe6cbc7135d0
diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index ea848f8..f842edc 100644
--- a/daemon/rib/rib.hpp
+++ b/daemon/rib/rib.hpp
@@ -62,7 +62,6 @@
typedef std::list<shared_ptr<RibEntry>> RibEntryList;
typedef std::map<Name, shared_ptr<RibEntry>> RibTable;
typedef RibTable::const_iterator const_iterator;
- typedef std::map<uint64_t, std::list<shared_ptr<RibEntry>>> FaceLookupTable;
typedef bool (*RouteComparePredicate)(const Route&, const Route&);
typedef std::set<Route, RouteComparePredicate> RouteSet;
@@ -135,6 +134,9 @@
beginRemoveFace(uint64_t faceId);
void
+ beginRemoveFailedFaces(const std::set<uint64_t>& activeFaceIds);
+
+ void
onFibUpdateSuccess(const RibUpdateBatch& batch,
const RibUpdateList& inheritedRoutes,
const Rib::UpdateSuccessCallback& onSuccess);
@@ -150,6 +152,9 @@
insert(const Name& prefix, const Route& route);
private:
+ void
+ enqueueRemoveFace(const RibEntry& entry, uint64_t faceId);
+
/** \brief adds the passed update to a RibUpdateBatch and adds the batch to
* the end of the update queue.
*
@@ -219,12 +224,6 @@
void
modifyInheritedRoutes(const RibUpdateList& inheritedRoutes);
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
- using NameAndRoute = std::pair<const Name&, const Route&>;
-
- std::list<NameAndRoute>
- findRoutesWithFaceId(uint64_t faceId);
-
public:
/** \brief signals after a RIB entry is inserted
*
@@ -251,7 +250,7 @@
private:
RibTable m_rib;
- FaceLookupTable m_faceMap;
+ std::multimap<uint64_t, shared_ptr<RibEntry>> m_faceEntries; ///< FaceId => Entry with Route on this face
FibUpdater* m_fibUpdater;
size_t m_nItems;