[Nvidia-bluefield] Support for Standalone DPU in nvidia bluefield platform#56
[Nvidia-bluefield] Support for Standalone DPU in nvidia bluefield platform#56gpunathilell wants to merge 2 commits into
Conversation
| { | ||
| "interfaces": { | ||
| "Ethernet0": { | ||
| "default_brkout_mode": "1x100G" |
There was a problem hiding this comment.
Shouldn't it be 1x200G?
| SAI_DUMP_STORE_PATH=/var/log/bluefield/sdk-dumps | ||
| SAI_DUMP_STORE_AMOUNT=10 | ||
| DASH_ACL_DEFAULT_RULE_ACTION=permit | ||
| PORT_LAYOUT=2x100G |
| "index": "1,1,1,1", | ||
| "lanes": "0,1,2,3", | ||
| "breakout_modes": { | ||
| "1x100G": ["etp1"] |
| midplane_ip=$( ip -4 -o addr show eth0-midplane | awk '{print $4}' | cut -d'/' -f1 ) | ||
| if [[ $midplane_ip != "" ]] | ||
| then | ||
| if [[ $IS_APPLIANCE_DPU == "false" ]]; then |
There was a problem hiding this comment.
This should be in separate PR
There was a problem hiding this comment.
Split into separate PR
| # Enable ZMQ | ||
| LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "subtype"` | ||
| if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then | ||
| if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" || x"${LOCALHOST_SUBTYPE}" == x"Appliance" ]]; then |
There was a problem hiding this comment.
Please put in separate PR all related to the vendor independent implementation
| @@ -0,0 +1,74 @@ | |||
| #!/bin/bash | |||
| # | |||
| # Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. | |||
| platform=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["platform"]') | ||
| single_port=$([[ $hwsku == *"-com-dpu" ]] && echo true || echo false) | ||
| # Read MAC addresses | ||
| base_mac="$(echo $SYNCD_VARS | jq -r '.mac')" |
There was a problem hiding this comment.
This is duplication. Please remove
|
|
||
| if [[ $platform == "arm64-nvda_bf-9009d3b400ccea" ]]; then | ||
| # 8 cores DPU, reduce hugepages to 4096 | ||
| echo 4096 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages |
There was a problem hiding this comment.
let's have humber of huge pages defined in the device data directory.
There was a problem hiding this comment.
please add new key/value pair to platform.json
| declare -r FORCE_FW_CONFIG_RESET="${FORCE_FW_CONFIG_RESET:-false}" | ||
|
|
||
| # List of platforms that should skip firmware upgrade | ||
| PLATFORMS_SKIP_FW_UPGRADE=( | ||
| "9009d3b600" |
There was a problem hiding this comment.
let's define new flag in platform.json
| @@ -32,5 +32,6 @@ | |||
| "1x200G": ["etp2"] | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "SKIP_FW_UPDATE": "" | |||
There was a problem hiding this comment.
this should be the same as arm64-nvda_bf-9009d3b600cvaa
| @@ -46,6 +46,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}' | head -n 1) | |||
There was a problem hiding this comment.
Where is this variable used?
There was a problem hiding this comment.
It wasnt clear because master wasnt up to date to RC, please check now, variable is used
| declare -r FORCE_FW_CONFIG_RESET="${FORCE_FW_CONFIG_RESET:-false}" | ||
|
|
||
|
|
There was a problem hiding this comment.
Please remove redundant lines
|
Please update the header date in all modified files |
| sleep 1 | ||
| done | ||
|
|
||
| if [[ $SELF_REBOOT == "false" ]]; then |
There was a problem hiding this comment.
SELF_REBOOT != "true", this will be more "bash" like way to handle
Signed-off-by: gpunathilell <gpunathilell@nvidia.com>
…tically (sonic-net#25545) #### Why I did it src/sonic-dash-api ``` * 459cad6 - (HEAD -> master, origin/master, origin/HEAD) Add two extra HA states (#59) (3 hours ago) [Changrong Wu] * b3dfda7 - Add list of trusted VNIs (#56) (29 hours ago) [Lawrence Lee] ``` #### How I did it #### How to verify it #### Description for the changelog
Why I did it
Support for new DPU platform and for the Standalone DPU "Appliance" Topology
Changes introduced:
Platform independent changes:
dockers/docker-database/docker-database-init.shSupport for Appliance DPU, do not exportREMOTE_DB_PORTandREMOTE_DB_IPin case of appliance DPU, so that database is initialized with localDPU_APPL_DBandDPU_STATE_DBin case of appliance topologydockers/docker-orchagent/orchagent.sh- Allow zmq initialization in orchagent for Appliance subtypedockers/docker-sonic-gnmi/gnmi-native.sh- Allow zmq port initialization in the gnmi server for Appliance subtypesrc/sonic-config-engine/config_samples.py- Add support for appliance topology and generate basic default config during first bootsrc/sonic-yang-models/yang-models/sonic-device_metadata.yang- Yang validation update for appliance topologysrc/systemd-sonic-generator/systemd-sonic-generator.cpp- Differentiate between APPLIANCE_DPU and SMARTSWITCH_DPU during systemd service generation, this is done by checking forAPPLIANCE_DPUkey in platform.json---------Platform Specific changes-------------------
platform/nvidia-bluefield/installer/install.sh.j2andplatform/nvidia-bluefield/installer/create_sonic_imageSupport in bfb image generation for Appliance DPU (Generate the right grub configuration for CPU usage for NASA in case of 8 core vs 16 core device and execute reboot from the DPU in case of standalone DPU instead of waiting for host reboot)platform/nvidia-bluefield/bluefield-platform-modules/udev/82-net-setup-link.rulesRestore creation of 2 dataplane ports (Although at this point only one port is supported in NASA)platform/nvidia-bluefield/platform-api/sonic_platform/chassis.pyandplatform/nvidia-bluefield/platform-api/sonic_platform/device_data.py- Return False foris_smartswitchcheck, used in thermalctld to push data to smartswitch (Not needed for appliance)device/nvidia-bluefield/arm64-nvda_bf-9009d3b400ccea/Nvidia-9009d3b400CCEA- New DPU platform for 8-core Bluefield 3 Device -Nvidia-9009d3b400CCEAIncluding all Platform specific files and port configurationdevice/nvidia-bluefield/arm64-nvda_bf-9009d3b600cvaa/platform.json- Add APPLIANCE_DPU key to detect whether platform is an appliance DPU or Smartswitch DPUWork item tracking
How I did it
Updated changes as described above
How to verify it
Test with manual deployment of image generated after build on standalone DPU device to test the SONiC image
Which release branch to backport (provide reason below if selected)
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)