Skip to content

Commit f53f9e9

Browse files
committed
Add comment for fdb sync up processing
Signed-off-by: Jipan Yang <[email protected]>
1 parent 140e6d7 commit f53f9e9

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

orchagent/fdborch.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ FdbOrch::FdbOrch(DBConnector *db, string tableName, PortsOrch *port) :
3636
Orch::addExecutor("FDB_NOTIFICATIONS", fdbNotifier);
3737
}
3838

39+
/*
40+
* sync up orchagent with libsai/ASIC for FDB entries.
41+
*
42+
* Currently NotificationProducer is used by syncd to inform FDB change,
43+
* which means orchagent will miss the signal if it happens between orchagent shutdown and startup.
44+
* Syncd doesn't know whether the signal has been lost or not.
45+
* Also the source of notification event is from libsai/SDK.
46+
*
47+
* Syncd puts a copy of FDB into ASIC DB the moment it generates FDB notification.
48+
* Here orchagent reads the data directly from ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY
49+
*/
3950
void FdbOrch::syncUpFdb()
4051
{
4152
SWSS_LOG_ENTER();
@@ -92,7 +103,8 @@ void FdbOrch::update(sai_fdb_event_t type, const sai_fdb_entry_t* entry, sai_obj
92103
return;
93104
}
94105

95-
if (m_entries.count(update.entry) != 0) // we already have such entries
106+
// we already have such entries
107+
if (m_entries.count(update.entry) != 0)
96108
{
97109
SWSS_LOG_INFO("FdbOrch notification: mac %s is already in bv_id 0x%lx",
98110
update.entry.mac.to_string().c_str(), entry->bv_id);

0 commit comments

Comments
 (0)