From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by dpdk.org (Postfix) with ESMTP id 566255A5D for ; Tue, 25 Aug 2015 05:22:35 +0200 (CEST) Received: by pacti10 with SMTP id ti10so38883284pac.0 for ; Mon, 24 Aug 2015 20:22:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Tj5iotT4jjtP9zzOdShWR16+9Pbd1tYAQHfbSozfB/4=; b=Zx/M0ineUnvaRuFvaObDqyLBxDmTtG0JTnpNiGR/hWcGiQbSuWolKcsUheYX3vOpRa wCQhie8m8MktVSDQi9DghltkTD1QtGLhLXECNnbrWXFjtxlzFQwIORaofayOrg52akNq 5n+ytpdoJfIKPxi/Qu+L48MBHyY44TdTFqucvlm281keWJtXG4Jnh4DraSRsfay/edv9 cp22FsH+vhZmdfviUBDjcIf1jjJpmnbSj9U3pZG9RhSuJ2NFCT7EcqI16iRlFGFY1RQp iVctctg74WZw5H/ZsPSKB5bKYm1ZhqXwXKowVpXZXD/YNSfKtCAIenLGuc8usVWUpmlL 3nYw== X-Gm-Message-State: ALoCoQmJs2aBFPyUdgraNu/0I8E3sKe0wODRc+/UB2H5ixWwF3wdqWe9MU/3Ll3Zck52OJfCfZlK X-Received: by 10.68.229.195 with SMTP id ss3mr51977267pbc.100.1440472954688; Mon, 24 Aug 2015 20:22:34 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id sm3sm15974077pab.20.2015.08.24.20.22.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2015 20:22:34 -0700 (PDT) Message-ID: <55DBDF78.2090507@igel.co.jp> Date: Tue, 25 Aug 2015 12:22:32 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: leo zhu , dev@dpdk.org References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 03:22:36 -0000 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