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

[dash] fix ENI admin state update #3081

Merged
merged 4 commits into from
Apr 10, 2024
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
6 changes: 4 additions & 2 deletions orchagent/dash/dashorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,11 @@ bool DashOrch::setEniAdminState(const string& eni, const EniEntry& entry)
{
SWSS_LOG_ENTER();

bool eni_enable = entry.metadata.admin_state() == dash::eni::State::STATE_ENABLED;

sai_attribute_t eni_attr;
eni_attr.id = SAI_ENI_ATTR_ADMIN_STATE;
eni_attr.value.booldata = entry.metadata.admin_state();
eni_attr.value.booldata = eni_enable;

sai_status_t status = sai_dash_eni_api->set_eni_attribute(eni_entries_[eni].eni_id,
&eni_attr);
Expand All @@ -293,7 +295,7 @@ bool DashOrch::setEniAdminState(const string& eni, const EniEntry& entry)
}
}
eni_entries_[eni].metadata.set_admin_state(entry.metadata.admin_state());
SWSS_LOG_NOTICE("Set ENI %s admin state to %s", eni.c_str(), entry.metadata.admin_state() ? "UP" : "DOWN");
SWSS_LOG_NOTICE("Set ENI %s admin state to %s", eni.c_str(), eni_enable ? "UP" : "DOWN");

return true;
}
Expand Down
Loading