From 3b4b653713b33ebabf779d1f9f5be37e1079dd0b Mon Sep 17 00:00:00 2001 From: Nadiia Stetskovych Date: Wed, 7 Feb 2024 01:41:20 +0200 Subject: [PATCH] Do not read bytes ACL stat for Yuba Asic Signed-off-by: Nadiia Stetskovych --- .../test/dataplane_tests/HwAclCounterTests.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/fboss/agent/hw/test/dataplane_tests/HwAclCounterTests.cpp b/fboss/agent/hw/test/dataplane_tests/HwAclCounterTests.cpp index f091ad69666e5..d5374b9ec6434 100644 --- a/fboss/agent/hw/test/dataplane_tests/HwAclCounterTests.cpp +++ b/fboss/agent/hw/test/dataplane_tests/HwAclCounterTests.cpp @@ -167,17 +167,23 @@ class HwAclCounterTest : public HwLinkStateDependentTest { EXPECT_EVENTUALLY_GE(aclPktCountAfter, aclPktCountBefore + 1); // At most we should get a pkt bump of 2 EXPECT_EVENTUALLY_LE(aclPktCountAfter, aclPktCountBefore + 2); - EXPECT_EVENTUALLY_GE( - aclBytesCountAfter, aclBytesCountBefore + sizeOfPacketSent); + if (getAsic()->getAsicType() != cfg::AsicType::ASIC_TYPE_YUBA) { + EXPECT_EVENTUALLY_GE( + aclBytesCountAfter, aclBytesCountBefore + sizeOfPacketSent); + } // On native BCM we see 4 extra bytes in the acl counter. This is // likely due to ingress vlan getting imposed and getting counted // when packet hits acl in ingress pipeline - EXPECT_EVENTUALLY_LE( - aclBytesCountAfter, - aclBytesCountBefore + (2 * sizeOfPacketSent) + 4); + if (getAsic()->getAsicType() != cfg::AsicType::ASIC_TYPE_YUBA) { + EXPECT_EVENTUALLY_LE( + aclBytesCountAfter, + aclBytesCountBefore + (2 * sizeOfPacketSent) + 4); + } } else { EXPECT_EVENTUALLY_EQ(aclPktCountBefore, aclPktCountAfter); - EXPECT_EVENTUALLY_EQ(aclBytesCountBefore, aclBytesCountAfter); + if (getAsic()->getAsicType() != cfg::AsicType::ASIC_TYPE_YUBA) { + EXPECT_EVENTUALLY_EQ(aclBytesCountBefore, aclBytesCountAfter); + } } }); };