下载:http://fast.dpdk.org/rel/dpdk-19.08.2.tar.xz
解压:tar -xvf dpdk-19.08.2.tar.xz
(1)设置环境变量和编译
cd dpdk-stable-19.08.2
export RTE_SDK=`pwd`
export RTE_TARTGET=x86_64-native-linuxapp-gcc
make config T=x86_64-native-linuxapp-gcc
cd x86_64-native-linuxapp-gcc/
make
(2)遇到igb_uio编译问题可以
/* set 64-bit DMA mask */
// err = pci_set_dma_mask(dev, DMA_BIT_MASK(64));
// if (err != 0) {
// dev_err(&dev->dev, "Cannot set DMA mask\n");
// goto fail_release_iomem;
// }
// err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
// if (err != 0) {
// dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
// goto fail_release_iomem;
// }
err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64));
if (err != 0) {
dev_err(&dev->dev, "Cannot set DMA mask\n");
goto fail_release_iomem;
}
makefile文件修改
(3)kin模块编译问题
kni_misc.c文件
// netif_rx_ni(skb);
netif_rx(skb);
kni_net.c文件