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 81F86A00C4; Fri, 30 Sep 2022 21:17:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2ACAC40684; Fri, 30 Sep 2022 21:17:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0F6F54003F for ; Fri, 30 Sep 2022 21:17:06 +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 28UBvNJ6022710; Fri, 30 Sep 2022 12:17:03 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jw1rt7xhf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 12:17:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hzZvAJhadu3YKdt4DRne7geZRsG/acgwhevSVPwwg4J4gMf7a6bxn3+iVHMPGf9OF0FuijgdCfEdRTDU15FxgcdMCbJOeL5S6deNUKfDt0J99j8ylvG8pYc+8Zo2CwvaI4iklSroCYfz/0/wrj0iwE1uxG8ja0Yp5sty/gtt8sx6uFMWXbC9zFmr6CUSmwvcVeFWb0kO5+Ei5eepIM9XHoPL3T4cCdtffHWohVZLRZdrai402lb6yDSeFSJbEE5lSRizXAWfZbjaoFwcd+xFQn3UYHgFz0WXsLknyxgs8Sq8jg5JxFYGaHHUOs31anuLS2pC5V/NA9qo7euRZvaQiQ== 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=hEzjxra/GUDUI1ceVFYQ4sWjxM3ofSUo9MjYXPfz9T0=; b=XIEWdh3G4cW3MIvSpGUhLKiC+k8J+FAHdYSvPo8cVqqI92kMrLwdebBdL0tFrCU98kw38HD3cz6foFJ3wAuTHZISG8ohQBnOZ2h5/W9t9gjLqq6qDX05gyEl0DQitw7I+++OmkQcH8S5sqdacvuxGhn26cTp11BojUm1N7l2m0jjEMJsQUpgYtOfUnU3FUPu+SiXPaVfqSoVkhsz4NJvkiYELY70Xkw9yoxgvhA3nPbLCDS3vMS11EJ439mFEDEalU544lXATuapHzlpnu0R1Py/Qr7+JlT3aEFEavVhifb8LXhF0sES6XfqLj5XR24t81qG+0b+S3j1rQqo4piihQ== 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=hEzjxra/GUDUI1ceVFYQ4sWjxM3ofSUo9MjYXPfz9T0=; b=UqSQGNbP47B0NO90BfI1/iTdO4Rj1k8AbhTA0g12C6q8pPMHchJuXqnQ0+QYfne+sGdTOexmf4uOoPZU/J+9VOQwwbYA3Husuvx4Z4JF7AKXKO2rfRFZq16d4FYo+gGu2thna2Aeqi74OBA5Q0SfXrZrKBdp/u0Tisucyw8t1AU= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by SN4PR18MB4933.namprd18.prod.outlook.com (2603:10b6:806:215::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.24; Fri, 30 Sep 2022 19:17:01 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ee27:3b96:a580:ba9e]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ee27:3b96:a580:ba9e%9]) with mapi id 15.20.5676.023; Fri, 30 Sep 2022 19:17:01 +0000 From: Akhil Goyal To: 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" , Thomas Monjalon , "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: AQHYh8OrlZDaFDX6qEaZfPCxP8SiZq2ChXEAgGS0awCAEbjJ0A== Date: Fri, 30 Sep 2022 19:17:01 +0000 Message-ID: References: <20220624121217.3450612-1-schalla@marvell.com> <2989100.CbtlEUcBR6@thomas> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB4484:EE_|SN4PR18MB4933:EE_ x-ms-office365-filtering-correlation-id: 209614b5-fbb6-442f-ffd7-08daa3185a15 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eM2AH4iNwhDcE+b/oGI3bo8wnYGfzwah0QDnHEeGKizEnz/HudYOu38CFBKYFGj2jBooeQJlT6s/PITihNJnQW+AmaYIJjl6eVgoIuv79xSWAvsdQWGXFUW1UENsY6ipOrys3PtqQU/yCP+isfbXw9Xr9AHc9kCAbSCzZYWOVqRT3/56twxHN5Q00LtP0h5hf6jWN8qLrB2KrhRzdkxeM++sK9jHj1UBZs+5O2O+lG51aMxq9MCZI2aPxHDF4enoOewIU2wXkgKNulPs6vuqGOrlAkFQhNkPu2J6pTO6XCNQY+TbzRhSc3kUy7sPmMHvjOqyR8RMk0AVLVcGBi36lO6Vu2w498fEIRkEj12fpA37MykzWfbkbjbwiDFay1w/YPE/93bXaA4rYew0ZGzOKyN3ztuVRQ88R3sfq0qoTbVLtopmILIPOR+JR8BwdZbXIs3WZxG6V7rSlGCAYL9ss4ACFFYd/fm4jT+NQdMs2BG69Lu8FHVriWSzpRyjdTYLElIQmhQzvlxzEd9v559F+k6b2waG3jUdh0mW9eWalnubjpFakc9BY97n35wgFSJN5SQZACehY+uXqjYXRPWQKaT3QRn2RN9YlLjBNYcbgBeg7yNIKt9IPDQkT5Ydj2wlz6m66+f8jqn4TvAxudL2otqI5VvsjOrcdMwwMtJt0L3+2Hlx1dg15V79omkePobcsekEmQeYrxw8B4AgVrFNShNdJMaLuco18NTfE59lE83bhoHPXB1YciGwSHQgMVUX6TvMhYmEJZj4TKjrOFth8NxBDmvacoXnmWi/xQrQIS4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(376002)(366004)(396003)(39860400002)(136003)(451199015)(86362001)(66476007)(6862004)(71200400001)(186003)(52536014)(38100700002)(5660300002)(316002)(54906003)(83380400001)(66946007)(41300700001)(76116006)(8676002)(19627235002)(38070700005)(55016003)(66446008)(64756008)(33656002)(122000001)(8936002)(66556008)(6636002)(4326008)(478600001)(6506007)(2906002)(7696005)(26005)(9686003)(966005)(55236004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4sv1z1YywuUnmIrDvrhASYSlAuPO8LyHsy0/VhiAMER0lN89AB5JoY23/5ru?= =?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2chFxUjsQoRMN6Inhxc?= =?us-ascii?Q?WOrEx3BB3oucnJ3riyvXeKZl2fhko0TcTXvFPwjlFMa2tCPeUBKf6QmtSb0H?= =?us-ascii?Q?XHu5gtNGO/jcNjqw+AkpKpUkXY/C5t/f6rdAMGwlp0DfiDr97oeeUJDKgmVI?= =?us-ascii?Q?Me2cTjlOT5gIqG82536LVBedELcQSFM4+XE9E8B3fKd2DmCI8amjhhDEyNwi?= =?us-ascii?Q?VjtUEgpi51yoRg8EXmV3t9pbYtn48YQ96gggiK88iy4Rilqd0FAO9tGddSbc?= =?us-ascii?Q?I4PYoNwx7onmFJNbpa8b4QnPib3sV6aqHbxk5cIt2WfS7ShZJIhkey1/X7VR?= =?us-ascii?Q?KqBwWYAbs4qVted90FxPvhD8Is/iAr50ZFKgfwa7SCl2tzapQD92Gh8e1hQE?= =?us-ascii?Q?faId6lSKuDy7Ao+xWeR4P2UdpFDSf8wCwx/S4NsgJ76MGEWPApQEwCPeRu6u?= =?us-ascii?Q?J0hhlfBkMqwoeynZk/9x0tf/zmEqJFI8etfirYgCsQgjpQA1mVLnIRsy3yXY?= =?us-ascii?Q?vjjkksKnlXyfrG53E1YSc7oi/pMLxcPiltkjWuDMKtCppEY+jNNvYIf+BkGR?= =?us-ascii?Q?+DjHUdskRQyb1K/RQZnSbuCHejr4QLpazNeSEAPRx18jNEFuz/NdROcbl+l7?= =?us-ascii?Q?NyXRcTft7s2/H1qQRzA=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: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 209614b5-fbb6-442f-ffd7-08daa3185a15 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2022 19:17:01.1967 (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: RitFMr79o4DL0rlZgGVD1qcvofC4Rxxg0M0UkaOWXD4OOIXTqyTo0MNdsnBlrmgPFjszrAVSvpHmC37rKMhD9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR18MB4933 X-Proofpoint-GUID: AfrSlWPuqQbxSibDQaT0c28YQki22hFG X-Proofpoint-ORIG-GUID: AfrSlWPuqQbxSibDQaT0c28YQki22hFG 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-30_04,2022-09-29_03,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 > > 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. > > > > What about other events? > > > > > + * @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. > > > > What will it mean if the event is not related to queues? > > > > > * @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. > > > > Are you going to add a new callback parameter each time the application > > needs info about a new event? > > > > In my opinion, it is a very bad idea. > > As done in ethdev, you should add a query function specific to the even= t. > > > > 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 i= s > > started from 0. So that application can keep calling this function to = handle 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. = But > as of now we only have single error event. There is a deprecation notice for this patch. Since the patch is dropped ca= n we remove that notice?