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 BD448A00C3; Mon, 19 Sep 2022 14:38:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53F0840E0F; Mon, 19 Sep 2022 14:38:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6A8C740141 for ; Mon, 19 Sep 2022 14:38:28 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28J5EhqC027218; Mon, 19 Sep 2022 05:38:24 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jnbkppn9u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Sep 2022 05:38:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmYT+h3jPi0vMzY1dqTU5QnBLXb+CanIjfeZppVVrLeIdi0PnFXGdNPaW+SJjXaz5WK8fSc34pu4fDBpTcJHcwIzlxr5kmasruwKTgTzGNB1splHl1OyN6U93sVp/1ghQzBQgqtgjBSCtSSw9udjJHIHIcGlLq/n+SFJQ28tn5tscaUWpa0gL2hAhbM8kVShiH1Sblg3VTvq1NWHUFxUhMx07KSCQpsj1WrDVETR3NaYp0hkkN/2yE3lmAV1LyNiR34aPRwrIc8hpFBgFbWwkKkbFixTNhhcbuL615QyRXVEDOH1arbwAphIuegizaZyG9+s9/IrYrH0kLiM/RniIQ== 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=myRE9jtqxSF0Qmnk0v0ir7cI7SVcdIjb47JLEzZy1Yk=; b=bJf4QMa3EmE0Au0I0ZuQJdlHTIMI9OudN3gri+3+Q2l/C+JMTXtSBbEZkh29667CTS5EDYr13l3qQFBEAgykHkEIGG06lsUx6wZpWhhKgC07GRYJli4zxR9D4A/WPEtKms5e8a/CBaztYzcOqLetskUzO6X9ikFnAutCPYT7Dp/ArQGQfUgTLABzqgoMjtNasETOdu87ZgaHgdpUdoINodWc4tcQMfmIjW5iUgS4Bk+6zW6CSfpvaLnX7RMoNqZQoxqHfyj03KUw+JL+062j3n5Z0mO4VcYjg76vpdBOccWQA5bEDiqt8aAARTK+lTU04ssjLi7EPDuER8FY9Xwbrw== 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=myRE9jtqxSF0Qmnk0v0ir7cI7SVcdIjb47JLEzZy1Yk=; b=he4ZzF7jdSN/9r775x322j510gWdh2RMqbKex/prvK06kTlTMHHDyxX1wobXvjIyXPAHvm/mm/ToVw+XH6FFeiGj+GruZJQxS1TfozxdRcHCFGjX7Yo36Z8y001YgKMimiyhKXcO4yAoihq7vShLZp5PayLLikbwkSoFdB4qSf4= Received: from BYAPR18MB2791.namprd18.prod.outlook.com (2603:10b6:a03:10a::25) by PH0PR18MB5115.namprd18.prod.outlook.com (2603:10b6:510:168::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Mon, 19 Sep 2022 12:38:19 +0000 Received: from BYAPR18MB2791.namprd18.prod.outlook.com ([fe80::7a31:323:d055:df4e]) by BYAPR18MB2791.namprd18.prod.outlook.com ([fe80::7a31:323:d055:df4e%5]) with mapi id 15.20.5632.021; Mon, 19 Sep 2022 12:38:19 +0000 From: Srujana Challa To: Thomas Monjalon , Akhil Goyal CC: "roy.fan.zhang@intel.com" , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram , Anoob Joseph , "david.marchand@redhat.com" , "bruce.richardson@intel.com" , "konstantin.v.ananyev@yandex.ru" , "matan@nvidia.com" , "honnappa.nagarahalli@arm.com" Subject: RE: [EXT] Re: [RFC PATCH] cryptodev: add return parameter to callback process API Thread-Topic: [EXT] Re: [RFC PATCH] cryptodev: add return parameter to callback process API Thread-Index: AQHYmcqBLYw7MaZRNE6lY3A533ZGcq3nCS3g Date: Mon, 19 Sep 2022 12:38:18 +0000 Message-ID: References: <20220624121217.3450612-1-schalla@marvell.com> <2989100.CbtlEUcBR6@thomas> In-Reply-To: <2989100.CbtlEUcBR6@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR18MB2791:EE_|PH0PR18MB5115:EE_ x-ms-office365-filtering-correlation-id: d16eb964-6ded-48cd-959e-08da9a3bd4df x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pZEw7j9dx6SQS9m2ih3fOaSNU0gtnAzlWhi00XCeQjS0m2dJOfapvLkVoHikhaE04IA2a2YMavT3jUZXdRCb9UhYUAUC3QCpIxNN2k+ijug+LrYnNZZMO1IFatDqvBIdWuvHsWq8VIawa2YBkUyI+ORJ+FIbZmzSXBnuNleAL9CKv3D/plJrWHFM36/8ZueN44qjrSypfC4WyVx14tkaCtXbJ1x7MnNnhWD+0PGd1GLaSXeTLudif4POZlwQf4C7BGJbU3H/1bMu1q7KJEkLjtFLAXtKBqCRKwFtNZTYUP1R6R96ij/6oWYsvG5PWhyF+s0UKgElJ35DnyFvfMK6nnxbehnxisB7fEUv1QwdK7JMrW/0LhSfY0yyLQh3F11etQiBdWjDoaecJK/VDvhUmKgTBEC/a6bqHD8VAxGc1JaugSBtjm/85k47fvca0Dy16AKB+cYQMa68bom+sxWWNvMJJovLGX+/eeEsBV3i0wA3sinZBHc1BUBQrZTgAZJMbVM17pC1YG18imaSOM9mCcr3zUdaK0R79Dj2IB6iWpQ92TTxZcDyJ6cP3b1UCP4zJd0oKjFWAtELOTm1qmX0uL5t9+QMhKXe8lQP/ntdmme1z/zetrvdf/Pgkx4vxmjgX11SL1U+d6u4szHJLzY5LPVlqPwP0uFZIZMvaUlu8lQ86JF26tXSCUnAZYENFRZqvcrjafqAdZZZ+iSwDejSNp0zQBtmr2cItRPnZuULgnpFuXn8LrRUnJDc5uBRy94pucXmjy2wernQEVz7s6dGbHT3oO4UvhJjYoa3eshmd3l4LXUQyRP72GyJlqKkye02 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR18MB2791.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(396003)(376002)(366004)(346002)(451199015)(9686003)(71200400001)(7696005)(8936002)(6506007)(52536014)(53546011)(2906002)(38070700005)(316002)(19627235002)(55016003)(6636002)(122000001)(110136005)(86362001)(33656002)(186003)(5660300002)(26005)(4326008)(83380400001)(478600001)(966005)(8676002)(54906003)(66946007)(66476007)(64756008)(66556008)(38100700002)(66446008)(41300700001)(76116006)(23180200003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qasCQFJ97LeoLTEi6H2PeQknXlDCSDxCaJ095sv+HQBxSGq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F/LeHyo+z1J+2wlnLwaifeDKwRTCmx?= =?us-ascii?Q?RqW4GVqlxmhem1d+O9Eb+C5MNbe+n5qkVhusjKmILrb7HEIljZ6fUsPtuoe4?= =?us-ascii?Q?1bZl+dEB75fvVqS73Usuf3WGmOm73EW4FhCdIX0M30e82psHDsbK4Bav3BWX?= =?us-ascii?Q?/n0YxRWG7t1HPb3ggBxsNXpiQoUmHNqMNOe0xqb9v/iFZwLWIVXLxx/pnJQp?= =?us-ascii?Q?/HFx6Q9hNX5Dwmzx/uYNOC+Gi+ixfDCpSRx71xRKPI1epfi7dWNtCAodjKpd?= =?us-ascii?Q?wnEtVWZyaplZDD+cpJGX9Ulbg3s1f6wjF7anKj3y9he8VxY06nZRpy1UT234?= =?us-ascii?Q?xZgUs2/lRtcVHLBX0M7kAZGulTQDTRgWW7sSaLhzFVOyv9SEbMLkGVKW376V?= =?us-ascii?Q?c6CltPDDCTxgYt0CqpFm+XGQqyX4vGIPedU3uDbv5QLvKW7VBcFn2K5onHya?= =?us-ascii?Q?L8jsjDrmtqnipCMaiyhz0nk1IBuhH2vsfT0YHfKoHXN1AzUDgFu9lZ5yUuFQ?= =?us-ascii?Q?gGeQeqB+4P6+4KLnYXaM+EbAIG0M1qv3kwus+635d/OTEDs5TTJPOyQrRWmL?= =?us-ascii?Q?phWk5X5ErF75Y0yB1gr/2by5xXzRox0J0qkQ0Uw+iTwjD6N9j08/KPPplb5v?= =?us-ascii?Q?KdqMo7TZJtuvlpY1y+o=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: BYAPR18MB2791.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d16eb964-6ded-48cd-959e-08da9a3bd4df X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2022 12:38:19.1048 (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: /pPmMxTygxIxpma62sIj0X9Du5yCTyN6nUZ3mKCiBr+7i5A0GKb8yXVewDNaYQlITfpS51gJ51iwJ2ori77jCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB5115 X-Proofpoint-ORIG-GUID: 1f74qUPV2Gbzi9m8mV3BfvhZ2-_qkSYJ X-Proofpoint-GUID: 1f74qUPV2Gbzi9m8mV3BfvhZ2-_qkSYJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-19_05,2022-09-16_01,2022-06-22_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 > -----Original Message----- > From: Thomas Monjalon > Sent: Sunday, July 17, 2022 4:17 PM > To: Akhil Goyal ; Srujana Challa > > Cc: roy.fan.zhang@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran > ; Nithin Kumar Dabilpuram > ; Anoob Joseph ; > david.marchand@redhat.com; bruce.richardson@intel.com; > konstantin.v.ananyev@yandex.ru; matan@nvidia.com; > honnappa.nagarahalli@arm.com > Subject: [EXT] Re: [RFC PATCH] cryptodev: add return parameter to callbac= k > process API >=20 > External Email >=20 > ---------------------------------------------------------------------- > 24/06/2022 14:12, Srujana Challa: > > Adds a return parameter "uint16_t qp_id" to the functions > > rte_cryptodev_pmd_callback_process and rte_cryptodev_cb_fn. > > The new parameter is used to return queue pair ID to the application > > when it gets error interrupt, so that application can disable and > > enable the queue pair, to bring the queue back to normal state. >=20 > What about other events? >=20 > > + * @param qp_id Return parameter from driver to the application. > Driver > > + * returns queue pair ID when it gets HW error > interrupt. > > + * The application can release and setup the queue > > + * again, to bring the HW queue back to normal state. >=20 > What will it mean if the event is not related to queues? >=20 > > * @param event Crypto device event to register for notification of. > > * @param cb_arg User specified parameter to be passed as to passed > to > > * users callback function. >=20 > Are you going to add a new callback parameter each time the application > needs info about a new event? >=20 > In my opinion, it is a very bad idea. > As done in ethdev, you should add a query function specific to the event. >=20 > Example: https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > 3A__git.dpdk.org_dpdk_commit_-3Fid- > 3Dbc70e5594838&d=3DDwICAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DFj4OoD5hcK > FpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=3DSUn- > UVCQXX4KwyuDDcIb_PvE4MwkLTimQ3ox7hHcKW7wCq6BzW2849tn1nq2dO > S1&s=3DaSpFxjeE4xjxZadI9wxc5AqInIvinSvFfa0NEeRrxBA&e=3D > Here, when a threshold is reached, an event > RTE_ETH_EVENT_RX_AVAIL_THRESH is fired, and the application can get > more info about what happened by calling the function > rte_eth_rx_avail_thresh_query(). > Look at the parameters description: > " > @param[inout] queue_id > On input starting Rx queue index to search from. > If the queue_id is bigger than maximum queue ID of the port, search is > started from 0. So that application can keep calling this function to ha= ndle all > pending events with a simple increment of queue_id on the next call. > On output if return value is 1, Rx queue index with the event pending. > @param[out] avail_thresh > Location for available descriptors threshold of the found Rx queue. > " > Agree with your comment. Will work on to implement query API for events. Bu= t as of now we only have single error event.