-
Notifications
You must be signed in to change notification settings - Fork 161
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
[CMIS]Improved 400G link bring up sequence #254
Merged
+230
−136
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
57cb73c
Improved 400G link bring up sequence
prgeor 9b00b47
Event based handling
prgeor 5c42c57
Remove unused functions
prgeor 0204a07
Force DP to remain in DpInitialized State state on admin shutdown
prgeor 69d3a54
Added test case
prgeor b9cb34d
Skip CMIS task manager based upon flag
prgeor be6d509
Addressed review comments
prgeor 647cff7
Fix xcvrd crash
prgeor 374972e
Fix test failure
prgeor b52a3f6
Listen only to 'APPL_DB's admin_status
prgeor 3d25e45
Fix typo
prgeor 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 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.
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.
If
XcvrTableHelper
is implemented as a class member, it should be initialized intask_worker
instead of__init__
.This is because
CmisManagerTask
is a subprocess wrapper, which means a subprocess will be forked oncetask_run
is called.If it is initialized in
__init__
, the flow isXcvrTableHelper
along with all the low level objects, like the sockets based on which the tables are accessedThere 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.
Of course, initializing it in
__init__
and then duplicating it from parent to child should also work. But it looks like taking a detour to me.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 what is the concern here? only the worker thread is going to use the socket, not the parent.
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.
xcvr_table_helper
is initialized in the parent and then duplicated in the client. but it will never be used by the parent.so the resource allocated in the parent is wasted.
__init__
:xcvr_table_helper
initialized in parent. resource allocated for it but not used.task_worker
xcvr_table_helper
is initialized in the child before it starts to work.as I mentioned, it also works in the current way. so I'm ok if you do not decide to change it.