git clone https:/http://github.com/spdk/spdk
cd spdk
git submodule update –init
./scripts/pkgdep.sh
./configure
#configure这步可以(--help find more usuage)
make
make install
# 执行单测
./test/unit/unittest.sh
注意事项:
1、使用root账号运行SPDK程序,因为DPDK中IOVA模式需要。
2、注意配置大页内存,在 /etc/sysctl.conf 文件中写入 vm.nr_hugepages=1024 [表示配置1024个大页,每页大小一般情况为2MB] 执行’ sysctl -p '命令以启用hugepages参数。
运行hello_world程序遇到的问题:
root@wg-hbaseslavetest-0010 ~/spdk/build # sudo ./examples/hello_world