Skip to content

Commit

Permalink
orchagent/portsorch: Setting a netdev channel for host interface traps (
Browse files Browse the repository at this point in the history
#14)

By default a host interface channel is defined as a callback.

Signed-off-by: Denys Haryachyy <Denys.Haryachyy@caviumnetworks.com>
  • Loading branch information
Denys Haryachyy authored and Shuotian Cheng committed Apr 14, 2016
1 parent a3d6843 commit 16567b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ PortsOrch::PortsOrch(DBConnector *db, string tableName) :
}
}

for (i = 0; i < 4; i++)
{
attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_CHANNEL;
attr.value.s32 = SAI_HOSTIF_TRAP_CHANNEL_NETDEV;
status = sai_hostif_api->set_trap_attribute(trap_ids[i], &attr);
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to set trap attribute\n");
}
}

/* Get port number */
attr.id = SAI_SWITCH_ATTR_PORT_NUMBER;

Expand Down

0 comments on commit 16567b9

Please sign in to comment.