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 A261D41C61; Fri, 10 Feb 2023 16:20:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CC48410D3; Fri, 10 Feb 2023 16:20:44 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2050.outbound.protection.outlook.com [40.107.22.50]) by mails.dpdk.org (Postfix) with ESMTP id 0D060410D0 for ; Fri, 10 Feb 2023 16:20:43 +0100 (CET) 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=oZLBJvWlkOFhDJKDGM0s8KIhiPkwns6t9O1KPjNPm0c=; b=lpg9XNXG/rLnb0Ae2ocLEW6fUVUBbD1b+52wJNhclgmczKt5z3dS39QO/l+UcLFLmtS6UpWzICpSZ6BPqdFBytVBj1rx36u8Sm/vj3WM7WO5pmppgCl9kQGnoKMvCMiEay54r5savSW74ieV0bBNd60KFJhnNNgmp1i2mUyu3Ps= Received: from DUZPR01CA0008.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::17) by AS4PR08MB8046.eurprd08.prod.outlook.com (2603:10a6:20b:586::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21; Fri, 10 Feb 2023 15:20:33 +0000 Received: from DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3c3:cafe::7d) by DUZPR01CA0008.outlook.office365.com (2603:10a6:10:3c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21 via Frontend Transport; Fri, 10 Feb 2023 15:20:33 +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 DBAEUR03FT048.mail.protection.outlook.com (100.127.142.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21 via Frontend Transport; Fri, 10 Feb 2023 15:20:33 +0000 Received: ("Tessian outbound 333ca28169fa:v132"); Fri, 10 Feb 2023 15:20:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 61a4fa5837189aa2 X-CR-MTA-TID: 64aa7808 Received: from fb3ccac1f45b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E695964C-1B8F-45E0-A579-C5E30267B86D.1; Fri, 10 Feb 2023 15:20:22 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fb3ccac1f45b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 10 Feb 2023 15:20:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Um5xjlvcXcZTpcM/G/mWCLcpwE+qv7moYhjBDDU+DyiTBQVTS6yPGjBLMjQ/zIwnYcll51o24EtQLmdjhUY8NshlmffkoUG9JYv2KhFnsaUQIBqHOJgTsBaSAi6YeOIw9DuumADgZIyjvgfvpDHS2RfSObSXmH80iBh+B/0pVhaHRv3n9CSrBnPfFJfhGsfENWlzhMUTaD07aRFEj1kZZfif2Sz1ZKo0A9sSB7jIz6pCrv+buOn/en1u1OryQQ9Q1GHiZA0fEnIybLh/WCgRVeZpVzCsLqMo9CcDYIT3oNRh1Azsxqxx3FDWPSDIqlfQQTo1AyYZ9L50Kyhpscyi6g== 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=oZLBJvWlkOFhDJKDGM0s8KIhiPkwns6t9O1KPjNPm0c=; b=Msq7NI+vqh2DgGmXXkA+11TocrPreSNqeE9ltJ0BROa5uU1eoi4j7W9VoujdNbRoS9K3TATL6Yv5oTKHAGeUKlPjc0V17hCe2JoysXzmU1J8IlZycD2CjuQlQH60Uk77cNMrIpVlDfKdRGSM9GzDZKcHzg9GNp8MscwfJQhs9kk79iTwW+EuYNUKwFa3FYTkdDcDSZPpyBwIL9Ct8+f7mtmZ8eGoBiPYsl2ounkcLSk7yXzZebXUj4B5QeRbxI4FHDdYpaNWLm28fZrmjLa6zaXPtxN29hR/g9U1PiraCa5tatgpX7/Y9BIKCqtAHdohjszanLI9cpF+AEt5+6Ib9w== 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=oZLBJvWlkOFhDJKDGM0s8KIhiPkwns6t9O1KPjNPm0c=; b=lpg9XNXG/rLnb0Ae2ocLEW6fUVUBbD1b+52wJNhclgmczKt5z3dS39QO/l+UcLFLmtS6UpWzICpSZ6BPqdFBytVBj1rx36u8Sm/vj3WM7WO5pmppgCl9kQGnoKMvCMiEay54r5savSW74ieV0bBNd60KFJhnNNgmp1i2mUyu3Ps= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DBAPR08MB5718.eurprd08.prod.outlook.com (2603:10a6:10:1a9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 15:20:19 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f8c8:b4b6:c041:ac9d]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::f8c8:b4b6:c041:ac9d%7]) with mapi id 15.20.6086.019; Fri, 10 Feb 2023 15:20:19 +0000 From: Honnappa Nagarahalli To: =?iso-8859-1?Q?Morten_Br=F8rup?= , Kamalakshitha Aligeri , "Yuying.Zhang@intel.com" , "beilei.xing@intel.com" , "olivier.matz@6wind.com" , "andrew.rybchenko@oktetlabs.ru" , "bruce.richardson@intel.com" , "konstantin.ananyev@huawei.com" , Ruifeng Wang , Feifei Wang CC: "dev@dpdk.org" , nd , nd Subject: RE: [PATCH v2 1/2] net/i40e: replace put function Thread-Topic: [PATCH v2 1/2] net/i40e: replace put function Thread-Index: AQHZPRyQFMEyiRlbtEG77oolNRpj6a7HyFiAgACDm3A= Date: Fri, 10 Feb 2023 15:20:19 +0000 Message-ID: References: <20230209062501.142828-1-kamalakshitha.aligeri@arm.com> <20230210065407.209567-1-kamalakshitha.aligeri@arm.com> <20230210065407.209567-2-kamalakshitha.aligeri@arm.com> <98CBD80474FA8B44BF855DF32C47DC35D87728@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87728@smartserver.smartshare.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3FD98727A7D87A4FA74C9B4AE9F924BD.0 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|DBAPR08MB5718:EE_|DBAEUR03FT048:EE_|AS4PR08MB8046:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b3d6f81-76e4-48a9-3eec-08db0b7a5ab4 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: CJPyJFtSJ8yA0Id+/g7tRTQRiVg42rtGsazFBYY2nR+133N0lo0ZllqYvQkIrg2aSu6fwGlNksvclEyTBkwKDLi0mLgot2td4OvXIf6akfjnAClWMAKbNKClIv9O9ixSRoMRC11NpSHsAry37SIvhwan+9gQ1AcBxBX7I6zKkZtbRGVat3Ybwf+8sbo8wspX5+ijFlBHjLWaXpgIkFzQHcT0fkiru1U1bsHbjZrKuFyMF3RGbcmPfQLse81pZ4TJyB9Mt+vk9cDa5Uh9IyxULbKCzoTA54uh0ydj7SLk0+YxERMPTQ+x9HCjTiPZ/mhW0+c9EN2wj0mgHrVoy/3BwrRP5wLnE6790cgVl0tBcTRdlqKqurlCQX9QIP3Z/p4XsJSpFekaM/EJXhlL1BoFJLMuqBGTun4rqXzBZ/Wrx5w0W+EqL21OTlDZVw1InOZcY4wY7ou5BVAJaCvbek2m1fa4d+AbXGY5eOgi/qC8NXLPd5F7hxKsM5fgNaMHZgsrRm9k7GjOQMRbG1/WytYCON6WCRICv4Roiy/U6CqIJJAOvZOBQLBabxVuLgaQAh3jDlGlWoPy1RuOJT9nccLSWynh9sM8zkVVmakY3UiP7s9zkwWOrgGnPdk0gmHNElR6Sw6AZHlh7Nu1WFRTOiJNoWl1mRbgpJbmT60XIeoIDanTVMbLXl0VDLVGBKz6EYYOi3CYp08raV/smDS02Nt6eCrFE+i8nOQ4AZNh5TQ9D5nR9rUsKm1LAmJDb+nTsbOL X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(136003)(396003)(346002)(366004)(376002)(39860400002)(451199018)(86362001)(38070700005)(64756008)(66476007)(316002)(76116006)(66556008)(54906003)(6506007)(110136005)(6636002)(8676002)(66946007)(9686003)(71200400001)(966005)(186003)(52536014)(41300700001)(8936002)(478600001)(4326008)(83380400001)(5660300002)(7696005)(33656002)(2906002)(55016003)(921005)(122000001)(66446008)(66574015)(38100700002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5718 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: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fcbe3194-fb03-4fbd-043e-08db0b7a522b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ROilpHH2rfNsNoNUY5fqI+YvQ34mgo3zFqCOiq0PWocM+PGGvUd9NbDnDrpR9j3lSgRg4ltcGNztxdltrkUYXqUK94usuu9Kv+1oJv+E5nL2Zr3IDTGjr+jlgKJJTBRIEGhl3vJj71luXNvX8+2dMRKJONbHXXhpRIHhF4vFspxlbh+l5ESsWeM7APdow8N8zHsBGKj5wAUXamvPK1WnD+xFe0AzwGKI8FiUQc22t6mRIzmophl6LWUGjpymISPJYHENBA9FQs5D31KJDVV/9S9R3/RPegbtVSE1yl5873F8b7ugybcpxqHlePWBALgNHUs5exK1/w3SaiokiK12gNWGSi58ZVB7HlETnfaJtKflOpPe787FAE+ms69IQJgf2c+3R2iFwUVUZxQTLXTf+M6U08M9Vq9JsMLiEZBDCGI6XvCza0dTpexHLLswmJ5SF6JGYH72ksN89g88svfKy9CicW38BUUnB9nKNT7Qsgh0g8ZpOov1k9aH+0gaQlTZaTzfj+vXAaHjSinbTX9cdPQQulCh84fRUQrNP58lBO+7mwNPLVLvSj4Abxbhgp1TvYaIi0FEmtGQGfyb8G1lOtTdTR+XBvuYXbHjJSs17RWyIcr29dG/VtOsWk6r+g6a0vZqPM7QFJmVNT+6yX9kEtP6Vp0lbVCaFC6Qg1VkgOJ6xkgGFjZoDjCoITBWkZozot/4eTl1LW8VgoT9CAtepT7vds6QPTIf+IKXkQtWqqyFsXDbOa3cdbwIrchsvpcs 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:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199018)(40470700004)(36840700001)(46966006)(82310400005)(8676002)(186003)(8936002)(6506007)(70586007)(70206006)(4326008)(33656002)(86362001)(82740400003)(81166007)(9686003)(921005)(356005)(66574015)(47076005)(336012)(40460700003)(2906002)(316002)(6636002)(7696005)(966005)(55016003)(54906003)(41300700001)(5660300002)(26005)(40480700001)(52536014)(478600001)(36860700001)(83380400001)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2023 15:20:33.8734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b3d6f81-76e4-48a9-3eec-08db0b7a5ab4 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: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB8046 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 [ >=20 > > From: Kamalakshitha Aligeri [mailto:kamalakshitha.aligeri@arm.com] > > Sent: Friday, 10 February 2023 07.54 > > > > Integrated zero-copy put API in mempool cache in i40e PMD. > > On Ampere Altra server, l3fwd single core's performance improves by 5% > > with the new API > > > > Signed-off-by: Kamalakshitha Aligeri > > Reviewed-by: Ruifeng Wang > > Reviewed-by: Feifei Wang > > --- > > Link: > > https://patchwork.dpdk.org/project/dpdk/patch/20230209145833.129986-1- > > mb@smartsharesystems.com/ >=20 > If you agree with the referred patch, please review or acknowledge it on = the > mailing list, so it can be merged. >=20 > > > > .mailmap | 1 + > > drivers/net/i40e/i40e_rxtx_vec_common.h | 28 > > ++++++++++++++++++++----- > > 2 files changed, 24 insertions(+), 5 deletions(-) > > > > diff --git a/.mailmap b/.mailmap > > index 75884b6fe2..05a42edbcf 100644 > > --- a/.mailmap > > +++ b/.mailmap > > @@ -670,6 +670,7 @@ Kai Ji Kaiwen Deng > > Kalesh AP > > > > Kamalakannan R > > +Kamalakshitha Aligeri > > Kamil Bednarczyk Kamil Chalupnik > > Kamil Rytarowski > > > > diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h > > b/drivers/net/i40e/i40e_rxtx_vec_common.h > > index fe1a6ec75e..113599d82b 100644 > > --- a/drivers/net/i40e/i40e_rxtx_vec_common.h > > +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h > > @@ -95,18 +95,36 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq) > > > > n =3D txq->tx_rs_thresh; > > > > - /* first buffer to free from S/W ring is at index > > - * tx_next_dd - (tx_rs_thresh-1) > > - */ > > + /* first buffer to free from S/W ring is at index > > + * tx_next_dd - (tx_rs_thresh-1) > > + */ > > txep =3D &txq->sw_ring[txq->tx_next_dd - (n - 1)]; > > > > if (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) { > > + struct rte_mempool *mp =3D txep[0].mbuf->pool; > > + struct rte_mempool_cache *cache =3D > > rte_mempool_default_cache(mp, rte_lcore_id()); > > + void **cache_objs; > > + > > + if (unlikely(!cache)) > > + goto fallback; > > + > > + cache_objs =3D rte_mempool_cache_zc_put_bulk(cache, mp, n); > > + if (unlikely(!cache_objs)) > > + goto fallback; > > + > > for (i =3D 0; i < n; i++) { > > - free[i] =3D txep[i].mbuf; > > + cache_objs[i] =3D txep->mbuf; > > /* no need to reset txep[i].mbuf in vector path */ > > + txep++; >=20 > Why the change from "xyz[i] =3D txep[i].mbuf;" to "xyz[i] =3D txep->mbuf;= txep++;"? I > don't see "txep" being used after the "done" label. And at the fallback, = you still > use "xyz[i] =3D txep[i].mbuf;". It would look cleaner using the same meth= od in > both places. +1 >=20 > It's not important, so feel free to keep as is or change as suggested. Bo= th ways, >=20 > Acked-by: Morten Br=F8rup >=20 > > } > > - rte_mempool_put_bulk(free[0]->pool, (void **)free, n); > > goto done; > > + > > +fallback: > > + for (i =3D 0; i < n; i++) > > + free[i] =3D txep[i].mbuf; > > + rte_mempool_generic_put(mp, (void **)free, n, cache); > > + goto done; > > + > > } > > > > m =3D rte_pktmbuf_prefree_seg(txep[0].mbuf); > > -- > > 2.25.1 > >