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 7eb4931
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2700,6 +2700,22 @@ void PortsOrch::doPortTask(Consumer &consumer)
}
}

if (!lane_set.empty() && m_portListLaneMap.find(lane_set) == 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());

it = consumer.m_toSync.erase(it);
continue;
}

/* Collect information about all received ports */
if (lane_set.size())
{
Expand Down

0 comments on commit 7eb4931

Please sign in to comment.