-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sub intf] Port object reference count update (#1712)
Signed-off-by: Wenda Ni <wonda.ni@gmail.com> There are two parts of changes in this pr: The motivation is that for each Port object instantiated, it should be initialized in PortsOrch::m_port_ref_count. For each Port object to be removed, its m_port_ref_count check should be zero to proceed further. These operations are generic and therefore should also apply to sub port Port object. Currently, Port object reference count increments - When a router interface is created on top. - When an ACL table is bound to Port (i.e., becoming a member of the ACL table group associated with the Port object). Port object reference count decrements - When a router interface on top is removed. - When an ACL table is unbound from Port (i.e, removing membership from the ACL table group associated with the Port object). Item 1, router interface creation and removal, is of direct relevance to sub port Port object. The other part of change is the reference count update to parent port Port object when a sub port Port object is added/removed on top. This part is motivated by change in Add reference counting to ports for ACL bindings. What I did At sub port Port object instantiation - Init sub port Port object reference count - Increase parent port Port object reference count At sub port Port object removal - Check sub port Port object reference count drops to zero - Decrease parent port Port object reference count At physical port removal - Check physical port Port object reference count drops to zero How I verified it vs test extension Issue parent port removal at APPL_DB level before removing sub port interface. Verify that parent port persists in ASIC_DB until sub interface is removed. Without the change, extended vs test fails:
- Loading branch information
1 parent
4a00042
commit f99abdc
Showing
2 changed files
with
112 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters