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.
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
Independent Module - platform-daemon code to support port SI configuration per speed #3
base: master
Are you sure you want to change the base?
Independent Module - platform-daemon code to support port SI configuration per speed #3
Changes from 13 commits
ba78303
f0f0489
30bd3e4
abddbca
f088df6
d3f9653
62fea72
f43df10
5d3b5c0
d186d88
6f8b658
6525e33
ad4a4e0
88b40b9
2b4fe20
a247905
3ac3f1f
ffc026f
6b88870
9d86e59
c2ac376
404e6ff
1a7bd24
a78b4aa
de99228
50ad9b2
08a80ee
0690bf5
f6ec4f3
1ff6b55
2b64b84
be29382
dde725b
721b29c
fac5bb2
0c386aa
b5c8c0a
6d0142b
cc91f93
03fbb09
cef8ffc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is it possible that the get call would return None?
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.
The 'host_electrical_interface_id' key is searched for in a dictionary returned from the EEPROM. Therefore, it is highly unlikely for this key not to be present in appl_adv_dict[speed_index] (returned from get_application_advertisement()).
Just to be on the safe side, I added some protection in case an invalid dictionary was returned from the EEPROM.
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.
should we continue if port_speed or lane_count is -1?
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 port_speed or lane_count have invalid values, then lane_speed_key will be None, and therefore, if media_settings.json supports SI values per speed, then get_media_settings_value() will return an empty result, according to the updated flow of the parser. So in the case of invalid port_speed or lane_count, nothing will be posted to APP_DB during notify_media_settings().
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.
are you going to keep this debug code?
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 updated this log message according to Moshe's suggestion