Skip to content

Commit 20dde0c

Browse files
authored
Fix for handling broadcom DNX ASIC to have ipv4 and ipv6 ACL rules in separate tables. (sonic-net#2178)
Use the sub_platform env variable which is populated via swss_vars and sonic_version.yml
1 parent 5b7c949 commit 20dde0c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

orchagent/aclorch.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -2645,6 +2645,7 @@ void AclOrch::init(vector<TableConnector>& connectors, PortsOrch *portOrch, Mirr
26452645
// Broadcom and Mellanox. Virtual switch is also supported for testing
26462646
// purposes.
26472647
string platform = getenv("platform") ? getenv("platform") : "";
2648+
string sub_platform = getenv("sub_platform") ? getenv("sub_platform") : "";
26482649
if (platform == BRCM_PLATFORM_SUBSTRING ||
26492650
platform == CISCO_8000_PLATFORM_SUBSTRING ||
26502651
platform == MLNX_PLATFORM_SUBSTRING ||
@@ -2676,9 +2677,11 @@ void AclOrch::init(vector<TableConnector>& connectors, PortsOrch *portOrch, Mirr
26762677
m_mirrorTableCapabilities[TABLE_TYPE_MIRRORV6] ? "yes" : "no");
26772678

26782679
// In Mellanox platform, V4 and V6 rules are stored in different tables
2680+
// In Broadcom DNX platform also, V4 and V6 rules are stored in different tables
26792681
if (platform == MLNX_PLATFORM_SUBSTRING ||
26802682
platform == CISCO_8000_PLATFORM_SUBSTRING ||
2681-
platform == MRVL_PLATFORM_SUBSTRING)
2683+
platform == MRVL_PLATFORM_SUBSTRING ||
2684+
(platform == BRCM_PLATFORM_SUBSTRING && sub_platform == BRCM_DNX_PLATFORM_SUBSTRING))
26822685
{
26832686
m_isCombinedMirrorV6Table = false;
26842687
}

orchagent/orch.h

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const char state_db_key_delimiter = '|';
3434
#define INVM_PLATFORM_SUBSTRING "innovium"
3535
#define MLNX_PLATFORM_SUBSTRING "mellanox"
3636
#define BRCM_PLATFORM_SUBSTRING "broadcom"
37+
#define BRCM_DNX_PLATFORM_SUBSTRING "broadcom-dnx"
3738
#define BFN_PLATFORM_SUBSTRING "barefoot"
3839
#define VS_PLATFORM_SUBSTRING "vs"
3940
#define NPS_PLATFORM_SUBSTRING "nephos"

0 commit comments

Comments
 (0)