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

Generalizing config.bcm support for BRCM silicons #699

Merged
merged 15 commits into from
May 26, 2021

Conversation

geans-pin
Copy link
Contributor

HLD for per-switching silicon Common config for Broadcom Supported Platforms design

@lguohan lguohan requested a review from gechiang April 14, 2021 21:29
@lguohan
Copy link
Contributor

lguohan commented Apr 14, 2021

@gechiang , can you take a look?

```
Nov 3 09:19:25.373964 2020 sonic INFO syncd#supervisord: syncd Merging
/usr/share/sonic/hwsku/td3-ix8a-bwde-48x25G+8x100G.config.bcm with
/usr/share/sonic/device/x86_64-broadcom_common/x86_64-broadcom_b77
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between the b77 and b87 version of the common td3 config.bcm? from chip_id you can only tell if it is TD3/TH/TD2/... etc but how can you use that to select which one of the TD3 to use? Can you elaborate on this?

Copy link
Contributor Author

@geans-pin geans-pin Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The b77 and b87 is different TD3 model which is the upper 3 nibbles of the switching silicon's device ID.

  2. We use the CHIP ID to select the common config folder. FYI, see the mention in HLD :
    In the config_syncd_bcm() function, it will load the common silicon config.bcm file by looking for a *.bcm file in the /usr/share/sonic/device/x86_64-broadcom_common/x86_64-broadcom_{$chip_id} folder where the $chip_id is the upper 3 nibbles of the switching silicon's device ID as listed in SDK/include/soc/devids.h.

  3. I will fix the the typo as the following.
    Then, merge common broadcom-sonic-{$chip_name}.config.bcm file with the existing platform specific config.bcm file in which the duplicate configuration entries in the platform specific file will override entries in the common broadcom-sonic-{$chip_name}.config.bcm file.

- Check the syslog to make sure the common config merged to
config.bcm successfully
- Check the final merged config.bcm dump from show tech dump

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have plans to extract those "common" soc properties from each of the platform specific config.bcm file into the common config.bcm file?

Copy link
Contributor Author

@geans-pin geans-pin Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we don't have the plans to merge anything common from platform specific config.bcm to common config.bcm, since It will break our rule. In the design, when we find the same common config property existing on both platform specific and common specific. We will keep the original config in platform specific without merging it.

@geans-pin geans-pin changed the title Per-switching silicon Common config for Broadcom Supported Platforms Generalizing config.bcm support for BRCM silicons Apr 16, 2021
Copy link
Contributor

@rlhui rlhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if a platform have multiple brcm asics, is it handled?

|-- x86_64-broadcom_b87-- broadcom-sonic-td3.config.bcm
|-- x86_64-broadcom_b96-- broadcom-sonic-th.config.bcm
|-- x86_64-broadcom_b97-- broadcom-sonic-th2.config.bcm
|-- x86_64-broadcom_b98-- broadcom-sonic-th3.config.bcm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the dnx family of chips, e.g. Jericho2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common config of JR2 is not created so far. The framework will not handle this.

@gechiang
Copy link
Contributor

gechiang commented May 8, 2021

At the community review session we raised a few questions which require you to update with clarifications. Here are the set of items I noted down:

  1. Can you add a section to discuss what is the expectation in regard to WARM Reboot? Does this new feature has any impact during WARM boot where the new image being booted to contains new changes in the common portion?
  2. Please clearly document if there are specific "Mandatory" properties that are part of the common SOC properties and the ODM should never touch those properties in the ODM config.bcm file. Based on your new logic which places ODM's bcm.config SOC properties being higher priority, we need clear indication to these set of "Mandatory common" SOC properties that ODM should never attempt to modify...
  3. How do you introduce any "new" common SOC properties and the definition/purpose of each SOC property clearly so the community become aware of those new SOC properties. Clearly mark/indicate whether the newly introduced SOC property is "mandatory" or can be overwritten by ODM if they do not wish to accept such behavior.?

@geans-pin
Copy link
Contributor Author

My Reply inline:

At the community review session we raised a few questions which require you to update with clarifications. Here are the set of items I noted down:

  1. Can you add a section to discuss what is the expectation in regard to WARM Reboot? Does this new feature has any impact during WARM boot where the new image being booted to contains new changes in the common portion?

[GR] We will update the new section on the enhancement PR after this base line PR merged.

  1. Please clearly document if there are specific "Mandatory" properties that are part of the common SOC properties and the ODM should never touch those properties in the ODM config.bcm file. Based on your new logic which places ODM's bcm.config SOC properties being higher priority, we need clear indication to these set of "Mandatory common" SOC properties that ODM should never attempt to modify...

[GS] We will update the Documents on the enhancement PR after this base line PR merged.

  1. How do you introduce any "new" common SOC properties and the definition/purpose of each SOC property clearly so the community become aware of those new SOC properties. Clearly mark/indicate whether the newly introduced SOC property is "mandatory" or can be overwritten by ODM if they do not wish to accept such behavior.?

[GS] By default the common config feature is disabled, and ODM can enable this feature by touch the
common_config_support file in the $PLATFORM_DIR

@gechiang gechiang merged commit daf122e into sonic-net:master May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants