From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C35262B8E for ; Thu, 21 Jul 2016 02:42:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Jul 2016 17:42:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,397,1464678000"; d="scan'208";a="1020940255" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 20 Jul 2016 17:42:47 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jul 2016 17:42:46 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jul 2016 17:42:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.150]) with mapi id 14.03.0248.002; Thu, 21 Jul 2016 08:42:44 +0800 From: "Tan, Jianfeng" To: "dev@dpdk.org" CC: "yuanhan.liu@linux.intel.com" , "Wang, Zhihong" , "Xu, Qian Q" Thread-Topic: [PATCH v2] examples/vhost: fix perf regression Thread-Index: AQHR4uYwgtSiaAVoYUqZ6f/98uuRIaAiC37w Date: Thu, 21 Jul 2016 00:42:43 +0000 Message-ID: References: <1468936391-138371-1-git-send-email-jianfeng.tan@intel.com> <1469060617-50465-1-git-send-email-jianfeng.tan@intel.com> In-Reply-To: <1469060617-50465-1-git-send-email-jianfeng.tan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] 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: Thu, 21 Jul 2016 00:42:57 -0000 Self-Nack this patch because the commit log needs change further. > -----Original Message----- > From: Tan, Jianfeng > Sent: Thursday, July 21, 2016 8:24 AM > To: dev@dpdk.org > Cc: yuanhan.liu@linux.intel.com; Wang, Zhihong; Xu, Qian Q; Tan, Jianfeng > Subject: [PATCH v2] examples/vhost: fix perf regression >=20 > 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. >=20 > The root cause is that below commit adds support for > VIRTIO_NET_F_GUEST_TSO4 and VIRTIO_NET_F_GUEST_TSO6, and when > mergeable is disabled, it triggers big_packets path of virtio-net > driver. In this path, virtio driver uses 19 desc with 18 4K-sized > pages to receive each packet, so that it can receive a big packet > with size of 64K. 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). >=20 > 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. >=20 > Fixes: 9fd72e3cbd29 ("examples/vhost: add virtio offload") >=20 > Reported-by: Qian Xu > Signed-off-by: Jianfeng Tan > --- > v2: change the Fixes line to point to proper commit to fix. > examples/vhost/main.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/examples/vhost/main.c b/examples/vhost/main.c > index 3b98f42..92a9823 100644 > --- a/examples/vhost/main.c > +++ b/examples/vhost/main.c > @@ -327,6 +327,8 @@ port_init(uint8_t port) > if (enable_tso =3D=3D 0) { > rte_vhost_feature_disable(1ULL << > VIRTIO_NET_F_HOST_TSO4); > rte_vhost_feature_disable(1ULL << > VIRTIO_NET_F_HOST_TSO6); > + rte_vhost_feature_disable(1ULL << > VIRTIO_NET_F_GUEST_TSO4); > + rte_vhost_feature_disable(1ULL << > VIRTIO_NET_F_GUEST_TSO6); > } >=20 > rx_rings =3D (uint16_t)dev_info.max_rx_queues; > -- > 2.7.4