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 7704CA0C49; Wed, 16 Jun 2021 13:05:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 068744067A; Wed, 16 Jun 2021 13:05:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8B8DB40140 for ; Wed, 16 Jun 2021 13:05:55 +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 15GB0UeV004948; Wed, 16 Jun 2021 04:05:54 -0700 Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam08lp2044.outbound.protection.outlook.com [104.47.74.44]) by mx0b-0016f401.pphosted.com with ESMTP id 396tagx119-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jun 2021 04:05:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDP6Ew395t9dOa05VmYDkJBHw+w2LwzU7ogD2UQ3BUE+VP9tTLDiPuSwloFgcq7oGwbQpjKqZnWX4Land8NJbsxyKWFcyTMoPA6abeeGrGRtUGeAj2hE2tpl95BRq5Pq2zwy8b3pkmv2+uVXeGkKd27vukVVS2U1Vr4hiTX5s4ZNs806/AgBHBbkzKKUjXGMuXt1oVe2aoxjiTj7LSNN1jwQS5kJQDSRum7Zi/f0AAWZdxFA17Fy8uw6oaAtC/0dmLZL11QKKyenA9I97qXPaEAhyddZn5ncM8s82qqN4w7xNwPaiXFQjwhO3aqOedfWCJJ4NfecXaZgFOsCibXKnQ== 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=/eRA8iCWYiCUsvqMsyYHWHOB97DUygZSVc9Pk+KAMLc=; b=dHHU4an9DCo8YpjCkk1SsxFQxd9qoVCLNG/VoKWoeG1N3Q8VruqMQgmv5iLswtGq+SneGrOBKj+91C/2822zpLr/tp8nPsgfypNedvQimWIzptc7t5ba4RVKc0GjfO3x4658+LN4eo+vtgnFAGeVO+q82Cv2HzT3gajCX1e+BB4EL7JM8ebnkkJfCj/JFp1BBjyQfI5+32KzcHbgyaICNeO7/3RlJg+RDcp7FqxQvz2NuoySavz1xIhIi9CEM94bH8gf5U0WCmlTBkF7TplirxGNGsVdZfoRQUqtxN1M3PAzFB9pmZZvxxk6ugn3H6tLyC1XE2+6ljBAfBvtGmZ8cw== 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=/eRA8iCWYiCUsvqMsyYHWHOB97DUygZSVc9Pk+KAMLc=; b=MhP2EG74Aq0FtCLvL3IAS2Z5uQGfBilitdDbegw3SA2MTjLq+JDrqYSpE9pYkPns5dLWOJC1rmnJiSCQOCVtkyBFMrhh4BEOPT3qwcK14hnFxEmexxSgesx9n+mVvp9Tc8GE4DKXHW2QZT2DW9YQwmHXFjDJMx2G6n8MzEdl1kY= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO6PR18MB4465.namprd18.prod.outlook.com (2603:10b6:303:13b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Wed, 16 Jun 2021 11:05:50 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::7d67:6d21:1714:c816]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::7d67:6d21:1714:c816%2]) with mapi id 15.20.4219.026; Wed, 16 Jun 2021 11:05:50 +0000 From: Akhil Goyal To: Anoob Joseph , Thomas Monjalon CC: Ankur Dwivedi , Jerin Jacob Kollanukkaran , Tejasree Kondoj , "dev@dpdk.org" , Anoob Joseph , Archana Muniganti Thread-Topic: [PATCH 05/20] crypto/cnxk: add queue pair ops Thread-Index: AQHXV86Rqr6iYNR34ES95rwFcU6kCKsWjuUg Date: Wed, 16 Jun 2021 11:05:49 +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: <1622652221-22732-6-git-send-email-anoobj@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [122.162.4.46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e919c023-e4e0-4406-c67e-08d930b6b359 x-ms-traffictypediagnostic: CO6PR18MB4465: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:655; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H+5np0eZq2Ve4M7HJiJ3hI0QkitaAl17tv+XCqdNdlRAfG2TjxeQ8CBJtNWfxikZ2UfGhSbQ92+eLlhR2trO7f8e60rNFZpV1oU3q6fY/CXUh6kivNYgkSmB/OfTWjqJYSrOE5InEJIrWiy36m3uHxdHkH3v5gHGzrcbsjRv7iCYQvk9WIkPQfwVHeLc7tcckVr1CXHP9YsSf6PhsVzqwwqyWlptgxtCt359IH+oZn6ecoTPLduMWhQTb2uE7nYVAhtePq6C/2ZdBHPUUQkBQp2r4ZH/uXKEA1OpmQcz7ClSSRk3rllpTqXbqhcm+Ex2BFmeW+aSxs2AvzAh9q+LW/NofQ/cUprjg88ymN3IGtyXn5zUOKVs/VtQM3awXPAkcCT4LMD3EwqBwgzvMspsekd2+Z5akhq6fxNMKANcTJ+7v1eO7/hjwilALnWG/vxSheZmQqASmiVFdoGZbqd48z9Hm6z6xJfcEVkdT5LD+fkPgg19NROBPPaw0j+hkxRtID749fKULtI7FqUJ3kanU7iPtXThWG7HRgZDAu4niXxs/SXYcUU38vMrPk/krnj1woZ7aLif+YuRbwV2HSzkMSz3ydBDZmlq94XPZX2jaqQ= 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)(136003)(39860400002)(346002)(376002)(396003)(366004)(2906002)(5660300002)(4326008)(9686003)(26005)(107886003)(6506007)(71200400001)(55016002)(122000001)(38100700002)(186003)(33656002)(86362001)(52536014)(76116006)(66946007)(110136005)(66476007)(8676002)(64756008)(478600001)(66446008)(66556008)(316002)(7696005)(8936002)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2tnlf77sC5IlA3WKjE5Gg9wos0K5qqR7PeQ65px5+UkwIb6mfzLXChksD9Zx?= =?us-ascii?Q?D0gVNTYAgDIEi1qDT6PqBZy+80cnyWA2oBM4n8ngpKleR5wzElqNm44QPM8w?= =?us-ascii?Q?UOzRUE41I4zIK3KwWAiksteVxPZbo6/DunFZBA8qzEgQyfZdsZVOL4F5Bjmz?= =?us-ascii?Q?Ff6Ovnbe0H6THM8HSvW25YWfSFgDF6TEx6TgwraPauUYnQmbr2iHWfIsj7Ae?= =?us-ascii?Q?SBmmT6cCkK6W8bxo5haoKIyJtfdNmbQOwg4FvVeIWJUvVK2wYfMgw5KmVrO0?= =?us-ascii?Q?c+T24s8DYdBiXp67UG0xLkSs1egU1qv33fFsdhcPGCrFq5xnkcjy1VLHWTy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ovfVhocqWpV/Cg/kSNnu6swMAJO4c8nx?= =?us-ascii?Q?e5VPxW155frM6REJmmXkRW1wO+eXOm6sLm4ogj4Wh72N8phxsUJszbqtnyxA?= =?us-ascii?Q?c4Y=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: e919c023-e4e0-4406-c67e-08d930b6b359 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2021 11:05:49.9368 (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: a372Ip+IqViOI8iWIKDCxgYTnOmX3Uf2kqndiF7wz9ULsi38isNe+ZvGANyORu7fPZeDouanXZBW8sHfd/6Ndw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB4465 X-Proofpoint-ORIG-GUID: eFJI1yKbhzzAqelsXimf8wj2tR5k9Wpn X-Proofpoint-GUID: eFJI1yKbhzzAqelsXimf8wj2tR5k9Wpn X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-16_07:2021-06-15, 2021-06-16 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" > 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_ */ Why do we need these separate helper files. It has only one function and fe= w Macros which can be easily moved to drivers/crypto/cnxk/cnxk_cryptodev_ops.= c/.h