Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[portorch]: Skip to create port if the lane set isn't available in ASIC #1923

Merged
merged 7 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,23 @@ task_process_status Orch::handleSaiCreateStatus(sai_api_t api, sai_status_t stat
exit(EXIT_FAILURE);
}
break;
case SAI_API_HOSTIF:
switch (status)
{
case SAI_STATUS_SUCCESS:
return task_success;
case SAI_STATUS_FAILURE:
/*
* Host interface maybe failed due to lane not available.
* In some scenarios, like SONiC virtual machine, the invalid lane may be not enabled by VM configuration,
* So just ignore the failure and report an error log.
*/
return task_ignore;
default:
SWSS_LOG_ERROR("Encountered failure in create operation, exiting orchagent, SAI API: %s, status: %s",
sai_serialize_api(api).c_str(), sai_serialize_status(status).c_str());
exit(EXIT_FAILURE);
}
default:
switch (status)
{
Expand Down
4 changes: 3 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,9 @@ void PortsOrch::doPortTask(Consumer &consumer)

if (!initPort(get<0>(it->second), get<5>(it->second), get<4>(it->second), it->first))
{
throw runtime_error("PortsOrch initialization failure.");
// Failure has been recorded in initPort
it++;
continue;
}

initPortSupportedSpeeds(get<0>(it->second), m_portListLaneMap[it->first]);
Expand Down