From 9ecc541274e661f2196ff1dd920bc46e39a68f95 Mon Sep 17 00:00:00 2001 From: Prabhu Sreenivasan <45380242+PrabhuSreenivasan@users.noreply.github.com> Date: Thu, 7 Jan 2021 20:42:35 +0530 Subject: [PATCH] Add support for SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY needed by CRM (#756) Signed-off-by: Prabhu Sreenivasan Co-authored-by: Prabhu Sreenivasan --- vslib/inc/SwitchStateBase.h | 1 + vslib/src/SwitchStateBase.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/vslib/inc/SwitchStateBase.h b/vslib/inc/SwitchStateBase.h index 9a28db9dc55f..d174ad9527a1 100644 --- a/vslib/inc/SwitchStateBase.h +++ b/vslib/inc/SwitchStateBase.h @@ -593,6 +593,7 @@ namespace saivs constexpr static const int m_maxSNATEntries = 100; constexpr static const int m_maxDNATEntries = 100; + constexpr static const int m_maxIPMCEntries = 100; constexpr static const int m_maxDoubleNATEntries = 50; /* Half of single NAT entry */ constexpr static const int m_maxAclTables = 3; diff --git a/vslib/src/SwitchStateBase.cpp b/vslib/src/SwitchStateBase.cpp index 304f9d72adf7..fc15d399796f 100644 --- a/vslib/src/SwitchStateBase.cpp +++ b/vslib/src/SwitchStateBase.cpp @@ -963,6 +963,7 @@ sai_status_t SwitchStateBase::set_static_crm_values() { SAI_SWITCH_ATTR_AVAILABLE_FDB_ENTRY, m_maxFdbEntries }, { SAI_SWITCH_ATTR_AVAILABLE_SNAT_ENTRY, m_maxSNATEntries }, { SAI_SWITCH_ATTR_AVAILABLE_DNAT_ENTRY, m_maxDNATEntries }, + { SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY, m_maxIPMCEntries }, { SAI_SWITCH_ATTR_AVAILABLE_DOUBLE_NAT_ENTRY, m_maxDoubleNATEntries } }; @@ -1898,6 +1899,7 @@ sai_status_t SwitchStateBase::refresh_read_only( case SAI_SWITCH_ATTR_AVAILABLE_ACL_TABLE_GROUP: case SAI_SWITCH_ATTR_AVAILABLE_SNAT_ENTRY: case SAI_SWITCH_ATTR_AVAILABLE_DNAT_ENTRY: + case SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY: case SAI_SWITCH_ATTR_AVAILABLE_DOUBLE_NAT_ENTRY: return SAI_STATUS_SUCCESS;