From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 7F3CE4A63 for ; Fri, 22 Jul 2016 11:59:20 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id i5so58885958wmg.0 for ; Fri, 22 Jul 2016 02:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=xbLrK/SuYAPuIos7SEdBChMZgoO2EjVp6AEknWODeMk=; b=DXpo5YgXOr9VSmbZCQ5qRZN3hLX+dYOyN6Ra97TlM+eSJu6USiffxkQwQIEjY9XSnA 8jeFX+20FqdeBGyO47Xjm9cvb8fS4yTDSm6Msh0wl8Gq3VTFLG1q1Yod/37mDRFycd3i hORUC5/TWa5YQaQdDcxFffWA/CwGJG2dny3MXieiNGmttDOaTZajQyo6UA887elkENga io4L5HANVngoYwUMYDDHPVNs+VEE9X5yDqbjqjN+nL0Zpv7gKOmKHh7nzp66/9Px4/O9 W81tKZNuwVqOKTxCMM2QzszcDPDH7iONmeAsOE93t4JPo429sBBB4Lwy94LSsZKIqm+G 4MMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=xbLrK/SuYAPuIos7SEdBChMZgoO2EjVp6AEknWODeMk=; b=EWmeQrDXMxub9T2LGiPH5HNJqbkJ/oc52o7iOeSSRHM5Tvybjuo+ICWHWcsidGm64h 2h2EB6vOOlo3k5xRkaQdVsJs51/1GOY6hzodGYKVWrWNyB9By0Sfl4RkksUq1u0vxc7X rFD59GJQ6l1TJAA7Y27S2U9LdAppohKIt6v1wQQEYArr+2IslfyEKFp2yIDGgE5ik4Oo i13wEr7YJ9J74zCCecL3OHJtQuK+Ahs79K9yxS2lvvjn+jw8bmK0pHlPFfJ0ir3M3KLu AGggtH+0mEeHMgkbakyYqE1XTNWvqYetpq0LITqUXSigiP9nQhDk8e75Nke5BeAMa+Lv iQJA== X-Gm-Message-State: AEkoouuDR2xm70GsdF6hOvQCEnTlw0I4JKN8T4fcKySLbisWw95ZHiIr+QkmSTrp2Z5lz2oM X-Received: by 10.194.235.69 with SMTP id uk5mr128924wjc.53.1469181560266; Fri, 22 Jul 2016 02:59:20 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id ly9sm110533wjb.44.2016.07.22.02.59.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2016 02:59:19 -0700 (PDT) From: Thomas Monjalon To: Jianfeng Tan Cc: dev@dpdk.org, Yuanhan Liu , zhihong.wang@intel.com, qian.q.xu@intel.com Date: Fri, 22 Jul 2016 11:59:18 +0200 Message-ID: <2545812.Vh7NDq74Ot@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160721013426.GA28708@yliu-dev.sh.intel.com> References: <1468936391-138371-1-git-send-email-jianfeng.tan@intel.com> <1469061765-50814-1-git-send-email-jianfeng.tan@intel.com> <20160721013426.GA28708@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] examples/vhost: fix perf regression 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: Fri, 22 Jul 2016 09:59:20 -0000 2016-07-21 09:34, Yuanhan Liu: > On Thu, Jul 21, 2016 at 12:42:45AM +0000, Jianfeng Tan wrote: > > We find significant perfermance drop introduced by below commit, > > when vhost example is started with --mergeable 0 and inside vm, > > kernel virtio-net driver is used to do ip based forwarding. > > > > The commit, 859b480d5afd ("vhost: add guest offload setting"), adds > > support for VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6, > > in vhost lib. But inside vhost example, the way to disable tso only > > excludes the direction from virtio to vhost, but not the opposite > > direction. When mergeable is disabled, it triggers big_packets path > > of virtio-net driver to prepare to receive possible big packets with > > size of 64K. Because mergeable is off, for each entry of avail ring, > > virtio driver uses 19 desc chained together, with one desc pointing > > to header, other 18 desc pointing to 4K-sized pages. But QEMU only > > creates 256 desc entries for each vq, which results in that only 13 > > packets can be received. VM kernel can quickly handle those packets > > and go to sleep (HLT). > > > > As QEMU has no option to set the desc entries of a vq, so here, > > we disable VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6 > > with VIRTIO_NET_F_HOST_TSO4 and VIRTIO_NET_F_HOST_TSO6 when we > > disable tso of vhost example, to avoid VM kernel virtio driver > > go into big_packets path. > > > > Fixes: 9fd72e3cbd29 ("examples/vhost: add virtio offload") > > > > Reported-by: Qian Xu > > Signed-off-by: Jianfeng Tan > > --- > > v3: reword commit log. > > Yes, much better. One minor nit: you forgot to carry the Tested-by from > Qian. > > Acked-by: Yuanhan Liu Applied, thanks