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 1F4A5A0C41; Wed, 17 Nov 2021 18:44:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0199E41158; Wed, 17 Nov 2021 18:44:58 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2077.outbound.protection.outlook.com [40.107.236.77]) by mails.dpdk.org (Postfix) with ESMTP id 529BC410E9 for ; Wed, 17 Nov 2021 18:44:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mSt8gc8QGyOHZ1G2RBv/71yHnffiGGXggHU/NH3a3JGqrt/hmFbm3xoxOzgSp7jQ34G/XBOQ0gFcIQJ7gq5J3bW4spzB57u/ZfpTmAyyd3eigpz4UkXtf6xkAcaarUcGio6tzI+iAXSOKN9CwHA7x2LIIk2FpkUz6wEdrJq34x5F3iyMLImjHo/Kq7iM0RODZsfJqDjyf1fgsLzPdNFdBH+U9MdkwJ8+oRnz5vlC92zSygzfniunwIGYqndS/GM9UKMorVfBGJd4jIAAxNRHn7yy1koL7wNJt+yI7vImZA7PZyhTlCYoF+HgY7bVwGBSBksKXoGYn6wUGyPTjiRN6g== 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=bMFE3rtLb2SdyuD6vXW5Oq2MO3F+H6YNJdAkA9j7O7Y=; b=B8WRJUIJN/wVYwuOYJQ8s+M+KVA2Vc/Vb8H9Ruf/o4tvlooGZKmiVfzu4XhziSi7i2CLs0DJT22Qk1XAX3i7RFhOza0XXf9Rdp4HFwOmH3XJJVo1UODWR8WmURtJgzF6ud/yKzIAkDhgu5qnj0xqf3B9FwQFHu7gyHGcCsRASUNxRRRyHccIQoyJS35HAF1LUj8XJmspGFAGrOqRTULXklPLC9ED7zX2CsL/uGz8uYPO05nQi3D621gpEsQACkFHmANo1n6bxvqV6O+zFZ019PIFAS43Zm1veWfAri5XewIQmEDygTAT2gNAyaZzCw9mVFeazYJj2nIZLS+UnJeKzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bMFE3rtLb2SdyuD6vXW5Oq2MO3F+H6YNJdAkA9j7O7Y=; b=Qdo7cywE4Il+z05hOX7ZxuN71iOJYWBPDOHRAoGJu33dK1gmdALPieSbXaDZyr0zeueXSxxHWxGXGdmXtq4LnL8ZmRNFPjSP5UfESXH6ge2JqAisKjUdc3ixpKDGPrL+jidDiefl76nq9ntFfHSq3zM+DH7qkbDlbU2iSyTxI9wwKXg4zWIrxoaJ3WtDceOBBZ99D/ysVzJKqc8itdU3gAr+I1vP4EyderiwRyYqnAHsc9YTXH9yl2YoEKD54pe5HkkeRObGH0vzi57sPSI9TMPMAiNdEJdVGZqWxhZ8zwyPCMlYTTdEYkdxlI7mbNffVwmgmaXw7e2ww+5B4cMOAg== Received: from DM6PR12MB4107.namprd12.prod.outlook.com (2603:10b6:5:218::7) by DM5PR12MB1737.namprd12.prod.outlook.com (2603:10b6:3:10e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21; Wed, 17 Nov 2021 17:44:53 +0000 Received: from DM6PR12MB4107.namprd12.prod.outlook.com ([fe80::98ea:e961:8212:62f4]) by DM6PR12MB4107.namprd12.prod.outlook.com ([fe80::98ea:e961:8212:62f4%7]) with mapi id 15.20.4713.021; Wed, 17 Nov 2021 17:44:53 +0000 From: Elena Agostini To: Jerin Jacob CC: "Ananyev, Konstantin" , "Yigit, Ferruh" , "Richardson, Bruce" , Stephen Hemminger , "dev@dpdk.org" Subject: Re: [PATCH v3 1/1] app/testpmd: add GPU memory option for mbuf pools Thread-Topic: [PATCH v3 1/1] app/testpmd: add GPU memory option for mbuf pools Thread-Index: AQHX2xtuLnccivIdaEyRk5cICPLtBqwGrVmAgADi4JqAAATLgIAAAH8ygAABeoCAAATgAIAADV+AgAAAvt6AABDlgIAAAnYkgAAD8ICAAAEyWIAAPORW Date: Wed, 17 Nov 2021 17:44:53 +0000 Message-ID: References: <20211029204909.21318-1-eagostini@nvidia.com> <20211117030459.8274-1-eagostini@nvidia.com> <20211117030459.8274-2-eagostini@nvidia.com> <20211116133449.7b7d21d1@hermes.local> <20243569-b7f0-53c5-02c5-ba29734e30c2@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5f9c94d3-9f56-40b5-fce8-08d9a9f1f66c x-ms-traffictypediagnostic: DM5PR12MB1737: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xBtzGpw+v4uc4/YX9gM9ZXQybIhh0guXvmXlVOTHyScy9IjXzQ2QNv1qgMUBPCEqLMTq+uHYkxFEZCpWVcEn6Y57Sb1obbHCX7cmrbw1R16gIp1PdA9hfz6q1/sIJSY/fUtXGbeG/vap65JGEQzOUifdhuMbXICEJwSC2dMyVTEZEqz5LVIqDfTdUSdsnsSGy3u5Ux0AUzSuUJY0ww5W4QQsx8ZP4nenxgaR8kkmPD6gAjLfk64ONUQi8Z+xwqxEtu+xjGVLjRfVQ3GyOogT4D4fhSjO/Kj9ZoKBlfNBTHx6l/iRDx2NSGucGc8PwF/4jG5qahOw5HdFe4fDeIb08iv+FAqn4AmX4QM7hbXCeppyLkzMEt2kH7+gAoUJlMLplxHHHdpz4LEx+rZa7ABX09Hf8nYB9FiK7RFAisbJwg5FSN1DtWdHaAcmX3ueYE1Ah5KubSPjZMVVtOb8LXoHuVc7TqJAPKkofkrUMiqgLUxmM47UCuhzfbjrf3WVR4QL3w9Uve6ijplkTRLN+AzdIsHeuKxwLiY8H8/EgqAPsxkaglrQEv+rCSpyxsaPR6hqGkVFqgTGEXMNRlijAnFQNujvKl2PB0r7/P1mszbcwT0ZPKi0DbSRZh2LKZUexyz6mLgqoenPOIwGALPpdlOlgYIa/4rfkubm5lO9LcMQERaXMEEfXG8+hRv1u1WXe+Bt/S+j3eKtyg2V6hvc4vTDqpID37DYgn5DmkvhF3D05mxBkgQLbzhRNOUImCAGQrQpmsVY4R8VlUYqA4aWF5/UG9BRHrv0B1X4FT5hMREaHRw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4107.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(52536014)(186003)(2906002)(6506007)(9686003)(8936002)(53546011)(508600001)(4326008)(26005)(40265005)(66556008)(966005)(6916009)(7696005)(83380400001)(2940100002)(38070700005)(166002)(8676002)(86362001)(71200400001)(38100700002)(33656002)(316002)(54906003)(122000001)(91956017)(66946007)(76116006)(5660300002)(66446008)(55016002)(66476007)(64756008)(579004)(559001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?ai0ri8h9CqI9Q2DswXsIwjPkoXY0Qxg7eZZT6xTRk/tE99l6hYQf/prk?= =?Windows-1252?Q?XZQiPGHaAPzBRgxPy5Y+9g/jaRR1Y2uygCZYq75jUIGe/Gdt8R7cWA+a?= =?Windows-1252?Q?JtkQN0C83NoGudRD67R7euDt9uEoAeotd+GZHdiEdq5J4C++R1E/PiL+?= =?Windows-1252?Q?F+iRtg0O6fUty7jbY6X1l1cJ70UdnHZmC1LRlnUy2BFYqBDqu0vlmm+4?= =?Windows-1252?Q?4yXfRrEoWxXFWlMfe888a0mKaaVBLMPq8LCeEzDAOwrPVajjxlLzZ5Sn?= =?Windows-1252?Q?0WoQL9f41AogylBDAVpjCUZkPvxMRY1oa7HatjGmvrdYhlO/siCG0GWY?= =?Windows-1252?Q?/FzjCGeHwROzw1ieQuLfO7Wvod2jwGh+63b4quy0eBgWSP/5FXu2b5LZ?= =?Windows-1252?Q?GUr3Lwnc8yRIdPZ8BrlA1vJMu3Ie0adJ17W0kJ+I4dDSxiiOUUI/EiRV?= =?Windows-1252?Q?TmnYGOej1mWEPKtu5VDC6/mSkv2z7bZufWcME+kR2AOGscZTw0LYUByS?= =?Windows-1252?Q?VEhUjrS2EQXW66wB4qH6PWPfGdC4ziaTIQ3uNyJWWR5YTXDnwcBuKTwM?= =?Windows-1252?Q?y5PqmafBHieffGnecf/6Ajsdjsk301GQM6e2+/C+npSca4p4SKsqxXkh?= =?Windows-1252?Q?JKmIIttKLLeON6Sck5CQ7jCmGBZMasGUi2naTAxVoSqz6UgRa3+ZC+Xk?= =?Windows-1252?Q?zwIoXsXOaCQVXm5aApFsBZUGrJV9VRshp7tMwZDdUHRwl4eYYtdUtV7n?= =?Windows-1252?Q?biKkl6OBYaj8AFwv179ZizyFnBJMAYJ4eO94N4g10hL6YO2g09F6ZLkz?= =?Windows-1252?Q?V+woGname92MZzBkNNvapVuwq22lm8Ji5a0A8I4Qhh04eANAB5gknhoS?= =?Windows-1252?Q?OIUv9hQs7FArHaczPyxjsGLf8gakjQlwx8phH2z4cZet8gvLMTXyhkEI?= =?Windows-1252?Q?Lht9WQf/VTgrVpnQUSjpHRRrDfANc6JGGidDFa2Oe5z9J1h5q5teYuH+?= =?Windows-1252?Q?P/2EjD04aBnVcbT+U4AutXv+ly7dFHLjXWWHLMwp7iktQ0FO9T97QtY/?= =?Windows-1252?Q?vRivAYW+ek3Sy90l927otCbgWfUP7XyZkhtLQNrOf9/LurmfJRS/glG0?= =?Windows-1252?Q?GhDOa5vlIfmU9UyipeySimJtS5IlIIcF3Goh7PvG7/t3nNSedFnO40Bc?= =?Windows-1252?Q?gWanv4PSoOgNTKQtU4oAla3ZPpr9p1whGgXxu9keKpk4/HZa73V6lgXh?= =?Windows-1252?Q?7JTnvbSM5Z7ejKWXz/iStjsl4qDARb0+VQ7FsOu9LGVOpoUJ5SsQxhuv?= =?Windows-1252?Q?z3SpP54w1p4YkZ+XPTWRMO9gKfaccyfH4QlY88sUdUxsq+uTzdkkIGha?= =?Windows-1252?Q?jYLkscd2aV3g5D61/ASe1PJ4WnNyqkKbhpIIt4znabGYeTdk0CmoTjlb?= =?Windows-1252?Q?mI0MI1LFUjJsuB6VnK3kIgHj53CSGnX+fQHUx+HuEcjwE+AsgiGuQEcA?= =?Windows-1252?Q?dW4HZlSowG8Elp2NgCQvzy3Q6eav4YaV9eDipcxJDDI928PMOzkF66Wz?= =?Windows-1252?Q?WGtrtsXIbPb29rpFv9NVmCvU1ao9mikrA/JlR9hZRw4e1yO4jUUcWRjJ?= =?Windows-1252?Q?Qt4eU3PbL7Mk7QhvAIBviHCl88Aw0ghZ5OYqHtdu6uwtU21phCT+YfKW?= =?Windows-1252?Q?DnAOfFmdDq0ub+QvH6ph/cChEV+Pt/bjpAiJWnCNKmi6AYz/dk8+UcKR?= =?Windows-1252?Q?1WxB5G4ZkuXUx6E8rvzzsmSTBKgKEuy+l5X0s/tw?= Content-Type: multipart/alternative; boundary="_000_DM6PR12MB410778286DA057FB46A35588CD9A9DM6PR12MB4107namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4107.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f9c94d3-9f56-40b5-fce8-08d9a9f1f66c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2021 17:44:53.5260 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Htkg3cj4969WK17W4yMTCFVEMcGFGTAoPPHiV01D51lXHBg9a6MITSUJvq46WFLqzWdx54dX2AWsieS0Ehh5IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1737 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 --_000_DM6PR12MB410778286DA057FB46A35588CD9A9DM6PR12MB4107namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable > > On Wed, Nov 17, 2021 at 7:20 PM Elena Agostini w= rote: > > > > > > > On Wed, Nov 17, 2021 at 6:09 PM Elena Agostini wrote: > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>> On Wed, 17 Nov 2021 03:04:59 +0000 > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >>>>>> This patch introduces GPU memory in testpmd through th= e gpudev library. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> Testpmd can be used for network benchmarks when using = GPU memory > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> instead of regular CPU memory to send and receive pack= ets. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> This option is currently limited to iofwd engine to en= sure > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> no workload is applied on packets not accessible from = the CPU. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> The options chose is --mbuf-size so buffer split featu= re across > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> different mempools can be enabled. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>>> Signed-off-by: Elena Agostini > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>> Won't this create a hard dependency of test-pmd on gpud= ev? > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>>> I thought gpudev was supposed to be optional > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>>> Sure, let me submit another patch to make it optional > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> Why to add yet another compile time macro everywhere in t= estpmd and > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> make hard to maintain? > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> Adding iofwd kind of code is very simple to add test/test= -gpudev and > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> all GPU specific options > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> can be added in test-gpudev. It also helps to review the = patches as > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> test cases focus on > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >>> each device class. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> Test-gpudev is standalone unit test to ensure gpudev funct= ions work correctly. > > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> In testpmd instead, there is a connection between gpudev a= nd the network. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I understand that. We had the same case with eventdev, wher= e it needs to > > > > > > > > > > > > > > > > > > > work with network. Testpmd is already complicated, IMO, we = should > > > > > > > > > > > > > > > > > > > focus only ethdev > > > > > > > > > > > > > > > > > > > test cases on testpmd, test-gpudev can use ethdev API to en= able > > > > > > > > > > > > > > > > > > > networking requirements for gpudev. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > +1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > +1 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Testpmd already manages different type of memories for mempools. > > > > > > > > > > > > > > > > gpudev is just another type of memory, there is nothing more than= that. > > > > > > > > > > > > > > Let take this example: > > > > > > > 1) New code changes > > > > > > > > > > > > > > app/test-pmd/cmdline.c | 32 +++++++- > > > > > > > app/test-pmd/config.c | 4 +- > > > > > > > app/test-pmd/icmpecho.c | 2 +- > > > > > > > app/test-pmd/meson.build | 2 +- > > > > > > > app/test-pmd/parameters.c | 15 +++- > > > > > > > app/test-pmd/testpmd.c | 167 +++++++++++++++++++++++++++++++++++= --- > > > > > > > app/test-pmd/testpmd.h | 16 +++- > > > > > > > 7 files changed, 217 insertions(+), 21 deletions(-) > > > > > > > > > > > > > > 2) Good amount of code need to go through condition compilation as > > > > > > > gpudev is optional that make > > > > > > > testpmd further ugly. > > > > > > > > > > > > > > 3) It introduces new memtype, now > > > > > > > > > > > > > > +enum mbuf_mem_type { > > > > > > > + MBUF_MEM_CPU, > > > > > > > + MBUF_MEM_GPU > > > > > > > +}; > > > > > > > > > > > > > > The question largely, why testpmd need to pollute for this, testpmd= , > > > > > > > we are using for testing ethdev device class. > > > > > > > All we are saying is to enable this use case in test-gpudev so that= it > > > > > > > focuses on GPU specific, Whoever is not > > > > > > > interested in specific libraries do not even need to review the tes= tpmd patches. > > > > > > > > > > > > I understand your point. I don=92t understand why this testpmd patch = is there since Oct 29 but > > > > > I'm receiving reviews only few days before rc4 when I have a limited am= ount of time to get new code > accepted.> > > > I understand that pain. Welcome to DPDK, we have all gone through this > > review issue one or another way.> > > > > > > > > > > > > > > I can provide a gpudev + ethdev example by end of today (I'd like to ke= ep test-gpudev as it is to > test gpudev API standalone). > > > > > > Is there any chance this new example will be reviewed and eventually = accepted in DPDK 21.11?> > > > Why a new example? I don't have any issues in updating app/test-gpudev/= . > > Understood. If this can also help to speed up the acceptance process, I= =92ll provide a new patch for app/> test-gpudev to introduce ethdev to send= and receive packets This is the patch to introduce ethdev in app/test-gpudev as alternative to = testpmd patch, please give me your feedback. https://patches.dpdk.org/project/dpdk/patch/20211118015228.30628-2-eagostin= i@nvidia.com It would be really helpful for the gpudev library to have a concrete exampl= e to send and receive packets using GPU memory --_000_DM6PR12MB410778286DA057FB46A35588CD9A9DM6PR12MB4107namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

> > On Wed, N= ov 17, 2021 at 7:20 PM Elena Agostini <eagostini@nvidia.com> wrote:

> > >=

> > > >= On Wed, Nov 17, 2021 at 6:09 PM Elena Agostini <eagostini@nvidia.com>= ; wrote:

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>> On Wed, 17 Nov 2021 03:04:59 +0000

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> This patch introduces GPU memory i= n testpmd through the gpudev library.

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> Testpmd can be used for network be= nchmarks when using GPU memory

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> instead of regular CPU memory to s= end and receive packets.

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> This option is currently limited t= o iofwd engine to ensure

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> no workload is applied on packets = not accessible from the CPU.

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> The options chose is --mbuf-size s= o buffer split feature across

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> different mempools can be enabled.=

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>> Signed-off-by: Elena Agostini <= eagostini@nvidia.com>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>> Won't this create a hard dependency of= test-pmd on gpudev?

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>> I thought gpudev was supposed to be op= tional

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>> Sure, let me submit another patch to make = it optional

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> Why to add yet another compile time macro ever= ywhere in testpmd and

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> make hard to maintain?

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> Adding iofwd kind of code is very simple to ad= d test/test-gpudev and

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> all GPU specific options

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> can be added in test-gpudev. It also helps to = review the patches as

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> test cases focus on

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>> each device class.

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >> Test-gpudev is standalone unit test to ensure gpud= ev functions work correctly.

> > >=

> > > >= >

> > >=

> > > >= > > > >>

> > >=

> > > >= >

> > >=

> > > >= > > > >> In testpmd instead, there is a connection between = gpudev and the network.

> > >=

> > > >= >

> > >=

> > > >= > > > >

> > >=

> > > >= >

> > >=

> > > >= > > > > I understand that. We had the same case with eventdev,= where it needs to

> > >=

> > > >= >

> > >=

> > > >= > > > > work with network. Testpmd is already complicated, IMO= , we should

> > >=

> > > >= >

> > >=

> > > >= > > > > focus only ethdev

> > >=

> > > >= >

> > >=

> > > >= > > > > test cases on testpmd, test-gpudev can use ethdev API = to enable

> > >=

> > > >= >

> > >=

> > > >= > > > > networking requirements for gpudev.<= /p>

> > >=

> > > >= >

> > >=

> > > >= > > > >

> > >=

> > > >= >

> > >=

> > > >= > > >

> > >=

> > > >= >

> > >=

> > > >= > > > +1

> > >=

> > > >= >

> > >=

> > > >= > >

> > >=

> > > >= >

> > >=

> > > >= > > +1

> > >=

> > > >= >

> > >=

> > > >= >

> > >=

> > > >= >

> > >=

> > > >= > Testpmd already manages different type of memories for mempools.=

> > >=

> > > >= >

> > >=

> > > >= > gpudev is just another type of memory, there is nothing more than tha= t.

> > >=

> > > >=

> > >=

> > > >= Let take this example:

> > >=

> > > >= 1) New code changes

> > >=

> > > >=

> > >=

> > > = ; > app/test-pmd/cmdline.c    |  32 +++++++-

> > >=

> > > >= app/test-pmd/config.c     |   4 +-

> > >=

> > > >= app/test-pmd/icmpecho.c   |   2 +-

> > >=

> > > >= app/test-pmd/meson.build  |   2 +-

> > >=

> > > >= app/test-pmd/parameters.c |  15 +++-

> > >=

> > > >= app/test-pmd/testpmd.c    | 167 +++++++++++++++++++++++++++= ++++++++---

> > >=

> > > >= app/test-pmd/testpmd.h    |  16 +++-=

> > >=

> > > >= 7 files changed, 217 insertions(+), 21 deletions(-)

> > >=

> > > >=

> > >=

> > > >= 2) Good amount of code need to go through condition compilation as

> > >=

> > > >= gpudev is optional that make

> > >=

> > > >= testpmd further ugly.

> > >=

> > > >=

> > >=

> > > >= 3) It introduces new memtype, now

> > >=

> > > >=

> > >=

> > > >= +enum mbuf_mem_type {

> > >=

> > > >= + MBUF_MEM_CPU,

> > >=

> > > >= + MBUF_MEM_GPU

> > >=

> > > >= +};

> > >=

> > > >=

> > >=

> > > >= The question largely, why testpmd need to pollute for this, testpmd,<= /o:p>

> > >=

> > > >= we are using for testing ethdev device class.

> > >=

> > > >= All we are saying is to enable this use case in test-gpudev so that it

> > >=

> > > >= focuses on GPU specific, Whoever is not

> > >=

> > > >= interested in specific libraries do not even need to review the testpmd pa= tches.

> > >=

> > >=

> > >=

> > > I un= derstand your point. I don=92t understand why this testpmd patch is there s= ince Oct 29 but

> > >=

> > I'm recei= ving reviews only few days before rc4 when I have a limited amount of time = to get new code > accepted.>

> > I underst= and that pain. Welcome to DPDK, we have all gone through this

> > review is= sue one or another way.>

> >

> > >=

> > >=

> > >=

> > I can pro= vide a gpudev + ethdev example by end of today (I'd like to keep test-gpude= v as it is to > test gpudev API standalone).

> > >=

> > > Is t= here any chance this new example will be reviewed and eventually accepted i= n DPDK 21.11?>

> > Why a new= example? I don't have any issues in updating app/test-gpudev/.<= /span>

> Understood. If= this can also help to speed up the acceptance process, I=92ll provide a ne= w patch for app/> test-gpudev to introduce ethdev to send and receive pa= ckets

 

This is the patch t= o introduce ethdev in app/test-gpudev as alternative to testpmd patch, please give me your feedback.

 

https://patches.dpdk.org/project/dpdk/patch/20211118015228.30628-2-ea= gostini@nvidia.com

 

It would be really = helpful for the gpudev library to have a concrete example to send and recei= ve packets using GPU memory

--_000_DM6PR12MB410778286DA057FB46A35588CD9A9DM6PR12MB4107namp_--