Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" : ""
}
]
}
]
}
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"
}
}
}
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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Nvidia-9009d3b400CCEA appliance
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 device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/pcie.yaml
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 device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/platform.json
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nvidia-bluefield
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
}
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"],
Comment thread
oleksandrivantsiv marked this conversation as resolved.
"polling_interval": 60
}
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" : ""
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"1x200G": ["etp2"]
}
}
}
},
"APPLIANCE_DPU": "",
"SELF_REBOOT": "",
"SKIP_FW_UPDATE": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
"1x200G": ["etp2"]
}
}
}
},
"SKIP_FW_UPDATE": "",
"SELF_REBOOT": ""
}
4 changes: 2 additions & 2 deletions platform/mellanox/asic_detect/asic_detect.sh
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");
Expand Down Expand Up @@ -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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Where is this variable used?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The 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
Expand Down
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"
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ RUN apt-get clean -y && \
rm -rf /debs

COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["files/syncd_init_bf_platform.sh", "/usr/bin/"]
COPY ["critical_processes", "/etc/supervisor/"]

RUN mkdir -p /etc/mlnx/
Expand Down
71 changes: 71 additions & 0 deletions platform/nvidia-bluefield/files/syncd_init_bf_platform.sh
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
}
Loading
Loading