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 9F184A0C41; Thu, 18 Nov 2021 11:16:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 143CA40687; Thu, 18 Nov 2021 11:16:17 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by mails.dpdk.org (Postfix) with ESMTP id 4254440395 for ; Thu, 18 Nov 2021 11:16:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cUh0qfY5wP/79i1b7cFoMNOojnrSneGD69rmbN3BR58rHOnBnYNoAr8fueE/y9tHICBr2OAvu+W0Az/jE5Ot3ahasW7bvuLQTXN6BIZl/6CQVeN/KMu+28PnwQlDbXN6OlaSo8xkuE1IPsP+I0FgWMDt34EVpD+fRr7wFM9i9EvxU0Iz7zAzTizviYplHZ5y5znzlntTIIU6RHGuItlCApC7cCaGYnfZNyiwiS7P5tD9KYKhlJ1+qpzDVvtVM6NvUCFnFbyPgP3itxOYg9237DUhDV5d//SDyQUY6GEe1P/rI+th/RMCDO0yT9jjR2OxK1NY5MkHBdhQ+/M012xF3g== 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=d9r3nS9Mpt8Zt4KgCteqvKoi7LriqC7n9Y1AkmRNvxU=; b=IdXPeV2Sr9mAyNbHwot0wToA6aWbvWl4qDRF1J7aZZFiTsICJtQ1tuhokeIQo9V+N1gtHWSTVAAAbB0ax8WjQGtuJpc8/ieyWJX0NNUmq0zpUWrc2JWuCTMmWMyjEU6/vvOtOYtal/PXaF/gGzMo4mbcMOYdGDYYstNyVB3vRdygiBaXOMo17EgCkFiOKEo42I7+CsgmIisE11VaGgrY34YW/HWx5Ai2o7Jnr6iDmJ/aZCN1U0ceg7DtFHkSBffv+lSQUWwrxCmfIJdWn97zyTk4FeT9d17DWbtbMo5QmLK5RHy5w+UMkoufinomZZ3L3ngCo/Z1xguadyGfvDvZwg== 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=d9r3nS9Mpt8Zt4KgCteqvKoi7LriqC7n9Y1AkmRNvxU=; b=P/Zg+RaalojTz5y+RRpqfeVcY1UvMXcvIcO1D52hiY3GPkLbu9ccnNrDTyfFd6tO0qp+PHr/OuKQGhADYfP6TvsNP5hKousseZc6WcXwX3aa3l/rrN0nU+Lb2CMKvK/l5cU5mEANzYMlbiIzB9eYJIQUnbEB99ix6F0AqO9FWrMaULVk3rgQda0uc6vSO4VwGssmjiuQnjxEahsnKiloWWYdWA32f4ytrvm+eivIyUeBTGfyEohOrbPEwFhZgvgwq04t+GXNNDVpLaWIN7LpT4heY/sk7y7fpmN/f+Bplfa6G5jARIiiIfZlk3O4FAgqsW5d1LOl7axYgUc8qGcQpQ== Received: from BY5PR12MB4100.namprd12.prod.outlook.com (2603:10b6:a03:200::13) by BY5PR12MB3922.namprd12.prod.outlook.com (2603:10b6:a03:195::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19; Thu, 18 Nov 2021 10:16:13 +0000 Received: from BY5PR12MB4100.namprd12.prod.outlook.com ([fe80::30dd:7ef1:de7a:b4df]) by BY5PR12MB4100.namprd12.prod.outlook.com ([fe80::30dd:7ef1:de7a:b4df%3]) with mapi id 15.20.4713.021; Thu, 18 Nov 2021 10:16:13 +0000 From: Elena Agostini To: Jerin Jacob CC: dpdk-dev Subject: Re: [PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx packets using GPU memory Thread-Topic: [PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx packets using GPU memory Thread-Index: AQHX29p50hxSStr5SUWn3/nc6naMB6wI0CqAgABCU64= Date: Thu, 18 Nov 2021 10:16:13 +0000 Message-ID: References: <20211118015228.30628-1-eagostini@nvidia.com> <20211118015228.30628-2-eagostini@nvidia.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: 666b6fd8-38cb-4fd6-603d-08d9aa7c7319 x-ms-traffictypediagnostic: BY5PR12MB3922: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uE7yf3b8r2LcHI/FtRWhOXIEGr2CYn0/wUiBs6TWEDB+xj7xTI4lzPPYGd0DMsFjAltl2vMZXBYElEshvvrlge0Ln1qKHc/cG4qkzJHFeQEhIgrNP8ssu9V3DSoqKGGAKSx/VklGcOs97oHqLrkQe4zacL+tw3WrXCHKVfm7JzjqhPj7ThuTJgctozlVgVLJHFKBtQhKInRu6ShuZcTjr2P65h0+Vt9rfcwAsDWXrXwzmtjT1KM9WuWW12U3sz6x6zgUdFuXbrYYBd2t020aWlxQzzfxnquTOFcckXJRe7Mp+GjAoq9kkHINlHxlw5MZm5V/9UY5rD/icu7GOScz1usdSKa8yvGKrCKAcFSZfRmBhMLtzTBPBSNv0IhIw47BSVHquk2X3kLmztqq6UnQ0iDwj3iXqtMs3b8dyygeYmB+/e0Sg60Y7N/y89b/PQt+7UR6l3bp3cMU2fknHLTSrrwa0bOXWhVbDko6jj/Q3LrbUP8jiLa3pRQYJ/j+jd30inou+fVc5oK/yBcQCZ63DIJOopUzoak6uXb1tWbSIGboCEMKtVRKkJtqR9lafFcE35svIEcDF8msORyNH0Nbqax8YHLt/wZDw5Gga14awkzAWbJfXC5ULt3SSIowdIwX951c09t9uOvLwK4LgTpwlzXhooCZYNwl/G0IejXHDk4qt4nZJhRk3AW8QYAVkTkIkT5fdPdI4cuo+gv78pVwIA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4100.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(26005)(83380400001)(86362001)(4326008)(5660300002)(55016002)(52536014)(38100700002)(2906002)(33656002)(8676002)(91956017)(53546011)(64756008)(6506007)(66556008)(9686003)(66446008)(66476007)(71200400001)(186003)(7696005)(66946007)(76116006)(508600001)(8936002)(122000001)(316002)(6916009)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?405PwUfo2mcoNHLpZUXBbd4aNnAFvlRd37BibOFvnnFrm+FJCm5eoPHoRoYe?= =?us-ascii?Q?W82AZYeA0j1kH/Y9SiIB9w9OXYatrO5eDTtTLzb/99jRi1nEChX5j61OWc3g?= =?us-ascii?Q?Lbel31ojZFIg4BtcGBC8JqrO3heyZPxXc6mxYL1bm2mrJtcT/sPVeeI+x930?= =?us-ascii?Q?mBxUi7Hfbwtq0coicjtZThilg4V5aRUdzsglfU2OkJSXNSXuPoGL4HfHLgQ5?= =?us-ascii?Q?YdysQINyf6+IuRB0eCs579asJJ6UwdLyFS960RN+w6g0PCIq43apbnqJM0zU?= =?us-ascii?Q?I//EdxHKQaDze4MYJxwZD+n/b7EtvxcDglwckDkVAm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jA6F/ShXUkOFU+PAe8FJ7bBFYaSldNntktEexdjYZQzHJJeVsMu/0?= =?us-ascii?Q?se5Omc8IyIgGNUpYkceI5hQshefFpYCAp5OevysCTE7aFWUJOKvvSzLQOoam?= =?us-ascii?Q?LBB8oAI/HuXEZpE/Ph5cHTiSpXPLWjrBhRdRR9oSmj1s33G45wD3hnVyGGkN?= =?us-ascii?Q?7oIfKD5dlTH70DlaeXq4AYFLv94aK4R+lnnkHL8PB4AE7q1zCX/sY6JAe3MT?= =?us-ascii?Q?qwmbTDjJ+zJHjovsaPtAU9u8d2b2V5OYDLJS9a8MSpXMW8n3a5vqano3xq6D?= =?us-ascii?Q?Qb2kwtI6rBL/3KJ4S1/DnY1PLJrZxxaOGmFLyX2JGFy8StZivt6jEiSCMVK+?= =?us-ascii?Q?1IudYtj3M6M1rMlcf7ZdhXfap5Oz0N1nx564f6fPd28a1COrKKCQPsnhcwfa?= =?us-ascii?Q?OlTMezDXk0x3P8Fcmol7uLLy10qkwOzSiRABys7FkTMa?= Content-Type: multipart/alternative; boundary="_000_BY5PR12MB4100D8F523DA30576F65DBBECD9B9BY5PR12MB4100namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4100.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 666b6fd8-38cb-4fd6-603d-08d9aa7c7319 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2021 10:16:13.2588 (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: IqdZTZvQTfDNf05gWtin7AbDoudIbjyVVlA/TW3gmUXG3V2+qB410Se0oZBZXg8ooP5IE8uXKJ1/vBCZFx0pdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3922 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_BY5PR12MB4100D8F523DA30576F65DBBECD9B9BY5PR12MB4100namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > From: Jerin Jacob > Date: Thursday, 18 November 2021 at 07:17 > To: Elena Agostini > Cc: dpdk-dev > Subject: Re: [PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx pa= ckets using GPU memory > External email: Use caution opening links or attachments> > > On Thu, Nov 18, 2021 at 12:28 AM wrote: > > > > From: Elena Agostini > > > > This patch introduces ethdev in test-gpudev app to provide: > > - an example to show how GPU memory can be used to send and receive pac= kets > > - an useful tool to measure network metrics when using GPU memory with > > io forwarding > > > > With this feature test-gpudev can: > > - RX packets in CPU or GPU memory > > - Store packets in the gpudev communication list > > - TX receive packets from the communication list > > > > It's a simulation of a multi-core application. > > > > Signed-off-by: Elena Agostini > > --- > > app/test-gpudev/main.c | 471 +++++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 452 insertions(+), 19 deletions(-) > > > > diff --git a/app/test-gpudev/main.c b/app/test-gpudev/main.c > > index 250fba6427..daa586c64e 100644 > > --- a/app/test-gpudev/main.c > > +++ b/app/test-gpudev/main.c > > @@ -10,6 +10,8 @@ > > #include > > #include > > #include > > +#include > > +#include > > > > #include > > #include > > @@ -19,22 +21,98 @@ > > #include > > #include > > #include > > +#include > > +#include > > +#include > > > > #include > > > > +#ifndef ACCESS_ONCE > > +#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&x) > > +#endif > > + > > +#ifndef WRITE_ONCE > > +#define WRITE_ONCE(x, v) (ACCESS_ONCE(x) =3D (v)) > > +#endif> > Better to have a public version of this macro as it uses just in this > test application. Thanks for taking time to review this patch. I can actually use the RTE_GPU_VOLATILE macro exposed in the gpudev library to replace both of them. --_000_BY5PR12MB4100D8F523DA30576F65DBBECD9B9BY5PR12MB4100namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

> From: Jerin Ja= cob <jerinjacobk@gmail.com>

> Date: Thursday= , 18 November 2021 at 07:17

> To: Elena Agos= tini <eagostini@nvidia.com>

> Cc: dpdk-dev &= lt;dev@dpdk.org>

> Subject: Re: [= PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx packets using GPU = memory

> External email= : Use caution opening links or attachments>

>

 

> On Thu, Nov 18= , 2021 at 12:28 AM <eagostini@nvidia.com> wrote:

> >

> > From: Ele= na Agostini <eagostini@nvidia.com>

> >

> > This patc= h introduces ethdev in test-gpudev app to provide:

> > - an exam= ple to show how GPU memory can be used to send and receive packets

> > - an usef= ul tool to measure network metrics when using GPU memory with

> > io forwar= ding

> >

> > With this= feature test-gpudev can:

> > - RX pack= ets in CPU or GPU memory

> > - Store p= ackets in the gpudev communication list

> > - TX rece= ive packets from the communication list

> >

> > It's a si= mulation of a multi-core application.

> >

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

> > ---<= /o:p>

> >  app= /test-gpudev/main.c | 471 +++++++++++++++++++++++++++++++++++++++--

> >  1 f= ile changed, 452 insertions(+), 19 deletions(-)

> >

> > diff --gi= t a/app/test-gpudev/main.c b/app/test-gpudev/main.c

> > index 250= fba6427..daa586c64e 100644

> > --- a/app= /test-gpudev/main.c

> > +++ b/app= /test-gpudev/main.c

> > @@ -10,6 = +10,8 @@

> >  #in= clude <stdarg.h>

> >  #in= clude <errno.h>

> >  #in= clude <getopt.h>

> > +#include= <stdbool.h>

> > +#include= <signal.h>

> >

> >  #in= clude <rte_common.h>

> >  #in= clude <rte_malloc.h>

> > @@ -19,22= +21,98 @@

> >  #in= clude <rte_ethdev.h>

> >  #in= clude <rte_mempool.h>

> >  #in= clude <rte_mbuf.h>

> > +#include= <rte_launch.h>

> > +#include= <rte_lcore.h>

> > +#include= <rte_per_lcore.h>

> >

> >  #in= clude <rte_gpudev.h>

> >

> > +#ifndef = ACCESS_ONCE

> > +#define = ACCESS_ONCE(x) (*(volatile typeof(x) *)&x)

> > +#endif

> > +

> > +#ifndef = WRITE_ONCE

> > +#define = WRITE_ONCE(x, v) (ACCESS_ONCE(x) =3D (v))

> > +#endif&g= t;

 

> Better to have= a public version of this macro as it uses just in this

> test applicati= on.

 

Thanks for taking t= ime to review this patch.

I can actually use = the RTE_GPU_VOLATILE macro exposed in the gpudev library<= /p>

to replace both of = them.

--_000_BY5PR12MB4100D8F523DA30576F65DBBECD9B9BY5PR12MB4100namp_--