Skip to content

Commit

Permalink
Cosmetic changes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsudharsan committed Jun 26, 2020
1 parent 288c6bc commit e722fa1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,14 +491,10 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
{
auto trap_gr_attr = trap_gr_attribs[ind];

sai_status = sai_hostif_api->set_hostif_trap_group_attribute(
m_trap_group_map[trap_group_name], &trap_gr_attr);
sai_status = sai_hostif_api->set_hostif_trap_group_attribute(m_trap_group_map[trap_group_name], &trap_gr_attr);
if (sai_status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to apply attribute:%d to trap group:%" PRIx64 ""
", name:%s, error:%d\n", trap_gr_attr.id,
m_trap_group_map[trap_group_name], trap_group_name.c_str(),
sai_status);
SWSS_LOG_ERROR("Failed to apply attribute:%d to trap group:%" PRIx64 ", name:%s, error:%d\n", trap_gr_attr.id, m_trap_group_map[trap_group_name], trap_group_name.c_str(), sai_status);
return task_process_status::task_failed;
}
SWSS_LOG_NOTICE("Set trap group %s to host interface", trap_group_name.c_str());
Expand All @@ -509,13 +505,10 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
{
sai_object_id_t new_trap;

sai_status = sai_hostif_api->create_hostif_trap_group(&new_trap, gSwitchId,
(uint32_t)trap_gr_attribs.size(),
trap_gr_attribs.data());
sai_status = sai_hostif_api->create_hostif_trap_group(&new_trap, gSwitchId, (uint32_t)trap_gr_attribs.size(), trap_gr_attribs.data());
if (sai_status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to create host interface trap group %s, rc=%d",
trap_group_name.c_str(), sai_status);
SWSS_LOG_ERROR("Failed to create host interface trap group %s, rc=%d", trap_group_name.c_str(), sai_status);
return task_process_status::task_failed;
}

Expand Down

0 comments on commit e722fa1

Please sign in to comment.