Skip to content

Commit

Permalink
vslib: support SAI_PORT_ATTR_HOST_TX_READY_STATUS
Browse files Browse the repository at this point in the history
Signed-off-by: Wataru Ishida <[email protected]>
  • Loading branch information
ishidawataru committed Nov 14, 2024
1 parent 9c1e265 commit 75fcfc2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vslib/SwitchStateBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,11 @@ sai_status_t SwitchStateBase::create_ports()
attr.value.u32 = DEFAULT_VLAN_NUMBER;

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

attr.id = SAI_PORT_ATTR_HOST_TX_READY_STATUS;
attr.value.u32 = SAI_PORT_HOST_TX_READY_STATUS_READY;

CHECK_STATUS(set(SAI_OBJECT_TYPE_PORT, port_id, &attr));
}

return SAI_STATUS_SUCCESS;
Expand Down Expand Up @@ -1699,6 +1704,11 @@ sai_status_t SwitchStateBase::create_port_dependencies(

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

attr.id = SAI_PORT_ATTR_HOST_TX_READY_STATUS;
attr.value.u32 = SAI_PORT_HOST_TX_READY_STATUS_READY;

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

// attributes are not required since they will be set outside this function

CHECK_STATUS(create_ingress_priority_groups_per_port(port_id));
Expand Down Expand Up @@ -2425,6 +2435,7 @@ sai_status_t SwitchStateBase::refresh_read_only(
*/

case SAI_PORT_ATTR_OPER_STATUS:
case SAI_PORT_ATTR_HOST_TX_READY_STATUS:
return SAI_STATUS_SUCCESS;

case SAI_PORT_ATTR_FABRIC_ATTACHED:
Expand Down

0 comments on commit 75fcfc2

Please sign in to comment.