Skip to content

Commit

Permalink
Exclude validateIngressPoolParamChange test on J3
Browse files Browse the repository at this point in the history
Summary: Exclude validateIngressPoolParamChange test on J3 as changing ingress pool size separately is not supported.

Reviewed By: jasmeetbagga

Differential Revision:
D67675210

Privacy Context Container: L1125642

fbshipit-source-id: 663efb02a5a585a9081378dca54b5f70d5df5315
  • Loading branch information
maxwindiff authored and facebook-github-bot committed Jan 3, 2025
1 parent 33cff99 commit 4ec3c94
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 29 deletions.
68 changes: 39 additions & 29 deletions fboss/agent/test/agent_hw_tests/AgentIngressBufferTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,35 +199,6 @@ TEST_F(AgentIngressBufferTest, validateConfig) {
verifyAcrossWarmBoots(setup, verify);
}

// Create PG, Ingress pool config, associate with PFC config.
// Modify the ingress pool params only and ensure that it is
// getting re-programmed
TEST_F(AgentIngressBufferTest, validateIngressPoolParamChange) {
auto setup = [&]() {
setupHelper();
auto portId = masterLogicalInterfacePortIds()[0];
auto switchId = getSw()->getScopeResolver()->scope(portId).switchId();
auto asic = getSw()->getHwAsicTable()->getHwAsic(switchId);
// setup bufferPool
std::map<std::string, cfg::BufferPoolConfig> bufferPoolCfgMap;
bufferPoolCfgMap.insert(make_pair(
static_cast<std::string>(kBufferPoolName),
getBufferPoolConfig(asic->getPacketBufferUnitSize(), 1)));
cfg_.bufferPoolConfigs() = bufferPoolCfgMap;
// update one PG, and see ifs reflected in the HW
applyNewConfig(cfg_);
};

auto verify = [&]() {
WITH_RETRIES({
EXPECT_EVENTUALLY_TRUE(checkSwHwPgCfgMatch(
masterLogicalInterfacePortIds()[0], true /*pfcEnable*/));
});
};

verifyAcrossWarmBoots(setup, verify);
}

// Create PG config, associate with PFC config. Modify the PG
// config params and ensure that its getting re-programmed.
TEST_F(AgentIngressBufferTest, validatePGParamChange) {
Expand Down Expand Up @@ -400,4 +371,43 @@ TEST_F(AgentIngressBufferTest, validatePGQueueChanges) {
verifyAcrossWarmBoots(setup, verify);
}

class AgentIngressBufferPoolTest : public AgentIngressBufferTest {
std::vector<production_features::ProductionFeature>
getProductionFeaturesVerified() const override {
auto features = AgentIngressBufferTest::getProductionFeaturesVerified();
features.push_back(production_features::ProductionFeature::
SEPARATE_INGRESS_EGRESS_BUFFER_POOL);
return features;
}
};

// Create PG, Ingress pool config, associate with PFC config.
// Modify the ingress pool params only and ensure that it is
// getting re-programmed
TEST_F(AgentIngressBufferPoolTest, validateIngressPoolParamChange) {
auto setup = [&]() {
setupHelper();
auto portId = masterLogicalInterfacePortIds()[0];
auto switchId = getSw()->getScopeResolver()->scope(portId).switchId();
auto asic = getSw()->getHwAsicTable()->getHwAsic(switchId);
// setup bufferPool
std::map<std::string, cfg::BufferPoolConfig> bufferPoolCfgMap;
bufferPoolCfgMap.insert(make_pair(
static_cast<std::string>(kBufferPoolName),
getBufferPoolConfig(asic->getPacketBufferUnitSize(), 1)));
cfg_.bufferPoolConfigs() = bufferPoolCfgMap;
// update one PG, and see ifs reflected in the HW
applyNewConfig(cfg_);
};

auto verify = [&]() {
WITH_RETRIES({
EXPECT_EVENTUALLY_TRUE(checkSwHwPgCfgMatch(
masterLogicalInterfacePortIds()[0], true /*pfcEnable*/));
});
};

verifyAcrossWarmBoots(setup, verify);
}

} // namespace facebook::fboss
1 change: 1 addition & 0 deletions fboss/agent/test/production_features.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ enum ProductionFeature {
LINERATE_SFLOW = 48,
MIRROR_ON_DROP = 49,
PAUSE = 50,
SEPARATE_INGRESS_EGRESS_BUFFER_POOL = 51,
# production feature which is present on all platforms, keep it at the end
HW_SWITCH = 65536,
}
Expand Down

0 comments on commit 4ec3c94

Please sign in to comment.