From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0066.outbound.protection.outlook.com [104.47.1.66]) by dpdk.org (Postfix) with ESMTP id F318EAAC0 for ; Fri, 27 Apr 2018 18:10:06 +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=3lDyEBwhCoK2AKBktkcUrouGBdjVFw0a+nZEwdejVGk=; b=pn3xbj4A4LgHMMgAEGrlbPqx8BesU7+JcK0nKCT/4iRiSp7GJxyPLQ/wwlAqOUXf7bqU5yGFfLiRyjVH58SnAswQSh54dNwUPGLrqWbg+S6F12LuFIEaJcX6U41ePCKGUJzSO9wGshVqAwu017tz3zFzChqAbr8qnutXBEnkr/8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by DB6PR0402MB2774.eurprd04.prod.outlook.com (2603:10a6:4:96::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Fri, 27 Apr 2018 16:10:02 +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 21:55:54 +0530 Message-Id: <20180427162556.22781-2-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180427162556.22781-1-shreyansh.jain@nxp.com> References: <20180427162556.22781-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: OSAPR01CA0035.jpnprd01.prod.outlook.com (2603:1096:603:14::23) To DB6PR0402MB2774.eurprd04.prod.outlook.com (2603:10a6:4:96::11) 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:DB6PR0402MB2774; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0402MB2774; 3:CSyj+YejlU+bvEETPIHqHxw3IDK6a550NIw59myiNUK8jo5RMIcqYCQdtPcijiyBMZITX9yXysU18p91PjiIaaIdgzpzPEXnbdqZ2IumHh703nABeEhJmz4y6Cf/IAXx2JkCMXbGOMBC2o+LyUtih0YlBcdz2rDLWE76TB5PsNSKq4vZZwimD7upezlJ+g1z30FaVSTzWn8/zA2aJwFthW21JGYCfLQsDdsc6KVsqY3gGsdiaVmeogSwg2jx6i0D; 25:xidfwO+IdZE5VSBlkHORQO7YKZ9pmqOwFCNwjqnszQb4dmmucUvE2uR4UOnY38KbJBzeyH6hfn7RJdrYRvombV4XFx7mDgFuSGe2zb8d0+fx9pZUHGuSEfgf7QaCqqDJzhsxCFseGvY121cwzeUKJl7BDArXTHRN2XquvfCCpHIfquh1P3tWhYw2BpYOv7/X1Oxc2p+MhzmiLLoOsxAE1bdVS6W+DeFfj5tnPzAJZFF3iZvhg8OfVmeIUioEv1Q5IQJAcwxjrLUX2JXuLbSNWnyr16REyFkw81em0loPI0nEp+Agw6/sAB2BeVEq5sfpVPFvQ1Gn1/7piBHi+LaRBg==; 31:AuCD1AIHZtmQ4ad0bFMV/0Y2JwmKNMoF6+8NCxGyPx3lnHtQ3K2tCo7J8vgS2186DoE9hs2OrLYa3kCavGVo4/sLBfT1uQ+gzECJq1bStkQZaPch+jW5Juq1XQ0G8VyhK5tuK8HPxO2S3/PKRem4F2nkngRNqRXwr5Bg7sjlSypKwOle+gyNSxyy/hSOUpD9z3bXdDTi2CP+rFW2AKccX3eTcM6KlcSIXTMdAuP9Kyc= X-MS-TrafficTypeDiagnostic: DB6PR0402MB2774: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0402MB2774; 20:qwriDrAn98tcklwXnTMuJtrII8cpwUa1DoGA9nX7F7XX1x0sl4MvXKLuku8g9GFj0Yy4Aqr7j6y/3eQ+zIsPUAFD2s/AB3n6V9JrfWLYfglo4r/KerRs1XQkRJzUXyWkjj58mviP90pe7vcpMTxiTO3PrcXl5BnBjyk8ZNYGZj1oYlSjViJ8ivkaSo9MkCTwjUsHa83WbTFxlfvXDVAm+s7DzyhLS+m64aJZ0Lu+sz4OXpp2xZAPXXRB6iNVobM5t3jSseEg7mWoGIc7JcVPpmrw87BfpktX6Oy6EOv5FajVhUADPMPA3cn/JgnxbkgJqerlY1wfm71fMbB+FPxZPIfq7eDUjrGwFKIWIVzKnQzIvh+V1ByKIZjvw+vJGFFU4Hiqx4HaGAHDRrbX6GeveMzre7CISz1Awbq0rDVBkepypKrxuoMAV7K8fswW6x0jaAPY9uVv8Ri1c/WSJIToShiroTlll27J3ib0ejklcGcN0lQ56LXbw8kRt5CJjtzv; 4:/AdGIWzxUt9zwMs3ytxDsb881ivRU/fbzaC6OG7Ss6tt35i535A+cuLwWAuuxy7eLdFb+DK0dSch0rYHLV0WGuQVfX/opdH+33QF07X8Xh0fDP0+uAaeP83lld8FmdoppQ3uJ5kKByz/QErwZN6qguVpQkNDyh7TUkFEsmsBJaL2NkKTej/aTdzAa0HpQBTw20IM/XqCQu8dZNEaAv9n9TKJlZbqjOfYez94VA4+syE3gpIHIgaJjCmz6LMYH44ANCEmEg6uBhpz5jGXDMY6XI3uB1yqw+CSXQR50tstpJBm87O3+E4pZl7DeyTUaCfV 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)(5005006)(8121501046)(3002001)(10201501046)(3231232)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:DB6PR0402MB2774; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0402MB2774; X-Forefront-PRVS: 0655F9F006 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(39380400002)(376002)(396003)(189003)(199004)(36756003)(68736007)(478600001)(8676002)(3846002)(5009440100003)(52116002)(8936002)(51416003)(6116002)(16586007)(81166006)(1076002)(105586002)(2906002)(5660300001)(81156014)(106356001)(50226002)(48376002)(50466002)(305945005)(25786009)(6512007)(6486002)(7736002)(316002)(6666003)(2616005)(16526019)(186003)(11346002)(76176011)(55236004)(44832011)(26005)(53936002)(486006)(386003)(476003)(956004)(97736004)(66066001)(86362001)(6506007)(446003)(4326008)(47776003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0402MB2774; 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; DB6PR0402MB2774; 23:Lt0SfeFQdAm3FBI0grZbBBzrrHsy+vFGB3dwyr+?= =?us-ascii?Q?Bs2WR43MrNbnuCC5VxJNDbR0OHLqr17KNU1Fc46l/R39gaqBM6Z3/QEcIdbb?= =?us-ascii?Q?9S6LVozw+ORGaI1sMBmsLYGbgQaHR1KfP1H0miJE0qfEz/Hfsth5b8b84CaX?= =?us-ascii?Q?1BefHRLlwSxSNb3YcIw53DnNMys9qDCfB1JGxGqWXst6SUl4sD7XUGcx1LPf?= =?us-ascii?Q?az272PDT2nTTfta6UdUM+G9B+72XZO0HGi6FmlSBO0u0CJ+f/IqdPTbBLZET?= =?us-ascii?Q?NBwCBA7626rYOEbdiAJbbH4ZyrMVIJYp14MgyLCYyW83YuUsTVjWn/PXBm4S?= =?us-ascii?Q?lku/I+p2T6CoZIXdzIFnir7P0Opgt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nosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0402MB2774; 7:IZVtfgSKkRG6T6GwhFTb8QuIU2V+fmfjG6KXVS4Kit2ikXRRg5nuUI8gpLOt2ev/hpLzTw1y870nDhadM3aiFCkPvegC2n/HOzYbOEcOv9zGPTyVsBlmU7jbuq9YNLhn7/6gHK3+uS9RFSv+jI11o5OzJDCWQ4P4JEwJNO8RNcsGdNFk1UWsAltBkNPuHIGGq4FSNbJ8997B9bOsqRruFBpUOX0C6xEUM8sMJO/HPgM5tkAPX4UYVxjqWXkGg95A X-MS-Office365-Filtering-Correlation-Id: a897a191-c9cc-4586-746d-08d5ac595704 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2018 16:10:02.0707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a897a191-c9cc-4586-746d-08d5ac595704 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2774 Subject: [dpdk-dev] [PATCH 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 16:10:07 -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. Signed-off-by: Shreyansh Jain --- This adversely affects the performance as complete memsegs now need to be parsed, but a rework containing necessary optimzation would be posted over this. 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