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

[xcvrd] Don't log unnecessary messages upon empty transceiver change event #53

Merged
merged 2 commits into from
Sep 9, 2020
Merged

[xcvrd] Don't log unnecessary messages upon empty transceiver change event #53

merged 2 commits into from
Sep 9, 2020

Conversation

chiourung
Copy link
Contributor

@chiourung chiourung commented Apr 8, 2020

Eliminates unnecessary logs of the form:

xcvrd: Got event True {} in state 1
xcvrd: mapping from True {'-1': 'system_become_ready'} to system_become_ready
xcvrd: Got system_become_ready in normal state, ignored

What I did:
Don't need to do anything when the port_dict of transceiver_change is empty

How to verify:
Run on DUT to make sure xcvrd can detect tranceiver eeprom correctly and
there is no unmeaning logs anymore.

Signed-off-by: chiourung_huang chiourung_huang@edge-core.com

xcvrd: Got event True {} in state 1
xcvrd: mapping from True {'-1': 'system_become_ready'} to system_become_ready
xcvrd: Got system_become_ready in normal state, ignored

What I did:
    Don't need to do anything when the port_dict of transceiver_change is empty

How to verify:
    Run on DUT to make sure xcvrd can detect tranceiver eeprom correctly and
    there is no unmeaning logs anymore.

Signed-off-by: chiourung_huang <chiourung_huang@edge-core.com>
@jleveque jleveque added the xcvrd label Jul 10, 2020
@jleveque
Copy link
Contributor

@chiourung: If you feel this PR is still necessary, please fix the recent conflicts.

@jleveque
Copy link
Contributor

Looks good to me. @keboliu: please review, also.

@keboliu
Copy link
Collaborator

keboliu commented Sep 9, 2020

LGTM.

@jleveque jleveque changed the title Too many duplicated logs of xcvrd [xcvrd] Don't log unnecessary messages upon empty transceiver change event Sep 9, 2020
@jleveque jleveque merged commit 7f812c9 into sonic-net:master Sep 9, 2020
abdosi pushed a commit that referenced this pull request Sep 19, 2020
…event (#53)

When port_dict of transceiver_change is empty, do nothing rather than log messages like
```
xcvrd: Got event True {} in state 1
xcvrd: mapping from True {'-1': 'system_become_ready'} to system_become_ready
xcvrd: Got system_become_ready in normal state, ignored
```
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
…t#53)

Signed-off-by: wangzhui <wangzhui@asterfusion.com>
@chiourung chiourung deleted the xcvrd_duplicate_logs branch March 15, 2023 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants