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 E4CC6433C8; Thu, 7 Mar 2024 04:56:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7008402F2; Thu, 7 Mar 2024 04:56:23 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 81626402EA for ; Thu, 7 Mar 2024 04:56:22 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 426IERZa005433 for ; Wed, 6 Mar 2024 19:56:21 -0800 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3wpp7bm2u3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 06 Mar 2024 19:56:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3nGIMgHNTeHzp6152kbe2x03JskZElc6N6beJcsd2+bs0So8zhnYl8YFmWOEpuJLIL3hGXVI5nRIeH2zP8B13IjOyw7zlWbHgn2dnSh2oLnCx+JXsUT5A5TzLdsqJMR56CXEjKpeJWiAMrwc4WzO6jbPYPkyWaIaOv3gB9b5wUHpNsnXigxsOEMirv6+pevEy5kUkx5YC9fJ+sl6ybROnJ7xstwVUTnUJ+k3X5x7p6pU8+tgnAshRtqKVZbwPjcEIMGCq+qQuxCnik31rUfO2OQclhgzvogYC2H89RnCK/DLVtsOhJpY4f0ZHFukRZcg7vspmdGOMSVOiCFClYs0w== 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=VBOljlwiNQ/vNyeeYnJRdHgR1kp9iXOKDUQ88VG9meU=; b=JIJBJM3StW76NTiyF9cNNB2jB/bB8WR5/19AS+UOby42xRkEigW128pJruGs6CHXk+TWy2Dht0tJkC6uKlgjqMBk4FtkXZcdRPyyCyGOBAipNWOjWi2iFWIi3tInzK9Vx7JvaujdqnPdnnwPJ1SDO1uRtslHI6WO3YQYDOxkbddC3Bxdyzc2WK6ULV6TKR4mmsX3GQhFs2mRKaCuGYalBthSqyjlAA3pFn3NqGI+4IGdjLWvjO4wLuvkiC+nVv/SkAYd2ta4PdSucX6VmdWx8jtriQVseQq6BdVZlMMaVAok/QsHnPEv/9ZBMmCP6xpaWLFAmPIw9O3VxYoJKkPPuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VBOljlwiNQ/vNyeeYnJRdHgR1kp9iXOKDUQ88VG9meU=; b=LBCdI7C9iyattJYAarb21Xh6fYKUeDcEf104EfccHfGKsS36DgPlyY0cKU0iOAhgRyj9qDNg+AgOAKgA3UFvsClfItCIu+gcpAk3LMQhH0V6kMxHm++9QcdNimZj4jxsNvyOzt4SlUxMpuI2zNSzWBT2G/q0EWilmfR2nLPz5Lw= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by SA0PR18MB3550.namprd18.prod.outlook.com (2603:10b6:806:73::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 03:56:18 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::baf5:a4b6:7776:10f4]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::baf5:a4b6:7776:10f4%7]) with mapi id 15.20.7362.019; Thu, 7 Mar 2024 03:56:17 +0000 From: Pavan Nikhilesh Bhagavatula To: Amit Prakash Shukla , Jerin Jacob CC: "dev@dpdk.org" , Vamsi Krishna Attunuru , Nithin Kumar Dabilpuram , Anoob Joseph , Aakash Sasidharan , Amit Prakash Shukla Subject: RE: [PATCH v3] app/eventdev: support DMA adapter test Thread-Topic: [PATCH v3] app/eventdev: support DMA adapter test Thread-Index: AQHab/lQQdDsYMoThkm2fNUa1uVVPbErpi1A Date: Thu, 7 Mar 2024 03:56:17 +0000 Message-ID: References: <20240228060102.4137229-1-amitprakashs@marvell.com> <20240306190539.1941756-1-amitprakashs@marvell.com> In-Reply-To: <20240306190539.1941756-1-amitprakashs@marvell.com> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4086:EE_|SA0PR18MB3550:EE_ x-ms-office365-filtering-correlation-id: 46550630-ec97-403d-5638-08dc3e5a8ae7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pMqdoruEoHN/B9mGCUGSxBeU9tv1805ylWF/6yOHOuWdO2bcmS9AEWYK/IKbd/MchPt8XVLIP3ESN4TWibPxoR++yLdfgNrWkhGEHI5caq1sKl2+i6fw5q1hZH9M2SIivLIJiTJ6ZMaVn7lu6Z84CfsyObeHNvOrvZWXdrkMqxnlAveuLMQUBIBsoq2yrao2NZP2Akavm7O5QLhYakG12Z+1g6Sg5Z9Ny6yxePF0c2CTeYx1R+5ZM4v69m6kR1U2qHFT7041/dVtnK/sQK1eMkQY0Zkz/bklnEbKHDMBwHSiWkjg7rS9xEudJ6mkd6f/xK8S8BRNwWqeFt4juz1DBdkF4hs7fbczIFC6o7YHg5OlFjpEzPbepADUCCIyaIxHDGpphHMm9rYosUzh747ZMX2xAKZJcQOp1jYxfteTmlMAUQNFAw4w0R2tOl1FmsMuR0iKNWK2+kN1H5aEUtK0syylzcPPnXpMALrGuIXS+4eMuNkW2GIGyD0kJX8Ja77aWlr5sR5J3QijxGCTCSZtoekyepGK4cSt4y36zhBE/fpWKrwxWFPVr3/54Wc0F03dULyyNdnvsbBGIWprmvAg4qBiiodFdeIEJ0eiDBWi0MBmKFSesJ8qYNGkOfVWS9AoJv5uQP/dpoUEnSZWJZa70AkhL61qjBpw+cr7gp+pZgBPFsiGscZfoLrmiBwa9x9fZWYKkHgEANRke1HW0VUyLw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tlAvSAGcmCxD6rZJ6xfTqnYb3U6EM33h/sZWNxfapoCp7q8hlNlLyGRjy5xD?= =?us-ascii?Q?34eOXZbpHqxYQy3wMHiEPAz5oeLLo7FB9Hq1xknKjPNylPHC7WM1Yu7Jb4IM?= =?us-ascii?Q?loiUEtROJGzFlzsL383SPz6cp1f3qRHSHNZZ5FGVQV/+RP7vmcd+yMwUQo/B?= =?us-ascii?Q?LeWFDHXijZQzhfgu1ZdgacLqi/tLd4J+rvABcGJlD4GLBRYF3Uj5hDXvtg4k?= =?us-ascii?Q?YR2sT8vd1w74IiM9oSNig8L7NGULTucevO05HkoVL0NokZBbSL+xK60NgLm6?= =?us-ascii?Q?Go0tWCuslAQcr0Yvu+rBJjLItco6SYwHPFCLZxETRY6yDJE1b1a4EyZysJ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kpxI9BQjVe00WVRlvQ2K/KprqrNB9?= =?us-ascii?Q?tg4fUo+BBsnFQstKl10e6SGgpGaOEefi9qkE96K/eOOAAj8Tn/IP2ByKTMxO?= =?us-ascii?Q?yIlBCA1vcqe63Df+NM6LIlZ5227HrzTQnzOgO67uxHFFLasx1if/3jGd5gOe?= =?us-ascii?Q?Zo9tzr/+8ggOHqi6las2l6Oyv36GU5WND8TAoQU0BHJgaRsXZhk65wKLhSIE?= =?us-ascii?Q?HZHpc3s35LtNFk/N6mN8vuUTMDSVNX7RS0G3Ahy+5rGKzfdtwfCJyLz2bTF5?= =?us-ascii?Q?7Fnn+3NwLzmXpcZEYIAuWd+F4m4eNeQrB+bHHJuooMmBoak0lSK9z6RDudVJ?= =?us-ascii?Q?bqR/TVzotay1CsJQrIR+7Dq7FdPkrzkQSK67yW5n?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46550630-ec97-403d-5638-08dc3e5a8ae7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2024 03:56:17.7821 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: on8UAM1Wt/61sJ/OnynCmGUegh+iyrT4a/Ic2Iq8fRsxH8fob91eDroysdHmiYEnresmeO4nJiW1K1QYW+FkZk/ni6TlKzK5ngKOiW0FMSc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR18MB3550 X-Proofpoint-ORIG-GUID: Ex34fabg64kKhiuBjPoRBI3b9L_Orls0 X-Proofpoint-GUID: Ex34fabg64kKhiuBjPoRBI3b9L_Orls0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-06_14,2024-03-06_01,2023-05-22_02 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: Amit Prakash Shukla > Sent: Thursday, March 7, 2024 12:36 AM > To: Jerin Jacob > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula > ; Vamsi Krishna Attunuru > ; Nithin Kumar Dabilpuram > ; Anoob Joseph ; Aakash > Sasidharan ; Amit Prakash Shukla > > Subject: [PATCH v3] app/eventdev: support DMA adapter test >=20 > Added performance test support for DMA adapter. >=20 > Signed-off-by: Amit Prakash Shukla With below changes Acked-by: Pavan Nikhilesh > --- > v3: > - Resolved review comments. >=20 > v2: > - Fixed intel compilation error. >=20 > app/test-eventdev/evt_common.h | 3 + > app/test-eventdev/evt_main.c | 15 ++ > app/test-eventdev/evt_options.c | 36 ++++ > app/test-eventdev/evt_options.h | 12 ++ > app/test-eventdev/evt_test.h | 6 + > app/test-eventdev/test_perf_atq.c | 34 +++- > app/test-eventdev/test_perf_common.c | 256 > ++++++++++++++++++++++++++- > app/test-eventdev/test_perf_common.h | 35 ++-- > app/test-eventdev/test_perf_queue.c | 32 +++- > doc/guides/tools/testeventdev.rst | 27 +++ > 10 files changed, 427 insertions(+), 29 deletions(-) >=20 > diff --git a/app/test-eventdev/evt_common.h b/app/test- > eventdev/evt_common.h > index fcb3571438..dbe1e5c0c4 100644 > --- a/app/test-eventdev/evt_common.h > +++ b/app/test-eventdev/evt_common.h > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > #include > #include >=20 > @@ -42,6 +43,7 @@ enum evt_prod_type { > EVT_PROD_TYPE_ETH_RX_ADPTR, /* Producer type Eth Rx Adapter. > */ > EVT_PROD_TYPE_EVENT_TIMER_ADPTR, /* Producer type Timer > Adapter. */ > EVT_PROD_TYPE_EVENT_CRYPTO_ADPTR, /* Producer type Crypto > Adapter. */ > + EVT_PROD_TYPE_EVENT_DMA_ADPTR, /* Producer type DMA > Adapter. */ > EVT_PROD_TYPE_MAX, > }; >=20 > @@ -86,6 +88,7 @@ struct evt_options { > uint64_t timer_tick_nsec; > uint64_t optm_timer_tick_nsec; > enum evt_prod_type prod_type; > + enum rte_event_dma_adapter_mode dma_adptr_mode; > enum rte_event_crypto_adapter_mode crypto_adptr_mode; > enum rte_crypto_op_type crypto_op_type; > enum rte_crypto_cipher_algorithm crypto_cipher_alg; > diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c > index 13a8500ef7..03114020f1 100644 > --- a/app/test-eventdev/evt_main.c > +++ b/app/test-eventdev/evt_main.c > @@ -138,6 +138,14 @@ main(int argc, char **argv) > } > } >=20 > + /* Test specific dmadev setup */ > + if (test->ops.dmadev_setup) { > + if (test->ops.dmadev_setup(test, &opt)) { > + evt_err("%s: dmadev setup failed", opt.test_name); > + goto dmadev_destroy; > + } > + } > + > /* Test specific eventdev setup */ > if (test->ops.eventdev_setup) { > if (test->ops.eventdev_setup(test, &opt)) { > @@ -171,6 +179,9 @@ main(int argc, char **argv) > if (test->ops.cryptodev_destroy) > test->ops.cryptodev_destroy(test, &opt); >=20 > + if (test->ops.dmadev_destroy) > + test->ops.dmadev_destroy(test, &opt); > + > if (test->ops.mempool_destroy) > test->ops.mempool_destroy(test, &opt); >=20 > @@ -196,6 +207,10 @@ main(int argc, char **argv) > if (test->ops.cryptodev_destroy) > test->ops.cryptodev_destroy(test, &opt); >=20 > +dmadev_destroy: > + if (test->ops.dmadev_destroy) > + test->ops.dmadev_destroy(test, &opt); > + > ethdev_destroy: > if (test->ops.ethdev_destroy) > test->ops.ethdev_destroy(test, &opt); > diff --git a/app/test-eventdev/evt_options.c b/app/test- > eventdev/evt_options.c > index 03fb3bfce0..fb5a0a255f 100644 > --- a/app/test-eventdev/evt_options.c > +++ b/app/test-eventdev/evt_options.c > @@ -146,6 +146,36 @@ evt_parse_timer_prod_type_burst(struct > evt_options *opt, > return 0; > } >=20 > +static int > +evt_parse_dma_prod_type(struct evt_options *opt, > + const char *arg __rte_unused) > +{ > + opt->prod_type =3D EVT_PROD_TYPE_EVENT_DMA_ADPTR; > + > + /* Only Forward mode is supported for DMA adapter. */ > + opt->dma_adptr_mode =3D > RTE_EVENT_DMA_ADAPTER_OP_FORWARD; > + > + return 0; > +} > + > +static int > +evt_parse_dma_adptr_mode(struct evt_options *opt, const char *arg) > +{ > + uint8_t mode; > + int ret; > + > + ret =3D parser_read_uint8(&mode, arg); > + if (mode !=3D RTE_EVENT_DMA_ADAPTER_OP_FORWARD) { > + RTE_LOG(ERR, USER1, "DMA adapter is supported in forward > mode only\n"); > + return -EINVAL; > + } > + > + opt->dma_adptr_mode =3D > RTE_EVENT_DMA_ADAPTER_OP_FORWARD; > + > + return ret; > +} > + > + > static int > evt_parse_crypto_prod_type(struct evt_options *opt, > const char *arg __rte_unused) > @@ -446,6 +476,7 @@ usage(char *program) > "\t--queue_priority : enable queue priority\n" > "\t--deq_tmo_nsec : global dequeue timeout\n" > "\t--prod_type_ethdev : use ethernet device as producer.\n" > + "\t--prod_type_dmadev : use dma device as producer.\n" > "\t--prod_type_cryptodev : use crypto device as producer.\n" > "\t--prod_type_timerdev : use event timer device as > producer.\n" > "\t expiry_nsec would be the timeout\n" > @@ -457,6 +488,7 @@ usage(char *program) > "\t--timer_tick_nsec : timer tick interval in ns.\n" > "\t--max_tmo_nsec : max timeout interval in ns.\n" > "\t--expiry_nsec : event timer expiry ns.\n" > + "\t--dma_adptr_mode : 1 for OP_FORWARD mode > (default).\n" > "\t--crypto_adptr_mode : 0 for OP_NEW mode (default) > and\n" Please fixup the text. > "\t 1 for OP_FORWARD mode.\n" > "\t--crypto_op_type : 0 for SYM ops (default) and\n" > @@ -540,9 +572,11 @@ static struct option lgopts[] =3D { > { EVT_QUEUE_PRIORITY, 0, 0, 0 }, > { EVT_DEQ_TMO_NSEC, 1, 0, 0 }, > { EVT_PROD_ETHDEV, 0, 0, 0 }, > + { EVT_PROD_DMADEV, 0, 0, 0 }, > { EVT_PROD_CRYPTODEV, 0, 0, 0 }, > { EVT_PROD_TIMERDEV, 0, 0, 0 }, > { EVT_PROD_TIMERDEV_BURST, 0, 0, 0 }, > + { EVT_DMA_ADPTR_MODE, 1, 0, 0 }, > { EVT_CRYPTO_ADPTR_MODE, 1, 0, 0 }, > { EVT_CRYPTO_OP_TYPE, 1, 0, 0 }, > { EVT_CRYPTO_CIPHER_ALG, 1, 0, 0 },