Skip to content

Commit

Permalink
do not set SAI_BUFFER_PROFILE_ATTR_XON_OFFSET_TH
Browse files Browse the repository at this point in the history
Summary:
as titled

SAI_BUFFER_PROFILE_ATTR_XON_OFFSET_TH is unsupported for this platform

Reviewed By: rohitpuri-sw

Differential Revision:
D66854094

Privacy Context Container: L1125642

fbshipit-source-id: b2e85fd513ca03d5a23abd24482ef0750394ec23
  • Loading branch information
Parvez Shaikh authored and facebook-github-bot committed Dec 6, 2024
1 parent 7ff3555 commit b2e5688
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions fboss/agent/hw/sai/switch/SaiBufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,12 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs(
#endif
0,
0,
0,
#if defined(CHENAB_SAI_SDK)
// Do not set xonOffset for Chenab as it is not supported
std::nullopt, // XonOffsetTh
#else
0, // XonOffsetTh
#endif
sharedFadtMaxTh,
sharedFadtMinTh,
sramFadtMaxTh,
Expand Down Expand Up @@ -619,10 +624,16 @@ SaiBufferManager::ingressProfileCreateAttrs(
xoffTh = *config.headroomLimitBytes();
}
SaiBufferProfileTraits::Attributes::XonTh xonTh{0}; // Not configured!
SaiBufferProfileTraits::Attributes::XonOffsetTh xonOffsetTh{0};
std::optional<SaiBufferProfileTraits::Attributes::XonOffsetTh> xonOffsetTh{};
if (config.resumeOffsetBytes()) {
xonOffsetTh = *config.resumeOffsetBytes();
}
#if !defined(CHENAB_SDK)
else {
xonOffsetTh = 0;
}
#endif

std::optional<SaiBufferProfileTraits::Attributes::SharedFadtMaxTh>
sharedFadtMaxTh;
std::optional<SaiBufferProfileTraits::Attributes::SharedFadtMinTh>
Expand Down

0 comments on commit b2e5688

Please sign in to comment.