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

[PortsOrch] Add reference counting to ports for ACL bindings #1614

Merged
merged 4 commits into from
Jan 28, 2021
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
13 changes: 13 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,13 @@ bool PortsOrch::unbindAclTable(sai_object_id_t port_oid,
return false;
}


Port port;
if (getPort(port_oid, port))
{
decreasePortRefCount(port.m_alias);
}

if (!unbindRemoveAclTableGroup(port_oid, acl_table_oid, acl_stage)) {
return false;
}
Expand Down Expand Up @@ -1307,6 +1314,12 @@ bool PortsOrch::bindAclTable(sai_object_id_t port_oid,
return false;
}

Port port;
if (getPort(port_oid, port))
{
increasePortRefCount(port.m_alias);
}

return true;
}

Expand Down