Description
AclOrch::init() decides whether the MIRRORV6 (IPv6 mirror) ACL table type is supported from a hardcoded list of platform strings, with a long-standing // TODO: Query SAI to get mirror table capabilities:
// TODO: Query SAI to get mirror table capabilities
if (platform == BRCM_PLATFORM_SUBSTRING ||
platform == CISCO_8000_PLATFORM_SUBSTRING ||
platform == MLNX_PLATFORM_SUBSTRING ||
... ||
platform == VS_PLATFORM_SUBSTRING)
{
m_mirrorTableCapabilities = { { TABLE_TYPE_MIRROR, true }, { TABLE_TYPE_MIRRORV6, true } };
}
else
{
m_mirrorTableCapabilities = { { TABLE_TYPE_MIRROR, true }, { TABLE_TYPE_MIRRORV6, false } };
}
A new ASIC whose SAI does support IPv6 ACL match fields is therefore reported as not supporting MIRRORV6 until its platform string is manually added to this list. This is the same hardcoding anti-pattern being removed elsewhere in AclOrch (e.g. ACL table match-field / group-type / member-priority capabilities).
Steps to reproduce the issue
- Bring up SONiC on a platform that supports IPv6 ACL mirroring but whose
platform string is not in the hardcoded list above.
- Attempt to create a
MIRRORV6 ACL table.
AclOrch reports TABLE_TYPE_MIRRORV6: no and the table type is unavailable, even though the ASIC/SAI supports it.
Describe the results you received
MIRRORV6 support is gated purely on a static platform-string allow-list; capable platforms not on the list cannot use IPv6 mirror ACL tables.
Describe the results you expected
MIRRORV6 capability should be derived from SAI (the IPv6 ACL match-field create capability), so any platform whose SAI reports support can use the table, independent of a hardcoded list.
Additional information you deem important
Suggested fix: query sai_query_attribute_capability(SAI_OBJECT_TYPE_ACL_TABLE, SAI_ACL_TABLE_ATTR_FIELD_SRC_IPV6) and use create_implemented. When the capability query itself is unavailable (older SAI returning a non-success status), fall back to the existing platform list so current platforms are unaffected. IPv4 mirror (TABLE_TYPE_MIRROR) was never platform-gated and stays unconditional.
Description
AclOrch::init()decides whether theMIRRORV6(IPv6 mirror) ACL table type is supported from a hardcoded list of platform strings, with a long-standing// TODO: Query SAI to get mirror table capabilities:A new ASIC whose SAI does support IPv6 ACL match fields is therefore reported as not supporting
MIRRORV6until its platform string is manually added to this list. This is the same hardcoding anti-pattern being removed elsewhere inAclOrch(e.g. ACL table match-field / group-type / member-priority capabilities).Steps to reproduce the issue
platformstring is not in the hardcoded list above.MIRRORV6ACL table.AclOrchreportsTABLE_TYPE_MIRRORV6: noand the table type is unavailable, even though the ASIC/SAI supports it.Describe the results you received
MIRRORV6support is gated purely on a static platform-string allow-list; capable platforms not on the list cannot use IPv6 mirror ACL tables.Describe the results you expected
MIRRORV6capability should be derived from SAI (the IPv6 ACL match-field create capability), so any platform whose SAI reports support can use the table, independent of a hardcoded list.Additional information you deem important
Suggested fix: query
sai_query_attribute_capability(SAI_OBJECT_TYPE_ACL_TABLE, SAI_ACL_TABLE_ATTR_FIELD_SRC_IPV6)and usecreate_implemented. When the capability query itself is unavailable (older SAI returning a non-success status), fall back to the existing platform list so current platforms are unaffected. IPv4 mirror (TABLE_TYPE_MIRROR) was never platform-gated and stays unconditional.