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

[BFN] Provide unified approach to select P4 profile based on chip family #1089

Merged
merged 2 commits into from
Jul 29, 2022

Conversation

taras-keryk
Copy link
Contributor

Currently, we do not have an option to select a default profile for each chip. One default profile per package only.
We cannot select a chip suitable profile on SDK package installation because we must detect the chip type first.

However, we have a logic in SONiC which selects suitable profile on system boot, if not selected by the user:
https://github.com/Azure/sonic-buildimage/blob/master/device/barefoot/x86_64-accton_as9516_32d-r0/syncd.conf

This is SONiC generic way to do some platform specific hooks on syncd start:
https://github.com/Azure/sonic-sairedis/blob/bc7ccc2d5c2ddad53ebd696f81ff3d45aacbf438/syncd/scripts/syncd_init_common.sh#L328

Probably it's better to move this logic here https://github.com/Azure/sonic-sairedis/blob/26094f8a614db7ac97b91516a6946402c8a81370/syncd/scripts/syncd_init_common.sh#L240

and use “chip_family” from switch-tna-sai.conf to do default p4 profile selection from one place – syncd_init_common.sh

https://github.com/Azure/sonic-buildimage/blob/e4e3adcbc2b47174e2ccfb307f6258ba3cd26b04/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/switch-tna-sai.conf#L4

@taras-keryk taras-keryk marked this pull request as draft July 22, 2022 19:53
@taras-keryk taras-keryk marked this pull request as ready for review July 22, 2022 19:57
kcudnik
kcudnik previously approved these changes Jul 23, 2022
akokhan
akokhan previously approved these changes Jul 23, 2022
@taras-keryk taras-keryk dismissed stale reviews from akokhan and kcudnik via c8c6565 July 25, 2022 06:23
akokhan
akokhan previously approved these changes Jul 25, 2022
@akokhan
Copy link
Contributor

akokhan commented Jul 26, 2022

@kcudnik , could you please merge this PR? Thank you.

@kcudnik kcudnik merged commit 4853881 into sonic-net:master Jul 29, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Aug 9, 2022
Update sonic-sairedis submodule pointer to include the following:
* [sonic-sairedis] Support bulk counter ([sonic-net#1094](sonic-net/sonic-sairedis#1094))
* Transfer organization from Azure to sonic-net ([sonic-net#1095](sonic-net/sonic-sairedis#1095))
* [BFN] Provide unified approach to select P4 profile based on chip family ([sonic-net#1089](sonic-net/sonic-sairedis#1089))
* Add support of mdio IPC server class using sai switch api and unix socket ([sonic-net#1080](sonic-net/sonic-sairedis#1080))
* [FlexCounter] Refactor FlexCounter class  ([sonic-net#1073](sonic-net/sonic-sairedis#1073))

Signed-off-by: dprital <drorp@nvidia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Aug 29, 2022
Update sonic-sairedis submodule pointer to include the following:
* Run 20 vs tests at a time. ([sonic-net#1111](sonic-net/sonic-sairedis#1111))
* [asan] suppress the static variable leaks ([sonic-net#1085](sonic-net/sonic-sairedis#1085))
* [sonic-sairedis] Support bulk counter ([sonic-net#1094](sonic-net/sonic-sairedis#1094))
* Transfer organization from Azure to sonic-net ([sonic-net#1095](sonic-net/sonic-sairedis#1095))
* [BFN] Provide unified approach to select P4 profile based on chip family ([sonic-net#1089](sonic-net/sonic-sairedis#1089))

Signed-off-by: dprital <drorp@nvidia.com>
mlorrillere added a commit to mlorrillere/sonic-buildimage that referenced this pull request Sep 8, 2022
* 660a920 [Chassis] Create fabric ports for switch_type fabric. (sonic-net/sonic-sairedis#1114)
* 8140c22 Fix issue: bulk counter feature cannot compile on platforms having no sai_bulk_object_get_stats/sai_bulk_object_clear_stats (sonic-net/sonic-sairedis#1105)
* 0aa60f5 [lgtm] Add uuid library (sonic-net/sonic-sairedis#1119)
* e8a01a8 Add retry on zmq functions if fail with EINTR. (sonic-net/sonic-sairedis#1109)
* 594b242 Add SAI_PORT_ATTR_OPER_SPEED support (sonic-net/sonic-sairedis#1107)
* 4c9e048 Add Xsight specific syncd start options (sonic-net/sonic-sairedis#1112)
* da26ace Run 20 vs tests at a time. (sonic-net/sonic-sairedis#1111)
* ffc4109 [asan] suppress the static variable leaks (sonic-net/sonic-sairedis#1085)
* bfd37e3 [sonic-sairedis] Support bulk counter (sonic-net/sonic-sairedis#1094)
* 90ba09a Transfer organization from Azure to sonic-net (sonic-net/sonic-sairedis#1095)
* 4853881 [BFN] Provide unified approach to select P4 profile based on chip family (sonic-net/sonic-sairedis#1089)
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…ily (sonic-net#1089)

* Added check if SDE profile configured

* put $PROFILE_DEFAULT into quotes, removed one extra space before $PROFILE_DEFAULT
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