Skip to content

Commit

Permalink
not set EcnGreenMinThreshold and EcnGreenMaxThreshold when GreenEnabl…
Browse files Browse the repository at this point in the history
…e is false

Summary:
as titled, these thresholds are unsupported

as per SAI sec these attributes are valid only when GreenEnable is true  and mode is one of (SAI_ECN_MARK_MODE_GREEN, SAI_ECN_MARK_MODE_YELLOW, SAI_ECN_MARK_MODE_RED, SAI_ECN_MARK_MODE_ALL)

https://github.com/opencomputeproject/SAI/blob/master/inc/saiwred.h#L96

Reviewed By: nivinl, maxwindiff

Differential Revision:
D66845491

Privacy Context Container: L1125642

fbshipit-source-id: e6c9316cd32158597c52037c8e73a0d2a6d41136
  • Loading branch information
Parvez Shaikh authored and facebook-github-bot committed Dec 10, 2024
1 parent 1569cf1 commit 2fb0977
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fboss/agent/hw/sai/switch/SaiWredManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ SaiWredTraits::CreateAttributes SaiWredManager::profileCreateAttrs(
std::get<std::optional<Attributes::EcnGreenMaxThreshold>>(attrs);
#if !defined(BRCM_SAI_SDK_XGS_AND_DNX)
std::tie(greenMin, greenMax, greenDropProbability, ecnGreenMin, ecnGreenMax) =
std::make_tuple(0, 0, kDefaultDropProbability, 0, 0);
std::make_tuple(
0, 0, kDefaultDropProbability, std::nullopt, std::nullopt);
#endif
for (const auto& aqm : std::as_const(*queue.getAqms())) {
// THRIFT_COPY
Expand Down

0 comments on commit 2fb0977

Please sign in to comment.