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

Fix neighbor doesn't update all attribute #2577

Merged
merged 4 commits into from
Jan 3, 2023
Merged
Changes from all commits
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
17 changes: 10 additions & 7 deletions orchagent/neighorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,15 +912,18 @@ bool NeighOrch::addNeighbor(const NeighborEntry &neighborEntry, const MacAddress
}
else if (isHwConfigured(neighborEntry))
{
status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbor_entry, &neighbor_attr);
if (status != SAI_STATUS_SUCCESS)
for (auto itr : neighbor_attrs)
{
SWSS_LOG_ERROR("Failed to update neighbor %s on %s, rv:%d",
macAddress.to_string().c_str(), alias.c_str(), status);
task_process_status handle_status = handleSaiSetStatus(SAI_API_NEIGHBOR, status);
if (handle_status != task_success)
status = sai_neighbor_api->set_neighbor_entry_attribute(&neighbor_entry, &itr);
if (status != SAI_STATUS_SUCCESS)
{
return parseHandleSaiStatusFailure(handle_status);
SWSS_LOG_ERROR("Failed to update neighbor %s on %s, attr.id=0x%x, rv:%d",
macAddress.to_string().c_str(), alias.c_str(), itr.id, status);
task_process_status handle_status = handleSaiSetStatus(SAI_API_NEIGHBOR, status);
if (handle_status != task_success)
{
return parseHandleSaiStatusFailure(handle_status);
}
}
}
SWSS_LOG_NOTICE("Updated neighbor %s on %s", macAddress.to_string().c_str(), alias.c_str());
Expand Down