Skip to content

Commit

Permalink
when acl table group is enabled, create default acl table group and a…
Browse files Browse the repository at this point in the history
…cl table

Summary: as titled

Differential Revision: D61354484

fbshipit-source-id: 270bfd14be0cf81f340b0eee504453eef83663f6
  • Loading branch information
Parvez Shaikh authored and facebook-github-bot committed Aug 16, 2024
1 parent 4c27a15 commit e17b195
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions fboss/agent/test/utils/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ cpp_library(
],
headers = ["ConfigUtils.h"],
exported_deps = [
":acl_test_utils",
":asic_test_utils",
":port_test_utils",
"//fboss/agent:agent_features",
Expand Down
6 changes: 6 additions & 0 deletions fboss/agent/test/utils/ConfigUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "fboss/agent/FbossError.h"
#include "fboss/agent/SwSwitch.h"
#include "fboss/agent/test/TestEnsembleIf.h"
#include "fboss/agent/test/utils/AclTestUtils.h"
#include "fboss/agent/test/utils/AsicUtils.h"
#include "fboss/agent/test/utils/PortTestUtils.h"
#include "fboss/lib/config/PlatformConfigUtils.h"
Expand Down Expand Up @@ -701,6 +702,11 @@ cfg::SwitchConfig genPortVlanCfg(
const std::optional<std::map<SwitchID, const HwAsic*>>& hwAsicTable,
const std::optional<PlatformType> platformType) {
cfg::SwitchConfig config;
if (FLAGS_enable_acl_table_group) {
utility::addAclTableGroup(
&config, cfg::AclStage::INGRESS, utility::getAclTableGroupName());
utility::addDefaultAclTable(config);
}
if (switchIdToSwitchInfo.has_value() && hwAsicTable.has_value()) {
populateSwitchInfo(
config,
Expand Down

0 comments on commit e17b195

Please sign in to comment.