forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
[Nvidia-bluefield] Support for Standalone DPU in nvidia bluefield platform #56
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
Open
gpunathilell
wants to merge
2
commits into
master
Choose a base branch
from
BF3_POC
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...e/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/Nvidia-9009d3b400CCEA/context_config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "CONTEXTS": [ | ||
| { | ||
| "guid" : 0, | ||
| "name" : "syncd0", | ||
| "dbAsic" : "ASIC_DB", | ||
| "dbCounters" : "COUNTERS_DB", | ||
| "dbFlex": "FLEX_COUNTER_DB", | ||
| "dbState" : "STATE_DB", | ||
| "zmq_enable": true, | ||
| "zmq_endpoint": "tcp://127.0.0.1:5555", | ||
| "zmq_ntf_endpoint": "tcp://127.0.0.1:5556", | ||
| "switches": [ | ||
| { | ||
| "index" : 0, | ||
| "hwinfo" : "" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
10 changes: 10 additions & 0 deletions
10
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/Nvidia-9009d3b400CCEA/hwsku.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "interfaces": { | ||
| "Ethernet0": { | ||
| "default_brkout_mode": "1x200G" | ||
| }, | ||
| "Ethernet4": { | ||
| "default_brkout_mode": "1x200G" | ||
| } | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/Nvidia-9009d3b400CCEA/port_config.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ## | ||
| ## SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
| ## Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| ## SPDX-License-Identifier: Apache-2.0 | ||
| ## | ||
| ## Licensed under the Apache License, Version 2.0 (the "License"); | ||
| ## you may not use this file except in compliance with the License. | ||
| ## You may obtain a copy of the License at | ||
| ## | ||
| ## http://www.apache.org/licenses/LICENSE-2.0 | ||
| ## | ||
| ## Unless required by applicable law or agreed to in writing, software | ||
| ## distributed under the License is distributed on an "AS IS" BASIS, | ||
| ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ## See the License for the specific language governing permissions and | ||
| ## limitations under the License. | ||
| ## | ||
| # name lanes alias index | ||
| Ethernet0 0,1,2,3 etp1 1 | ||
| Ethernet4 4,5,6,7 etp2 2 |
5 changes: 5 additions & 0 deletions
5
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/Nvidia-9009d3b400CCEA/sai.profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| SAI_DUMP_STORE_PATH=/var/log/bluefield/sdk-dumps | ||
| SAI_DUMP_STORE_AMOUNT=10 | ||
| DASH_ACL_DEFAULT_RULE_ACTION=permit | ||
| PORT_LAYOUT=2x200G | ||
| HAIRPIN=false |
1 change: 1 addition & 0 deletions
1
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/default_sku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Nvidia-9009d3b400CCEA appliance |
2 changes: 2 additions & 0 deletions
2
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/installer.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| GRUB_CMDLINE_LINUX="console=ttyAMA1 console=hvc0 console=ttyAMA0 earlycon=pl011,0x13010000 quiet" | ||
| ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="isolcpus=2-6 nohz_full=2-6 rcu_nocbs=2-6" |
53 changes: 53 additions & 0 deletions
53
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/pcie.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| - bus: '00' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: a2db | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 BlueField-3 SoC Crypto disabled | ||
| (rev 01)' | ||
| - bus: '01' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: 197b | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] | ||
| (rev 01)' | ||
| - bus: '02' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: 197b | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] | ||
| (rev 01)' | ||
| - bus: '02' | ||
| dev: '03' | ||
| fn: '0' | ||
| id: 197b | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] | ||
| (rev 01)' | ||
| - bus: '03' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: a2dc | ||
| name: 'Ethernet controller: Mellanox Technologies MT43244 BlueField-3 integrated | ||
| ConnectX-7 network controller (rev 01)' | ||
| - bus: '03' | ||
| dev: '00' | ||
| fn: '1' | ||
| id: a2dc | ||
| name: 'Ethernet controller: Mellanox Technologies MT43244 BlueField-3 integrated | ||
| ConnectX-7 network controller (rev 01)' | ||
| - bus: '04' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: 197b | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] | ||
| (rev 01)' | ||
| - bus: '05' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: 197b | ||
| name: 'PCI bridge: Mellanox Technologies MT43244 Family [BlueField-3 SoC PCIe Bridge] | ||
| (rev 01)' | ||
| - bus: '06' | ||
| dev: '00' | ||
| fn: '0' | ||
| id: '0001' | ||
| name: 'Non-Volatile memory controller: KIOXIA Corporation Device 0001' |
38 changes: 38 additions & 0 deletions
38
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/platform.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "chassis": { | ||
| "name": "Nvidia-9009d3b400CCEA", | ||
| "components": [], | ||
| "fans": [], | ||
| "fan_drawers": [], | ||
| "psus": [], | ||
| "thermals": [], | ||
| "sfps": [ | ||
| { | ||
| "name": "Ethernet0" | ||
| }, | ||
| { | ||
| "name": "Ethernet4" | ||
| } | ||
| ] | ||
| }, | ||
| "interfaces": { | ||
| "Ethernet0": { | ||
| "index": "1,1,1,1", | ||
| "lanes": "0,1,2,3", | ||
| "breakout_modes": { | ||
| "1x200G": ["etp1"] | ||
| } | ||
| }, | ||
| "Ethernet4": { | ||
| "index": "2,2,2,2", | ||
| "lanes": "4,5,6,7", | ||
| "breakout_modes": { | ||
| "1x200G": ["etp2"] | ||
| } | ||
| } | ||
| }, | ||
| "APPLIANCE_DPU": "", | ||
| "SKIP_FW_UPDATE": "", | ||
| "SELF_REBOOT": "", | ||
| "HUGEPAGES": "4096" | ||
| } |
1 change: 1 addition & 0 deletions
1
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/platform_asic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nvidia-bluefield |
7 changes: 7 additions & 0 deletions
7
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/pmon_daemon_control.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "skip_ledd": true, | ||
| "skip_psud": true, | ||
| "skip_fancontrol": true, | ||
| "skip_chassisd": true, | ||
| "skip_ycabled": true | ||
| } |
6 changes: 6 additions & 0 deletions
6
device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/system_health_monitoring_config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "services_to_ignore": [], | ||
| "devices_to_ignore": ["psu", "fan"], | ||
| "user_defined_checkers": ["python3 -m sonic_platform.throttling_checks.cpu_check", "python3 -m sonic_platform.throttling_checks.ddr_check"], | ||
| "polling_interval": 60 | ||
| } | ||
21 changes: 21 additions & 0 deletions
21
...e/nvidia-bluefield/arm64-nvda_bf-9009d3b600cvaa/Nvidia-9009d3b600CVAA/context_config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "CONTEXTS": [ | ||
| { | ||
| "guid" : 0, | ||
| "name" : "syncd0", | ||
| "dbAsic" : "ASIC_DB", | ||
| "dbCounters" : "COUNTERS_DB", | ||
| "dbFlex": "FLEX_COUNTER_DB", | ||
| "dbState" : "STATE_DB", | ||
| "zmq_enable": true, | ||
| "zmq_endpoint": "tcp://127.0.0.1:5555", | ||
| "zmq_ntf_endpoint": "tcp://127.0.0.1:5556", | ||
| "switches": [ | ||
| { | ||
| "index" : 0, | ||
| "hwinfo" : "" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,5 +32,8 @@ | |
| "1x200G": ["etp2"] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "APPLIANCE_DPU": "", | ||
| "SELF_REBOOT": "", | ||
| "SKIP_FW_UPDATE": "" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,5 +32,7 @@ | |
| "1x200G": ["etp2"] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "SKIP_FW_UPDATE": "", | ||
| "SELF_REBOOT": "" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
| # Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
|
|
@@ -64,7 +64,7 @@ if [[ -n "$lspci_output" ]]; then | |
| for key in "${DEVICE_ORDER[@]}"; do | ||
| if echo "$lspci_output" | grep "$VENDOR_ID:$key" &>/dev/null; then | ||
| DEVICE_TYPE="${DEVICE_DICT[$key]}" | ||
| DEVICE_PCI_ID=$(echo "$lspci_output" | grep "$VENDOR_ID:$key" | awk '{print $1}') | ||
| DEVICE_PCI_ID=$(echo "$lspci_output" | grep "$VENDOR_ID:$key" | awk '{print $1}' | head -n 1) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this variable used?
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasnt clear because master wasnt up to date to RC, please check now, variable is used |
||
| RC=$SUCCESS_CODE | ||
| break | ||
| fi | ||
|
|
||
1 change: 1 addition & 0 deletions
1
platform/nvidia-bluefield/bluefield-platform-modules/udev/82-net-setup-link.rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/net/e*", ATTR{phys_port_name}=="p0", NAME="Ethernet0" | ||
| SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:00.0/0000:03:00.1/net/e*", ATTR{phys_port_name}=="p1", NAME="Ethernet4" | ||
| SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/net/e*", ATTR{phys_port_name}=="c1pf0", NAME="eth0-midplane", RUN+="/usr/bin/bfnet.sh configure-midplane-iface" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # | ||
| # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES | ||
| # Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| configure_syncd_init_common() { | ||
| # Read MAC addresses | ||
| base_mac="$(echo $SYNCD_VARS | jq -r '.mac')" | ||
| hwsku=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["hwsku"]') | ||
| platform=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["platform"]') | ||
| single_port=$([[ $hwsku == *"-com-dpu" ]] && echo true || echo false) | ||
| eth0_mac=$(cat /sys/class/net/Ethernet0/address) | ||
|
|
||
| cp $HWSKU_DIR/sai.profile /tmp/sai-temp.profile | ||
|
|
||
| echo >> /tmp/sai-temp.profile | ||
|
|
||
| DEVICE_TYPE=$(/usr/bin/asic_detect/asic_detect.sh) | ||
| if [[ $? -eq 0 ]]; then | ||
| ASIC_PROFILE_FILE="sai-${DEVICE_TYPE}.profile" | ||
| ASIC_PROFILE_PATH="/etc/mlnx/${ASIC_PROFILE_FILE}" | ||
| if [ -f "$ASIC_PROFILE_PATH" ]; then | ||
| cat "$ASIC_PROFILE_PATH" >> /tmp/sai-temp.profile | ||
| echo >> /tmp/sai-temp.profile | ||
| fi | ||
| else | ||
| echo "Warning: ASIC is not detected..." | ||
| fi | ||
|
|
||
| # keep only the first occurence of each prefix with '=' sign, and remove the others. | ||
| awk -F= '!seen[$1]++' /tmp/sai-temp.profile > /tmp/sai.profile | ||
| rm -f /tmp/sai-temp.profile | ||
|
|
||
| # Update sai.profile with MAC_ADDRESS | ||
| echo "DEVICE_MAC_ADDRESS=$base_mac" >> /tmp/sai.profile | ||
| echo "PORT_1_MAC_ADDRESS=$eth0_mac" >> /tmp/sai.profile | ||
|
|
||
| CMD_ARGS+=" -l -p /tmp/sai.profile -w 180000000" | ||
|
|
||
| SDK_DUMP_PATH=$(cat /tmp/sai.profile | grep "SAI_DUMP_STORE_PATH" | cut -d = -f2) | ||
| if [ ! -d "$SDK_DUMP_PATH" ]; then | ||
| mkdir -p "$SDK_DUMP_PATH" | ||
| fi | ||
|
|
||
| platform_json_path="/usr/share/sonic/platform/platform.json" | ||
|
|
||
| hugepages=$(jq -r '.HUGEPAGES' $platform_json_path) | ||
| if [ -z "$hugepages" ]; then | ||
| hugepages=9216 | ||
| fi | ||
|
|
||
| echo $hugepages > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages | ||
|
|
||
| mkdir -p /mnt/huge | ||
| mount -t hugetlbfs pagesize=1GB /mnt/huge | ||
|
|
||
| ethtool -A Ethernet0 rx off tx off | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.