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 5C8AEA00BE; Mon, 16 May 2022 09:26:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 516AA40E03; Mon, 16 May 2022 09:26:52 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 258E140A7D for ; Mon, 16 May 2022 09:26:51 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24FMmsg5024067; Mon, 16 May 2022 00:26:49 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2175.outbound.protection.outlook.com [104.47.58.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g2bxsnq9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 May 2022 00:26:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YlNw9EBT0If0qAlR6qrQMW3mYZ0U5idr5IwTLdsZemAryuagWaluk7K7X4gP/cmBZOfVlZy28xOvQFPtUYda0BKtexvuFhjsdzGrK/zkeTwts479T7XEeh2AxitdhL84Q4+3Vxbp9vRmDPuhiUZws+jbJ6ktGRUqdfCVNkTgqz7uU9zW5obqfDWWM7OADSzTg12tHBJM/6/Mr5Fe2IMLMMsKeADSvWR7uacaTO4gpuT0Q/ImnTTGcsuBOnm145oYW/0DSLZm0fXRURLIozMK7gmDB6hNCFRZRngbTAIz+aWCXuWon67sweFPuypdROF3d2GAE++P8kmErLFT9Op9MQ== 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=Qj8c3gJvqYQLEWKovVE6pqe12VN7NzPSHz3doi8s5QY=; b=Bd4aHTAY3VcLg4ydu6YayxWQfvhbKPflKhOVEFmoHpfqqHBdjo4GYcD/xGLLSVvQPmgHRpNI3bo2//ZdinhG+Me7C6wZ8KE3J42D5riUVQBKe75m4B67eBsbgCFviQ0aODFD7xXcG1VGM6j7+sW6blUBCU54O4v7QfHOg9C71PelNtesYHSQD+IAkJsPhQGZDRmDvDASz1vowz2Y1RtlWFuf5+Havk26uzxfWB7guWBg4hL7oDKfNoipIOzxZ/PHx+IPgSJ9gZUSZNsJ98Ha9R1jPkac9opY0f58e2DuqCWeCN0n9+DTMF/VXOO7g/zlmGFZ6MhnWPWnErDcegKTSw== 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.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qj8c3gJvqYQLEWKovVE6pqe12VN7NzPSHz3doi8s5QY=; b=pVNh3GmQL+jBWG6Dlpy8MuzBgVfzaoTln40b360kkyyetrNwCzv+PvPDXouWQ9Cwqh6x/SZjRpCLYY5QtBoL0GN02rI00GQM4XoX3OmJa3TyEVXZ1afnV2AEJeEgdMUABgagFW+zAenZOKzHjtF6E2Fd/SpsawoUx2WZ+J9ImcI= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by DM5PR18MB1196.namprd18.prod.outlook.com (2603:10b6:3:b9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Mon, 16 May 2022 07:26:47 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::141b:43fb:348e:f3a]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::141b:43fb:348e:f3a%5]) with mapi id 15.20.5250.018; Mon, 16 May 2022 07:26:46 +0000 From: Anoob Joseph To: Gagandeep Singh CC: Akhil Goyal , "dev@dpdk.org" , Hemant Agrawal Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logic Thread-Topic: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logic Thread-Index: AQHYWFsPxTxf6zv/SUC547satxvZA60crAQAgASMWoCAAAKNgA== Date: Mon, 16 May 2022 07:26:46 +0000 Message-ID: References: <20220425041423.2232034-1-g.singh@nxp.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 07b6fdb1-9d5a-4d42-3fe8-08da370d6f5c x-ms-traffictypediagnostic: DM5PR18MB1196:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oXR1+Sm6A8o9w/jcm+2u1Mbyx64p8FkOxV4glpJUW+BSjtuMdAFKchw7JE7Pusp8Vrx4hZGppW9CUSNpTOObbEMn+I4M4TPxjh6npXleHxmWQQINL8hq/gdpZtlaJc1ycxdHM97igcd3CxMuV0X/05RCppmrdMkd4HBlUnbbM7nt0VrPgs5jVnAED5Z6AFF63dZINjg9/OPDxv44A2sb5NvsfgbiPTBsgS5YLKYTjVcUkTP48pYwsbn4NeElVyrsvbBND6VZeQ6/T/m9VUrcOY7KQeZ+78eEBIn1Ftfvzap/7IOKZL5h/6GPdZNXOe6RYpyVvAG127qldBsZp/mFnhrJx3Kn9ekbtrWWijRP81tuxC9gZhYsvswOuJZVdPEZUw1EWTv2Y5GfoZC9I/JbnkBiAiRiMmp2FxOz22N9vznXdnj0WGLXWMZB3L4OKdENh7xgHK5kZpBdtnJ2S4xkwyMPHvhcyQXZ2KNZJVGsUVC6PWZi9B8pgzvZAA9wRSJDDobjYA6QTxJIIkpc8iJ23+wWJ4p7+lT6PRNNUeFbpfdLq8RXrtFVGdpfZfwHVDGfAlY0R/74FpsljQ/MYGaI0wWjdZaIdEAEhb/cSw4+qvgA8I78HjKI3mPTYl0N74+EhZ/dzqAib1PK7WwaZ4+TyPn3L4NwA9SSVEIt29RracARMw5oly98kNsloO1Kk8zAXJ6Xz5pfxmhOQNWCzTVPQA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4672.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(53546011)(9686003)(26005)(6506007)(83380400001)(7696005)(86362001)(122000001)(55016003)(76116006)(38070700005)(38100700002)(71200400001)(2906002)(508600001)(5660300002)(52536014)(8936002)(4326008)(8676002)(66556008)(64756008)(66946007)(6916009)(54906003)(66446008)(33656002)(316002)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2rPbdSSre0mYrmSBhP9qqF7RoAGXjpBIKHdZ0XLfK2U9c+B0neivQwNet43/?= =?us-ascii?Q?oRDnoueNgagdQu3vfZX/xYyKwRHFTkfjkaKLBWWXqVeWht+wK7P49NLAOGpe?= =?us-ascii?Q?05DBbZhujdU3cwbE+39OmRizcZSm9g8sL5MzKHlD8M0jjR76bhVphDMUWm5K?= =?us-ascii?Q?4gVWsWO1W/HFKtHiymJiunrBNGTTyN/WvRYEcglCZiSa+SZQOwurYqnheiGr?= =?us-ascii?Q?SMq7Dh7TOyNYQCsVpKtSGdnZ7pIdcOxR+y0I24aqMqRbBpafav8q8x64UbF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PtizdmyCsGrQChVURoHSfUwjyuyi/FkOlOefkoKgoyYU1sQ?= =?us-ascii?Q?epuCPz/Phcu9sUk+UO5hoblqjz1NC7f604thOI5BR0TwItF7OPjisHJMIs37?= =?us-ascii?Q?le0NfT98R+XwnRMIXC1Q3sVbO3mO+IMTizza8i0kmCXPQNxtNqUYnAVLWUTb?= =?us-ascii?Q?NVwDEgbalOUBbk2uJpnnbxaLj9/3u+mmePn49RPKIvHq2dBVH1DajpyHcjKH?= =?us-ascii?Q?GHBqX2dpPpx6PzDdNSp6LsET3vtkZGbjklRU7qHUNXEfMryVBIPVElaD0O7x?= =?us-ascii?Q?8XtJgC5sAyKCjg+IoDouB8ccMavbh13sBVmnxQkXGxDNzbfx7Xjy4f+7FCPE?= =?us-ascii?Q?CNZcAqbzcXoGF9nvPYa18gHkj2U0YrOE803f6zI6cjG9oSzgBpKODPf0tuki?= =?us-ascii?Q?M/+3CRqdtkmlPZZyFhwvI8bSH7VNpsOYe/cQtMEl4tTRTgW7W0Hz8Dczcign?= =?us-ascii?Q?vt2pZ6VSSiRxdGupCui11s1EEH0IDf6+meVKQSxvgNdNBCm+5r+jvITuEMTb?= =?us-ascii?Q?HgR3QQoaMIhIxtY61N/7ie57aPM1qUAcklqgS4l/B0QqCq3sb5QwktJ+4VnJ?= =?us-ascii?Q?QxD265e27A=3D=3D?= 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: PH0PR18MB4672.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07b6fdb1-9d5a-4d42-3fe8-08da370d6f5c X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2022 07:26:46.8453 (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: Y702c49RBuv0nRfv3+CsUZR5C4z9OwbeSLnYU+utXKMG3zYP4c7V13uRekegtoRaYGR95M9kO9MXzRBHP9jAfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB1196 X-Proofpoint-ORIG-GUID: wEK0NKDmegcfgfV4eGgqO1PIoYAZwfVP X-Proofpoint-GUID: wEK0NKDmegcfgfV4eGgqO1PIoYAZwfVP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-16_03,2022-05-13_01,2022-02-23_01 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 Hi Gagandeep, Please see inline. Thanks, Anoob > -----Original Message----- > From: Gagandeep Singh > Sent: Monday, May 16, 2022 12:44 PM > To: Akhil Goyal ; dev@dpdk.org; Hemant Agrawal > > Cc: Anoob Joseph > Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue logi= c >=20 > Hi >=20 > > -----Original Message----- > > From: Akhil Goyal > > Sent: Friday, May 13, 2022 3:17 PM > > To: Gagandeep Singh ; dev@dpdk.org; Hemant Agrawal > > > > Cc: Anoob Joseph > > Subject: RE: [EXT] [PATCH 1/8] app/test-crypto-perf: improve dequeue > > logic > > > > Hi Gagan, > > > Issue more dequeue commands if the gap between enqueued and dequeued > > > packets is more than burst size *8 > > > > > > Signed-off-by: Gagandeep Singh > > > --- > > Why is this change required? What gain are we getting? > > I see a performance drop due to this patch. >=20 > Issue is, in case if security engine/driver is slow in processing the Job= s especially > for larger packet sizes then in that case application will keep enqueuing= packets > with higher rate than dequeue which may results in buffer pool exhaustion= . > Application has option to increase pool size but that may not be Helpful = for the > platforms those with memory constraints. [Anoob] Can you elaborate the issue that you are hitting?=20 >=20 > We can work on limiting the enqueue side instead of keeping the dequeue t= o > avoid any performance drop due to any empty dequeue. [Anoob] Shouldn't PMD take care of limiting the enqueue side? Application c= an specify the desired queue depth and when application enqueues beyond tha= t, enqueue API can return 0. Wouldn't that good enough? =20 >=20 > Dropping this patch from this series. I will update the logic and will tr= y to send as > separate patch. >=20 > > > > > app/test-crypto-perf/cperf_test_throughput.c | 42 > > > +++++++++++--------- > > > 1 file changed, 23 insertions(+), 19 deletions(-) > > > > > > diff --git a/app/test-crypto-perf/cperf_test_throughput.c > > > b/app/test-crypto- perf/cperf_test_throughput.c index > > > cecf30e470..5cd8919c91 100644 > > > --- a/app/test-crypto-perf/cperf_test_throughput.c > > > +++ b/app/test-crypto-perf/cperf_test_throughput.c > > > @@ -223,26 +223,30 @@ cperf_throughput_test_runner(void *test_ctx) > > > ops_unused =3D burst_size - ops_enqd; > > > ops_enqd_total +=3D ops_enqd; > > > > > > - > > > /* Dequeue processed burst of ops from crypto device > */ > > > - ops_deqd =3D rte_cryptodev_dequeue_burst(ctx->dev_id, > > > ctx->qp_id, > > > - ops_processed, test_burst_size); > > > - > > > - if (likely(ops_deqd)) { > > > - /* Free crypto ops so they can be reused. */ > > > - rte_mempool_put_bulk(ctx->pool, > > > - (void **)ops_processed, > > > ops_deqd); > > > - > > > - ops_deqd_total +=3D ops_deqd; > > > - } else { > > > - /** > > > - * Count dequeue polls which didn't return any > > > - * processed operations. This statistic is mainly > > > - * relevant to hw accelerators. > > > - */ > > > - ops_deqd_failed++; > > > - } > > > - > > > + do { > > > + ops_deqd =3D rte_cryptodev_dequeue_burst( > > > + ctx->dev_id, ctx->qp_id, > > > + ops_processed, > > > test_burst_size); > > > + > > > + if (likely(ops_deqd)) { > > > + /* Free crypto ops for reuse */ > > > + rte_mempool_put_bulk(ctx->pool, > > > + (void > > > **)ops_processed, > > > + ops_deqd); > > > + > > > + ops_deqd_total +=3D ops_deqd; > > > + } else { > > > + /** > > > + * Count dequeue polls which didn't > > > + * return any processed operations. > > > + * This statistic is mainly relevant > > > + * to hw accelerators. > > > + */ > > > + ops_deqd_failed++; > > > + } > > > + } while (ops_enqd_total - ops_deqd_total > > > > + test_burst_size * 8); > > > } > > > > > > /* Dequeue any operations still in the crypto device */ > > > -- > > > 2.25.1