Skip to content

Commit

Permalink
update the default LT capability upon get failures
Browse files Browse the repository at this point in the history
Signed-off-by: Dante Su <dante.su@broadcom.com>
  • Loading branch information
ds952811 committed May 20, 2022
1 parent 0f73666 commit 84bdde4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ void PortsOrch::initPortCapLinkTraining(Port &port)
// TODO: Use SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE for the query
//
// While SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE is available at SAI master,
// it's not available in SAI v1.10 paried with SONiC.202205.
// it's not available in SAI v1.10 paired with SONiC.202205.
// And given that LT is part of AN, it should be okay to use
// SAI_PORT_ATTR_SUPPORTED_AUTO_NEG_MODE as a fallback plan.
attr.id = SAI_PORT_ATTR_SUPPORTED_AUTO_NEG_MODE;
Expand All @@ -1970,10 +1970,9 @@ void PortsOrch::initPortCapLinkTraining(Port &port)
}
else
{
// This is a new feature, hence none of breakage should be observed by
// having the LT capability flagged as NOT SUPPORTED upon a get failure
port.m_cap_lt = 0;
SWSS_LOG_WARN("Unable to get %s LT capability, assumming it's NOT supported",
// Align with AN to have LT flagged as supported
port.m_cap_lt = 1;
SWSS_LOG_WARN("Unable to get %s LT capability, assumming it's supported",
port.m_alias.c_str());
}
}
Expand Down

0 comments on commit 84bdde4

Please sign in to comment.