Skip to content

Commit

Permalink
Add fabric llfc as a switch extension create attribute
Browse files Browse the repository at this point in the history
Summary: As titled

Reviewed By: shri-khare

Differential Revision: D64014923

fbshipit-source-id: fa028a5381106e5754953c522b4c3512cb02a0af
  • Loading branch information
Jasmeet Bagga authored and facebook-github-bot committed Oct 8, 2024
1 parent d30c05e commit eff4e9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fboss/agent/hw/sai/api/SwitchApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ struct SaiSwitchTraits {
std::optional<Attributes::ArsProfile>,
#endif
std::optional<Attributes::ReachabilityGroupList>,
std::optional<Attributes::DelayDropCongThreshold>>;
std::optional<Attributes::DelayDropCongThreshold>,
std::optional<Attributes::FabricLinkLayerFlowControlThreshold>>;

#if SAI_API_VERSION >= SAI_VERSION(1, 12, 0)
static constexpr std::array<sai_stat_id_t, 3> CounterIdsToRead = {
Expand Down Expand Up @@ -758,6 +759,7 @@ SAI_ATTRIBUTE_NAME(Switch, VoqLatencyMaxLevel2Ns);
SAI_ATTRIBUTE_NAME(Switch, ArsProfile)
#endif
SAI_ATTRIBUTE_NAME(Switch, ReachabilityGroupList);
SAI_ATTRIBUTE_NAME(Switch, FabricLinkLayerFlowControlThreshold);

template <>
struct SaiObjectHasStats<SaiSwitchTraits> : public std::true_type {};
Expand Down
1 change: 1 addition & 0 deletions fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ void handleExtensionAttributes() {
SAI_EXT_ATTR_MAP(Switch, VoqLatencyMaxLevel2Ns);
SAI_EXT_ATTR_MAP(Switch, ReachabilityGroupList);
SAI_EXT_ATTR_MAP(Switch, DelayDropCongThreshold);
SAI_EXT_ATTR_MAP(Switch, FabricLinkLayerFlowControlThreshold);
}

} // namespace
Expand Down
4 changes: 4 additions & 0 deletions fboss/agent/platforms/sai/SaiPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes(
delayDropCongThreshold = 1;
}
#endif
std::optional<
SaiSwitchTraits::Attributes::FabricLinkLayerFlowControlThreshold>
fabricLLFC;

return {
initSwitch,
Expand Down Expand Up @@ -651,6 +654,7 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes(
#endif
std::nullopt, // ReachabilityGroupList
delayDropCongThreshold, // Delay Drop Cong Threshold
fabricLLFC,
};
}

Expand Down

0 comments on commit eff4e9c

Please sign in to comment.