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 E9A34A0C4D; Thu, 17 Jun 2021 09:13:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D691E40683; Thu, 17 Jun 2021 09:13:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9F2A14067A for ; Thu, 17 Jun 2021 09:13:06 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15H75Xju018195; Thu, 17 Jun 2021 00:13:05 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by mx0b-0016f401.pphosted.com with ESMTP id 397udrsdxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jun 2021 00:13:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnO0PQZNQbNerXX+XJIjOnftjJIpYqAxNEesPRnWvCBI3Rtttyooyf81IPr0sc1w5if0g3pT0ncMBTvIqx+u7I/76YixccX5ZxDX+gUbqiukahCIquhqBHaCiXDgsHnP95Ih+rKdDywdzmBF8/WAEqRRgitl3r5tbTMk3NvPnHObez1caQlidVZ5X4g+pXAOlE3aSFAQOyg0YRweinnwKUq5kZxsDqQnjvXiGje1qVlzqTItF4yekQq1KGCd76CV1II4h0I5FmSFi+GlCfVcnDe5wYaYe/uq2UCrByqZIA/m3RVeTSAA9DtGlP1AkZ9OEP9aThjKFWvts/xo3ciyoQ== 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-SenderADCheck; bh=FSz2G6QvH+SJYgut16AXHVMLIepjAtfhJusef5om4mI=; b=WeK3pGKCtlqUlYN7V6bakKpi9q907OF5J46QLAWDrcvw12f9y9Z5gd4+t636TYVleMib4pWp3Ep5aXMFizCj0XwLq7DttRYAC7Lt8PUlwnV41YYiNkO4jIMs6wscXrvmdOAU3GAb2L2rIlWtNk3DGVeNzw8tVNHitEhqOJN53NaT8b9uEXVzqgmTsOtzJmGm6kzxSbprLht7Sm80eFK5KFIunJ+Abm61OHuTypYFIKuIBhp1J0zLGlpAGQnywz456a4zSLTZTGzfO3aTTfJ5o3m/LNAVsVD47STSoiWjHH8p3M/3gLZZacp3DwQwL5RGGrMg1PbOrK1CdP/wQ2VHGw== 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=FSz2G6QvH+SJYgut16AXHVMLIepjAtfhJusef5om4mI=; b=O5ebL0ZZiDt+oIjfFO/DwBHstB6E75pUWjnxWqXyGCNlyu6k/pOhVF+CnwOEqikFGFZqUzFk7730v/Q74Kn1ZEGFI5vBvi7biRYmnzc/u1Wzw2S7qXfj5IbYUPCt6XtEFh1+HW69l3MrtaZ3H3NpbySUJK5vrrZYTw/hUuabvgU= Received: from PH0PR18MB4672.namprd18.prod.outlook.com (2603:10b6:510:c9::16) by PH0PR18MB4813.namprd18.prod.outlook.com (2603:10b6:510:af::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Thu, 17 Jun 2021 07:13:03 +0000 Received: from PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::2c51:a56a:32a4:d6c4]) by PH0PR18MB4672.namprd18.prod.outlook.com ([fe80::2c51:a56a:32a4:d6c4%3]) with mapi id 15.20.4219.026; Thu, 17 Jun 2021 07:13:03 +0000 From: Anoob Joseph To: Akhil Goyal , Thomas Monjalon CC: Ankur Dwivedi , Jerin Jacob Kollanukkaran , Tejasree Kondoj , "dev@dpdk.org" , Archana Muniganti Thread-Topic: [PATCH 05/20] crypto/cnxk: add queue pair ops Thread-Index: AQHXV86Rr1X2jfaSG0OCXmjBTlASO6sWj4OAgAFQ9jA= Date: Thu, 17 Jun 2021 07:13:03 +0000 Message-ID: References: <1622652221-22732-1-git-send-email-anoobj@marvell.com> <1622652221-22732-6-git-send-email-anoobj@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.44.198.14] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 880b1258-c04a-4ab6-8936-08d9315f58f2 x-ms-traffictypediagnostic: PH0PR18MB4813: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Hrm3HckdwXeFJk1tN4mnikKSdJkzsckl6kW1SmUsbesHuTCniLYzVOiLOlEG0GmRv09Xt7qYMlZ9A0KJOHAnnF4MpOoGuzyRnoAGW25eTMrciAo4PVXSPEF3Ye2A1aXORrLMEJxJJnRHZh3cXwJYaJb4Gvtg2P2wHJkOJg7pj6h+e9u3oezFl7eMGEBrph0uaed4Ap0woXPHnKuBtJBzd4cRrPLRtGLd8lLx1o4hSgQ+tbzsj3EiimYYiLAvGH4G6Rrwk8xhEcDVXduJLOp3r3NfRTVAwFGJMWvwiMFxRv/gQUtVTLM9sIp5XH5wrqCSAbZX3El23hPRW1SEreRGvoLGknzAr/6SbkVewfK4KZc4fz2NHourKGX7CLgC3lPmPiXuWgo6w1iejq5TGJcwOJsyS0P0GgZJI6TuMcHXAn75lYB6B0gdL8fPEu5b5u7MX3pMWUr2pwZyhWppU0uibRJruGaSqTY9Vg2vT/EmDA/3WHX92Yynlnzp/q2ux3fmpgMeh+J3RWvc1bKtfn5JHm19PCV0AYM8h9AMcxQS9N38OqL2lYbl9iyJmOTfYsAkl2wI5B+x4+CrkOgS70AZAU/0ylJTlp3R724ifj7uuew= 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:(4636009)(39850400004)(136003)(366004)(376002)(396003)(346002)(9686003)(6506007)(478600001)(7696005)(8936002)(52536014)(53546011)(110136005)(33656002)(5660300002)(66946007)(83380400001)(316002)(54906003)(66476007)(55016002)(107886003)(66446008)(4326008)(2906002)(38100700002)(8676002)(122000001)(86362001)(66556008)(64756008)(71200400001)(26005)(76116006)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1px3rjtiOY82Zl+KusLiromYTWIKHqwjzFoI3mOcqMKV9Z0u1hg+iTl8cYpH?= =?us-ascii?Q?i0BcoCrHidc27hqqpSgBGM33Bw2gn2cDRC4tFh+A9CqgcWK3SBMZuNwPOlLL?= =?us-ascii?Q?frBgVjpjYrJwqlB9rX/Ck/ITKtLGenUx1ODrXvA/BxjIyeYnSn8v6+RuxOtp?= =?us-ascii?Q?D4x7ujxjGC3lfygb8seOA7KSO+b4OgIS00oHnSF8DsklvnWu4AAEICommSMP?= =?us-ascii?Q?AzNeSkpCtDTGdqzBTxePCLsZasS58xcC1Zz5nozTJfsVQykEbdPGFEZAwwVt?= =?us-ascii?Q?pT9Y4vh1BHDxGSPJBfE36KzE+APX1sSvY4cB70n/bm4pkO6k39ByFrVFN8pR?= =?us-ascii?Q?TfEvgxpN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TmJS//HBZm5mBNVO?= =?us-ascii?Q?x4beDSzdMnB0Iw3ydBsYI7qDl5J6LgaSrDTzEGEQs6ESWdr5l4UtyjV5jR+f?= =?us-ascii?Q?++kMQqMOg7kYunLUWOd+QfxS?= 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: 880b1258-c04a-4ab6-8936-08d9315f58f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2021 07:13:03.2016 (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: JMAOT1gDZfoJXscoWKSi0N9T3XuG7gO48vnrlLlFGIK6TNCS4AE//ieiyTM7HFP56VTEzRrFr/j2IIIj3JT9zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4813 X-Proofpoint-ORIG-GUID: axLzKvAE9XJWtSbCOLppKAWfM8AhOk0O X-Proofpoint-GUID: axLzKvAE9XJWtSbCOLppKAWfM8AhOk0O X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-17_02:2021-06-15, 2021-06-17 signatures=0 Subject: Re: [dpdk-dev] [PATCH 05/20] crypto/cnxk: add queue pair ops 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 Akhil, Please see inline. Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Wednesday, June 16, 2021 4:36 PM > To: Anoob Joseph ; Thomas Monjalon > > Cc: Ankur Dwivedi ; Jerin Jacob Kollanukkaran > ; Tejasree Kondoj ; > dev@dpdk.org; Anoob Joseph ; Archana Muniganti > > Subject: RE: [PATCH 05/20] crypto/cnxk: add queue pair ops >=20 > > diff --git a/drivers/crypto/cnxk/cnxk_cpt_ops_helper.c > > b/drivers/crypto/cnxk/cnxk_cpt_ops_helper.c > > new file mode 100644 > > index 0000000..103195e > > --- /dev/null > > +++ b/drivers/crypto/cnxk/cnxk_cpt_ops_helper.c > > @@ -0,0 +1,28 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2021 Marvell. > > + */ > > + > > +#include > > + > > +#include "hw/cpt.h" > > +#include "roc_api.h" > > + > > +#include "cnxk_cpt_ops_helper.h" > > + > > +int > > +cnxk_cpt_ops_helper_get_mlen(void) > > +{ > > + uint32_t len; > > + > > + /* For MAC */ > > + len =3D 2 * sizeof(uint64_t); > > + len +=3D ROC_SE_MAX_MAC_LEN * sizeof(uint8_t); > > + > > + len +=3D CPT_OFFSET_CONTROL_BYTES + CPT_MAX_IV_LEN; > > + len +=3D RTE_ALIGN_CEIL((ROC_SE_SG_LIST_HDR_SIZE + > > + > > (RTE_ALIGN_CEIL(ROC_SE_MAX_SG_IN_OUT_CNT, 4) >> > > + 2) * SG_ENTRY_SIZE), > > + 8); > > + > > + return len; > > +} > > diff --git a/drivers/crypto/cnxk/cnxk_cpt_ops_helper.h > > b/drivers/crypto/cnxk/cnxk_cpt_ops_helper.h > > new file mode 100644 > > index 0000000..23c6fed > > --- /dev/null > > +++ b/drivers/crypto/cnxk/cnxk_cpt_ops_helper.h > > @@ -0,0 +1,20 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(C) 2021 Marvell. > > + */ > > + > > +#ifndef _CNXK_CPT_OPS_HELPER_H_ > > +#define _CNXK_CPT_OPS_HELPER_H_ > > + > > +#define CPT_MAX_IV_LEN 16 > > +#define CPT_OFFSET_CONTROL_BYTES 8 > > +#define SG_ENTRY_SIZE sizeof(struct roc_se_sglist_comp) > > + > > +/* > > + * Get size of contiguous meta buffer to be allocated > > + * > > + * @return > > + * - length > > + */ > > +int cnxk_cpt_ops_helper_get_mlen(void); > > + > > +#endif /* _CNXK_CPT_OPS_HELPER_H_ */ >=20 > Why do we need these separate helper files. It has only one function and = few > Macros which can be easily moved to > drivers/crypto/cnxk/cnxk_cryptodev_ops.c/.h >=20 [Anoob] Yes. This can be removed. Will move to cnxk_cryptodev_ops.c as the = macros are not used elsewhere.=20