@@ -269,7 +269,7 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::registerInWdDb(const Port& port,
269
269
270
270
if (!c_portStatIds.empty ())
271
271
{
272
- string key = sai_serialize_object_id (port.m_port_id ) + " :" + std::to_string (INT_MAX );
272
+ string key = sai_serialize_object_id (port.m_port_id ) + " :" + std::to_string (m_pollInterval );
273
273
vector<FieldValueTuple> fieldValues;
274
274
string str = counterIdsToStr (c_portStatIds, &sai_serialize_port_stat);
275
275
fieldValues.emplace_back (PFC_WD_PORT_COUNTER_ID_LIST, str);
@@ -318,7 +318,7 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::registerInWdDb(const Port& port,
318
318
// Create internal entry
319
319
m_entryMap.emplace (queueId, PfcWdQueueEntry (action, port.m_port_id , i));
320
320
321
- string key = queueIdStr + " :" + std::to_string (INT_MAX );
321
+ string key = queueIdStr + " :" + std::to_string (m_pollInterval );
322
322
323
323
m_pfcWdTable->set (key, queueFieldValues);
324
324
@@ -337,7 +337,7 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::unregisterFromWdDb(const Port& po
337
337
for (uint8_t i = 0 ; i < PFC_WD_TC_MAX; i++)
338
338
{
339
339
sai_object_id_t queueId = port.m_queue_ids [i];
340
- string key = sai_serialize_object_id (queueId) + " :" + std::to_string (INT_MAX );
340
+ string key = sai_serialize_object_id (queueId) + " :" + std::to_string (m_pollInterval );
341
341
342
342
// Unregister in syncd
343
343
m_pfcWdTable->del (key);
@@ -358,7 +358,8 @@ PfcWdSwOrch<DropHandler, ForwardHandler>::PfcWdSwOrch(
358
358
m_pfcWdTable(new ProducerStateTable(m_pfcWdDb.get(), PFC_WD_STATE_TABLE)),
359
359
c_portStatIds(portStatIds),
360
360
c_queueStatIds(queueStatIds),
361
- c_queueAttrIds(queueAttrIds)
361
+ c_queueAttrIds(queueAttrIds),
362
+ m_pollInterval(pollInterval)
362
363
{
363
364
SWSS_LOG_ENTER ();
364
365
@@ -389,8 +390,10 @@ PfcWdSwOrch<DropHandler, ForwardHandler>::PfcWdSwOrch(
389
390
fieldValues.emplace_back (SAI_OBJECT_TYPE, sai_serialize_object_type (SAI_OBJECT_TYPE_QUEUE));
390
391
391
392
auto pluginTable = ProducerStateTable (m_pfcWdDb.get (), PLUGIN_TABLE);
392
- pluginTable.set (detectSha, fieldValues);
393
- pluginTable.set (restoreSha, fieldValues);
393
+ string detectShaKey = detectSha + " :" + std::to_string (m_pollInterval);
394
+ string restoreShaKey = restoreSha + " :" + std::to_string (m_pollInterval);
395
+ pluginTable.set (detectShaKey, fieldValues);
396
+ pluginTable.set (restoreShaKey, fieldValues);
394
397
}
395
398
catch (...)
396
399
{
0 commit comments