
This commit introduces "libbnxt_re" version 220.0.5.0 to StarlingX to support Broadcom NetXtreme-E network adapters' Infiniband/RDMA functionality. "libbnxt_re" is an Infiniband verbs library. The source RPM file is used for packaging purposes, and the following changes are made to source RPM as part of the packaging for StarlingX. (This is a summary; for further information, please see the patch files.) - The spec file is adapted to StarlingX by modifying its Release and BuildRoot fields. - For compatibility with StarlingX's build scripts, the whitespace between the field names and the colon characters (':') are removed. - A BuildRequires is added for kernel{?bt_ext}-headers >= 5.10 to ensure that libbnxt_re build does not fail due to a conflict between rdma-core and kernel-headers-4.18, the latter of which is pre-installed and stays installed in the mock/chroot file system until the kernel packages are built by the build system. (This build failure is a transient issue impacting efficiency, as the build system retries building the package until the correct kernel headers are installed.) - The configure script is regenerated to ensure that the newer version of rdma-core is supported by the configure script, which hard-codes ABI version v22, whereas StarlingX ships with rdma-core ABI version v37. This is done by calling the autogen.sh script in %build. - The original source RPM file replaces pre-existing libbnxt_re library file symbolic link in /usr/lib64/libibverbs via post-installation hooks (i.e., %post). This behaviour is modified to instead directly include the symbolic link in the package, since StarlingX's version of rdma-core does not include the libbnxt_re library. - The configure.ac file is patched to use a compatibility version of the "stdatomic.h" header provided by libbnxt_re, as the StarlingX/CentOS 7 toolchain does not have this header file. Testing: - An ISO image is successfully built (monolithically) with this commit. - This commit has not yet been directly tested due to a lack of hardware; however, we have confirmed that the library is successfully dynamically loaded by applications making use of the libibverbs library by packaging the Linux RDMA community's perftest tools for StarlingX and then starting the ib_send_bw performance test tool on a physical server with Mellanox hardware. This was followed by confirming that the /proc/<PID>/maps file for the ib_send_bw process contains the new libbnxt_re library. The latter indicates that the library is successfully loaded. Story: 2009915 Task: 44759 Depends-On: https://review.opendev.org/c/starlingx/kernel/+/833464 Depends-On: https://review.opendev.org/c/starlingx/tools/+/833462 Change-Id: I3ffd0a0cbaa076802c8140d8fe67cbe56e6b3a90 Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
From 05fe24097fa8287bddea3418799e32d949999267 Mon Sep 17 00:00:00 2001
|
|
From: "M. Vefa Bicakci" <vefa.bicakci@windriver.com>
|
|
Date: Mon, 14 Feb 2022 13:13:09 -0500
|
|
Subject: [PATCH] Set up stdatomic.h if necessary
|
|
|
|
The toolchain used for building libraries in StarlingX (i.e., CentOS 7)
|
|
does not provide the stdatomic.h header. Thankfully, the libbnxt_re
|
|
package includes a compatibility-oriented version of this header in
|
|
rc-compat/v22.
|
|
|
|
Hence, copy over this header from the rc-compat/v22 directory to the
|
|
current rc-compat version sub-directory, but only if required, to let
|
|
the build finish successfully.
|
|
|
|
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
|
---
|
|
configure.ac | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 9e4e980886d4..61f2a014eb94 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -481,6 +481,22 @@ AC_HEADER_STDC
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
|
|
+dnl Check if the host's toolchain provides stdatomic.h and use
|
|
+dnl our local copy if required.
|
|
+tmp_stdatomic=if$$.c
|
|
+echo "#include <stdatomic.h>" > ${tmp_stdatomic}
|
|
+dnl Need to work around embedded newlines, hence the additional
|
|
+dnl level of indirection.
|
|
+incpath=$(echo -n __include_path__)
|
|
+if echo -- $incpath | grep -q src/rc-compat/ && \
|
|
+ ! $CC $CPPFLAGS -E ${tmp_stdatomic} >/dev/null 2>/dev/null && \
|
|
+ ! test -f src/rc-compat/$(echo -n rcore_version)/stdatomic.h; then
|
|
+ cp -v src/rc-compat/v22/stdatomic.h src/rc-compat/$(echo -n rcore_version)/stdatomic.h
|
|
+fi
|
|
+rm -f ${tmp_stdatomic}
|
|
+unset tmp_stdatomic
|
|
+unset incpath
|
|
+
|
|
dnl Check for libibverbs device library extension
|
|
dummy=if$$
|
|
cat <<IBV_VERSION > $dummy.c
|
|
--
|
|
2.29.2
|
|
|