From 5486f975f552b2b26bba4116ce5bd6a435413f30 Mon Sep 17 00:00:00 2001 From: Kamil Cudnik Date: Mon, 8 Apr 2019 22:24:54 +0200 Subject: [PATCH] Ignore ACL_COUNTER bytes and packets during comparison logic (#443) --- syncd/syncd_applyview.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/syncd/syncd_applyview.cpp b/syncd/syncd_applyview.cpp index c72cafbcff25..9fea14f68c3e 100644 --- a/syncd/syncd_applyview.cpp +++ b/syncd/syncd_applyview.cpp @@ -1656,6 +1656,28 @@ class AsicView { std::shared_ptr attr = std::make_shared(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); /*