Skip to content
Closed
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
@@ -1,5 +1,5 @@
##
## Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
## Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES.
## Apache-2.0
##
## Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -36,7 +36,11 @@ RUN apt-get update && \
python3-dev \
python3-setuptools \
binutils-dev \
ethtool
ethtool \
python3-clang \
clang

RUN pip3 install ctypeslib2 clang==14

{% if docker_syncd_bluefield_debs.strip() -%}
# Copy locally-built Debian package dependencies
Expand Down
2 changes: 1 addition & 1 deletion platform/nvidia-bluefield/recipes/dpu-sai.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

DPU_SAI_VERSION = SAIBuild0.0.41.0
DPU_SAI_VERSION = SAIBuild0.0.43.1

# Place here URL where SAI sources exist
DPU_SAI_SOURCE_BASE_URL=
Expand Down
12 changes: 11 additions & 1 deletion platform/nvidia-bluefield/recipes/sdk.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -158,6 +158,16 @@ $(DOCA_FLOW_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCA_FLOW_DEV)_DEP_FLAGS := $(SDK_COMMON_FLAGS_LIST)
$(DOCA_FLOW_DEV)_DEP_FILES := $(DEP_FILES)

# hw-streering

$(LIB_NV_HWS)_CACHE_MODE := GIT_CONTENT_SHA
$(LIB_NV_HWS)_DEP_FLAGS := $(SDK_COMMON_FLAGS_LIST)
$(LIB_NV_HWS)_DEP_FILES := $(DEP_FILES)

$(LIB_NV_HWS_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(LIB_NV_HWS_DEV)_DEP_FLAGS := $(SDK_COMMON_FLAGS_LIST)
$(LIB_NV_HWS_DEV)_DEP_FILES := $(DEP_FILES)

# SDN appliance

SPATH := $($(SDN_APPL)_SRC_PATH)
Expand Down
29 changes: 25 additions & 4 deletions platform/nvidia-bluefield/recipes/sdk.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -19,7 +19,7 @@ SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sonic-bluefield-packages/bin

# Place here URL where SDK sources exist
SDK_SOURCE_BASE_URL =
SDK_VERSION = 25.4-RC3
SDK_VERSION = 25.7-RC1

SDK_COLLECTX_URL = https://linux.mellanox.com/public/repo/doca/1.5.2/debian12/aarch64/

Expand Down Expand Up @@ -223,8 +223,8 @@ DOCA_DEB_VERSION = $(DOCA_VERSION)-1

DOCA_COMMON = doca-sdk-common_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
$(DOCA_COMMON)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/doca
$(DOCA_COMMON)_RDEPENDS = $(DPDK) $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(LIBGRPC_DEV)
$(DOCA_COMMON)_DEPENDS = $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(DPDK_DEV) $(LIBGRPC_DEV)
$(DOCA_COMMON)_RDEPENDS = $(DPDK) $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(LIBGRPC_DEV) $(LIB_NV_HWS)
$(DOCA_COMMON)_DEPENDS = $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(DPDK_DEV) $(LIBGRPC_DEV) $(LIB_NV_HWS_DEV)
DOCA_COMMON_DEV = libdoca-sdk-common-dev_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
$(DOCA_COMMON_DEV)_DEPENDS = $(DOCA_COMMON)

Expand Down Expand Up @@ -276,6 +276,27 @@ else
SONIC_ONLINE_DEBS += $(DOCA_DEBS) $(DOCA_DEV_DEBS)
endif

# hw-steering packages, needed for doca-flow runtime
NV_HWS_VERSION = $(call get_sdk_package_version_full,"nv_hws")

LIB_NV_HWS = libnvhws1_${NV_HWS_VERSION}_${CONFIGURED_ARCH}.deb
$(LIB_NV_HWS)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/nv_hws
$(LIB_NV_HWS)_DEPENDS = $(IB_VERBS_DEV)

LIB_NV_HWS_DEV = libnvhws-dev_${NV_HWS_VERSION}_${CONFIGURED_ARCH}.deb
$(LIB_NV_HWS_DEV)_DEPENDS = $(LIB_NV_HWS)

ifeq ($(SDK_FROM_SRC), y)
$(eval $(call add_derived_package,$(LIB_NV_HWS),$(LIB_NV_HWS_DEV)))
else
SONIC_ONLINE_DEBS += $(LIB_NV_HWS) $(LIB_NV_HWS_DEV)
endif

SDK_SRC_TARGETS += $(LIB_NV_HWS)
SDK_DEBS += $(LIB_NV_HWS) $(LIB_NV_HWS_DEV)

export LIB_NV_HWS LIB_NV_HWS_DEV

# SDN Appliance

SDN_APPL_VER=$(call get_sdk_package_version_full,"nasa")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 8801a2b3e74e3383db4a7f630a0a7b439d34a7a1 Mon Sep 17 00:00:00 2001
From: vkarri <vkarri@nvidia.com>
Date: Fri, 30 May 2025 01:54:09 +0000
Subject: [PATCH] Add WA to a bug in doca build script which matches on
prefixes

doca-sdk-flow-dpa-provider depends on FlexIO but doca-sdk-flow does not.
build script because of the prefix match assumes doca-sdk-flow depends on FlexIO.
Remove doca-sdk-flow-dpa-provider from FLEXIO_PACKAGES array until this is fixed in DOCA

Signed-off-by: vkarri <vkarri@contoso.com>
---
devtools/scripts/doca_build_packages.sh | 1 -
1 file changed, 1 deletion(-)

diff --git a/devtools/scripts/doca_build_packages.sh b/devtools/scripts/doca_build_packages.sh
index 44271ed..0f3c075 100755
--- a/devtools/scripts/doca_build_packages.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Have you created a redmine ticket for this?

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.

yeah, 4472616

+++ b/devtools/scripts/doca_build_packages.sh
@@ -152,7 +152,6 @@ FLEXIO_PACKAGES=(
'doca-spcx-cc'
'doca-sdk-pcc-ztr-rttcc-algo'
'doca-sdk-sta'
- 'doca-sdk-flow-dpa-provider'
)

CUDA_PACKAGES=(
--
2.39.5

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion platform/nvidia-bluefield/sdk-src/doca/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
# Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES.
# Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -36,6 +36,8 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
pushd doca/
find . -type f -exec touch {} +

patch -p1 < ../0001-Add-WA-to-a-bug-in-doca-build-script-which-matches-o.patch

source /etc/profile.d/mlnx-dpdk-aarch64-linux-gnu.sh
source ./devtools/public/set_env_variables.sh --deb

Expand Down
5 changes: 5 additions & 0 deletions platform/nvidia-bluefield/sdk-src/nv_hws/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except these files
!.gitignore
!Makefile
42 changes: 42 additions & 0 deletions platform/nvidia-bluefield/sdk-src/nv_hws/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES.
# 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.
#

.ONESHELL:
SHELL = /bin/bash

MAIN_TARGET = $(LIB_NV_HWS)
DERIVED_TARGETS = $(LIB_NV_HWS_DEV)
NV_HWS_PATH := $(shell pwd)/nv_hws

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Make sure errors will be reported
set -e

# get sources
rm -rf nv_hws/ nv_hws.zip

# get sources
wget $(SDK_SOURCE_URL)/nv_hws.zip
unzip nv_hws.zip

pushd nv_hws/
PATH=/usr/bin/:$(PATH) dpkg-buildpackage -d -us -uc -b -j1 --admindir $(SONIC_DPKG_ADMINDIR)
popd

mv $(DERIVED_TARGETS) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
3 changes: 3 additions & 0 deletions sonic-slave-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ RUN pip3 install \
ctypesgen==1.0.2 \
crc16

# For nvidia-bluefield sdk
RUN pip3 install ctypeslib2 clang==14

# For sonic config engine testing
# Install pyangbind here, outside sonic-config-engine dependencies, as pyangbind causes enum34 to be installed.
# enum34 causes Python 're' package to not work properly as it redefines an incompatible enum.py module
Expand Down