Skip to content

Commit

Permalink
[202211_RC9] [portsorch]: Set default hostif TX queue
Browse files Browse the repository at this point in the history
  • Loading branch information
keboliu committed Mar 31, 2023
1 parent 4186f59 commit 9ffe789
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ extern event_handle_t g_events_handle;
#define VLAN_PREFIX "Vlan"
#define DEFAULT_VLAN_ID 1
#define MAX_VALID_VLAN_ID 4094
#define DEFAULT_HOSTIF_TX_QUEUE 7

#define PORT_SPEED_LIST_DEFAULT_SIZE 16
#define PORT_STATE_POLLING_SEC 5
Expand Down Expand Up @@ -2582,6 +2583,10 @@ bool PortsOrch::createVlanHostIntf(Port& vl, string hostif_name)
attr.value.chardata[SAI_HOSTIF_NAME_SIZE - 1] = '\0';
attrs.push_back(attr);

attr.id = SAI_HOSTIF_ATTR_QUEUE;
attr.value.u32 = DEFAULT_HOSTIF_TX_QUEUE;
attrs.push_back(attr);

sai_status_t status = sai_hostif_api->create_hostif(&vl.m_vlan_info.host_intf_id, gSwitchId, (uint32_t)attrs.size(), attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
Expand Down Expand Up @@ -4812,6 +4817,10 @@ bool PortsOrch::addHostIntfs(Port &port, string alias, sai_object_id_t &host_int
attr.value.chardata[SAI_HOSTIF_NAME_SIZE - 1] = '\0';
attrs.push_back(attr);

attr.id = SAI_HOSTIF_ATTR_QUEUE;
attr.value.u32 = DEFAULT_HOSTIF_TX_QUEUE;
attrs.push_back(attr);

sai_status_t status = sai_hostif_api->create_hostif(&host_intfs_id, gSwitchId, (uint32_t)attrs.size(), attrs.data());
if (status != SAI_STATUS_SUCCESS)
{
Expand Down

0 comments on commit 9ffe789

Please sign in to comment.