Skip to content

Commit 5486f97

Browse files
authored
Ignore ACL_COUNTER bytes and packets during comparison logic (#443)
1 parent b138ff9 commit 5486f97

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

syncd/syncd_applyview.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,28 @@ class AsicView
16561656
{
16571657
std::shared_ptr<SaiAttr> attr = std::make_shared<SaiAttr>(field.first, field.second);
16581658

1659+
if (obj->getObjectType() == SAI_OBJECT_TYPE_ACL_COUNTER)
1660+
{
1661+
auto* meta = attr->getAttrMetadata();
1662+
1663+
switch (meta->attrid)
1664+
{
1665+
1666+
case SAI_ACL_COUNTER_ATTR_PACKETS:
1667+
case SAI_ACL_COUNTER_ATTR_BYTES:
1668+
1669+
// when reading asic view, ignore acl counter packets and bytes
1670+
// this will result to not compare them during comparison logic
1671+
1672+
SWSS_LOG_INFO("ignoring %s for %s", meta->attridname, obj->str_object_id.c_str());
1673+
1674+
continue;
1675+
1676+
default:
1677+
break;
1678+
}
1679+
}
1680+
16591681
obj->setAttr(attr);
16601682

16611683
/*

0 commit comments

Comments
 (0)