@@ -44,6 +44,10 @@ IntfMgr::IntfMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, c
44
44
{
45
45
// Build the interface list to be replayed to Kernel
46
46
buildIntfReplayList ();
47
+ if (m_pendingReplayIntfList.empty ())
48
+ {
49
+ setWarmReplayDoneState ();
50
+ }
47
51
}
48
52
}
49
53
@@ -191,16 +195,25 @@ void IntfMgr::buildIntfReplayList(void)
191
195
192
196
m_cfgLoopbackIntfTable.getKeys (intfList);
193
197
std::copy ( intfList.begin (), intfList.end (), std::inserter ( m_pendingReplayIntfList, m_pendingReplayIntfList.end () ) );
194
-
198
+
195
199
m_cfgVlanIntfTable.getKeys (intfList);
196
200
std::copy ( intfList.begin (), intfList.end (), std::inserter ( m_pendingReplayIntfList, m_pendingReplayIntfList.end () ) );
197
-
201
+
198
202
m_cfgLagIntfTable.getKeys (intfList);
199
203
std::copy ( intfList.begin (), intfList.end (), std::inserter ( m_pendingReplayIntfList, m_pendingReplayIntfList.end () ) );
200
204
201
205
SWSS_LOG_INFO (" Found %d Total Intfs to be replayed" , (int )m_pendingReplayIntfList.size () );
202
206
}
203
207
208
+ void IntfMgr::setWarmReplayDoneState ()
209
+ {
210
+ m_replayDone = true ;
211
+ WarmStart::setWarmStartState (" intfmgrd" , WarmStart::REPLAYED);
212
+ // There is no operation to be performed for intfmgr reconcillation
213
+ // Hence mark it reconciled right away
214
+ WarmStart::setWarmStartState (" intfmgrd" , WarmStart::RECONCILED);
215
+ }
216
+
204
217
bool IntfMgr::isIntfCreated (const string &alias)
205
218
{
206
219
vector<FieldValueTuple> temp;
@@ -705,7 +718,6 @@ bool IntfMgr::doIntfAddrTask(const vector<string>& keys,
705
718
void IntfMgr::doTask (Consumer &consumer)
706
719
{
707
720
SWSS_LOG_ENTER ();
708
- static bool replayDone = false ;
709
721
710
722
string table_name = consumer.getTableName ();
711
723
@@ -761,13 +773,9 @@ void IntfMgr::doTask(Consumer &consumer)
761
773
762
774
it = consumer.m_toSync .erase (it);
763
775
}
764
-
765
- if (!replayDone && WarmStart::isWarmStart () && m_pendingReplayIntfList.empty () )
776
+
777
+ if (!m_replayDone && WarmStart::isWarmStart () && m_pendingReplayIntfList.empty () )
766
778
{
767
- replayDone = true ;
768
- WarmStart::setWarmStartState (" intfmgrd" , WarmStart::REPLAYED);
769
- // There is no operation to be performed for intfmgr reconcillation
770
- // Hence mark it reconciled right away
771
- WarmStart::setWarmStartState (" intfmgrd" , WarmStart::RECONCILED);
779
+ setWarmReplayDoneState ();
772
780
}
773
781
}
0 commit comments