From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f196.google.com (mail-ob0-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 4FAD65952 for ; Tue, 25 Aug 2015 07:10:28 +0200 (CEST) Received: by obbwr7 with SMTP id wr7so7937750obb.1 for ; Mon, 24 Aug 2015 22:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FVL35vTfIm6thc5Nk7Ocs99dJzXa5FXOB9Q5hPsIsFE=; b=kiZAH67rb23RieUFf9wxYiYuJULUHuWbZobaxqI9qJ71X9mFor+oN+lohgDmntZ7OK RQ8cEMb474KP2YNqOeyhONuiB+rT2fHOJupB8LsAXM55uLGsdXIecGugOaKFOZJsmINe eW2nkoz0r/917RBjbZ3KxqzK0VOChJhXUxKrJ3t0UPN5slxn03wXFreyftw3F3uov1XY m0CsJ6DfPy4hTJehK/Ah1yRoXWwzI86xO1IviILi7jiQgWGgQewLdSJgShkxYH0+Dg/R 5gK2pl68wiV0zuAdQA3361w24BW7e7HcKEBYJyKz1/Yu7ced5TemZ4pmgiC1arm3hy5s gXlg== MIME-Version: 1.0 X-Received: by 10.182.130.134 with SMTP id oe6mr16802896obb.46.1440479427711; Mon, 24 Aug 2015 22:10:27 -0700 (PDT) Received: by 10.202.63.69 with HTTP; Mon, 24 Aug 2015 22:10:27 -0700 (PDT) In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC057D205F@SHSMSX101.ccr.corp.intel.com> References: <55DBDF78.2090507@igel.co.jp> <1ED644BD7E0A5F4091CF203DAFB8E4CC057D205F@SHSMSX101.ccr.corp.intel.com> Date: Tue, 25 Aug 2015 13:10:27 +0800 Message-ID: From: leo zhu To: Tetsuya Mukawa , "Liu, Jijiang" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "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? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2015 05:10:28 -0000 Hi Tetsuya & Jijiang, Great! Thanks a lot for your explanations. Thanks. Leo On Tue, Aug 25, 2015 at 11:27 AM, Liu, Jijiang 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 > >