From patchwork Thu Aug 30 05:51:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145504 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp420105ljw; Wed, 29 Aug 2018 22:54:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBH2zJhWQCtK+4+1RpvH6K9JkD48SxifNp38FhZqxW8iHggLtwq0Swv0HB0Nf17AUcw2GF X-Received: by 2002:adf:e2c5:: with SMTP id d5-v6mr6797474wrj.139.1535608474490; Wed, 29 Aug 2018 22:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608474; cv=none; d=google.com; s=arc-20160816; b=EHTm/ObEoNKw0yPIgfDL7zHwWJ+pUvGgem/K9JgcwVft5NrOF8hFt8OxgfjDu51Cih WHf8LpXZkKQdxhiUCxTZKYzxGbG3yKZK7MZRG3r4yPVJDwBiFiw0qEdDg0LX7tDQiTcm RM6LFvWTe7dJdqY0jSsu0Vh5lcslGfokg5AOVYVrjLinQX0K+HhmBBpVHNNFoBrWXEV/ vs4WK7m++JybM2KsQ+Fw9o4cIP1rjS8Vs9PW6uZCEBYI6yWxtsrLA3wf9LfF+m6X0q7K 3vr3fT1Km7aDrpafGvf/6QK2wDR6Iwb6ECvTkt/tZxjDiMyUOp8Hv5dY25R65vc2KNGb GaZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=unoVI7YQ8lg8TPDiKLAzHbCVakVCHeHh9rOlsJWB8HM=; b=pCd1h9J5ZuigBgvLKLg+df2fPSUYg9wzChfjANOXNx/hTcKBG1qflH84W62Hx5cDpM dCOFfAB2CnY0Md+wgwdVvzeFLmPBWp2PheSBxthjFmdgsXLg17rMIV2TWp78Kt8o3c0l jZR1eSHnoYaxljNoukdwu5seVBHY3uBDRTANWc/bzCA7DdySQvDQLDOpqtDJZ3HvSCvJ Xc3kGkVuwJhdJ636L7cGd0w7Ox9heUFZbicPIfipX+hdUVYO+EMF4xKSNEZ83y+OvLIx OverM9drDLRUIYwjJzqkBRim12vWqGke0m9rtiFx7BHaNP79jBSdn/ynQfgCn9v8B2af FKnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=GqEqeZo6; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id t27-v6si5848128wrb.341.2018.08.29.22.54.34; Wed, 29 Aug 2018 22:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=GqEqeZo6; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A28E58FA; Thu, 30 Aug 2018 07:53:30 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10089.outbound.protection.outlook.com [40.107.1.89]) by dpdk.org (Postfix) with ESMTP id 55A484CA9 for ; Thu, 30 Aug 2018 07:53:18 +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:X-MS-Exchange-SenderADCheck; bh=unoVI7YQ8lg8TPDiKLAzHbCVakVCHeHh9rOlsJWB8HM=; b=GqEqeZo6w9ydsMcZVdbdqZxwPzbq8+RLDPRsLaqW0X9d6ou6Dq8EK7KXEyPSoozaSoJ3skij62aBgOhbAZfq/E6/Q/htvfgxuIH6QPqDTj8eI9gNKMfwGcSQRkrc6SrjzXcjxAL5YTK7/lVeBk65UU5yklQzMhNVN9UQE1rx6Yw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.143.30.134) by VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Thu, 30 Aug 2018 05:53:16 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:03 +0530 Message-Id: <1535608265-13323-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535608265-13323-1-git-send-email-hemant.agrawal@nxp.com> References: <1535608265-13323-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: PN1PR0101CA0049.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::11) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 888d7254-c318-4ede-50cb-08d60e3ce21c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2541; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541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VP9xIA8WkX3QXY3V9mBi49p0Bt7Z+P1qI6qWjOzmYjGtVHr3VNGVH6venUZc6aH3yJzZKgxGsuKKAWMPGxKRjznI+umyN6kwOroBoPgKZmpnTaHTtob65bkypxUJYo1NXh1ISqh1nSbP1lhGJBRmPZKc8iNbzwVXPN/OMsbnYt+MNAukuAUospavcJ6TSY3lUIXflLRAuaShRgOWZkbu3JRFl8DYLiZWdslLe+LWkrWYJgHinJ30WvKXF58h4fr7NAEujR8gkDxJqZ9m8rJD1s30yS8S6loqaV6EvyTjh1XkkX1sghK2aFN8X7elj3NmL11dCz7w6lcPRcrEZEdy96; 4:O6ebdpK46+zuUSCZ1er3dwhZhnZ1b8ZFqh5YPwR9EMu/Ar5nek066AlE9qebhkNaq5IsNwA/gt/AyfuK6DspJhgDZBi1DqQ0CfTnx4s/cZ1IZeYS7xC5OhHyTtrFelvKzVd+pjfq2I+3TTIYQozIpQpH2AFPmjjCTljA+w6nkaYQ2jsvjdmFKz+UC9G3TTkWWm4TmHYV2SZXEHra+9Y1pR2IaebBioJ+Z6xuQUdkrRv9nGvKE/VDC9EkPgOJhShPNBqTlWHVWQJCJUce5q/L5A5LAGWxEvVlsiWSK/Qq2nSyS2+h2di6TbKPlE6f+Jnk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:VI1PR0401MB2541; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2541; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(346002)(39860400002)(136003)(366004)(189003)(199004)(316002)(486006)(106356001)(47776003)(16526019)(53936002)(6916009)(6666003)(186003)(26005)(386003)(5009440100003)(6506007)(52116002)(2351001)(956004)(76176011)(66066001)(446003)(51416003)(6512007)(11346002)(6486002)(16586007)(97736004)(86362001)(4326008)(44832011)(25786009)(68736007)(105586002)(2616005)(305945005)(2906002)(14444005)(3846002)(6116002)(5660300001)(476003)(81166006)(478600001)(48376002)(8936002)(81156014)(7736002)(8676002)(50466002)(50226002)(2361001)(36756003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2541; H:bf-netperf1.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; VI1PR0401MB2541; 23:ZxGIwRyiFr1rdtcu98j/f07HCgA0unl7sdLS2Mm?= 1JKS3EoZdNecMhjq9Q0/ktBY6a1ikAR1wsu/qSp84uALgkeZLGYN/QO9s7yc4a9n+ZnOUGc9b2bc1Wz/rFTOVipbnA1vQpGqnpcmrpU3iYcVS70/9YdL49ICpqlzVnkHRfG8aYjc97f6l+2+kVHUJAtY938sBbOLKSr+JYm8gTyy6G5W4+JPZE2pXkjm1AJP1uRtVZjG+Fm1M6FeuMGuoivtFOfsdZdY+hsrBDHNtPV2+GgMLiv6EQFh5cLJlc7DttA6fEILlTPxpzFZ9Ribq/zY9zHbrUzqXKBYl0P61NYnx827QugjCRvAPPFgKF/XnG+Uozg0wKfZjleYr9PiBRuoHje4vVYYj0RCQnBxi27iGicIDnQKK3oWU8v3swjJc4wVAuUu0595qFztMbMX9wmzP37FHex9DtKs9KwCqwHru9OCB5zHfa6QHszy4xgu/gZA1qPUtJjd/3Uv/FH/YiNFKWhvl/F72sJR2Far3lPSGcd4wfZgSHFJ5MltDQd6d5tD6GVSRLo1T52u1GqPTIkIyjN7Dlf4NZHPv8Ggen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ARhdKUa0FJ+aRA= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541; 6:GK/+wT1cIhc6CCDe8edKL+e20wGbGvKV49/LUIv4ZlhAUrO1bWTddEUvK0nrWOFR1CVE+3qvIFCfKP1l2O5pnfXjyAp4V/UVrEao9YihXU3xAxJq5JrghWHdef9AqllZe9lT92J9ndufDb92hxHQP3RDvaioJ3z2yGGsUVkVTa1Em82zV7DLEZ1R5x6tT0rIEU81AspI6o+5WxkpYf5ZhTsDVZ4HjLLAa6tRdE4+0c2Z3HCiPkbJ7h691jWkkh5EMv6G1T4CONwOD01t9lTPvl2B0x3GOtL27ddf7PmQpOCbutNsyEZwNSGpVGm7k7lRsbPgEEkPEgGxYyrxaqKrddKS3dQAyNvAm0JK+QlHxUQ2gKk2GMlIhsqs4VczeCpLmF8sBMJ1tTHjq5VKOgZYffTC4cVNHsshuGRv5qhpl6N0NMOE/DDX8xEg7QDZ53AKGxie7xypQbt373OpYOv0Zg==; 5:1oA08y4xrLHIWRxC3AGC/D0T4aJPyuAe23Z/qwi+wyEkjHF8csSD/K1nxHxqJZaEnZ7fcYwlbSzqwXtw5R0BdRbJVsVLgY8Wl1PvBKPLodvm2rLmtjT4TFWe8UV094UOcEkrdEBT0RoeHQJZY0C1rVUaFnGq9nLgAjZ4d8tKvBk=; 7:96MjNazUnVoFAY4P//4PoHsCbr50qfAQd/Iw1v0X95KVjDIgAbWz2azoWuBrD1Wer5qE42t2aUBYf3aJfYLgWcA55IWQl1wA617OTcYqZqZXXBHcvko3shIdRw/5OMboZuwZF4uWuuCzUnVJxJj1IhgfLHG0T4Xlkp1MH4kVGkpearRSx0hqsdHHn7wBjgzV0fowr26nhlHY4Vn2FIE6kGMuQ+3YJjOAeAo7DYZDWFj/XBKSl3dQVCuu7Fw5gqCn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:16.7571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 888d7254-c318-4ede-50cb-08d60e3ce21c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2541 Subject: [dpdk-dev] [PATCH 08/10] crypto/dpaa2_sec: add out of place crypto support 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" Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 76 +++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) -- 2.7.4 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 99cc719..ca6ddad 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -62,11 +62,75 @@ static uint8_t cryptodev_driver_id; int dpaa2_logtype_sec; static inline int +build_proto_compound_fd(dpaa2_sec_session *sess, + struct rte_crypto_op *op, + struct qbman_fd *fd, uint16_t bpid) +{ + struct rte_crypto_sym_op *sym_op = op->sym; + struct ctxt_priv *priv = sess->ctxt; + struct qbman_fle *fle, *ip_fle, *op_fle; + struct sec_flow_context *flc; + struct rte_mbuf *src_mbuf = sym_op->m_src; + struct rte_mbuf *dst_mbuf = sym_op->m_dst; + int retval; + + /* Save the shared descriptor */ + flc = &priv->flc_desc[0].flc; + + /* we are using the first FLE entry to store Mbuf */ + retval = rte_mempool_get(priv->fle_pool, (void **)(&fle)); + if (retval) { + DPAA2_SEC_ERR("Memory alloc failed"); + return -1; + } + memset(fle, 0, FLE_POOL_BUF_SIZE); + DPAA2_SET_FLE_ADDR(fle, (size_t)op); + DPAA2_FLE_SAVE_CTXT(fle, (ptrdiff_t)priv); + + op_fle = fle + 1; + ip_fle = fle + 2; + + if (likely(bpid < MAX_BPID)) { + DPAA2_SET_FD_BPID(fd, bpid); + DPAA2_SET_FLE_BPID(op_fle, bpid); + DPAA2_SET_FLE_BPID(ip_fle, bpid); + } else { + DPAA2_SET_FD_IVP(fd); + DPAA2_SET_FLE_IVP(op_fle); + DPAA2_SET_FLE_IVP(ip_fle); + } + + /* Configure FD as a FRAME LIST */ + DPAA2_SET_FD_ADDR(fd, DPAA2_VADDR_TO_IOVA(op_fle)); + DPAA2_SET_FD_COMPOUND_FMT(fd); + DPAA2_SET_FD_FLC(fd, (ptrdiff_t)flc); + + /* Configure Output FLE with dst mbuf data */ + DPAA2_SET_FLE_ADDR(op_fle, DPAA2_MBUF_VADDR_TO_IOVA(dst_mbuf)); + DPAA2_SET_FLE_OFFSET(op_fle, dst_mbuf->data_off); + DPAA2_SET_FLE_LEN(op_fle, dst_mbuf->buf_len); + + /* Configure Input FLE with src mbuf data */ + DPAA2_SET_FLE_ADDR(ip_fle, DPAA2_MBUF_VADDR_TO_IOVA(src_mbuf)); + DPAA2_SET_FLE_OFFSET(ip_fle, src_mbuf->data_off); + DPAA2_SET_FLE_LEN(ip_fle, src_mbuf->pkt_len); + + DPAA2_SET_FD_LEN(fd, ip_fle->length); + DPAA2_SET_FLE_FIN(ip_fle); + + return 0; + +} + +static inline int build_proto_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op, struct qbman_fd *fd, uint16_t bpid) { struct rte_crypto_sym_op *sym_op = op->sym; + if (sym_op->m_dst) + return build_proto_compound_fd(sess, op, fd, bpid); + struct ctxt_priv *priv = sess->ctxt; struct sec_flow_context *flc; struct rte_mbuf *mbuf = sym_op->m_src; @@ -1273,6 +1337,16 @@ sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t driver_id) } else dst = src; + if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { + dpaa2_sec_session *sess = (dpaa2_sec_session *) + get_sec_session_private_data(op->sym->sec_session); + if (sess->ctxt_type == DPAA2_SEC_IPSEC) { + uint16_t len = DPAA2_GET_FD_LEN(fd); + dst->pkt_len = len; + dst->data_len = len; + } + } + DPAA2_SEC_DP_DEBUG("mbuf %p BMAN buf addr %p," " fdaddr =%" PRIx64 " bpid =%d meta =%d off =%d, len =%d\n", (void *)dst, @@ -2154,6 +2228,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, struct alginfo authdata, cipherdata; int bufsize; struct sec_flow_context *flc; + struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private; PMD_INIT_FUNC_TRACE(); @@ -2175,6 +2250,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, return -ENOMEM; } + priv->fle_pool = dev_priv->fle_pool; flc = &priv->flc_desc[0].flc; session->ctxt_type = DPAA2_SEC_IPSEC;