-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add a template function that returns list of asics on module #185
Conversation
Signed-off-by: ngocdo <ngocdo@arista.com>
@judyjoseph - please review and approve. |
If we are considering FCs with different number of asics, a CLI to display asics associated to a Fabric card will be a good enhancement. Is there a plan for that? |
I think it may not be a trivial work. If we just start from here and the cli just reads CHASSIS_STATE_DB and shows asic information, it's not a problem. But having a consistent design seems a different thing. Some systems don't have CHASSIS_STATE_DB, but have fabric. At some point, I'm sure we want the cli to show not just fabric, but NPU asics too. So the cli topic will be discussed later, and out of the scope of this PR. |
@judyjoseph Please review and approve this PR. It's a blocker for another one (sonic-net/sonic-platform-daemons#175). |
@ngoc-do also please update the PR description that this CHASSIS_ASIC_TABLE is introduced predominantly for FABRIC cards where the number of asic per car remains same. |
Done. |
@ngoc-do, Could you resolve the conflict in this file ? |
@jleveque, Please could you check if the comments are addressed, we could proceed to merge if ok. |
@judyjoseph - can you please merge asap please, needed for 202106 release |
I will resolve conflict. |
Conflict has been resolved. Please help merge. Thanks @judyjoseph. |
To include: > e168f1d 2021-07-19 pettershao-ragilenetworks: [python coverage] fix result color bar (sonic-net/sonic-platform-common#202) > 87c81de 2021-07-13 Prince George: Fix Xcvrd crash due to invalid key access in type_of_media_interface, host_electrical_interface, connector_dict (sonic-net/sonic-platform-common#206) > 4533f82 2021-06-21 ngoc-do: Add a template function that returns list of asics on module (sonic-net/sonic-platform-common#185) > 1e860c5 2021-06-18 Aravind Mani: Fix decode error when parsing EEPROM fields (sonic-net/sonic-platform-common#199) > 93641f3 2021-06-17 Sujin Kang: Unifying the platform api for get_pcie_aer_stats with PcieBase (sonic-net/sonic-platform-common#197)
To include: > e168f1d 2021-07-19 pettershao-ragilenetworks: [python coverage] fix result color bar (sonic-net/sonic-platform-common#202) > 87c81de 2021-07-13 Prince George: Fix Xcvrd crash due to invalid key access in type_of_media_interface, host_electrical_interface, connector_dict (sonic-net/sonic-platform-common#206) > 4533f82 2021-06-21 ngoc-do: Add a template function that returns list of asics on module (sonic-net/sonic-platform-common#185) > 1e860c5 2021-06-18 Aravind Mani: Fix decode error when parsing EEPROM fields (sonic-net/sonic-platform-common#199) > 93641f3 2021-06-17 Sujin Kang: Unifying the platform api for get_pcie_aer_stats with PcieBase (sonic-net/sonic-platform-common#197)
Add a generic function that returns a list of asics on module. Vendors will implement their own for their platform. The function could be used for collecting fabric asic info in each module and populating into CHASSIS_STATE_DB (sonic-net/sonic-platform-daemons#175). To simplify the change, all fabric cards in system should be identical in terms of number of asics in a card.
Asic PCI ID (PCI address) is collected by chassisd (inside pmon - sonic-net/sonic-platform-daemons#175) and saved in CHASSIS_STATE_DB (in redis_chassis). CHASSIS_STATE_DB is accessible by swss containers. At docker-init.sh (script is called after swss container is created and before anything that could run in swss like orchagent...), we wait until asic PCI ID of the corresponding asic is populated by chassisd. We then update asic_id in CONFIG_DB of asic's database. A system supporting dynamic asic PCI ID identification requires to have a file (empty) use_pci_id_chassis in its platform dir. When orchagent runs, it has correct asic PCI ID in its CONFIG_DB. Together with this PR: sonic-net/sonic-platform-daemons#175 sonic-net/sonic-platform-common#185 Signed-off-by: Maxime Lorrillere <mlorrillere@arista.com>
… CONFIG_DB (#9681) Asic PCI ID (PCI address) is collected by chassisd (inside pmon - sonic-net/sonic-platform-daemons#175) and saved in CHASSIS_STATE_DB (in redis_chassis). CHASSIS_STATE_DB is accessible by swss containers. At docker-init.sh (script is called after swss container is created and before anything that could run in swss like orchagent...), we wait until asic PCI ID of the corresponding asic is populated by chassisd. We then update asic_id in CONFIG_DB of asic's database. A system supporting dynamic asic PCI ID identification requires to have a file (empty) use_pci_id_chassis in its platform dir. When orchagent runs, it has correct asic PCI ID in its CONFIG_DB. Together with this PR: sonic-net/sonic-platform-daemons#175 sonic-net/sonic-platform-common#185 Signed-off-by: Maxime Lorrillere <mlorrillere@arista.com> Co-authored-by: Maxime Lorrillere <mlorrillere@arista.com>
…ic-net#185) * [xcvrd] add support for logging mux_metrics events into state DB Description This PR adds support for logging events for change requests received by xcvrd from swss into state DB. a typical log would look like this: 1) "xcvrd_switch_standby_start" 2) "2021-05-13 10:01:15.690835" 3) "xcvrd_switch_standby_end" 4) "2021-05-13 10:01:15.696051" where the key-value pairs signify the type of event requested out of active/standby/unknown and the timestamp associated with the event. Motivation and Context This is required for xcvrd to log the events which it receives in form of requests from swss or any other module into the DB. The timestamp will be useful for debugging the timeline of an event processing from a perspective of other modules as well as xcvrd itself. How Has This Been Tested? ran the changes on starlab testbed, by changing the file in the container. Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: ngocdo ngocdo@arista.com
Add a generic function that returns a list of asics on module. Vendors will implement their own for their platform.
The function could be used for collecting fabric asic info in each module and populating into CHASSIS_STATE_DB (sonic-net/sonic-platform-daemons#175). To simplify the change, all fabric cards in system should be identical in terms of number of asics in a card.