From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 251EEA2EDB for ; Tue, 1 Oct 2019 15:05:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B6D71BEC1; Tue, 1 Oct 2019 15:04:49 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150071.outbound.protection.outlook.com [40.107.15.71]) by dpdk.org (Postfix) with ESMTP id 884FC1BEB5 for ; Tue, 1 Oct 2019 15:04:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S3FDcswGC7ic4wy+sVRHKezRCLet+iTfaj42nE1d7V9pcuHY7dd08oiN5kaWkBlpKRaxo9jcI34aeDKJo1+IR0BIcGohYfe+SoXrympkuIxQlrg829Vpu+fB2uNN4kZn6rznDKwjjUnyBqFWmO/Hy6g3zmTwrrgOL7+v2EPuX/NUJsPKbP4/5PMVF+AOS8kyPFgPDpLJ1/R4J8H/YLB4PA0GiiuoW8uxJ6pIZiRWBwP4qijGXq1wpqHy6Iqo/uBYX+gBdbuFx8K0RuJCeEhniCnyfbu/iQbxsdgYr2dKS/FngOTv1dVEv0d/kHVWRlKbvbHbLiOM57hJQLqugJ7Akg== 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=7x61WQDLtbA3x6aLvq3V+QMCKkQvnGv4PqVy1rrYf/o=; b=GUbN4nblU1BjRT8K4W3sArY/BC3YGhB9Cbqhnz+MHyRUTbka8+FpgnWJkmyrXilOBiYOPmVP/AhZnEt32rSUjK1OBJGLHeKJ5/JY2CtHqv6kk+v8Mxsqi79ijZLTdCsknvmslPaG684saf1YHOdEI06Ztsot1w09GBVsIMq0WzWGz3TGqFDwLOpdiqNZLLLe8IKMpFMpy16EnllBUpe1vQMEZQPrua2kWsK0EtBeofAmGr0mmoLPXRvCDrO+HWmLKin3Et88QGZ3Hx5a5X4ZfdnTSx0Qs1+LELB9/pZ0+HgH42ZRk9fJropjY2ZrPcn7un647VkgVdgnkrDXI8nZFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7x61WQDLtbA3x6aLvq3V+QMCKkQvnGv4PqVy1rrYf/o=; b=Y9ebUfAyLSdqngziv5IWBwzrZCUlSIFxPaE4LjSXVX0L2tUpfpWDnl981y2knk7tqFPgViK0erTq7w7w7H0eEuCOp61Nd0EqHvjEeSjh+4dSL7DBYPOLsrIyigR9D8PwW/LPr6RZ2PPtEzVfFoGwGzVD1UemXxRHmvCUNu+iRjs= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (10.255.118.11) by VE1PR04MB6432.eurprd04.prod.outlook.com (20.179.234.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.15; Tue, 1 Oct 2019 13:04:46 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::c045:5df2:ba1f:c3ee]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::c045:5df2:ba1f:c3ee%5]) with mapi id 15.20.2305.022; Tue, 1 Oct 2019 13:04:46 +0000 From: Akhil Goyal To: Anoob Joseph , Pablo de Lara CC: Kanaka Durga Kotamarthy , Jerin Jacob , Narayana Prasad , Fiona Trahe , Shally Verma , Sunila Sahu , "dev@dpdk.org" Thread-Topic: [PATCH 4/8] common/cpt: add helper functions for asymmetric crypto Thread-Index: AQHVZxKWUF2dw9w1oke5+XQrci2etadF4m0g Date: Tue, 1 Oct 2019 13:04:46 +0000 Message-ID: References: <1568035687-25492-1-git-send-email-anoobj@marvell.com> <1568035687-25492-5-git-send-email-anoobj@marvell.com> In-Reply-To: <1568035687-25492-5-git-send-email-anoobj@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a3c463fa-9d1a-49ee-2c9e-08d7466fef54 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: VE1PR04MB6432: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 0177904E6B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(39860400002)(366004)(376002)(346002)(189003)(199004)(64756008)(5660300002)(11346002)(66556008)(14454004)(74316002)(8936002)(76116006)(305945005)(66476007)(66946007)(33656002)(229853002)(7696005)(66066001)(54906003)(4326008)(25786009)(6436002)(110136005)(99286004)(9686003)(478600001)(256004)(186003)(55016002)(6246003)(14444005)(102836004)(76176011)(52536014)(446003)(6506007)(71200400001)(66446008)(71190400001)(44832011)(81166006)(316002)(81156014)(6116002)(8676002)(26005)(476003)(86362001)(486006)(2906002)(7736002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6432; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ncsxQR+tWeoZ6uL10nmba7nLb4ZGtwIZvl8iZk5aLKkubDqS1kQHUpDdUp7HgjTaR68XC7udpTOMqwJQFWENmOwAxkTla+2YknEB85uxyOZQrnyu0l01QLlqLibOQv3bh70FIpi+wPSxYsrAgu0c2lSBrxCg3TrpbBRMRzAuOqFMk8ht48wldhTv1u+vor3hN0kbBPYu+mObRyK8OZrAibnbL/C5lnzN8BN5HTvXXFGVmweNAlChHHFqyowLGLE4Ga5vfe6KwhfaEYBtnZUngOsUt/nG+XdBMY4o2rC7u8U3vN9EDJxJvfn58dAXWbObG1RUgfYkLSHn2r0YIXODUxAuMvUjESV+57f2PEgB0lQsL3vh83YKaMc2yel34WG2wH4n846IqF+bFacSeJQYOKB/dwhmUGq1RZTMy0+hO9M= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3c463fa-9d1a-49ee-2c9e-08d7466fef54 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2019 13:04:46.4551 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: n7ZbRkklPY7UDW3kJ6r1+H0ZEHN87GgREGGDi6Z06Pbtro66lOiUyaPfe4vYMChEDZ1fO8UdvGXCzWPO0PYs0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6432 Subject: Re: [dpdk-dev] [PATCH 4/8] common/cpt: add helper functions for asymmetric crypto X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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, >=20 > From: Kanaka Durga Kotamarthy >=20 > Add helper functions to get meta len for asymmetric operations >=20 > Signed-off-by: Anoob Joseph > Signed-off-by: Kanaka Durga Kotamarthy > Signed-off-by: Sunila Sahu > --- > diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c > b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c > index ad64bf4..0543494 100644 > --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c > +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c > @@ -412,24 +412,34 @@ otx_cpt_metabuf_mempool_create(const struct > rte_cryptodev *dev, > int nb_elements) > { > char mempool_name[RTE_MEMPOOL_NAMESIZE]; > - int sg_mlen, lb_mlen, max_mlen, ret; > struct cpt_qp_meta_info *meta_info; > struct rte_mempool *pool; > + int max_mlen =3D 0; > + int sg_mlen =3D 0; > + int lb_mlen =3D 0; > + int ret; >=20 > - /* Get meta len for scatter gather mode */ > - sg_mlen =3D cpt_pmd_ops_helper_get_mlen_sg_mode(); > + if (dev->feature_flags & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO) { >=20 > - /* Extra 32B saved for future considerations */ > - sg_mlen +=3D 4 * sizeof(uint64_t); > + /* Get meta len for scatter gather mode */ > + sg_mlen =3D cpt_pmd_ops_helper_get_mlen_sg_mode(); >=20 > - /* Get meta len for linear buffer (direct) mode */ > - lb_mlen =3D cpt_pmd_ops_helper_get_mlen_direct_mode(); > + /* Extra 32B saved for future considerations */ > + sg_mlen +=3D 4 * sizeof(uint64_t); >=20 > - /* Extra 32B saved for future considerations */ > - lb_mlen +=3D 4 * sizeof(uint64_t); > + /* Get meta len for linear buffer (direct) mode */ > + lb_mlen =3D cpt_pmd_ops_helper_get_mlen_direct_mode(); >=20 > - /* Check max requirement for meta buffer */ > - max_mlen =3D RTE_MAX(lb_mlen, sg_mlen); > + /* Extra 32B saved for future considerations */ > + lb_mlen +=3D 4 * sizeof(uint64_t); > + > + /* Check max requirement for meta buffer */ > + max_mlen =3D RTE_MAX(lb_mlen, sg_mlen); > + } else if (dev->feature_flags & > RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO) { > + > + /* Get meta len for asymmetric operations */ > + max_mlen =3D cpt_pmd_ops_helper_asym_get_mlen(); > + } I am not sure how this is working. In your octeontx device, you will have both RTE_CRYPTODEV_FF_ASYMMETRIC_CRY= PTO and RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO will be set together. So it will not = go in else in any case. Please check in rest of the PMD also if this assumption is made somewhere e= lse also. >=20 > /* Allocate mempool */ >=20 > -- > 2.7.4