Compiling SPDK
After KAE is installed, compile SPDK. You do not need to install SPDK. Just compile it to generate an executable file.
Procedure
- Use a remote login tool to log in to the Linux CLI as the root user.
- Pull the SPDK code from the /home directory.
git clone https://gitee.com/kunpeng_compute/spdk.git
- Go to the pulled SPDK directory and switch to the KAE branch.
cd spdk git checkout spdk21.01.1-for-KAE
- Load the DPDK and isal modules.
git submodule update --init
- Install the SPDK dependency.
./scripts/pkgdep.sh
The pkgdep.sh script does not adapt to the openEuler OS. You need to add commands for adaptation. For details, see the following figure.

Add commands in the red box to the script.
- Configure compilation options.
./configure --with-crypto --with-reduce --with-ksal --with-crypto_openssl
- ./configure is used to configure compilation options. For example, --with-ksal loads the KSAL module, --with-crypto and --with-crypto_openssl load the crypto module, and --with-reduce loads the decompression module. You can run the ./configure -h command to view the detailed configuration.
- To load the decompression module, configure the environment variable export CFLAGS="-DZLIB_MEM_SIMU_PMEM".
- To load the crypto module, install two patches. Access https://gitee.com/kunpeng_compute/spdk/releases to obtain 0001-fix-openssl-engine-double-free-bug.patch and spdk_v21.01.1_dpdk_compress_kae.patch and save them to the spdk/dpdk directory. Then run the following commands:
patch -p1 < 0001-fix-openssl-engine-double-free-bug.patch patch -p1 < spdk_v21.01.1_dpdk_compress_kae.patch
- KSAL provides a Huawei-developed high-performance CRC algorithm. It is closed source and is integrated as a dynamic library. You need to install the KSAL package and load the KSAL dynamic library before compiling SPDK. Click here to download the RPM package.
- Perform compilation.
make -j
Parent topic: Software Installation