[dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used?
mukawa at igel.co.jp
Tue Aug 25 05:22:32 CEST 2015
On 2015/08/24 22:09, leo zhu wrote:
> Hi all,
> I am running the vhost sample application on my server.
> According to the dpdk-sample-applications-user-guide.pdf, I run the Virtual
> Machine with vhost-user enabled.
> Following is the command that is used to run the virtual machine.
> *qemu-system-x86_64 /root/leo/ubuntu-1.img -enable-kvm -m 1024 -vnc :5
> -chardev \socket,id=char1,path=/root/leo/dpdk-2.0.0/examples/vhost/usvhost
> -netdev type=vhost-user, \id=mynet1,chardev=char1,vhostforce -device
> virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1 \-object
> -numa node,memdev=mem -mem-prealloc*
> After the Virtual Machine is started, I found the offloads of the
> Virtual Machine's virtio-net network adapter
> are all disabled*.* The offloads status is checked with command*
> ethtool -k eth0*. I try to enables the offloads with ethtool command,
> but it does not work.
> My questions are:
> 1. Can the offloads of the guest's virtio-net network adapter be
> enabled when vhost-user is used?
I guess we need additional implementations in librte_vhost to enable
> 2. If the offloads can't be enabled when vhost-user is used, what is the reason?
Features are negotiated not olny between virtio-net driver on guest and
virtio-net device in QEMU, but also virtio-net device in QEMU and
vhost-user backend in librte_vhost.
As a result, if vhost-user backend doesn't support some features,
virtio-net driver on guest also cannot use them.
Please see "lib/librte_vhost/virtio-net.c"
/* Features supported by this lib. */
#define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \
(1ULL << VIRTIO_NET_F_CTRL_VQ) | \
(1ULL << VIRTIO_NET_F_CTRL_RX) | \
(1ULL << VHOST_F_LOG_ALL))
This is all current librte_vhost supports.
> It will be great if someone from the forum could give the answers and clues.
More information about the dev