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

Copp sflow changes #1011

Merged
merged 8 commits into from
Oct 28, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Addressing review comments
dgsudharsan committed Oct 7, 2019
commit 5d0960cfc62f4e136b3628c8620d9534cdb0e9c1
12 changes: 6 additions & 6 deletions orchagent/copporch.cpp
Original file line number Diff line number Diff line change
@@ -213,9 +213,9 @@ bool CoppOrch::applyAttributesToTrapIds(sai_object_id_t trap_group_id,
}
m_syncdTrapIds[trap_id] = trap_group_id;

auto hostTbl_entry = m_trapId_hostTblEntry_map.find(trap_id);
auto hostTbl_entry = m_trapid_hostif_table_map.find(trap_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use variable style consistently

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


if (hostTbl_entry == m_trapId_hostTblEntry_map.end())
if (hostTbl_entry == m_trapid_hostif_table_map.end())
{
auto hostif_map = m_trap_group_hostif_map.find(trap_group_id);
if (hostif_map != m_trap_group_hostif_map.end())
@@ -250,7 +250,7 @@ bool CoppOrch::applyAttributesToTrapIds(sai_object_id_t trap_group_id,
SWSS_LOG_ERROR("Failed to create hostif table entry failed, rv %d", status);
return false;
}
m_trapId_hostTblEntry_map[trap_id] = hostif_table_entry;
m_trapid_hostif_table_map[trap_id] = hostif_table_entry;
}
}
}
@@ -391,8 +391,8 @@ bool CoppOrch::removeGenetlinkHostIf(string trap_group_name)
{
if (it.second == m_trap_group_map[trap_group_name])
{
auto hostTableEntry = m_trapId_hostTblEntry_map.find(it.first);
if (hostTableEntry != m_trapId_hostTblEntry_map.end())
auto hostTableEntry = m_trapid_hostif_table_map.find(it.first);
if (hostTableEntry != m_trapid_hostif_table_map.end())
{
sai_status = sai_hostif_api->remove_hostif_table_entry(hostTableEntry->second);
if(sai_status != SAI_STATUS_SUCCESS)
@@ -402,7 +402,7 @@ bool CoppOrch::removeGenetlinkHostIf(string trap_group_name)
trap_group_name.c_str(), sai_status);
return false;
}
m_trapId_hostTblEntry_map.erase(it.first);
m_trapid_hostif_table_map.erase(it.first);
}
}
}
2 changes: 1 addition & 1 deletion orchagent/copporch.h
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ class CoppOrch : public Orch
TrapIdTrapGroupTable m_syncdTrapIds;

TrapGroupHostIfMap m_trap_group_hostif_map;
TrapHostTblEntryMap m_trapId_hostTblEntry_map;
TrapIdHostIfTableMap m_trapid_hostif_table_map;

void initDefaultHostIntfTable();
void initDefaultTrapGroup();