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 B1C6FA0C56; Wed, 8 Sep 2021 13:11:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 353D04115A; Wed, 8 Sep 2021 13:11:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3817241140 for ; Wed, 8 Sep 2021 13:11:35 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1889TY11030879; Wed, 8 Sep 2021 04:11:28 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2176.outbound.protection.outlook.com [104.47.58.176]) by mx0a-0016f401.pphosted.com with ESMTP id 3axtka8asw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Sep 2021 04:11:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kU8VH4RxdyI/w6WWjcbnQHlxwE0PXLsPWah6Qz0pcmnKWY7XDwE58BjPChdOgn0fr1/YVkEdVRzEWDzUvSXUHwyTiFpJ3RRGm3mHEB531RJvX6ACQXdKOppPYA9m8Cn7HK8IioUfet2rEVc3UquLMjQJ3tNVlSEMy5UJrghRt8YM1jwtNwvv+PXZf5D9GrYIyd0HNA7yv3YbPlM67exZlV2Ee1to+84z0zNC5mi7+aIjyoKq6D9DSFilpDwa9kIlNqutXv1EzOuyb6sKrU5cB4xN5/wFuAYBTSpyDqvAvxnclF0YH5uDNmla8NCJZ+TcwCzY0geoLGtKzla9eHLo9g== 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; bh=jliOUkvub2pYOAQjbO1+rUwLryhsDWYPrg6Ovn/4ZlI=; b=RWR0+LfLRUUNvDJ+Lmdesn+wUzgTSkS1DfChcE5X+U/Glrk90iYA5cxxNSWedyxjqReUuy8OhmIILgeb2ACYIyyoZOxF1QOX8cXMlT6gGBm5GtS7ajJBQKmwDi4sP3bSpTUxOzE12xwsc0ZY50KTO6Ozmap+O2UH4Nyi2fSjdWuVRnMGgvT9OBLQCkAVk0khoTpob2Lx1sQDDA0+v790XIorV5U8RrYrr/0Ua8YttyvZ0rDs+fX98tErP7OhpwzMQbR8DXFZftaIMTF2rQ80R6iTPlWdbRRLzo9vbbtAkEsgr4CGM5WXsyuX/WhW7pE4IQ1amqb/ZRdrXhuFFj/ATg== 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=jliOUkvub2pYOAQjbO1+rUwLryhsDWYPrg6Ovn/4ZlI=; b=HJmnaSWFpf2bSIYTCQIlreorpwdQa310hIJEYzn/u7X6uJGEGdov3RZTqVWnwLFvoOrPfDmNntCmvlFd9f2tRn0GQ4Vxj4nik5rk26TWTagBjJRqPVd+yEz+0ek7DZ8GdOrYIUzklBquAQVmcom+buOaVNjezo6SyoL0/vwkXlc= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO6PR18MB4434.namprd18.prod.outlook.com (2603:10b6:5:35d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 11:11:26 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::411f:5b87:321e:de29]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::411f:5b87:321e:de29%3]) with mapi id 15.20.4478.026; Wed, 8 Sep 2021 11:11:26 +0000 From: Akhil Goyal To: Anoob Joseph CC: "radu.nicolau@intel.com" , "declan.doherty@intel.com" , "hemant.agrawal@nxp.com" , "matan@nvidia.com" , "konstantin.ananyev@intel.com" , "thomas@monjalon.net" , "roy.fan.zhang@intel.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "ajit.khaparde@broadcom.com" , "pablo.de.lara.guarch@intel.com" , "fiona.trahe@intel.com" , Ankur Dwivedi , Michael Shamis , Nagadheeraj Rottela , "jianjay.zhou@huawei.com" , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Thread-Topic: [PATCH 1/8] cryptodev: separate out internal structures Thread-Index: AQHXnNSmWjMi9EyGZkSS8NsXkOTDPKuaBPkAgAAC0BA= Date: Wed, 8 Sep 2021 11:11:26 +0000 Message-ID: References: <20210829125139.2173235-1-gakhil@marvell.com> <20210829125139.2173235-2-gakhil@marvell.com> 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-office365-filtering-correlation-id: 42651a26-88f2-41df-0325-08d972b96683 x-ms-traffictypediagnostic: CO6PR18MB4434: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jCmdTdg1+7VqbvvyZr6JMIgm6Mou83zPhDNlplGzYegVyw4QnOxbpP6hOfnj4n9YgUaOQcr3FPrs1X27vi7n4iCVhBdQJRIGCyWUhgfQyLGrZPIagfV8uQ1+Cwx5g7ySF1RjXH+BrjpiK5ZaF0+8XiRq/rOdaLZqVCi4ryTtMfnBp/pGatO0YmKtASEYi96AvuXkciQVpB4fBf29WXolk5lHvbqd72RLoeMcAWRq1o7c9a4BNV8EPRbJEAzG2JCGzq6ww2fFQv6sXcd8kYduR/35ev5SoT3kfSIfuYo2f0TeyTlF0J/SW0m/s7pA+q2PP+jWzIvlMHZr/Pic80XaKeYPaKQmPHo/NktKvrfUD9uQ5Vknb0ACuy7+ezsa0GhTbDuc22utAs8WX6o/xzyW9D4Bv5RmWTjYj1cgor9soEWyQIQKZXBBVMVI15MH+rCA0KE9skXNHMr/BvMysE8ZKU7Om24vGkQXkif6xEA2FF4gn7KBUvvzkIML+kzm+WZedujt+x9a0d0viAAedn1SgKO43vLdQVNXgueO6mNx2YDAU5M6WtnTaozdq1DPqS/kUpIW/1s2bFS9k0HVdAD8vgHYG7zBqdwvs0aLHS7n6/4qnftgNu9a3vlQaxmdqerB35aPBGKQ8dXvFXPT38gbrsPWlJ/9GVKgHgqPaAMyJ4Af9pyGF9B06X9sGHbM5PLAKAAta+b0ijLtFv8CQEm3lg== 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:(4636009)(366004)(6506007)(122000001)(7696005)(6636002)(2906002)(55236004)(54906003)(86362001)(4326008)(76116006)(66446008)(66556008)(38100700002)(64756008)(66476007)(66946007)(508600001)(26005)(7416002)(71200400001)(5660300002)(33656002)(186003)(83380400001)(52536014)(38070700005)(107886003)(8676002)(9686003)(8936002)(55016002)(316002)(6862004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BQPciiw7Do3ZfyxGpCT2bBfZzT/FVQlXxz0bpmaSgyJjudorPFJIg92ZS8SL?= =?us-ascii?Q?xN5GheVPQ9frvg7PC21ai2uV3/uST7HbdBhMiNzk5UeXojxmFJH4NP2G0hxw?= =?us-ascii?Q?itDXDJNR/ydrnWHRwq2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AxIP?= =?us-ascii?Q?EFgQ6KYM1jxvWQJOgUOiDP6hZEEAHjHIuV7r5EdYxJD6Z5oPUd7F2//hfi6N?= =?us-ascii?Q?GgNdlDzBHZ7UOHS1jchQKWD2iBRtNyKMnhlIrjLPjyb706qfhhROclrn7RCu?= =?us-ascii?Q?xVOP0HWV49iDLqHUreM07fQlt1pOd3XbVOTke3z21rUDH26PhG0r06tWbGvT?= =?us-ascii?Q?9MJljU7OixU7DvbAdLP+70hconBKaz1E/miSziaS3VcV86oES5kZHtRHQA+d?= =?us-ascii?Q?8Y5xjc5Rk2PHqtKGb0yXizSa8IrFPnbKBTNjlLHC1e4Q3eq5iqw8JDJlkrob?= =?us-ascii?Q?q7X5wqXa1rVKBTnfO6qnJ4OL?= 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: 42651a26-88f2-41df-0325-08d972b96683 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 11:11:26.1554 (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: iPovN8HaTsqIt5oP602meN3Z+CfZxw2JbUB4Q8vjcJTlM4KA7ZO08qjNjPccRLJuYmtD/oxAaZBxAsxdIT0h8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB4434 X-Proofpoint-GUID: ttolITlsZ1aExi16EzSc7UjE6udSkwnT X-Proofpoint-ORIG-GUID: ttolITlsZ1aExi16EzSc7UjE6udSkwnT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-08_05,2021-09-07_02,2020-04-07_01 Subject: Re: [dpdk-dev] [PATCH 1/8] cryptodev: separate out internal structures 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 Sender: "dev" Hi Anoob, Please see inline. > > > > +#include >=20 > [Anoob] Is this intentional? Shouldn't we keep includes together in the t= op of > the file? >=20 It is intentional, and will be removed in a later patch, when the new frame= work is ready. > > +/** > > + * >=20 > [Anoob] Is there an extra blank line? >=20 > > + * Dequeue a burst of processed crypto operations from a queue on the > > +crypto > > + * device. The dequeued operation are stored in *rte_crypto_op* > > +structures > > + * whose pointers are supplied in the *ops* array. > > + * > > + * The rte_cryptodev_dequeue_burst() function returns the number of > ops > > + * actually dequeued, which is the number of *rte_crypto_op* data > > +structures > > + * effectively supplied into the *ops* array. > > + * > > + * A return value equal to *nb_ops* indicates that the queue contained > > + * at least *nb_ops* operations, and this is likely to signify that > > +other > > + * processed operations remain in the devices output queue. > > +Applications > > + * implementing a "retrieve as many processed operations as possible" > > +policy > > + * can check this specific case and keep invoking the > > + * rte_cryptodev_dequeue_burst() function until a value less than > > + * *nb_ops* is returned. > > + * > > + * The rte_cryptodev_dequeue_burst() function does not provide any > > +error > > + * notification to avoid the corresponding overhead. > > + * > > + * @param dev_id The symmetric crypto device identifier >=20 > [Anoob] I do realize this is copied from existing code, but "symmetric" s= hould > not be there in the above string, right? The API is equally applicable fo= r all > cryptodev operations, right? Agreed, I did not realize it was like this till now. This code will be remo= ved In a later patch of the series, but will check the final thing. >=20 > > + > > + >=20 > [Anoob] Couple of extra blank lines can be removed? This code is removed in a later patch. >=20 > > + > > #ifdef __cplusplus > > } > > #endif > > diff --git a/lib/cryptodev/rte_cryptodev_core.h > > b/lib/cryptodev/rte_cryptodev_core.h > > new file mode 100644 > > index 0000000000..1633e55889 > > --- /dev/null > > +++ b/lib/cryptodev/rte_cryptodev_core.h > > @@ -0,0 +1,100 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2021 Marvell. >=20 > [Anoob] Since the code is mostly a copy from rte_cryptodev.h shouldn't we > retain original licenses also? This is an intermediate patch. At the end of this patchset, the new file wi= ll be=20 A very small file with stuff only related to the new framework and will not= have Anything copied from other files, hence did not mention previous licenses. >=20 > > + */ > > + > > +#ifndef _RTE_CRYPTODEV_CORE_H_ > > +#define _RTE_CRYPTODEV_CORE_H_ >=20 > [Anoob] We are not including any of the dependent headers in this file. S= o > the caller would be required to include all the dependent headers. Might = be > better to include atleast basic required ones (for rte_crypto_op etc). This file is not required to be included directly as mentioned at the top o= f the file. Hence no need to include other header files. >=20 > > +/** @internal The data structure associated with each crypto device. *= / > > +struct rte_cryptodev { > > + dequeue_pkt_burst_t dequeue_burst; > > + /**< Pointer to PMD receive function. */ > > + enqueue_pkt_burst_t enqueue_burst; > > + /**< Pointer to PMD transmit function. */ >=20 > [Anoob] Transmit & receive are more ethdev specific terminology, right? W= hy > not enqueue/dequeue itself? This is kind of a legacy code, I just copied. We need not correct here, as = this code Will be removed in a later patch.