* [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used?
@ 2015-08-24 13:09 leo zhu
2015-08-25 3:22 ` Tetsuya Mukawa
0 siblings, 1 reply; 4+ messages in thread
From: leo zhu @ 2015-08-24 13:09 UTC (permalink / raw)
To: dev
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
memory-backend-file,id=mem,size=1024M,mem-path=/dev/hugepages,share=on
-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?
2. If the offloads can't be enabled when vhost-user is used, what is the reason?
It will be great if someone from the forum could give the answers and clues.
Thanks.
Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used?
2015-08-24 13:09 [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used? leo zhu
@ 2015-08-25 3:22 ` Tetsuya Mukawa
2015-08-25 3:27 ` Liu, Jijiang
0 siblings, 1 reply; 4+ messages in thread
From: Tetsuya Mukawa @ 2015-08-25 3:22 UTC (permalink / raw)
To: leo zhu, dev
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
> memory-backend-file,id=mem,size=1024M,mem-path=/dev/hugepages,share=on
> -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?
Hi Leo,
I guess we need additional implementations in librte_vhost to enable
offloads.
> 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.
Thanks,
Tetsuya
> It will be great if someone from the forum could give the answers and clues.
>
> Thanks.
> Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used?
2015-08-25 3:22 ` Tetsuya Mukawa
@ 2015-08-25 3:27 ` Liu, Jijiang
2015-08-25 5:10 ` leo zhu
0 siblings, 1 reply; 4+ messages in thread
From: Liu, Jijiang @ 2015-08-25 3:27 UTC (permalink / raw)
To: Tetsuya Mukawa, leo zhu, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tetsuya Mukawa
> Sent: Tuesday, August 25, 2015 11:23 AM
> To: leo zhu; dev@dpdk.org
> Subject: Re: [dpdk-dev] Why the offloads of the guest's virtio-net network
> adapter are disabled when vhost-user is used?
>
> 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
> > memory-backend-file,id=mem,size=1024M,mem-
> path=/dev/hugepages,share=on
> > -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?
>
> Hi Leo,
>
> I guess we need additional implementations in librte_vhost to enable
> offloads.
>
>
> > 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"
Yes, you are correct.
I'm working on the vhost TSO offload, the offload set in struct 'virtio_net_hdr' need to be considered in both virtio-net and vhost side.
> /* 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.
>
> Thanks,
> Tetsuya
>
> > It will be great if someone from the forum could give the answers and clues.
> >
> > Thanks.
> > Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used?
2015-08-25 3:27 ` Liu, Jijiang
@ 2015-08-25 5:10 ` leo zhu
0 siblings, 0 replies; 4+ messages in thread
From: leo zhu @ 2015-08-25 5:10 UTC (permalink / raw)
To: Tetsuya Mukawa, Liu, Jijiang; +Cc: dev
Hi Tetsuya & Jijiang,
Great! Thanks a lot for your explanations.
Thanks.
Leo
On Tue, Aug 25, 2015 at 11:27 AM, Liu, Jijiang <jijiang.liu@intel.com>
wrote:
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tetsuya Mukawa
> > Sent: Tuesday, August 25, 2015 11:23 AM
> > To: leo zhu; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Why the offloads of the guest's virtio-net
> network
> > adapter are disabled when vhost-user is used?
> >
> > 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
> > > memory-backend-file,id=mem,size=1024M,mem-
> > path=/dev/hugepages,share=on
> > > -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?
> >
> > Hi Leo,
> >
> > I guess we need additional implementations in librte_vhost to enable
> > offloads.
> >
> >
> > > 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"
> Yes, you are correct.
>
> I'm working on the vhost TSO offload, the offload set in struct
> 'virtio_net_hdr' need to be considered in both virtio-net and vhost side.
>
> > /* 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.
> >
> > Thanks,
> > Tetsuya
> >
> > > It will be great if someone from the forum could give the answers and
> clues.
> > >
> > > Thanks.
> > > Leo
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-25 5:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-24 13:09 [dpdk-dev] Why the offloads of the guest's virtio-net network adapter are disabled when vhost-user is used? leo zhu
2015-08-25 3:22 ` Tetsuya Mukawa
2015-08-25 3:27 ` Liu, Jijiang
2015-08-25 5:10 ` leo zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).