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 9E80AA0503; Wed, 18 May 2022 04:49:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47D234068B; Wed, 18 May 2022 04:49:03 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by mails.dpdk.org (Postfix) with ESMTP id 5249340041 for ; Wed, 18 May 2022 04:49:01 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=jHRxxuawdi81vMMnjrm53RJqTcFE3cYvbM7P+apq1kEd+MHx4yCr665yllKqbOXAPgpCOTokW9DlbDdZ7UcsBJ099ypuHQTa16Rg+blepLDMT4Cxhsum7kyWUV83dKtiATvQDQZWRkjkjtZpNXz23zI1ZZnwF2ZvmslgcX5EysuelAVi0vous8fvhedbCCO68i+FQJQirshwS0Ep6+CvP4k4KJ5jB0yT6FDhT3jZg1Y2rkx+wp3H81Zu+lq026TLYSnuUCHrIm94EGPeQ6fdZLAjDM4wTw4Ou0IhmmSyWIyNSh5MeF8IUJd5eyGAYoylC8PbIRjD8JU6pQuYPCToeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QreP01HRMQnKQGYIvD/yBKeHkTn2SMCQUgMrF4in6wI=; b=afOMrY58cmOj4Xqet704R8yZ5l8AGbqOvPKVXqfY3MS/mf2ORHfb2n3CryFG+2GHbsQcLyXFY1FJarQHz86HyeDob284Yli6ZZ4VTLgC8QET+RNH4WXlSsAVZIld1MShUpjdngfc6Vf0vNLC/kqSHiTz27AVaG97YBRCga/1kjm+7iQwnWS4pEMRbAmRJ9+tYmm4akxaDHrCY6d/NGEBWHiCaQ0duAU71RcPQYp2L2ZY0cjwDZs/7WfLJ5OA17UuMJXmkxNRVz+xy2MoOuo6dMVZ2PpPSSJZaYnxcCZjWaM6pddhlQwSfL9LM9vhZ+a3+WGAwo3eO9xHUMXOFTV+3A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QreP01HRMQnKQGYIvD/yBKeHkTn2SMCQUgMrF4in6wI=; b=CEukCdBBr6zElQJlfdw2EkvPbFmaqLjQvrAyMysvXDpPzFRnCj4qzuqxmDExKD1TY0qYIsahAaIUah33VEqvzUKd5YI1DKJURCa+t51ELhGkVTVZUUw1o7ucJARUQ9PdASUDpzZVw6oEsBvPUjt9BX95gjcuwYlYrsHGDuztRrI= Received: from DB6PR0202CA0002.eurprd02.prod.outlook.com (2603:10a6:4:29::12) by PAXPR08MB7042.eurprd08.prod.outlook.com (2603:10a6:102:1da::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13; Wed, 18 May 2022 02:48:59 +0000 Received: from DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:29:cafe::cf) by DB6PR0202CA0002.outlook.office365.com (2603:10a6:4:29::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Wed, 18 May 2022 02:48:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT050.mail.protection.outlook.com (100.127.142.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Wed, 18 May 2022 02:48:58 +0000 Received: ("Tessian outbound 9a0893f586e2:v119"); Wed, 18 May 2022 02:48:58 +0000 X-CR-MTA-TID: 64aa7808 Received: from 4612fc964762.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9EF75D4A-1538-4A48-8159-C2B705FD2DBB.1; Wed, 18 May 2022 02:48:52 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4612fc964762.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 May 2022 02:48:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amrBn5AGCWcOlOBIaMVO6+acHpCRkEkteK6DptsylYY04XR6IoABBor+ZpLEH3o7WFtB0LkH79bAG1Nm+59uXNUgXvj2AeIkWbTMwLSTvZ/JbKxtvGQicVCxBPOPu+peAF9yeDaW5Z81z7otb7db7jgFvgxFOid4Bd5CNqaOf6sLxqV8TRXW63p68GPm4doMmvwu+5eHye61GlLDjX6IWGKEJkVu+j14Ke/WTwk7YzBbWciOA8NYaL1HgBSsdqDLXf7liMLF2mwUVi8ldvey3kpOk8rX3N1IX+Sszr7iKqS7XD6cfoOPSDeaJhncrg+y7G1t6k2EtByKaD5oSinSjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QreP01HRMQnKQGYIvD/yBKeHkTn2SMCQUgMrF4in6wI=; b=fXd5kXCWdMwkR/DIvGTbiZZIW8Rfq4bikt8WLMwYp7hRhsKbHGVbgnzIsVNTyaiesT17CVXHhsFJENWsaC8/dJJd40mh0mInw6wd+/SkZJ8/gsfUK5cTLHEndHdNQAgEawSuPZce2AeDjwrv+ynwbCHa+CuFbGRFWUVuT2DO+t78R133sTYuOmYfXan6oAMhfuvIFjfi1pTBll/gl0JrqvMu0pWU6e7e9AoxHv7BKass14Fl29gEgjIcy/uffzBRvnH5igMY3sOSdDDEYfaem0EsE41FEH6lLvNowuA0ysY6HNinhmyftwQASU5mix/sqqrAIeX4hIxdCsm4XEHCkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QreP01HRMQnKQGYIvD/yBKeHkTn2SMCQUgMrF4in6wI=; b=CEukCdBBr6zElQJlfdw2EkvPbFmaqLjQvrAyMysvXDpPzFRnCj4qzuqxmDExKD1TY0qYIsahAaIUah33VEqvzUKd5YI1DKJURCa+t51ELhGkVTVZUUw1o7ucJARUQ9PdASUDpzZVw6oEsBvPUjt9BX95gjcuwYlYrsHGDuztRrI= Received: from AS8PR08MB7080.eurprd08.prod.outlook.com (2603:10a6:20b:401::19) by AM5PR0801MB1843.eurprd08.prod.outlook.com (2603:10a6:203:3a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.13; Wed, 18 May 2022 02:48:43 +0000 Received: from AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::f45b:b9f9:6278:31c]) by AS8PR08MB7080.eurprd08.prod.outlook.com ([fe80::f45b:b9f9:6278:31c%6]) with mapi id 15.20.5273.014; Wed, 18 May 2022 02:48:42 +0000 From: Ruifeng Wang To: Joyce Kong CC: "dev@dpdk.org" , nd , Joyce Kong , nd Subject: RE: [PATCH v1 0/2] add a fast path for memif Rx/Tx Thread-Topic: [PATCH v1 0/2] add a fast path for memif Rx/Tx Thread-Index: AQHYadwmYho9qi/4fki6Rm0Vj8wDHa0j73Ww Date: Wed, 18 May 2022 02:48:42 +0000 Message-ID: References: <20220412093243.3670187-1-joyce.kong@arm.com> <20220517105109.1086090-1-joyce.kong@arm.com> In-Reply-To: <20220517105109.1086090-1-joyce.kong@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 5EEA425B9B50DE4689026D32ACC7A1C7.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: e2d41c6b-7bcb-4b34-ab9d-08da3878f545 x-ms-traffictypediagnostic: AM5PR0801MB1843:EE_|DBAEUR03FT050:EE_|PAXPR08MB7042:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: I5s3PJSiShAvOBxlf6otuOp1UCrCy192U0U2/oqj3GL2O3c9m+hH9X/RZ9NMjS3Wtt5s65lIH6B30lm69Y+4SbmCM0d7acI9I5b/BF0CBUrx5jHwPwEFU4oViobZadBYnREYkHET2z0oDADsjGmOqGNAAcf6vJg9zDpDLrQgIhwEbltjO7rNjPkfI/UUXrbc5X8gOPjVi2+hiE64EeW17fJrlWjC2COFY7+zvsBq3Ob7g8LV0aXIEmZbXqNdm0A9WTwwlo/ancO9V8G/yo+kntgDxq7Sw9lLd9I3VGKzSZvVvzeqInuTTadSzxujPRJkg2b5qc7xIoxEHPkgSpXW1rO3ye80SWOUZ4ai491HaqrchJCH9cAa+IAxQPrW/eGT6JWZV8goC8J3lQUrqT2WaVLp6V64KY7ozQXUKy3kzzLPbz54osrFJS2HaUT5B5WfFQdSK0E05kuQWavYmIzJ5EPypY8TArbl/SagWxW4OElEigOURAUWOyGskF5tmu7SkTZDPyMa00VZ+73mHK0eK6ZmN8UtYCkZLfXQGvNBHXrG4PFPVOsXupr24DYrQgnTDsctxqLs7LicZ0depfYVC8YYs4L9Semt/IalTBDSDPeg3BpHiqgolEjQd+eplYbse/l4zAKTwtafyBQsNsD5Atggu12YUwYyT/3IaBiFOhKa8NpBxJ3Z9zgUgJIYcbkKMbx42oX2zqlCkwmCVWKZdw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7080.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(33656002)(76116006)(64756008)(66556008)(66946007)(508600001)(66446008)(4326008)(8676002)(86362001)(38070700005)(38100700002)(6862004)(66476007)(55016003)(6636002)(26005)(122000001)(9686003)(71200400001)(54906003)(316002)(7696005)(52536014)(8936002)(83380400001)(5660300002)(2906002)(6506007)(186003); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1843 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0370aaa4-b038-483c-2efe-08da3878ebb8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hSpjX7sxvXmCTe2qDFj39HPz1y9MBs0oIXALF5Odoj2RKoqMXA1DFlskmsC8Lz75uTKWOLo9KlFMINaeL3m6kpwJAoCGV1j2r72JwNpMYbkqCQ/Lp4Ls+Q5AAwfrmrJnUjiOl8/muvfFMXIrWx9ZFwflXC1CK8tg9oaJZ1aXVt6wNBXQ9wSpc9ZivqmnVGC47rLlG8GXPvEGw8ORmmYWoVOGkZHYiRVkhq3dRFxlpYbVkiCEgx0YudVzXcZ5YT5soD/7ewDI20tLU/8cNrNBBcB94+k0laKWskwzGlsGZQ3FOq1nyswclbF9rbivEK8fwzsNTDfagWmk7T4cTjzGBrD0G8sJi6T3AsAbAYhTtFFQc0f2WOVlOK97lE95pytEvgD8kDNosc00/IAU5H7axLk8m3E2Gj54OnrWBeAZ4Loo+3cKsCMS0qI/AT2EVua8uSB2qnjq7uZJ4mM9gqZ+E67cpr4gyhM6rc34iokQV8Sdu/cHigEgFoa+FFahdwRwUQwS0DvydwLsDRSQB76GUDdj2fvhQfhUwmZWM5FRERQT2VLf2V9dzfHQL+YKXCmP9R5MML4yOkWiq0dC09bOjKJ0dKTeeQfJaTAACkDKw0/DRSFyCNaEdru/kZbYbaHQO8ecmM0ep1aOjxhYkixGm5jA5b33qnFWFbaTMrzS2XIYimjVoIGIow0pgkLqv/Wn X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(33656002)(47076005)(82310400005)(81166007)(356005)(70206006)(40460700003)(55016003)(36860700001)(86362001)(2906002)(4326008)(8936002)(5660300002)(26005)(508600001)(8676002)(83380400001)(6636002)(54906003)(70586007)(6506007)(7696005)(9686003)(6862004)(52536014)(316002)(186003)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2022 02:48:58.8561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2d41c6b-7bcb-4b34-ab9d-08da3878f545 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7042 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 > -----Original Message----- > From: Joyce Kong > Sent: Tuesday, May 17, 2022 6:51 PM > Cc: Ruifeng Wang ; dev@dpdk.org; nd > ; Joyce Kong > Subject: [PATCH v1 0/2] add a fast path for memif Rx/Tx >=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 Series-reviewed-by: Ruifeng Wang