Skip to content

Commit

Permalink
Ignore ACL_COUNTER bytes and packets during comparison logic (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Apr 8, 2019
1 parent b138ff9 commit 5486f97
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions syncd/syncd_applyview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,28 @@ class AsicView
{
std::shared_ptr<SaiAttr> attr = std::make_shared<SaiAttr>(field.first, field.second);

if (obj->getObjectType() == SAI_OBJECT_TYPE_ACL_COUNTER)
{
auto* meta = attr->getAttrMetadata();

switch (meta->attrid)
{

case SAI_ACL_COUNTER_ATTR_PACKETS:
case SAI_ACL_COUNTER_ATTR_BYTES:

// when reading asic view, ignore acl counter packets and bytes
// this will result to not compare them during comparison logic

SWSS_LOG_INFO("ignoring %s for %s", meta->attridname, obj->str_object_id.c_str());

continue;

default:
break;
}
}

obj->setAttr(attr);

/*
Expand Down

0 comments on commit 5486f97

Please sign in to comment.