spdk/dpdk 编译相关问题汇总
生活随笔
收集整理的這篇文章主要介紹了
spdk/dpdk 编译相关问题汇总
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
下載
到官網上下載最新的spdk 代碼。
解決編譯依賴
yum install libaio.x86_64 libaio-devel.x86_64
編譯dpdk
特別注意的是dpdk:依賴 /lib/modules/uname -a/build 下執行的內核已經存在,并且編譯過,為此需要:
- 下載內核;
- 安裝依賴;
yum install ncurses.x86_64 ncurses-devel.x86_64 ncurses-libs.x86_64 ncurses-static.x86_64 ncurses-base.x86_64 ncurses-term.x86_64 ocaml-curses.x86_64
yum install numactl-devel.x86_64 numad.x86_64 numactl.x86_64
make menuconfig && make && make modules && make bzImage
注意用系統自帶的gcc make menuconfig 才可以彈出界面;
編譯spdk
參考下面命令:
./configure --with-fio=/home/xiaqichao/spdk/fio/fio --with-dpdk=/home/xiaqichao/latestspdk/spdk/dpdk/x86_64-native-linuxapp-gcc --without-virtio --without-vhost make; echo "EXTRA_CFLAGS=-fPIC" >> config/defconfig_x86_64-native-linuxapp-gcc && echo && make install T=x86_64-native-linuxapp-gcc DESTDIR=.LINK examples/bdev/fio_plugin/fio_plugin /home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../x86_64-baidu-linux-gnu/bin/ld.bfd: cannot find -lnuma collect2: error: ld returned 1 exit status make[3]: *** [fio_plugin] Error 1 make[2]: *** [fio_plugin] Error 2 make[1]: *** [bdev] Error 2 make: *** [examples] Error 2 [root@s]# cd / [root@s]# find ./ -name "libnuma*.so" ./usr/lib64/libnuma.so [root@s]# cp ./usr/lib64/libnuma.so //home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/usr/lib lib/ lib64/ libexec/ [root@s]# cp ./usr/lib64/libnuma.so //home/opt/gcc-4.8.2.bpkg-r4/gcc-4.8.2.bpkg-r4/usr/lib64/可以通過下面的命令來解決上面的依賴:
yum install numactl-devel.x86_64 numad.x86_64 numactl.x86_64
然后重新編譯即可。
hello world nvme 版本程序演示
[ DPDK EAL parameters: hello_world -c 0x1 --file-prefix=spdk0 --base-virtaddr=0x1000000000 --proc-type=auto ] EAL: Detected 32 lcore(s) EAL: Auto-detected process type: PRIMARY Initializing NVMe Controllers EAL: PCI device 0000:86:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:87:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:88:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:89:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:af:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:b0:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme EAL: PCI device 0000:b1:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme Attaching to 0000:b1:00.0 EAL: PCI device 0000:b2:00.0 on NUMA socket 0 EAL: probe driver: 8086:a54 spdk_nvme Attached to 0000:b1:00.0 Using controller INTEL SSDPE2KX040T7 (BTLF82140KK74P0IGN ) with 1 namespaces.Namespace ID: 1 size: 4000GB Initialization complete. Hello world! nvme_ctrlr.c: 473:nvme_ctrlr_shutdown: *ERROR*: did not shutdown within 5 seconds轉載于:https://blog.51cto.com/xiamachao/2386347
總結
以上是生活随笔為你收集整理的spdk/dpdk 编译相关问题汇总的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 报错注入_sqli-labs less5
- 下一篇: win10虚拟机下载安装安全狗(Apac