Skip to content

Commit

Permalink
set probability only if WRED is enabled
Browse files Browse the repository at this point in the history
Summary:
as titled

this is as per SAI spec

Reviewed By: msomasundaran

Differential Revision: D67953990

fbshipit-source-id: e686b3473fc9c96f4faa187c770241cdd3a6a379
  • Loading branch information
Parvez Shaikh authored and facebook-github-bot committed Jan 9, 2025
1 parent a4fbe68 commit 772ae66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fboss/agent/hw/sai/switch/SaiWredManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace facebook::fboss {

#if !defined(BRCM_SAI_SDK_XGS_AND_DNX)
#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) and !defined(CHENAB_SDK)
constexpr auto kDefaultDropProbability = 100;
#endif

Expand Down Expand Up @@ -55,7 +55,7 @@ SaiWredTraits::CreateAttributes SaiWredManager::profileCreateAttrs(
// 0 here to avoid that
std::tie(greenMin, greenMax, greenDropProbability, ecnGreenMin, ecnGreenMax) =
std::make_tuple(0, 0, kDefaultDropProbability, 0, 0);
#elif !defined(BRCM_SAI_SDK_XGS_AND_DNX)
#elif !defined(BRCM_SAI_SDK_XGS_AND_DNX) and !defined(CHENAB_SDK)
std::tie(greenMin, greenMax, greenDropProbability, ecnGreenMin, ecnGreenMax) =
std::make_tuple(
0, 0, kDefaultDropProbability, std::nullopt, std::nullopt);
Expand Down

0 comments on commit 772ae66

Please sign in to comment.