Skip to content

Commit b78cc8d

Browse files
authored
support 8 lanes for a physical port (sonic-net#778)
Signed-off-by: Guohan Lu <[email protected]>
1 parent 73b620c commit b78cc8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

orchagent/portsorch.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ PortsOrch::PortsOrch(DBConnector *db, vector<table_name_with_pri_t> &tableNames)
252252
/* Get port hardware lane info */
253253
for (i = 0; i < m_portCount; i++)
254254
{
255-
sai_uint32_t lanes[4] = { 0,0,0,0 };
255+
sai_uint32_t lanes[8] = { 0,0,0,0,0,0,0,0 };
256256
attr.id = SAI_PORT_ATTR_HW_LANE_LIST;
257-
attr.value.u32list.count = 4;
257+
attr.value.u32list.count = 8;
258258
attr.value.u32list.list = lanes;
259259

260260
status = sai_port_api->get_port_attribute(port_list[i], 1, &attr);
@@ -266,7 +266,9 @@ PortsOrch::PortsOrch(DBConnector *db, vector<table_name_with_pri_t> &tableNames)
266266

267267
set<int> tmp_lane_set;
268268
for (j = 0; j < attr.value.u32list.count; j++)
269+
{
269270
tmp_lane_set.insert(attr.value.u32list.list[j]);
271+
}
270272

271273
string tmp_lane_str = "";
272274
for (auto s : tmp_lane_set)

0 commit comments

Comments
 (0)