SPDK需要DPDK的支持
本文操作参考2021-03-04 SPDK安装指南
也感谢gitee库的拥有者https://gitee.com/piter-zhang/projects
下载SPDK
git clone https://gitee.com/oss_enterprise_go_enterprise/spdk.git
更改SPDK的gitmodules文件,换成国内gitee源
cpp
cd spdk
nano .gitmodules
将内容替换为
cpp
[submodule "dpdk"]
path = dpdk
url = https://gitee.com/piter-zhang/dpdk.git
[submodule "intel-ipsec-mb"]
path = intel-ipsec-mb
url = https://gitee.com/piter-zhang/intel-ipsec-mb.git
[submodule "isa-l"]
path = isa-l
url = https://gitee.com/piter-zhang/isa-l.git
[submodule "ocf"]
path = ocf
url = https://gitee.com/piter-zhang/ocf.git
[submodule "libvfio-user"]
path = libvfio-user
url = https://gitee.com/piter-zhang/libvfio-user.git
[submodule "xnvme"]
path = xnvme
url = https://gitee.com/piter-zhang/xNVMe.git
[submodule "isa-l-crypto"]
path = isa-l-crypto
url = https://gitee.com/piter-zhang/isa-l_crypto
然后下载库
cpp
git submodule update --init
安装依赖
cpp
sudo ./scripts/pkgdep.sh
编译(make -j参数可以选择线程数量)
cpp
$ ./configure
$ make
执行单元测试,查看是否安装成功
cpp
./test/unit/unittest.sh