From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22BB8A0032; Tue, 17 May 2022 16:00:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4E5D40041; Tue, 17 May 2022 16:00:02 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 9C3A14003C for ; Tue, 17 May 2022 16:00:00 +0200 (CEST) Content-class: urn:content-classes:message Subject: RE: [PATCH v1 0/2] add a fast path for memif Rx/Tx MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Tue, 17 May 2022 15:59:59 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87084@smartserver.smartshare.dk> In-Reply-To: <20220517105109.1086090-1-joyce.kong@arm.com> X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: [PATCH v1 0/2] add a fast path for memif Rx/Tx Thread-Index: Adhp3CXkLLVulanTSpiT0cgBH52VKQAGhrVg References: <20220412093243.3670187-1-joyce.kong@arm.com> <20220517105109.1086090-1-joyce.kong@arm.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Joyce Kong" Cc: , , X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Joyce Kong [mailto:joyce.kong@arm.com] > Sent: Tuesday, 17 May 2022 12.51 >=20 > For memif non-zero-copy mode, there is a branch to compare > the mbuf and memif buffer size during memory copying. Add > a fast memory copy path by removing this branch with mbuf > and memif buffer size defined at compile time. And for Tx > fast path, bulk free the mbufs which come from the same > mempool. >=20 > When mbuf =3D=3D memif buffer size, both Rx/Tx would choose > the fast memcpy path. When mbuf < memif buffer size, the > Rx chooses previous memcpy path while Tx chooses fast > memcpy path. When mbuf > memif buffer size, the Rx chooses > fast memcpy path while Tx chooses previous memcpy path. >=20 > Test with 1p1q on Ampere Altra AArch64 server, > --------------------------------------------------------- > buf size | memif =3D mbuf | memif < mbuf | memif > mbuf > --------------------------------------------------------- > non-zc gain | 16.95% | 3.28% | 13.29% > --------------------------------------------------------- > zc gain | 19.43% | 4.62% | 18.14% > --------------------------------------------------------- >=20 > Test with 1p1q on Cascade Lake Xeon X86server, > --------------------------------------------------------- > buf size | memif =3D mbuf | memif < mbuf | memif > mbuf > --------------------------------------------------------- > non-zc gain | 19.97% | 2.35% | 21.43% > --------------------------------------------------------- > zc gain | 14.30% | -1.21% | 11.98% > --------------------------------------------------------- >=20 > Joyce Kong (2): > net/memif: add a Rx fast path > net/memif: add a Tx fast path >=20 > drivers/net/memif/rte_eth_memif.c | 258 = ++++++++++++++++++++---------- > 1 file changed, 176 insertions(+), 82 deletions(-) >=20 > -- > 2.25.1 >=20 Series-Acked-by: Morten Br=F8rup