Skip to content

Commit 081d491

Browse files
author
ds952811
committed
address review comments
Signed-off-by: ds952811 <[email protected]>
1 parent 84bdde4 commit 081d491

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

orchagent/portsorch.cpp

+6-23
Original file line numberDiff line numberDiff line change
@@ -1946,35 +1946,18 @@ void PortsOrch::initPortCapAutoNeg(Port &port)
19461946
{
19471947
// To avoid breakage on the existing platforms, AN should be 1 by default
19481948
port.m_cap_an = 1;
1949-
SWSS_LOG_WARN("Unable to get %s AN capability, assumming it's supported",
1949+
SWSS_LOG_WARN("Unable to get %s AN support capability",
19501950
port.m_alias.c_str());
19511951
}
19521952
}
19531953

19541954
void PortsOrch::initPortCapLinkTraining(Port &port)
19551955
{
1956-
sai_status_t status;
1957-
sai_attribute_t attr;
1958-
1959-
// TODO: Use SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE for the query
1960-
//
1961-
// While SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE is available at SAI master,
1962-
// it's not available in SAI v1.10 paired with SONiC.202205.
1963-
// And given that LT is part of AN, it should be okay to use
1964-
// SAI_PORT_ATTR_SUPPORTED_AUTO_NEG_MODE as a fallback plan.
1965-
attr.id = SAI_PORT_ATTR_SUPPORTED_AUTO_NEG_MODE;
1966-
status = sai_port_api->get_port_attribute(port.m_port_id, 1, &attr);
1967-
if (status == SAI_STATUS_SUCCESS)
1968-
{
1969-
port.m_cap_lt = attr.value.booldata ? 1 : 0;
1970-
}
1971-
else
1972-
{
1973-
// Align with AN to have LT flagged as supported
1974-
port.m_cap_lt = 1;
1975-
SWSS_LOG_WARN("Unable to get %s LT capability, assumming it's supported",
1976-
port.m_alias.c_str());
1977-
}
1956+
// TODO:
1957+
// Add SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE query when it is
1958+
// available in the saiport.h of SAI.
1959+
port.m_cap_lt = 1;
1960+
SWSS_LOG_WARN("Unable to get %s LT support capability", port.m_alias.c_str());
19781961
}
19791962

19801963
/*

0 commit comments

Comments
 (0)