Skip to content

Commit

Permalink
Enable conditional entropy rehash for 12.0
Browse files Browse the repository at this point in the history
Summary:
As titled. It is already available in 12.0 release.

Note: 12.0.0.4 has one warmboot issue, which is fixed in 12.0.0.5. Will wait for 12.0.0.5 to be landed and then land this

Reviewed By: jasmeetbagga

Differential Revision: D66643179

fbshipit-source-id: 7b837bc7e8fc8d739375ad2985a2e3d1473cbe70
  • Loading branch information
Ron He authored and facebook-github-bot committed Dec 6, 2024
1 parent 2b0319c commit dac87e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions fboss/agent/hw/sai/api/bcm/PortApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ std::optional<sai_attr_id_t> SaiPortSerdesTraits::Attributes::

std::optional<sai_attr_id_t>
SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() {
// TODO(zecheng): Update flag when new 12.0 release has the attribute
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0)
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0)
return SAI_PORT_ATTR_COND_ENTROPY_REHASH_ENABLE;
#else
return std::nullopt;
Expand Down
3 changes: 1 addition & 2 deletions fboss/agent/hw/sai/api/bcm/SwitchApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,7 @@ SaiSwitchTraits::Attributes::AttributeMaxVoqs::operator()() {
}
std::optional<sai_attr_id_t>
SaiSwitchTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() {
// TODO(zecheng): Update flag when new 12.0 release has the attribute
#if defined(SAI_VERSION_11_7_0_0_DNX_ODP)
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0)
return SAI_SWITCH_ATTR_COND_ENTROPY_REHASH_PERIOD_US;
#endif
return std::nullopt;
Expand Down
3 changes: 1 addition & 2 deletions fboss/agent/hw/sai/switch/SaiSwitchManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,7 @@ void SaiSwitchManager::setVoqDramBoundTh(uint32_t dramBoundThreshold) {

void SaiSwitchManager::setConditionalEntropyRehashPeriodUS(
int conditionalEntropyRehashPeriodUS) {
// TODO(zecheng): Update flag when new 12.0 release has the attribute
#if defined(SAI_VERSION_11_7_0_0_DNX_ODP)
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0)
switch_->setOptionalAttribute(
SaiSwitchTraits::Attributes::CondEntropyRehashPeriodUS{
conditionalEntropyRehashPeriodUS});
Expand Down
3 changes: 1 addition & 2 deletions fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort(

std::optional<SaiPortTraits::Attributes::CondEntropyRehashEnable>
condEntropyRehashEnable{};
// TODO(zecheng): Update flag when new 12.0 release has the attribute
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0)
#if defined(BRCM_SAI_SDK_DNX_GTE_11_0)
condEntropyRehashEnable = swPort->getConditionalEntropyRehash();
#endif
std::optional<SaiPortTraits::Attributes::ShelEnable> shelEnable{};
Expand Down

0 comments on commit dac87e9

Please sign in to comment.