-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fixed xcvrd shutdown flow #23
Fixed xcvrd shutdown flow #23
Conversation
sonic-xcvrd/scripts/xcvrd
Outdated
# del sfp and dom info from db | ||
def del_port_sfp_dom_info_to_db(logical_port_name, int_tbl, dom_tbl): | ||
# update port dom/sfp info in db | ||
def post_port_sfp_dom_info_to_db(): |
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.
rename to "del_port_sfp_dom_info_from_db"?
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.
@keboliu please have a look at line 328:
# delete port dom/sfp info from db
def del_port_sfp_dom_info_from_db(logical_port_name, int_tbl, dom_tbl):
sonic-xcvrd/scripts/xcvrd
Outdated
dom_info_update = dom_info_update_task(dom_tbl) | ||
dom_info_update.task_run() | ||
while RUN: | ||
time.sleep(TIMEOUT_SECS) |
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.
main task is idling, original design using the main task to listen to the sfp change event, can we reduce one thread here? have you compared the time consuming of xvrd before and after, any significant increase?
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.
@keboliu before changes on stop ~10 sec, after changes ~1 sec.
The idea is to use main daemon process to:
- Do init
- Handle signals
- Manage tasks
- Do deinit
This is a different architecture approach.
Please fix new conflicts. |
@jleveque will do. |
fd1e078
to
aee8250
Compare
@jleveque done. |
Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
aee8250
to
13c1f22
Compare
@andriymoroz-mlnx please help to review and merge. |
Signed-off-by: Nazarii Hnydyn nazariig@mellanox.com
xcvrd shutdown flow is broken due to a platform_sfputil.get_transceiver_change_event() blocking call which uses epoll_wait. This function affects process signal mask and signal handlers are not getting called.
- What I did
- How I did it
- How to verify it
- Description for the changelog