Skip to content

Commit

Permalink
skip sflow tests for chenab
Browse files Browse the repository at this point in the history
Summary:
no support of sflow in chenab

TODO: tests to verify erspan sampling needs to be added

Differential Revision:
D67225627

Privacy Context Container: L1125642

fbshipit-source-id: 612bbbd9480b580f537fb8e7ffe44830fcd94445
  • Loading branch information
Parvez Shaikh authored and facebook-github-bot committed Dec 18, 2024
1 parent d4a6785 commit e106a24
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fboss/agent/hw/switch_asics/ChenabAsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ bool ChenabAsic::isSupportedNonFabric(Feature feature) const {
*/
case HwAsic::Feature::SPAN:
case HwAsic::Feature::ERSPANv4:
case HwAsic::Feature::SFLOWv4:
case HwAsic::Feature::ERSPANv6:
case HwAsic::Feature::SFLOWv6:
case HwAsic::Feature::ECN:
case HwAsic::Feature::QOS_MAP_GLOBAL:
case HwAsic::Feature::SMAC_EQUALS_DMAC_CHECK_ENABLED:
case HwAsic::Feature::WEIGHTED_NEXTHOPGROUP_MEMBER:
case HwAsic::Feature::SAI_WEIGHTED_NEXTHOPGROUP_MEMBER:
case HwAsic::Feature::BUFFER_POOL:
case HwAsic::Feature::MIRROR_PACKET_TRUNCATION:
case HwAsic::Feature::SFLOW_SAMPLING:
case HwAsic::Feature::SAI_ECN_WRED:
case HwAsic::Feature::MAC_AGING:
case HwAsic::Feature::TELEMETRY_AND_MONITORING:
Expand Down Expand Up @@ -199,6 +196,9 @@ bool ChenabAsic::isSupportedNonFabric(Feature feature) const {
case HwAsic::Feature::FDR_FIFO_WATERMARK:
case HwAsic::Feature::EGRESS_CELL_ERROR_STATS:
case HwAsic::Feature::CPU_QUEUE_WATERMARK_STATS:
case HwAsic::Feature::SFLOWv4:
case HwAsic::Feature::SFLOWv6:
case HwAsic::Feature::SFLOW_SAMPLING:
return false;
}
return false;
Expand Down
5 changes: 3 additions & 2 deletions fboss/agent/hw/test/HwMirrorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "fboss/agent/hw/test/HwTestMirrorUtils.h"

#include <gtest/gtest.h>
#include "fboss/agent/gen-cpp2/switch_config_constants.h"
#include "fboss/agent/hw/switch_asics/HwAsic.h"
#include "fboss/agent/hw/test/ConfigFactory.h"
Expand Down Expand Up @@ -480,7 +481,7 @@ TYPED_TEST(HwMirrorTest, HwResolvedMirrorStat) {
EXPECT_EQ(*stats.mirrors_erspan(), 1);
EXPECT_EQ(*stats.mirrors_sflow(), 1);
};
if (this->skipMirrorTest()) {
if (this->skipMirrorTest() || this->skipSflowTest()) {
#if defined(GTEST_SKIP)
GTEST_SKIP();
#endif
Expand Down Expand Up @@ -557,7 +558,7 @@ TYPED_TEST(HwMirrorTest, HwUnresolvedMirrorStat) {
EXPECT_EQ(*stats.mirrors_erspan(), 0);
EXPECT_EQ(*stats.mirrors_sflow(), 0);
};
if (this->skipMirrorTest()) {
if (this->skipMirrorTest() || this->skipSflowTest()) {
#if defined(GTEST_SKIP)
GTEST_SKIP();
#endif
Expand Down
8 changes: 8 additions & 0 deletions fboss/agent/hw/test/dataplane_tests/HwSflowTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "fboss/agent/test/EcmpSetupHelper.h"

#include <folly/IPAddress.h>
#include <gtest/gtest.h>

namespace facebook::fboss {

Expand Down Expand Up @@ -101,6 +102,13 @@ class HwSflowTest : public HwLinkStateDependentTest {
}
EXPECT_EQ(expectedSampledPackets, sampledPackets);
};
if (!getHwSwitch()->getPlatform()->getAsic()->isSupported(
HwAsic::Feature::SFLOWv6)) {
#if defined(GTEST_SKIP)
GTEST_SKIP();
#endif
return;
}
verifyAcrossWarmBoots(setup, verify);
}

Expand Down

0 comments on commit e106a24

Please sign in to comment.