Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fabric ports related calls for vs tests. #1301

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion vslib/SwitchStateBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2382,6 +2382,9 @@ sai_status_t SwitchStateBase::refresh_read_only(
return SAI_STATUS_SUCCESS;

case SAI_PORT_ATTR_FABRIC_ATTACHED:
case SAI_PORT_ATTR_FABRIC_ATTACHED_SWITCH_ID:
case SAI_PORT_ATTR_FABRIC_ATTACHED_PORT_INDEX:
case SAI_PORT_ATTR_HW_LANE_LIST:
return SAI_STATUS_SUCCESS;

case SAI_PORT_ATTR_PORT_SERDES_ID:
Expand Down Expand Up @@ -3429,7 +3432,7 @@ sai_status_t SwitchStateBase::create_fabric_ports()
sai_attribute_t attr;

attr.id = SAI_PORT_ATTR_FABRIC_ATTACHED;
attr.value.booldata = false;
attr.value.booldata = true;

CHECK_STATUS(set(SAI_OBJECT_TYPE_PORT, fabric_port_id, &attr));

Expand All @@ -3445,6 +3448,14 @@ sai_status_t SwitchStateBase::create_fabric_ports()
attr.value.s32 = SAI_PORT_TYPE_FABRIC;

CHECK_STATUS(set(SAI_OBJECT_TYPE_PORT, fabric_port_id, &attr));

attr.id = SAI_PORT_ATTR_FABRIC_ATTACHED_SWITCH_ID;
attr.value.s32 = i;
CHECK_STATUS(set(SAI_OBJECT_TYPE_PORT, fabric_port_id, &attr));

attr.id = SAI_PORT_ATTR_FABRIC_ATTACHED_PORT_INDEX;
attr.value.s32 = i;
CHECK_STATUS(set(SAI_OBJECT_TYPE_PORT, fabric_port_id, &attr));
}

return SAI_STATUS_SUCCESS;
Expand Down