Skip to content

[Mellanox] Add common sai.profile per asic and asic_detect.sh script#67

Closed
noaOrMlnx wants to merge 6 commits intomasterfrom
common-sai-profile-mlnx-nvbf3
Closed

[Mellanox] Add common sai.profile per asic and asic_detect.sh script#67
noaOrMlnx wants to merge 6 commits intomasterfrom
common-sai-profile-mlnx-nvbf3

Conversation

@noaOrMlnx
Copy link
Owner

Why I did it

This PR adds new script for Mellanox asic detection, as there are few places that use it.
The script queries "lspci" command to find out what is the current device ID.
If the script was successful, we write the value to asic_type so the script will be running only 1 time.

Also, added sai-spcx.profile and sai-bf3.profile with relevant parameters.

How I did it

Added new script to detect asic type, and new files for per-asic sai.profile

How to verify it

Run on switch and make sure the parameters are applied to sai.profile inside syncd.

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@noaOrMlnx noaOrMlnx force-pushed the common-sai-profile-mlnx-nvbf3 branch from d0410d7 to 6e9e603 Compare July 13, 2025 18:15
if [[ -n "${DEVICE_DICT[$DEVICE_ID]}" ]]; then
DEVICE_TYPE="${DEVICE_DICT[$DEVICE_ID]}"
else
DEVICE_TYPE=$TYPE_UNKNOWN

Choose a reason for hiding this comment

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

If the ${DEVICE_TYPE} is "unknown" script should return -1 return code to let caller know that the ASIC hasn't been detected.

#

if [[ -f "/usr/bin/asic_detect/asic_type" ]]; then
cat /usr/bin/asic_detect/asic_type

Choose a reason for hiding this comment

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

if during the previous execution script saved "unknown" into the file we need to try to detect ASIC again. E.g.:

if [[ -f "/usr/bin/asic_detect/asic_type" ]] && [[ $(cat /usr/bin/asic_detect/asic_type) != "unknown" ]]; then
...
fi

Copy link
Owner Author

Choose a reason for hiding this comment

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

@oleksandrivantsiv I already handled it on line 43 - I am not writing to asic_type unless it's different from "unknown".

@noaOrMlnx noaOrMlnx closed this Aug 17, 2025
noaOrMlnx pushed a commit that referenced this pull request Oct 26, 2025
…tomatically (sonic-net#992)

#### Why I did it
src/sonic-swss
```
* 7498ae9 - (HEAD -> 202412, origin/202412) Merge pull request #67 from mssonicbld/sonicbld/202412-merge (21 hours ago) [mssonicbld]
* bbce4b4 - Merge branch '202411' of https://github.com/sonic-net/sonic-swss into 202412 (21 hours ago) [Sonic Automation]
* fceb196 - Revert "Optimize counter polling interval by making it more accurate (11 days ago) [Kumaresh Perumal]
* d88b694 - Remove unused string variables in flexcounterorch.cpp (12 days ago) [Kumaresh Perumal]
|\ 
| failure_prs.log skip_prs.log 1e4315e - Remove unused string variables in flexcounterorch.cpp (12 days ago) [Kumaresh Perumal]
|/ 
* e82f8c2 - Revert "Optimize counter polling interval by making it more accurate (sonic-net#3500)" (12 days ago) [Kumaresh Perumal]
```
#### How I did it
#### How to verify it
#### Description for the changelog
noaOrMlnx pushed a commit that referenced this pull request Oct 26, 2025
…D automatically (sonic-net#1283)

#### Why I did it
src/sonic-sairedis
```
* 0ae8494 - (HEAD -> 202412, origin/HEAD, origin/202412) [unittest ]Conditionally enable TestServerSaiMockChannel (#67) (37 minutes ago) [mssonicbld]
* 12b21f3 - [syncd] Check whether stat_st and tam_telemetry is defined (sonic-net#1590) (#65) (5 days ago) [Ze Gan]
* 701a114 - [TAM]: Fix TAM notification and vslib implementation (sonic-net#1606) (#62) (5 days ago) [Ze Gan]
* 6b97f74 - [SAI]: Update SAI to support QUERY_STATS_ST_CAPABILITY and TAM (sonic-net#1573) (#63) (5 days ago) [Ze Gan]
```
#### How I did it
#### How to verify it
#### Description for the changelog
noaOrMlnx pushed a commit that referenced this pull request Oct 26, 2025
…tomatically (sonic-net#1600)

#### Why I did it
src/sonic-gnmi
```
*   64e8539 - (HEAD -> 202412, origin/202412) Merge pull request sonic-net#97 from Azure/202412-dev (4 hours ago) [Zain Budhwani]
|\  
| * 0de6456 - Adapt to the new usages of arguments (sonic-net#93) (6 hours ago) [Changrong Wu]
| * 0be3a77 - Remove redundant helper function toString from show_common.go (sonic-net#86) (23 hours ago) [gnemuw]
| * ff54cad - Fetch arguments from path and supply getters with parsed arguments (sonic-net#82) (25 hours ago) [Zain Budhwani]
| * 14660a2 - Add `show dropcounters config` (sonic-net#79) (33 hours ago) [Changrong Wu]
| * 1b7b835 - Added telemetry support for the 'show queue watermark' command. (#72) (5 days ago) [mramezani95]
| * 417ebe5 - interaces description implementation (#69) (6 days ago) [Vijay Sharma]
| * d3140d8 - Implement 'show ipv6 route' command (#64) (6 days ago) [gnemuw]
| * a715f58 - Add show services (#74) (7 days ago) [Zhaoyang Zhang]
| * fe4ab1c - Fix the show headroom_pool typo (sonic-net#76) (7 days ago) [Guoqiang Yuan]
| * 0277718 - Add show interface naming_mode (#73) (7 days ago) [axin]
| * 03519fe - Add show interface neighbor expected (#54) (7 days ago) [jiayuj2021]
| * f29223a - Add 'show ipv6 fib' command (#67) (7 days ago) [Guoqiang Yuan]
| * 8ae677e - Add SHOW implementation for processes (#63) (8 days ago) [yiliu4]
| * 61927f9 - [202412] Add support of 'show ipv6 link-local-mode' command (#65) (8 days ago) [cgangx]
| * 4dca30c - Add show interface flap support (#66) (8 days ago) [axin]
| * 18c276b - Add show system memory (#57) (8 days ago) [Changrong Wu]
| * 00cc010 - Add support for show interface status (#32) (8 days ago) [Changrong Wu]
| * 941b3a2 - Minor changes from VLAN Brief PR Comments (#68) (8 days ago) [Vijay Sharma]
| * af89dec - show uptime (#39) (9 days ago) [Vijay Sharma]
| * 718ffd7 - Add show ipv6 bgp network (#61) (9 days ago) [Zhaoyang Zhang]
| * 8346e29 - [202412] Add support for 'show ipv6 bgp neighbors (#58) (9 days ago) [zitingguo-ms]
| * aec577c - Add implementation for show lldp neighbors (#56) (10 days ago) [nanali-msft]
| * b561228 - Add show dropcounters counts / capabilities (#40) (13 days ago) [jiayuj2021]
| * 16d6ccc - Add support for dev branches in CodeQL analysis (13 days ago) [Zain Budhwani]
* 8e41780 - Revert "Sync 202412 dev with 202412 (sonic-net#94)" (sonic-net#96) (4 hours ago) [Zain Budhwani]
* c5b5383 - Sync 202412 dev with 202412 (sonic-net#94) (5 hours ago) [Zain Budhwani]
```
#### How I did it
#### How to verify it
#### Description for the changelog
noaOrMlnx pushed a commit that referenced this pull request Jan 21, 2026
…ly (sonic-net#24445)

#### Why I did it
src/dhcprelay
```
* 8772dd5 - (HEAD -> master, origin/master, origin/HEAD) [dhcp_relay] sonic dhcp relay agent for IPv4 (#67) (20 hours ago) [Shivashankar C R]
```
#### How I did it
#### How to verify it
#### Description for the changelog
noaOrMlnx pushed a commit that referenced this pull request Feb 18, 2026
…sonic-net#25508)

#### Why I did it
src/dhcpmon
```
* d78974f - (HEAD -> master, origin/master, origin/HEAD) [dhcp_mon] Add missing #include <algorithm> for std::replace (#68) (31 hours ago) [rustiqly]
* d4934fa - Add .github/copilot-instructions.md for AI-assisted development (#67) (31 hours ago) [rustiqly]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

2 participants