Skip to content

Commit 43ed544

Browse files
committed
Skip create port if the lane set isn't available in ASIC
Signed-off-by: Ze Gan <ganze718@gmail.com>
1 parent 86b4ede commit 43ed544

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

orchagent/portsorch.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,22 @@ void PortsOrch::doPortTask(Consumer &consumer)
27002700
}
27012701
}
27022702

2703+
if (m_portListLaneMap.find(lane_set) == m_portListLaneMap.end())
2704+
{
2705+
2706+
string tmp_lane_str = "";
2707+
for (auto s : lane_set)
2708+
{
2709+
tmp_lane_str += to_string(s) + " ";
2710+
}
2711+
tmp_lane_str = tmp_lane_str.substr(0, tmp_lane_str.size()-1);
2712+
2713+
SWSS_LOG_WARN("The lane set %s isn't available in ASIC", tmp_lane_str.c_str());
2714+
2715+
it = consumer.m_toSync.erase(it);
2716+
continue;
2717+
}
2718+
27032719
/* Collect information about all received ports */
27042720
if (lane_set.size())
27052721
{

0 commit comments

Comments
 (0)