Skip to content

Commit

Permalink
[Nvidia] [DPU] Update SAI to SAIBuild0.0.30.0, SDK to v24.4-RC2 (soni…
Browse files Browse the repository at this point in the history
…c-net#18769)

- Why I did it
Update SAI to SAIBuild0.0.30.0, SDK to v24.4-RC2.

- How I did it
Align SDK compilation makefiles to be compatible with the latest version.

- How to verify it
Build sonic-nvidia-bluefield.bin image.
  • Loading branch information
oleksandrivantsiv authored Apr 30, 2024
1 parent 65b07ce commit 7172d85
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 54 deletions.
13 changes: 13 additions & 0 deletions platform/nvidia-bluefield/pinctrl-mlxbf3/pinctrl-mlxbf3.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/pinctrl-mlxbf3.c b/pinctrl-mlxbf3.c
index 8371d83..d3746f6 100644
--- a/pinctrl-mlxbf3.c
+++ b/pinctrl-mlxbf3.c
@@ -18,7 +18,7 @@

#define DRV_VERSION "1.0"

-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
struct pinfunction {
const char *name;
const char * const *groups;
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.29.0
DPU_SAI_VERSION = SAIBuild0.0.30.0

# Place here URL where SAI sources exist
DPU_SAI_SOURCE_BASE_URL=
Expand Down
17 changes: 0 additions & 17 deletions platform/nvidia-bluefield/recipes/sdk.dep
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ $(DPDK_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(DPDK_DEV)_DEP_FLAGS := $(SDK_COMMON_FLAGS_LIST)
$(DPDK_DEV)_DEP_FILES := $(DEP_FILES)

# Collectx CLXAPI

FLAGS := $($(COLLECTX_CLXAPI)_URL)
DEP_FILES := $(SDK_COMMON_FILES_LIST)

$(COLLECTX_CLXAPI)_CACHE_MODE := GIT_CONTENT_SHA
$(COLLECTX_CLXAPI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(FLAGS)
$(COLLECTX_CLXAPI)_DEP_FILES := $(DEP_FILES)

# RXP compiler

Expand All @@ -135,15 +127,6 @@ $(LIBRXPCOMPILER_DEV)_CACHE_MODE := GIT_CONTENT_SHA
$(LIBRXPCOMPILER_DEV)_DEP_FLAGS := $(SDK_COMMON_FLAGS_LIST)
$(LIBRXPCOMPILER_DEV)_DEP_FILES := $(DEP_FILES)

# UCX

SPATH := $($(UCX)_SRC_PATH)
DEP_FILES := $(SDK_COMMON_FILES_LIST)
DEP_FILES += $(shell git ls-files -- $(SPATH))

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

# GRPC

Expand Down
40 changes: 6 additions & 34 deletions platform/nvidia-bluefield/recipes/sdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 24.1-RC3
SDK_VERSION = 24.4-RC2

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

Expand Down Expand Up @@ -213,20 +213,6 @@ export DPDK_DERIVED_DEBS
SDK_DEBS += $(DPDK) $(DPDK_DERIVED_DEBS)
SDK_SRC_TARGETS += $(DPDK)

# Collectx

COLLECTX_CLXAPI = collectx_1.14.3-9642347-debian12.1-aarch64-clxapi.deb
$(COLLECTX_CLXAPI)_URL = $(SDK_COLLECTX_URL)/collectx_1.14.3-9642347-debian12.1-aarch64-clxapi.deb
$(COLLECTX_CLXAPI)_RDEPENDS = $(IB_UMAD)

COLLECTX_CLXAPI_DEV = collectx_1.14.3-9642347-debian12.1-aarch64-clxapidev.deb
$(COLLECTX_CLXAPI_DEV)_URL = $(SDK_COLLECTX_URL)/collectx_1.14.3-9642347-debian12.1-aarch64-clxapidev.deb
$(COLLECTX_CLXAPI_DEV)_DEPENDS = $(COLLECTX_CLXAPI)
$(COLLECTX_CLXAPI_DEV)_RDEPENDS = $(IB_UMAD)

SDK_DEBS += $(COLLECTX_CLXAPI) $(COLLECTX_CLXAPI_DEV)
SDK_ONLINE_TARGETS += $(COLLECTX_CLXAPI) $(COLLECTX_CLXAPI_DEV)

# RXP compiler and derived packages

RXPCOMPILER_VER = $(call get_sdk_package_version_full,"rxp-tools")
Expand All @@ -245,20 +231,6 @@ export RXPCOMPILER_DERIVED_DEBS
SDK_DEBS += $(RXPCOMPILER) $(RXPCOMPILER_DERIVED_DEBS)
SDK_SRC_TARGETS += $(RXPCOMPILER)

# UCX and derived packages

UCX_VER = $(call get_sdk_package_version_full,"ucx")

UCX = ucx_$(UCX_VER)_arm64.deb
$(UCX)_DEPENDS = $(IB_VERBS_PROV) $(IB_VERBS) $(IB_VERBS_DEV) $(RDMACM) $(RDMACM_DEV)
$(UCX)_RDEPENDS = $(IB_VERBS_PROV) $(IB_VERBS)
$(UCX)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/ucx

export UCX_VER UCX

SDK_DEBS += $(UCX)
SDK_SRC_TARGETS += $(UCX)

# GRPC and derived packages

LIBGRPC_VER = $(call get_sdk_package_version_full,"grpc")
Expand All @@ -282,12 +254,12 @@ SDK_SRC_TARGETS += $(LIBGRPC_DEV)
DOCA_VERSION = $(call get_sdk_package_version_full,"doca")
DOCA_DEB_VERSION = $(DOCA_VERSION)-1

DOCA_LIBS = doca-libs_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
DOCA_LIBS = doca-cx-libs_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
$(DOCA_LIBS)_SRC_PATH = $(PLATFORM_PATH)/sdk-src/doca
$(DOCA_LIBS)_RDEPENDS = $(DPDK) $(COLLECTX_CLXAPI) $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(UCX) $(LIBGRPC_DEV) $(FLEXIO)
$(DOCA_LIBS)_DEPENDS = $(COLLECTX_CLXAPI) $(COLLECTX_CLXAPI_DEV) $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(UCX) $(DPDK_DEV) $(LIBGRPC_DEV) $(FLEXIO)
DOCA_LIBS_DEV = libdoca-libs-dev_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
DOCA_LIBS_DBG = doca-libs-dbgsym_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
$(DOCA_LIBS)_RDEPENDS = $(DPDK) $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(LIBGRPC_DEV) $(FLEXIO)
$(DOCA_LIBS)_DEPENDS = $(RXPCOMPILER) $(LIBRXPCOMPILER_DEV) $(DPDK_DEV) $(LIBGRPC_DEV) $(FLEXIO)
DOCA_LIBS_DEV = libdoca-cx-libs-dev_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb
DOCA_LIBS_DBG = doca-cx-libs-dbgsym_${DOCA_DEB_VERSION}_${CONFIGURED_ARCH}.deb

$(eval $(call add_derived_package,$(DOCA_LIBS),$(DOCA_LIBS_DEV)))
$(eval $(call add_derived_package,$(DOCA_LIBS),$(DOCA_LIBS_DBG)))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/configs/profiles/connectx/debian/control b/configs/profiles/connectx/debian/control
index 62f9403..fea0155 100644
--- a/configs/profiles/connectx/debian/control
+++ b/configs/profiles/connectx/debian/control
@@ -4,7 +4,6 @@ Maintainer: <[email protected]>
Build-Depends: debhelper (>= 10~),
gcc,
g++,
- meson,
pkg-config,
libibverbs-dev,
mlnx-dpdk-dev,
@@ -55,7 +54,6 @@ Architecture: amd64 arm64 armhf i386 ppc64el
Depends: ${misc:Depends},
libdoca-cx-libs-dev,
gcc,
- meson,
pkg-config,
mlnx-dpdk-dev,
libjson-c-dev,
@@ -71,7 +69,6 @@ Architecture: amd64 arm64 armhf i386 ppc64el
Depends: ${misc:Depends},
libdoca-cx-libs-dev,
gcc,
- meson,
pkg-config,
mlnx-dpdk-dev,
libjson-c-dev
5 changes: 3 additions & 2 deletions platform/nvidia-bluefield/sdk-src/doca/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
find . -type f -exec touch {} +

patch -p1 < ../0001-Allow-compilation-with-warnings.patch
patch -p1 < ../0001-Remove-meson-from-dependencies.patch
patch -p1 < ../0001-Remove-meson-from-connectx-dependencies.patch

source /etc/profile.d/libgrpc.sh
source /etc/profile.d/mlnx-dpdk-aarch64-linux-gnu.sh

# Build the Debs
PATH=/opt/mellanox/grpc/bin:/usr/bin/:$(PATH) dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
PATH=/opt/mellanox/grpc/bin:/usr/bin/:$(PATH) ./devtools/doca_package_build.sh connectx

popd
mv $(DERIVED_TARGETS) $* $(DEST)/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 178c90074d62fc6d8dfcef500cde1de8b4928eee Mon Sep 17 00:00:00 2001
From: Oleksandr Ivantsiv <[email protected]>
Date: Fri, 18 Nov 2022 20:09:52 +0200
Subject: [PATCH] Remove meson from dependencies.

---
debian/control | 1 -
1 file changed, 1 deletion(-)

diff --git a/debian/control b/debian/control
index a737765..b99b3e9 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,6 @@ Build-Depends: debhelper (>= 10.3~),
linux-headers-arm64 [arm64] | linux-headers-generic [arm64],
linux-headers-armmp [armhf] | linux-headers-generic [armhf],
linux-headers-powerpc64le [ppc64el] | linux-headers-generic [ppc64el],
- meson (>= 0.41~),
pkg-config,
python3,
python3-sphinx <!nodoc>,
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 6ce6a644e561f22021d031bc99f7b54a8d1142ad Mon Sep 17 00:00:00 2001
From: Oleksandr Ivantsiv <[email protected]>
Date: Mon, 10 Oct 2022 15:46:31 +0300
Subject: [PATCH] Allow warning during package compilation.

---
debian/rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 01e76c4..f4460af 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,13 +8,13 @@ export DEB_BUILD_OPTIONS=nostrip
dh $@

override_dh_auto_build:
- ./build.sh
+ ./build.sh --allow_warnings
./scripts/cp_pkg_content.sh deb ./debian/tmp

clean:
rm -f ./debian/debhelper-build-stamp ./debian/files ./debian/flexio.debhelper.log
rm -rf ./debian/flexio.substvars ./debian/tmp ./debian/flexio
- ./build.sh --clean
+ ./build.sh --clean --allow_warnings

override_dh_prep:
@ echo DH PREP
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From a009c7ed8fb199aaf456d91471937d1cc80871bc Mon Sep 17 00:00:00 2001
From: Oleksandr Ivantsiv <[email protected]>
Date: Mon, 17 Oct 2022 17:02:43 +0300
Subject: [PATCH] Install LD configuration.

---
debian/flexio-aarch64-linux-gnu.conf | 1 +
debian/flexio.install | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 debian/flexio-aarch64-linux-gnu.conf

diff --git a/debian/flexio-aarch64-linux-gnu.conf b/debian/flexio-aarch64-linux-gnu.conf
new file mode 100644
index 0000000..abfff31
--- /dev/null
+++ b/debian/flexio-aarch64-linux-gnu.conf
@@ -0,0 +1 @@
+/opt/mellanox/flexio/lib/
diff --git a/debian/flexio.install b/debian/flexio.install
index c54c604..93238ad 100644
--- a/debian/flexio.install
+++ b/debian/flexio.install
@@ -1 +1,2 @@
-debian/tmp/* /
\ No newline at end of file
+debian/tmp/* /
+debian/flexio-aarch64-linux-gnu.conf /etc/ld.so.conf.d/
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From d2168682c00d3738d458a4f2bce23595e0e0729c Mon Sep 17 00:00:00 2001
From: Oleksandr Ivantsiv <[email protected]>
Date: Fri, 18 Nov 2022 17:29:38 +0200
Subject: [PATCH] Remove meson from dependencies.

---
debian/control | 1 -
1 file changed, 1 deletion(-)

diff --git a/debian/control b/debian/control
index b8a9ca1..d2367e3 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,6 @@ Build-Depends: autotools-dev,
debhelper (>= 10),
clang,
lld,
- meson,
patchelf
#Standards-Version: 4.1.2
Homepage: www.nvidia.com
--
2.25.1

23 changes: 23 additions & 0 deletions platform/nvidia-bluefield/sdk-src/ofed/templates/control.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{#-
Copyright (c) 2024 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.
-#}
Package: mlnx-ofed-kernel-modules-{{kversion}}
Source: mlnx-ofed-kernel-modules-bin
Version: {{mft_version}}
Architecture: arm64
Maintainer: Vivek Reddy <vkarri@nvidia.com>
Provides: mlnx-ofed-kernel-modules
Depends: linux-image-{{ kversion }}-unsigned
Section: misc
Priority: optional
Description: mlnx-ofed-kernel-modules binary drivers for linux-image-{{kversion}} Kernel
17 changes: 17 additions & 0 deletions platform/nvidia-bluefield/sdk-src/ofed/templates/postinst.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{#-
Copyright (c) 2024 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.
-#}

#!/bin/sh
set -e
depmod -a {{kversion}}
17 changes: 17 additions & 0 deletions platform/nvidia-bluefield/sdk-src/ofed/templates/postrm.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{#-
Copyright (c) 2024 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.
-#}

#!/bin/sh
set -e
depmod -a {{kversion}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/debian/control b/debian/control
index 0ef86f4..3e8dfb1 100644
--- a/debian/control
+++ b/debian/control
@@ -65,7 +65,7 @@ Description: InfiniBand Communication Manager Assistant (ACM)
Package: ibverbs-providers
Architecture: linux-any
Multi-Arch: same
-Depends: ${misc:Depends}, ${shlibs:Depends}
+#Depends: ${misc:Depends}, ${shlibs:Depends}
Provides: libefa1, libipathverbs1, libmana1, libmlx5-1, libmthca1
Replaces: libipathverbs1,
libmlx5-1,
@@ -138,7 +138,7 @@ Section: libs
Pre-Depends: ${misc:Pre-Depends}
Depends: adduser, ${misc:Depends}, ${shlibs:Depends}
Recommends: ibverbs-providers
-Breaks: ibverbs-providers (<< 34~)
+#Breaks: ibverbs-providers (<< 34~)
Description: Library for direct userspace use of RDMA (InfiniBand/iWARP)
libibverbs is a library that allows userspace processes to use RDMA
"verbs" as described in the InfiniBand Architecture Specification and

0 comments on commit 7172d85

Please sign in to comment.