From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50077.outbound.protection.outlook.com [40.107.5.77]) by dpdk.org (Postfix) with ESMTP id 32721CFBA for ; Fri, 27 Apr 2018 19:05:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=paHHJOfmENUAfwxyuY1qCQexxClUMIMPZuv6xT7i8FI=; b=WgdPQ1iLoeh1uSyOjdnwmi5MktkQuk+hcN5jiMddqiEkzu05JpzBm67AAFYUgK6Wqo3tJcD0B2z5L28ZPSY8aqKioNz/tGqmTaLeg0JY+qvVnZnP3dBZXbqr1aUelZ5UHsr/po2rj0lG4BNbSbbvW5ngiMoUE5RGBW5ngNBSV1U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.13; Fri, 27 Apr 2018 17:05:09 +0000 From: Shreyansh Jain To: thomas@monjalon.net, dev@dpdk.org Cc: hemant.agrawal@nxp.com, akhil.goyal@nxp.com, anatoly.burakov@intel.com, Shreyansh Jain Date: Fri, 27 Apr 2018 22:50:56 +0530 Message-Id: <20180427172058.26850-2-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180427172058.26850-1-shreyansh.jain@nxp.com> References: <20180427162556.22781-1-shreyansh.jain@nxp.com> <20180427172058.26850-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: TYAPR04CA0016.apcprd04.prod.outlook.com (2603:1096:404:15::28) To AM5PR0402MB2770.eurprd04.prod.outlook.com (2603:10a6:203:98::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0402MB2770; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 3:44gK2toIxLy0E+qeNNvmkOehUBgFwvgLDewRr6yehxqPrSmnQCO+HTgv27cE3VqY4THDnu+smI72454uX8OWGDx323ZyhSUmB4FK3LRgjwlmtiaTyP8JU8jvMlNlKx3CpBa2zd4edgvA9g9kMc+kKfljQhgft2aLIgFeXDhfjwAwWUsDrba8fyDML7tg8gxcR9QyOzjVDIgGCiJGGm3bWRHqWM6zZ7kgf+kokMW0gvoQfkiqEWRrdF1MsAfdzFzi; 25:dCs6FZTZOsLHDy/E06PL26BUnu44JNIJBFGyW6RkNsaO11h42MyxR5kMSWim49+epgR6Om/FuQlqF1BsuU/daaNG+NU9VA37aWwhHo+B/HwCO7VuBGe/W2w/MmdMoKTDJzd4V4kL+K+gqkKLqtSHi1SnHnvJanHvJI7NvAzF0j6Aqj6nMe6bmLii/e6SPiHGSzvqxpoNW4XSW4lkXUowZyNeuW7XQVYnXx8wDN9mik4lY+H0cwBKb+xQCVTQN+zHQAdC4SNoP7YP4y5L1nC88DWT1hmA08rPCTrA5Z5F21y8n9NuO2iIvnRVP5tz5wOvHjLr7oSsl0jjq4AC8p9qUg==; 31:fvxU7xQHBBpOEB5Gv8iRgYkvuL2iCCBIB6KLeje6C/MCQUscHtyTR5sy4Qbjk5Yu3UjErEtC0aPtIc5DC5kW7ZbI+3KhRmlxFdjcor4/oVUVchuXjpPhyiRrZwxK96YcXy9vv959dzCMoN/XaOMDeT90hzcZuNzonBkG9pyYZ89z4b4Xsb5sBeJywqiGl7GzIdBgCFZX40KfipTPhqRd/qnPRtNNDgsTVi1pALbE9xQ= X-MS-TrafficTypeDiagnostic: AM5PR0402MB2770: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 20:uiZig+KGkD62+g79yIoo33wxj/xIqUbpwVg9LjGMek9uJ5+/DkkRBRFq7W4KBOGxeXsmekb70J1O4zeYmBVzQYIlG+e0ddEEU5T47M4/f+A46aTff93ZZzPhBLV7pGHc69aKIgEXu9tkeeOAbeV33DVBInBf3rbp4HpGpPjFEtTyI5xR7Gz3zUkLJwTlMn5BO5sCGbr6pM/Ul4EmqWfS81yNj+UWuzNTLOJXnevn4d76vcpn0YfkExG6sN0iY1oy0mHbA24mHhM+BGn3fxNp1rJVVE9GGRdwZn2NE2qydAmYrMkG0BygtHGQa+HfviusIBJFmlVFYdrDYGcUTe3cXFDkNeeX/srC+IEuhpQI9jR1flGn16dxKwPrTyc2QzE3ZKTwqmwQAqq5DFfiuhc20vUsaQ1znwm+s+Z2plZeVPBDc8FodC5VDIvkmHA6GD07n2atAeXSCYHWHu+AqLbs4RRGVmcNvrJsFB+c2MTvIl+qlWEXqMym1XaMtE0HYz8l; 4:tj2nyoxbasTLMdaUcm/BVq0nz5Mx7EcGZEyv3h89I5jX52IQk5oeX7Z3P0o+mdLKLSAJmrRk3pblAuR1mioNsI4QKtZLlb3cJ6WAAURB4KY2r5AZrFObOm2xHaBf8KG0sum2BzXAGBmYQQKq5ODbH6Qyyn+zHgIuw3MaRVlyWjvazym4vWzwpjcr7WBFpvxtxNivHn08HJGTUCnUb3AY/07dde3rPuDxS84deFClvQurjPV6st4p7fyztYAY091P8LK/NR9QL/QgcVGyQFlBh5xJbxIled5Bqm/OdAiBvMOVQyI8B3Hzj0q00SAZeObl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231232)(944501410)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:AM5PR0402MB2770; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0402MB2770; X-Forefront-PRVS: 0655F9F006 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(376002)(366004)(346002)(189003)(199004)(2906002)(66066001)(106356001)(186003)(6512007)(8936002)(4326008)(81156014)(81166006)(25786009)(53936002)(50226002)(8676002)(48376002)(47776003)(6486002)(105586002)(50466002)(36756003)(486006)(6116002)(6666003)(68736007)(316002)(446003)(86362001)(956004)(11346002)(97736004)(55236004)(5660300001)(1076002)(26005)(3846002)(476003)(478600001)(51416003)(305945005)(7736002)(16526019)(76176011)(44832011)(16586007)(6506007)(386003)(2616005)(52116002)(5009440100003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0402MB2770; H:Tophie.ap.freescale.net; 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-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0402MB2770; 23:I01Wnx+mlaHM8uZgf1LwmlO+quMSuq6gvJFF5Ai?= =?us-ascii?Q?X/bDjBaVaA8RQ6xZDDoY5j1DaYpaj/U50VxQdgqu6rUfHmHnMj9bogISkj+S?= =?us-ascii?Q?qGQ1n+s4s0sd+ZOjA9RMZpxYeJPcJDv9A237j4b6/P1oshIAw7VIS3ahypZj?= =?us-ascii?Q?KoGDRESUlCBlCE1WaRP7enEE0J5olrAMePpKFtxqrlo6Qz/T5BNycbRY/qx+?= =?us-ascii?Q?uoJ+NxzXzxIfcaCS00197ILuWVK+V4emd59LNukrc8AOgIdUuG+huaL42rpt?= =?us-ascii?Q?4ml+RRNv/ZXcrYcTE9cEwdHcIGRgThx54P3gc+oH69RNQmhy3YaZFi4bxiqV?= =?us-ascii?Q?LO+Mh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amDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2770; 7:91HNFKEB/yyXALrG2H88F8bivW0g5beDSTmQagnOHz3k2YJoVHQkHbs57r7vwkp3/aLZCXvJPeQQTOofZRo9teXgeQdczxOfC5BTK/4hN2z9oAkSJq1XHwEsnf5256qpfi3AfOA+CH3RCQpstD4b3VWXZ4bd3yPzDrRSErNmyO7/PXU6DtrkDu8SPRT3OPPNRCo5uXSx5ZRzjYd0rwI/x7UBr575hCEJedOST9uiedhp2KsTaxDg5el8/CXA/8F2 X-MS-Office365-Filtering-Correlation-Id: f59ab7e7-0bc0-498e-5a8e-08d5ac610a22 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2018 17:05:09.0943 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f59ab7e7-0bc0-498e-5a8e-08d5ac610a22 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2770 Subject: [dpdk-dev] [PATCH v2 1/3] crypto/dpaa_sec: remove ctx based offset for PA-VA conversion 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: , X-List-Received-Date: Fri, 27 Apr 2018 17:05:14 -0000 Crypto requires physical to virtual address conversion for descriptors. Prior to memory hotplugging this was based on memseg iteration assuming memsegs are all physical contiguous and using cached start address fast calculations can be done. This assumption now stands invalid with memory hotplugging support. In preparation for supporting hotplugging change to memory, this patchset removes the optimized pool context stored physical address offset based PA-VA conversion. This adversely affects the performance as complete memsegs now need to be parsed, but a rework containing necessary optimization would be posted over this. Signed-off-by: Shreyansh Jain --- drivers/crypto/dpaa_sec/dpaa_sec.c | 49 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index e456fd542..06f7e4373 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -103,13 +103,6 @@ dpaa_mem_vtop(void *vaddr) return (size_t)NULL; } -/* virtual address conversin when mempool support is available for ctx */ -static inline phys_addr_t -dpaa_mem_vtop_ctx(struct dpaa_sec_op_ctx *ctx, void *vaddr) -{ - return (size_t)vaddr - ctx->vtop_offset; -} - static inline void * dpaa_mem_ptov(rte_iova_t paddr) { @@ -630,7 +623,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) in_sg->extension = 1; in_sg->final = 1; in_sg->length = sym->auth.data.length; - qm_sg_entry_set64(in_sg, dpaa_mem_vtop_ctx(ctx, &cf->sg[2])); + qm_sg_entry_set64(in_sg, dpaa_mem_vtop(&cf->sg[2])); /* 1st seg */ sg = in_sg + 1; @@ -654,7 +647,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) sg++; rte_memcpy(old_digest, sym->auth.digest.data, ses->digest_length); - start_addr = dpaa_mem_vtop_ctx(ctx, old_digest); + start_addr = dpaa_mem_vtop(old_digest); qm_sg_entry_set64(sg, start_addr); sg->length = ses->digest_length; in_sg->length += ses->digest_length; @@ -708,7 +701,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses) if (is_decode(ses)) { /* need to extend the input to a compound frame */ sg->extension = 1; - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, &cf->sg[2])); + qm_sg_entry_set64(sg, dpaa_mem_vtop(&cf->sg[2])); sg->length = sym->auth.data.length + ses->digest_length; sg->final = 1; cpu_to_hw_sg(sg); @@ -722,7 +715,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses) cpu_to_hw_sg(sg); /* let's check digest by hw */ - start_addr = dpaa_mem_vtop_ctx(ctx, old_digest); + start_addr = dpaa_mem_vtop(old_digest); sg++; qm_sg_entry_set64(sg, start_addr); sg->length = ses->digest_length; @@ -775,7 +768,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) out_sg = &cf->sg[0]; out_sg->extension = 1; out_sg->length = sym->cipher.data.length; - qm_sg_entry_set64(out_sg, dpaa_mem_vtop_ctx(ctx, &cf->sg[2])); + qm_sg_entry_set64(out_sg, dpaa_mem_vtop(&cf->sg[2])); cpu_to_hw_sg(out_sg); /* 1st seg */ @@ -804,7 +797,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) in_sg->length = sym->cipher.data.length + ses->iv.length; sg++; - qm_sg_entry_set64(in_sg, dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg)); cpu_to_hw_sg(in_sg); /* IV */ @@ -871,7 +864,7 @@ build_cipher_only(struct rte_crypto_op *op, dpaa_sec_session *ses) sg->extension = 1; sg->final = 1; sg->length = sym->cipher.data.length + ses->iv.length; - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, &cf->sg[2])); + qm_sg_entry_set64(sg, dpaa_mem_vtop(&cf->sg[2])); cpu_to_hw_sg(sg); sg = &cf->sg[2]; @@ -937,7 +930,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) /* output sg entries */ sg = &cf->sg[2]; - qm_sg_entry_set64(out_sg, dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(out_sg, dpaa_mem_vtop(sg)); cpu_to_hw_sg(out_sg); /* 1st seg */ @@ -981,7 +974,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) /* input sg entries */ sg++; - qm_sg_entry_set64(in_sg, dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg)); cpu_to_hw_sg(in_sg); /* 1st seg IV */ @@ -1018,7 +1011,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) sg++; memcpy(ctx->digest, sym->aead.digest.data, ses->digest_length); - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, ctx->digest)); + qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest)); sg->length = ses->digest_length; } sg->final = 1; @@ -1056,7 +1049,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses) /* input */ rte_prefetch0(cf->sg); sg = &cf->sg[2]; - qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop(sg)); if (is_encode(ses)) { qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr)); sg->length = ses->iv.length; @@ -1101,7 +1094,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses) ses->digest_length); sg++; - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, ctx->digest)); + qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest)); sg->length = ses->digest_length; length += sg->length; sg->final = 1; @@ -1115,7 +1108,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses) /* output */ sg++; - qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop(sg)); qm_sg_entry_set64(sg, dst_start_addr + sym->aead.data.offset - ses->auth_only_len); sg->length = sym->aead.data.length + ses->auth_only_len; @@ -1184,7 +1177,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) /* output sg entries */ sg = &cf->sg[2]; - qm_sg_entry_set64(out_sg, dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(out_sg, dpaa_mem_vtop(sg)); cpu_to_hw_sg(out_sg); /* 1st seg */ @@ -1226,7 +1219,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) /* input sg entries */ sg++; - qm_sg_entry_set64(in_sg, dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(in_sg, dpaa_mem_vtop(sg)); cpu_to_hw_sg(in_sg); /* 1st seg IV */ @@ -1256,7 +1249,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) sg++; memcpy(ctx->digest, sym->auth.digest.data, ses->digest_length); - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, ctx->digest)); + qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest)); sg->length = ses->digest_length; } sg->final = 1; @@ -1293,7 +1286,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses) /* input */ rte_prefetch0(cf->sg); sg = &cf->sg[2]; - qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(&cf->sg[1], dpaa_mem_vtop(sg)); if (is_encode(ses)) { qm_sg_entry_set64(sg, dpaa_mem_vtop(IV_ptr)); sg->length = ses->iv.length; @@ -1323,7 +1316,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses) ses->digest_length); sg++; - qm_sg_entry_set64(sg, dpaa_mem_vtop_ctx(ctx, ctx->digest)); + qm_sg_entry_set64(sg, dpaa_mem_vtop(ctx->digest)); sg->length = ses->digest_length; length += sg->length; sg->final = 1; @@ -1337,7 +1330,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses) /* output */ sg++; - qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop_ctx(ctx, sg)); + qm_sg_entry_set64(&cf->sg[0], dpaa_mem_vtop(sg)); qm_sg_entry_set64(sg, dst_start_addr + sym->cipher.data.offset); sg->length = sym->cipher.data.length; length = sg->length; @@ -1412,7 +1405,6 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, struct rte_crypto_op *op; struct dpaa_sec_job *cf; dpaa_sec_session *ses; - struct dpaa_sec_op_ctx *ctx; uint32_t auth_only_len; struct qman_fq *inq[DPAA_SEC_BURST]; @@ -1497,8 +1489,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, inq[loop] = ses->inq; fd->opaque_addr = 0; fd->cmd = 0; - ctx = container_of(cf, struct dpaa_sec_op_ctx, job); - qm_fd_addr_set64(fd, dpaa_mem_vtop_ctx(ctx, cf->sg)); + qm_fd_addr_set64(fd, dpaa_mem_vtop(cf->sg)); fd->_format1 = qm_fd_compound; fd->length29 = 2 * sizeof(struct qm_sg_entry); /* Auth_only_len is set as 0 in descriptor and it is -- 2.14.1