From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 2A0D9200 for ; Mon, 28 May 2018 18:23:52 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE5148011059; Mon, 28 May 2018 16:23:51 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-45.ams2.redhat.com [10.36.112.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3E22ED17C; Mon, 28 May 2018 16:23:48 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: Maxime Coquelin Date: Mon, 28 May 2018 18:23:36 +0200 Message-Id: <20180528162338.4511-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 28 May 2018 16:23:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 28 May 2018 16:23:51 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: [dpdk-dev] [PATCH 0/2] Vhost: unitfy receive paths X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2018 16:23:52 -0000 Hi, This series is preliminary work to ease the integration of packed ring layout support. But even without packed ring layout, the result is positive. First patch unify both paths, and second one is a small optimization to avoid copying batch_copy_nb_elems VQ field to/from the stack. With the series applied, I get modest performance gain for both mergeable and non-mergeable casesi (, and the gain of about 300 LoC is non negligible maintenance-wise. Rx-mrg=off benchmarks: +------------+-------+-------------+-------------+----------+ | Run | PVP | Guest->Host | Host->Guest | Loopback | +------------+-------+-------------+-------------+----------+ | v18.05-rc5 | 14.47 | 16.64 | 17.57 | 13.15 | | + series | 14.87 | 16.86 | 17.70 | 13.30 | +------------+-------+-------------+-------------+----------+ Rx-mrg=on benchmarks: +------------+------+-------------+-------------+----------+ | Run | PVP | Guest->Host | Host->Guest | Loopback | +------------+------+-------------+-------------+----------+ | v18.05-rc5 | 9.38 | 13.78 | 16.70 | 12.79 | | + series | 9.38 | 13.80 | 17.49 | 13.36 | +------------+------+-------------+-------------+----------+ Note: Even without my series, the guest->host benchmark with mergeable buffers enabled looks suspicious as it should in theory be alsmost identical as when Rx mergeable buffers are disabled. To be investigated... Maxime Coquelin (2): vhost: unify Rx mergeable and non-mergeable paths vhost: improve batched copies performance lib/librte_vhost/virtio_net.c | 366 ++++-------------------------------------- 1 file changed, 32 insertions(+), 334 deletions(-) -- 2.14.3