R&D/DPDK

DPDK vhost

sunshout 2014. 10. 28. 17:19





DPDK build

- disable CONFIG_RTE_MBUF_SCATTER_GATTER, CONFIG_RTE_LIBRTE_IP_FRAG, CONFIG_RTE_LIBRTE_DISTRIBUTOR


config

#

# Compile librte_ip_frag

#

CONFIG_RTE_LIBRTE_IP_FRAG=n

CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n

CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4

CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n


#
# Compile the distributor library
#
CONFIG_RTE_LIBRTE_DISTRIBUTOR=n

cf) in DPDK 1.7, RTE_MBUF_SCATTER_GATTER is not available. http://permalink.gmane.org/gmane.comp.networking.dpdk.devel/2328


dpdk library

root@dpdk-m:~/opensource/dpdk# make config T=$RTE_TARGET

root@dpdk-m:~/opensource/dpdk# make install T=$RTE_TARGET


vhost example

root@dpdk-m:~/opensource/dpdk# cd examples/vhost
root@dpdk-m:~/opensource/dpdk/examples/vhost# make


eventfd_link

root@dpdk-m:~/opensource/dpdk/examples/vhost# cd ${RTE_SDK}/lib/librte_vhost/eventfd_link

root@dpdk-m:~/opensource/dpdk/lib/librte_vhost/eventfd_link# modprobe cuse
root@dpdk-m:~/opensource/dpdk/lib/librte_vhost/eventfd_link# make
root@dpdk-m:~/opensource/dpdk/lib/librte_vhost/eventfd_link# insmod  eventfd_link.ko


Trouble shooting

/root/opensource/dpdk/lib/librte_vhost/vhost-net-cdev.c:35:32: fatal error: fuse/cuse_lowlevel.h: No such file or directory

 #include <fuse/cuse_lowlevel.h>



apt-get install libfuse-dev


/root/opensource/dpdk/lib/librte_vhost/virtio-net.c: In function 'host_memory_map':

/root/opensource/dpdk/lib/librte_vhost/virtio-net.c:238:14: error: ignoring return value of 'realpath', declared with attribute warn_unused_result [-Werror=unused-result]

      realpath(memfile, resolved_path);


http://linux.die.net/man/3/realpath


Reference

http://dpdk.org/doc/intel/dpdk-sample-apps-1.7.0.pdf