Skip to content

Commit

Permalink
Skip create port if the lane set isn't available in ASIC
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <ganze718@gmail.com>
  • Loading branch information
Pterosaur committed Sep 22, 2021
1 parent 86b4ede commit 2761376
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,19 @@ void PortsOrch::doPortTask(Consumer &consumer)

for (auto it = m_lanesAliasSpeedMap.begin(); it != m_lanesAliasSpeedMap.end();)
{
if (m_portListLaneMap.find(it->first) == m_portListLaneMap.end())
{
string tmp_lane_str = "";
for (auto s : lane_set)
{
tmp_lane_str += to_string(s) + " ";
}
tmp_lane_str = tmp_lane_str.substr(0, tmp_lane_str.size() - 1);

SWSS_LOG_WARN("The lane set %s isn't available in ASIC", tmp_lane_str.c_str());
continue;
}

if (m_portListLaneMap.find(it->first) == m_portListLaneMap.end())
{
if (!addPort(it->first, get<1>(it->second), get<2>(it->second), get<3>(it->second)))
Expand Down

0 comments on commit 2761376

Please sign in to comment.