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
sonic-sairedis: Add support to sonic-sairedis for gearbox phys #624
sonic-sairedis: Add support to sonic-sairedis for gearbox phys #624
Changes from all commits
4942ac1
8695a23
4d93ea9
9e2d0c4
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.
why you need this ? if i understand correctly this is attribute on switch_create
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.
why you need this, i though this is switch_create attribute
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.
We need, at this early state, to know if this is NPU, which supports the starting of fdb agent thread, or is PHY, which does not. We experienced failures if we start this thread for phy, and it is not desireable anyway. Introducing the switch type in the ini file as in this example, is how we determine type.
SAI_WARM_BOOT_READ_FILE=./sai_warmboot.bin
SAI_WARM_BOOT_WRITE_FILE=./sai_warmboot.bin
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_BCM81724
SAI_VS_SAI_SWITCH_TYPE=SAI_SWITCH_TYPE_PHY
SAI_VS_HOSTIF_USE_TAP_DEVICE=false
SAI_VS_USE_BCMSIM_LINK_MON=true
SAI_VS_INTERFACE_LANE_MAP_FILE=BCM81724/lanemapphy.ini
Another option would be to hard code a mapping of part number to type somewhere, but that hardly seems like a good solution (might as well put it here, where the switch resource is defined).
The field is considered optional (default is NPU) since that is the dominant switch type, and for backwards compatibility. Effectively, at this point, making it a boolean "isPhy" but if you consider that downstream there might be a third or fourth class of "switch", better to call it out explicitly.