Skip to content

Commit 4c257ea

Browse files
lguohanShuotian Cheng
authored andcommitted
syncd_reinit: bug fix: Using the actual lane count to build the lane map (sonic-net#31)
1 parent ec9570f commit 4c257ea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

syncd/syncd_reinit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ std::unordered_map<sai_uint32_t, sai_object_id_t> saiGetHardwareLaneMap()
107107
exit(EXIT_FAILURE);
108108
}
109109

110-
for (int j = 0; j < lanesPerPort; j++)
110+
sai_int32_t laneCount = attr.value.u32list.count;
111+
112+
for (int j = 0; j < laneCount; j++)
111113
{
112114
map[lanes[j]] = portList[i];
113115
}

0 commit comments

Comments
 (0)