-
Notifications
You must be signed in to change notification settings - Fork 693
orchagent/portsorch: Keeping sched_group_ids in port #2520
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
Open
arvbb
wants to merge
12
commits into
sonic-net:master
Choose a base branch
from
arvbb:sched_grp_2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d0774f4
Keeping sched_group_ids in port
arvbb 3bbc601
Merge branch 'sonic-net:master' into sched_grp_2
arvbb 504c810
Merge branch 'sonic-net:master' into sched_grp_2
arvbb 1f8d8a1
Merge branch 'sonic-net:master' into sched_grp_2
arvbb df2c7bf
Fixing based on review comments
arvbb 52cb6e6
Merge branch 'sched_grp_2' of github.com:arvbb/sonic-swss into sched_…
arvbb fcfe175
Merge branch 'sonic-net:master' into sched_grp_2
arvbb f62988c
Merge branch 'sonic-net:master' into sched_grp_2
arvbb a377ffd
Merge branch 'sonic-net:master' into sched_grp_2
arvbb dab8baf
Merge branch 'sonic-net:master' into sched_grp_2
arvbb 6b8a0ab
Merge branch 'sonic-net:master' into sched_grp_2
arvbb 32ceec5
Merge branch 'sonic-net:master' into sched_grp_2
arvbb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids the memory issue but there is still a memory leak issue in DPB. eg. if the old port is removed then a set of new ports are created, the SAI OID of ports will be changed but
m_scheduler_group_port_info[<SAI OID of old port>]won't be removed. Eventually,m_scheduler_group_port_infowill contain a lot of info of ports that have been removed.I would like to suggest
Portstruct and initialize it during port initialization or in this function.m_scheduler_group_port_infoand removing items from it on port removing.@neethajohn how do you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the second solution will be a lot cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Stephen/Neetha, I am not familiar with DPB. How is the port removal scenario handled currently for scheduler group? Is it already getting covered in existing code before this PR or it is new functionality that needs to be added? Please clarify, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephenxs, can you comment on the DPB scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it comes to DPB, I think what we care about is the port removal flow.
In short, the QoS orchagent should listen to the
config_db.PORTtable and handle the port removal event.On receiving a port removal event, it should map the port name to OID and then erase the item indexed by the OID from
m_scheduler_group_port_info.I think we can use the function
bool PortsOrch::getPort(string alias, Port &p)to map the port name to OID.But what I'm not sure about is whether the mapping is still available in ports orch in the port removal scenario because there is no guarantee in terms of the order in which the orchagents (ports ~, QoS ~) handle the port removal notification.
this is why I proposed option
#1. but if we want to use#2maybe we also have a way. I will check with the DPB expert in my team (if there is one) and get back to you.thanks.