From patchwork Thu Aug 30 05:50:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145498 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419445ljw; Wed, 29 Aug 2018 22:53:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaV9WAnoGfnO4gLRmPRxRcJiMzCaWSixE0Fut1Wcg8QniYUtTEk86h/I8erOec4gZ7cm/4P X-Received: by 2002:a1c:2142:: with SMTP id h63-v6mr727013wmh.51.1535608410576; Wed, 29 Aug 2018 22:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608410; cv=none; d=google.com; s=arc-20160816; b=WGwNkQ05jPJe9g4igXszGEHrAlT6xsuL0xn8pNUJ805M/jdgmWGiCH2FSM8d0MAsGp RmVqzH07BBL814KNP43G9E9w/EF28tyfZyTOkDt+6A64BkR9HKBetST+vOiFcZY9hOt/ x/nKL8r+QcUNw6Fa36LnNfMSqFAIlYk+fJM8/k9oR5od8j9neso4qjvVoLLFEHFo/b7C LhAnWl7i/BENPA4hofEITZM3C1waJ8X5FQygw2T1RqUsJi6+q6GMwTnBMQ9/bqCJYfE3 qEUGJCD8cLklmySmdRfX1xc/CJmM9vGcW1RkFR26nvuuG3DNPpGRav5NKI40DK04ohLz pqRw== 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=R6+xo4JMka27dihyP0P4/O0bvhNCDpEDbuZY7xJdfi4=; b=v8tQcmGLzmuE6W5l/kY5AD0cP5ZHv57AaYxe8+/uqem18whN7Bh0/UQ/flpafIR2Ca FjP85BCfXrFd2Z8PSrmtBhpN2ukihQqmsMYgRXHw6CsHTWk8oR4dayMg1kLkgMYt+q1v SaxbfBgMv5HQeD+5I3d0wgj6hxOWQZgsjHfT2xbvSI88Qc6+02U0KL0KJ25bwIvMJiFg VJGqkzgiYJ+vRi1kOEpcJsoF/BdIa68t66HYEkfIp+kSLmu2ZuFwpfUqWHajgfBkeFVj PwxFPEyjiuWTPX6Gw2FQ3eWHuG1MlVcC+LzooBb2R0yOdAPh0wBJmF8G2/GiOdxBStMX 6B5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Iro5Ck3B; 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 h139-v6si688890wma.150.2018.08.29.22.53.30; Wed, 29 Aug 2018 22:53:30 -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=Iro5Ck3B; 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 1F6674CA7; Thu, 30 Aug 2018 07:53:17 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10071.outbound.protection.outlook.com [40.107.1.71]) by dpdk.org (Postfix) with ESMTP id 1AB5E2BF7 for ; Thu, 30 Aug 2018 07:53:11 +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=R6+xo4JMka27dihyP0P4/O0bvhNCDpEDbuZY7xJdfi4=; b=Iro5Ck3BQaFIs4sns7AqjPyh43N+x3abSEH240IcbuyiHnyhQt8Wtbcvbqyqzw4mc/TG2cIOvcVKkZLG/kYZQbpJaoXGJLHJbkHAWTOq1pGhApcN/RhU0Q3JwPhNf43Hu40vkKWUszx4eeT43CSBpIAuZFnhvB6wdM//U5nUpyI= 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:08 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:20:56 +0530 Message-Id: <1535608265-13323-2-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: 8e7c8a5b-80d3-4edb-6bcd-08d60e3cdd58 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; 3:3Hlt76Pfb4QE1y9UXpkp/woL7L+f36GEgl1n7oBgSJsvTkCDTcSBlAEliETr3R2tqid/MR0wYnoGJJ0VobQSl7vi5jUuFnPQ7RtyK5YVc1BFzTPxYyiATCqOxaeXkq1HvwUx6mo1SnjcJIuvHBUACyaITmuJy+R0u9+HwLj3wxX26ysRbrFX9whRdoThNuEafmFh/yaLz4+OhxlmplrRjIYXMj4TSNqkQC68IwaSt9iJm24MvLYAzi96elr5qkAU; 25:+XwLks+oRwksAqAgHO485Xz76/Pc/00OUjgCfaHstCb4NR32V2UNie1tO8KBDSA34/qkFcUdt92o2gzKWlpY7v+wolKFu1vt7euSD93kcxYAqSb393hAz8GMpGJrxg51lDpaC67losOpMt92ONOPsBolA6/sOoIaSphSiN8GCHySy3EcDqatzYOo6MCpG3YrTHGHxRaJez2SHLFNALcTWqx0Eqe9W2ffBWz28WK4Tl1bXFF62s923WkF6FeUtf6xPRST74WD04/T6Z2L9Dp3a5jyY17U38k2OWasVygbhzP2kHTJpIri2sntjsEqA/rrWDWM//tWJwyhWNQ1oci/3A==; 31:8o5cuYGnk3TurWggVLozC+1/CkFnvajmPpbNNbO9s5VptD3kDQP3n3vmr9vesIf7YIf4nfKJiLvlNppTJG0wdcjQ6iCD2rozGUjvP9+mj5olnz/k2qqUiC/tBPE42C+QOhoblyRv61AsklO0OAoxQv2EMrAcedlULNaZkK95DHHEO8FngJSVgOhXPPAQNi3/vFJckmrusegKJx88irtbUtHh23+1Axa/ntg4a36bmX8= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2541: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541; 20:AsZxVXTrtLM0a/z8yOdIYebswbJvBM3pX09p7L6Ss8lKgD7ywbWtqxCZQsAue/hISzNkvMvAoXOCd3Pk5hR0OjPRaNZyjInVprlbcxs3ElkZokrIiMCkvTTDbJ52qtnnoXPSz5p0tfVg7QUtrNfr+lC+pZS0EGPjZKED9HJ1eqPHkXpW7HLleg8LSFuRmBseRXGxE1h/3ECQQaESzqAS8jLsENo9GlurogANTOBJpjsCJpiVIGxC2dlyWmnReVxK8XD+Bxl2vasKsnR0mD8l4XNSVOqBQhJn+YvdZTC8n/W49IJkTO3moXWOIGLwQGBFeHO3RnX7g7mif9dz0Bo4VqebgC8KWuYJ0Uj0qf7hSWsaTO8lj7+BN8oeD7mKG7TKe9rbVHvo8TUW5BZvf0MwugU06zvEKDCstuz/zQp7cWU5i5cYqmRzWgUIcJhQuK30ff7QLeiqk080U92zEv9jpV7Ue4BhF6y4rw7+8RnU5fYLqVY3AwJ+rfy6Pu2J33F2; 4:Q99IrodFQQRXnidzG7EIF3zJN/+bzS+mLsjwJFkX2HFVd2KiIbXBmbb8AQESptlsBjsUNcQPOq1NFR4qDaioWhLAX5KqzoRe/3fPDHmHVJDQgqY2SDPTwomy21pRX9cw06i2FN8Hto14GO98VWrty4MH5aR1jz70WcyfOFhlSorsnFOUPnU9P5DiCuLx9VenDVMPt0IFWGpnwimiR9UPUpY5OLup5riFxCmJDbrVhoBB91+n9ZZ+h/124tIPAGTcmm5NcgStdlogbpYtHt3KE0pyP7hLsERvFJ87HHigKBE3wVY5iA0VldnoUjnO8OUt8GuIbIlC+9c+MxehY6ZSNPg1FSymPOer5Cu1a9FS7ZHfo6V4E/IX5yOftf3YnMdV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(788757137089)(1591387915157); 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)(6306002)(86362001)(575784001)(4326008)(966005)(44832011)(25786009)(68736007)(105586002)(2616005)(15650500001)(305945005)(2906002)(14444005)(53946003)(3846002)(6116002)(5660300001)(476003)(81166006)(478600001)(48376002)(8936002)(81156014)(7736002)(16200700003)(8676002)(50466002)(50226002)(2361001)(36756003)(110426005)(3714002)(21314002)(569006); 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:ZOk+V/+6ABwiEV25JKSIUdOev6esYci12hQPbvA?= B/14uJZlsmqdfYZE5gutpK8K4xUzGIfgmRafEVO68rqKEdnIq8OWjP0+7MUUvDI/SlpNZjDXu+pup3kR8xi6F2q193x9m8jFfAMzGTlhcJ5I+2TAQSq0CGOIMoLvjCqqGheG8bxg+Ae8bJnXX4Pn27O2gPl4NtnV58ybUTvbo33TbQ1TUHVQT/36XUvMlMEBpTIVmcvLhLi7h6/g3GBktzMqW1SiO4Q2KWoi5AukFeejc+9NDaEHvt6Ql0QdHC+tMt4QZOqA5JxIjszujl7SpT+IxJb3Q1sRHSyR3LTgEccC61/uGBWRJkHoM8TM+t4EM1pb/VRB8L4wraUw/5pda4ELJkMCJuW3KqLQrKd9j7pR6Mgx0YbQ0Z6yxoHEqymUivcYogafrIgb0W4g4yz8+Ik+nQekqv8M9W8DNL0yoyrvkqEDT9YjZLtixX1XLNndpFgGSDfHcSi3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Nq0otB5/CUgls49Js1/C0745RVVe/pP1XU0OGWFCQ7xY1xyegleEQnM1wVUOuWl6VYO+yh3CKOvXNSL4ERcz+L6zEKsQ4Ern13kQbOTmJt2x7g7JWES6i7cAwAJJZbPpp+wJuEcFZwI1ifsL1rXYeJQ8RC6Ib5K9xSNXtiAdGifpa6FuhOwq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:08.7634 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e7c8a5b-80d3-4edb-6bcd-08d60e3cdd58 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 01/10] crypto/dpaa2_sec: update the flib RTA to latest 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 | 5 +- drivers/crypto/dpaa2_sec/hw/desc.h | 814 +++++---------------- drivers/crypto/dpaa2_sec/hw/desc/algo.h | 58 +- drivers/crypto/dpaa2_sec/hw/desc/ipsec.h | 195 ++++- drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h | 346 ++++----- drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h | 22 + drivers/crypto/dpaa_sec/dpaa_sec.c | 6 +- 7 files changed, 565 insertions(+), 881 deletions(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 2a3c61c..ac49029 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2328,7 +2328,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, session->dir = DIR_ENC; bufsize = cnstr_shdsc_ipsec_new_encap(priv->flc_desc[0].desc, - 1, 0, &encap_pdb, + 1, 0, SHR_SERIAL, &encap_pdb, (uint8_t *)&ip4_hdr, &cipherdata, &authdata); } else if (ipsec_xform->direction == @@ -2338,7 +2338,8 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, decap_pdb.options = sizeof(struct ip) << 16; session->dir = DIR_DEC; bufsize = cnstr_shdsc_ipsec_new_decap(priv->flc_desc[0].desc, - 1, 0, &decap_pdb, &cipherdata, &authdata); + 1, 0, SHR_SERIAL, + &decap_pdb, &cipherdata, &authdata); } else goto out; diff --git a/drivers/crypto/dpaa2_sec/hw/desc.h b/drivers/crypto/dpaa2_sec/hw/desc.h index e925583..ca94ea3 100644 --- a/drivers/crypto/dpaa2_sec/hw/desc.h +++ b/drivers/crypto/dpaa2_sec/hw/desc.h @@ -588,7 +588,7 @@ #define OP_PCLID_TLS10_PRF (0x09 << OP_PCLID_SHIFT) #define OP_PCLID_TLS11_PRF (0x0a << OP_PCLID_SHIFT) #define OP_PCLID_TLS12_PRF (0x0b << OP_PCLID_SHIFT) -#define OP_PCLID_DTLS10_PRF (0x0c << OP_PCLID_SHIFT) +#define OP_PCLID_DTLS_PRF (0x0c << OP_PCLID_SHIFT) #define OP_PCLID_PUBLICKEYPAIR (0x14 << OP_PCLID_SHIFT) #define OP_PCLID_DSASIGN (0x15 << OP_PCLID_SHIFT) #define OP_PCLID_DSAVERIFY (0x16 << OP_PCLID_SHIFT) @@ -612,7 +612,7 @@ #define OP_PCLID_TLS10 (0x09 << OP_PCLID_SHIFT) #define OP_PCLID_TLS11 (0x0a << OP_PCLID_SHIFT) #define OP_PCLID_TLS12 (0x0b << OP_PCLID_SHIFT) -#define OP_PCLID_DTLS10 (0x0c << OP_PCLID_SHIFT) +#define OP_PCLID_DTLS (0x0c << OP_PCLID_SHIFT) #define OP_PCLID_BLOB (0x0d << OP_PCLID_SHIFT) #define OP_PCLID_IPSEC_NEW (0x11 << OP_PCLID_SHIFT) #define OP_PCLID_3G_DCRC (0x31 << OP_PCLID_SHIFT) @@ -665,643 +665,179 @@ #define OP_PCL_SRTP_HMAC_SHA1_160 0x0007 -/* For SSL 3.0 - OP_PCLID_SSL30 */ -#define OP_PCL_SSL30_AES_128_CBC_SHA 0x002f -#define OP_PCL_SSL30_AES_128_CBC_SHA_2 0x0030 -#define OP_PCL_SSL30_AES_128_CBC_SHA_3 0x0031 -#define OP_PCL_SSL30_AES_128_CBC_SHA_4 0x0032 -#define OP_PCL_SSL30_AES_128_CBC_SHA_5 0x0033 -#define OP_PCL_SSL30_AES_128_CBC_SHA_6 0x0034 -#define OP_PCL_SSL30_AES_128_CBC_SHA_7 0x008c -#define OP_PCL_SSL30_AES_128_CBC_SHA_8 0x0090 -#define OP_PCL_SSL30_AES_128_CBC_SHA_9 0x0094 -#define OP_PCL_SSL30_AES_128_CBC_SHA_10 0xc004 -#define OP_PCL_SSL30_AES_128_CBC_SHA_11 0xc009 -#define OP_PCL_SSL30_AES_128_CBC_SHA_12 0xc00e -#define OP_PCL_SSL30_AES_128_CBC_SHA_13 0xc013 -#define OP_PCL_SSL30_AES_128_CBC_SHA_14 0xc018 -#define OP_PCL_SSL30_AES_128_CBC_SHA_15 0xc01d -#define OP_PCL_SSL30_AES_128_CBC_SHA_16 0xc01e -#define OP_PCL_SSL30_AES_128_CBC_SHA_17 0xc01f - -#define OP_PCL_SSL30_AES_256_CBC_SHA 0x0035 -#define OP_PCL_SSL30_AES_256_CBC_SHA_2 0x0036 -#define OP_PCL_SSL30_AES_256_CBC_SHA_3 0x0037 -#define OP_PCL_SSL30_AES_256_CBC_SHA_4 0x0038 -#define OP_PCL_SSL30_AES_256_CBC_SHA_5 0x0039 -#define OP_PCL_SSL30_AES_256_CBC_SHA_6 0x003a -#define OP_PCL_SSL30_AES_256_CBC_SHA_7 0x008d -#define OP_PCL_SSL30_AES_256_CBC_SHA_8 0x0091 -#define OP_PCL_SSL30_AES_256_CBC_SHA_9 0x0095 -#define OP_PCL_SSL30_AES_256_CBC_SHA_10 0xc005 -#define OP_PCL_SSL30_AES_256_CBC_SHA_11 0xc00a -#define OP_PCL_SSL30_AES_256_CBC_SHA_12 0xc00f -#define OP_PCL_SSL30_AES_256_CBC_SHA_13 0xc014 -#define OP_PCL_SSL30_AES_256_CBC_SHA_14 0xc019 -#define OP_PCL_SSL30_AES_256_CBC_SHA_15 0xc020 -#define OP_PCL_SSL30_AES_256_CBC_SHA_16 0xc021 -#define OP_PCL_SSL30_AES_256_CBC_SHA_17 0xc022 - -#define OP_PCL_SSL30_AES_128_GCM_SHA256_1 0x009C -#define OP_PCL_SSL30_AES_256_GCM_SHA384_1 0x009D -#define OP_PCL_SSL30_AES_128_GCM_SHA256_2 0x009E -#define OP_PCL_SSL30_AES_256_GCM_SHA384_2 0x009F -#define OP_PCL_SSL30_AES_128_GCM_SHA256_3 0x00A0 -#define OP_PCL_SSL30_AES_256_GCM_SHA384_3 0x00A1 -#define OP_PCL_SSL30_AES_128_GCM_SHA256_4 0x00A2 -#define OP_PCL_SSL30_AES_256_GCM_SHA384_4 0x00A3 -#define OP_PCL_SSL30_AES_128_GCM_SHA256_5 0x00A4 -#define OP_PCL_SSL30_AES_256_GCM_SHA384_5 0x00A5 -#define OP_PCL_SSL30_AES_128_GCM_SHA256_6 0x00A6 - -#define OP_PCL_TLS_DH_ANON_AES_256_GCM_SHA384 0x00A7 -#define OP_PCL_TLS_PSK_AES_128_GCM_SHA256 0x00A8 -#define OP_PCL_TLS_PSK_AES_256_GCM_SHA384 0x00A9 -#define OP_PCL_TLS_DHE_PSK_AES_128_GCM_SHA256 0x00AA -#define OP_PCL_TLS_DHE_PSK_AES_256_GCM_SHA384 0x00AB -#define OP_PCL_TLS_RSA_PSK_AES_128_GCM_SHA256 0x00AC -#define OP_PCL_TLS_RSA_PSK_AES_256_GCM_SHA384 0x00AD -#define OP_PCL_TLS_PSK_AES_128_CBC_SHA256 0x00AE -#define OP_PCL_TLS_PSK_AES_256_CBC_SHA384 0x00AF -#define OP_PCL_TLS_DHE_PSK_AES_128_CBC_SHA256 0x00B2 -#define OP_PCL_TLS_DHE_PSK_AES_256_CBC_SHA384 0x00B3 -#define OP_PCL_TLS_RSA_PSK_AES_128_CBC_SHA256 0x00B6 -#define OP_PCL_TLS_RSA_PSK_AES_256_CBC_SHA384 0x00B7 - -#define OP_PCL_SSL30_3DES_EDE_CBC_MD5 0x0023 - -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA 0x001f -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_2 0x008b -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_3 0x008f -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_4 0x0093 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_5 0x000a -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_6 0x000d -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_7 0x0010 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_8 0x0013 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_9 0x0016 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_10 0x001b -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_11 0xc003 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_12 0xc008 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_13 0xc00d -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_14 0xc012 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_15 0xc017 -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_16 0xc01a -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_17 0xc01b -#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_18 0xc01c - -#define OP_PCL_SSL30_DES40_CBC_MD5 0x0029 - -#define OP_PCL_SSL30_DES_CBC_MD5 0x0022 - -#define OP_PCL_SSL30_DES40_CBC_SHA 0x0008 -#define OP_PCL_SSL30_DES40_CBC_SHA_2 0x000b -#define OP_PCL_SSL30_DES40_CBC_SHA_3 0x000e -#define OP_PCL_SSL30_DES40_CBC_SHA_4 0x0011 -#define OP_PCL_SSL30_DES40_CBC_SHA_5 0x0014 -#define OP_PCL_SSL30_DES40_CBC_SHA_6 0x0019 -#define OP_PCL_SSL30_DES40_CBC_SHA_7 0x0026 - -#define OP_PCL_SSL30_DES_CBC_SHA 0x001e -#define OP_PCL_SSL30_DES_CBC_SHA_2 0x0009 -#define OP_PCL_SSL30_DES_CBC_SHA_3 0x000c -#define OP_PCL_SSL30_DES_CBC_SHA_4 0x000f -#define OP_PCL_SSL30_DES_CBC_SHA_5 0x0012 -#define OP_PCL_SSL30_DES_CBC_SHA_6 0x0015 -#define OP_PCL_SSL30_DES_CBC_SHA_7 0x001a - -#define OP_PCL_SSL30_RC4_128_MD5 0x0024 -#define OP_PCL_SSL30_RC4_128_MD5_2 0x0004 -#define OP_PCL_SSL30_RC4_128_MD5_3 0x0018 - -#define OP_PCL_SSL30_RC4_40_MD5 0x002b -#define OP_PCL_SSL30_RC4_40_MD5_2 0x0003 -#define OP_PCL_SSL30_RC4_40_MD5_3 0x0017 - -#define OP_PCL_SSL30_RC4_128_SHA 0x0020 -#define OP_PCL_SSL30_RC4_128_SHA_2 0x008a -#define OP_PCL_SSL30_RC4_128_SHA_3 0x008e -#define OP_PCL_SSL30_RC4_128_SHA_4 0x0092 -#define OP_PCL_SSL30_RC4_128_SHA_5 0x0005 -#define OP_PCL_SSL30_RC4_128_SHA_6 0xc002 -#define OP_PCL_SSL30_RC4_128_SHA_7 0xc007 -#define OP_PCL_SSL30_RC4_128_SHA_8 0xc00c -#define OP_PCL_SSL30_RC4_128_SHA_9 0xc011 -#define OP_PCL_SSL30_RC4_128_SHA_10 0xc016 - -#define OP_PCL_SSL30_RC4_40_SHA 0x0028 - -/* For TLS 1.0 - OP_PCLID_TLS10 */ -#define OP_PCL_TLS10_AES_128_CBC_SHA 0x002f -#define OP_PCL_TLS10_AES_128_CBC_SHA_2 0x0030 -#define OP_PCL_TLS10_AES_128_CBC_SHA_3 0x0031 -#define OP_PCL_TLS10_AES_128_CBC_SHA_4 0x0032 -#define OP_PCL_TLS10_AES_128_CBC_SHA_5 0x0033 -#define OP_PCL_TLS10_AES_128_CBC_SHA_6 0x0034 -#define OP_PCL_TLS10_AES_128_CBC_SHA_7 0x008c -#define OP_PCL_TLS10_AES_128_CBC_SHA_8 0x0090 -#define OP_PCL_TLS10_AES_128_CBC_SHA_9 0x0094 -#define OP_PCL_TLS10_AES_128_CBC_SHA_10 0xc004 -#define OP_PCL_TLS10_AES_128_CBC_SHA_11 0xc009 -#define OP_PCL_TLS10_AES_128_CBC_SHA_12 0xc00e -#define OP_PCL_TLS10_AES_128_CBC_SHA_13 0xc013 -#define OP_PCL_TLS10_AES_128_CBC_SHA_14 0xc018 -#define OP_PCL_TLS10_AES_128_CBC_SHA_15 0xc01d -#define OP_PCL_TLS10_AES_128_CBC_SHA_16 0xc01e -#define OP_PCL_TLS10_AES_128_CBC_SHA_17 0xc01f - -#define OP_PCL_TLS10_AES_256_CBC_SHA 0x0035 -#define OP_PCL_TLS10_AES_256_CBC_SHA_2 0x0036 -#define OP_PCL_TLS10_AES_256_CBC_SHA_3 0x0037 -#define OP_PCL_TLS10_AES_256_CBC_SHA_4 0x0038 -#define OP_PCL_TLS10_AES_256_CBC_SHA_5 0x0039 -#define OP_PCL_TLS10_AES_256_CBC_SHA_6 0x003a -#define OP_PCL_TLS10_AES_256_CBC_SHA_7 0x008d -#define OP_PCL_TLS10_AES_256_CBC_SHA_8 0x0091 -#define OP_PCL_TLS10_AES_256_CBC_SHA_9 0x0095 -#define OP_PCL_TLS10_AES_256_CBC_SHA_10 0xc005 -#define OP_PCL_TLS10_AES_256_CBC_SHA_11 0xc00a -#define OP_PCL_TLS10_AES_256_CBC_SHA_12 0xc00f -#define OP_PCL_TLS10_AES_256_CBC_SHA_13 0xc014 -#define OP_PCL_TLS10_AES_256_CBC_SHA_14 0xc019 -#define OP_PCL_TLS10_AES_256_CBC_SHA_15 0xc020 -#define OP_PCL_TLS10_AES_256_CBC_SHA_16 0xc021 -#define OP_PCL_TLS10_AES_256_CBC_SHA_17 0xc022 - -#define OP_PCL_TLS_ECDHE_ECDSA_AES_128_CBC_SHA256 0xC023 -#define OP_PCL_TLS_ECDHE_ECDSA_AES_256_CBC_SHA384 0xC024 -#define OP_PCL_TLS_ECDH_ECDSA_AES_128_CBC_SHA256 0xC025 -#define OP_PCL_TLS_ECDH_ECDSA_AES_256_CBC_SHA384 0xC026 -#define OP_PCL_TLS_ECDHE_RSA_AES_128_CBC_SHA256 0xC027 -#define OP_PCL_TLS_ECDHE_RSA_AES_256_CBC_SHA384 0xC028 -#define OP_PCL_TLS_ECDH_RSA_AES_128_CBC_SHA256 0xC029 -#define OP_PCL_TLS_ECDH_RSA_AES_256_CBC_SHA384 0xC02A -#define OP_PCL_TLS_ECDHE_ECDSA_AES_128_GCM_SHA256 0xC02B -#define OP_PCL_TLS_ECDHE_ECDSA_AES_256_GCM_SHA384 0xC02C -#define OP_PCL_TLS_ECDH_ECDSA_AES_128_GCM_SHA256 0xC02D -#define OP_PCL_TLS_ECDH_ECDSA_AES_256_GCM_SHA384 0xC02E -#define OP_PCL_TLS_ECDHE_RSA_AES_128_GCM_SHA256 0xC02F -#define OP_PCL_TLS_ECDHE_RSA_AES_256_GCM_SHA384 0xC030 -#define OP_PCL_TLS_ECDH_RSA_AES_128_GCM_SHA256 0xC031 -#define OP_PCL_TLS_ECDH_RSA_AES_256_GCM_SHA384 0xC032 -#define OP_PCL_TLS_ECDHE_PSK_RC4_128_SHA 0xC033 -#define OP_PCL_TLS_ECDHE_PSK_3DES_EDE_CBC_SHA 0xC034 -#define OP_PCL_TLS_ECDHE_PSK_AES_128_CBC_SHA 0xC035 -#define OP_PCL_TLS_ECDHE_PSK_AES_256_CBC_SHA 0xC036 -#define OP_PCL_TLS_ECDHE_PSK_AES_128_CBC_SHA256 0xC037 -#define OP_PCL_TLS_ECDHE_PSK_AES_256_CBC_SHA384 0xC038 - -/* #define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0x0023 */ - -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA 0x001f -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_2 0x008b -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_3 0x008f -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_4 0x0093 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_5 0x000a -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_6 0x000d -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_7 0x0010 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_8 0x0013 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_9 0x0016 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_10 0x001b -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_11 0xc003 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_12 0xc008 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_13 0xc00d -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_14 0xc012 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_15 0xc017 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_16 0xc01a -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_17 0xc01b -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_18 0xc01c - -#define OP_PCL_TLS10_DES40_CBC_MD5 0x0029 - -#define OP_PCL_TLS10_DES_CBC_MD5 0x0022 - -#define OP_PCL_TLS10_DES40_CBC_SHA 0x0008 -#define OP_PCL_TLS10_DES40_CBC_SHA_2 0x000b -#define OP_PCL_TLS10_DES40_CBC_SHA_3 0x000e -#define OP_PCL_TLS10_DES40_CBC_SHA_4 0x0011 -#define OP_PCL_TLS10_DES40_CBC_SHA_5 0x0014 -#define OP_PCL_TLS10_DES40_CBC_SHA_6 0x0019 -#define OP_PCL_TLS10_DES40_CBC_SHA_7 0x0026 - -#define OP_PCL_TLS10_DES_CBC_SHA 0x001e -#define OP_PCL_TLS10_DES_CBC_SHA_2 0x0009 -#define OP_PCL_TLS10_DES_CBC_SHA_3 0x000c -#define OP_PCL_TLS10_DES_CBC_SHA_4 0x000f -#define OP_PCL_TLS10_DES_CBC_SHA_5 0x0012 -#define OP_PCL_TLS10_DES_CBC_SHA_6 0x0015 -#define OP_PCL_TLS10_DES_CBC_SHA_7 0x001a - -#define OP_PCL_TLS10_RC4_128_MD5 0x0024 -#define OP_PCL_TLS10_RC4_128_MD5_2 0x0004 -#define OP_PCL_TLS10_RC4_128_MD5_3 0x0018 - -#define OP_PCL_TLS10_RC4_40_MD5 0x002b -#define OP_PCL_TLS10_RC4_40_MD5_2 0x0003 -#define OP_PCL_TLS10_RC4_40_MD5_3 0x0017 - -#define OP_PCL_TLS10_RC4_128_SHA 0x0020 -#define OP_PCL_TLS10_RC4_128_SHA_2 0x008a -#define OP_PCL_TLS10_RC4_128_SHA_3 0x008e -#define OP_PCL_TLS10_RC4_128_SHA_4 0x0092 -#define OP_PCL_TLS10_RC4_128_SHA_5 0x0005 -#define OP_PCL_TLS10_RC4_128_SHA_6 0xc002 -#define OP_PCL_TLS10_RC4_128_SHA_7 0xc007 -#define OP_PCL_TLS10_RC4_128_SHA_8 0xc00c -#define OP_PCL_TLS10_RC4_128_SHA_9 0xc011 -#define OP_PCL_TLS10_RC4_128_SHA_10 0xc016 - -#define OP_PCL_TLS10_RC4_40_SHA 0x0028 - -#define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0xff23 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA160 0xff30 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA224 0xff34 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA256 0xff36 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA384 0xff33 -#define OP_PCL_TLS10_3DES_EDE_CBC_SHA512 0xff35 -#define OP_PCL_TLS10_AES_128_CBC_SHA160 0xff80 -#define OP_PCL_TLS10_AES_128_CBC_SHA224 0xff84 -#define OP_PCL_TLS10_AES_128_CBC_SHA256 0xff86 -#define OP_PCL_TLS10_AES_128_CBC_SHA384 0xff83 -#define OP_PCL_TLS10_AES_128_CBC_SHA512 0xff85 -#define OP_PCL_TLS10_AES_192_CBC_SHA160 0xff20 -#define OP_PCL_TLS10_AES_192_CBC_SHA224 0xff24 -#define OP_PCL_TLS10_AES_192_CBC_SHA256 0xff26 -#define OP_PCL_TLS10_AES_192_CBC_SHA384 0xff23 -#define OP_PCL_TLS10_AES_192_CBC_SHA512 0xff25 -#define OP_PCL_TLS10_AES_256_CBC_SHA160 0xff60 -#define OP_PCL_TLS10_AES_256_CBC_SHA224 0xff64 -#define OP_PCL_TLS10_AES_256_CBC_SHA256 0xff66 -#define OP_PCL_TLS10_AES_256_CBC_SHA384 0xff63 -#define OP_PCL_TLS10_AES_256_CBC_SHA512 0xff65 - -#define OP_PCL_TLS_PVT_AES_192_CBC_SHA160 0xff90 -#define OP_PCL_TLS_PVT_AES_192_CBC_SHA384 0xff93 -#define OP_PCL_TLS_PVT_AES_192_CBC_SHA224 0xff94 -#define OP_PCL_TLS_PVT_AES_192_CBC_SHA512 0xff95 -#define OP_PCL_TLS_PVT_AES_192_CBC_SHA256 0xff96 -#define OP_PCL_TLS_PVT_MASTER_SECRET_PRF_FE 0xfffe -#define OP_PCL_TLS_PVT_MASTER_SECRET_PRF_FF 0xffff - -/* For TLS 1.1 - OP_PCLID_TLS11 */ -#define OP_PCL_TLS11_AES_128_CBC_SHA 0x002f -#define OP_PCL_TLS11_AES_128_CBC_SHA_2 0x0030 -#define OP_PCL_TLS11_AES_128_CBC_SHA_3 0x0031 -#define OP_PCL_TLS11_AES_128_CBC_SHA_4 0x0032 -#define OP_PCL_TLS11_AES_128_CBC_SHA_5 0x0033 -#define OP_PCL_TLS11_AES_128_CBC_SHA_6 0x0034 -#define OP_PCL_TLS11_AES_128_CBC_SHA_7 0x008c -#define OP_PCL_TLS11_AES_128_CBC_SHA_8 0x0090 -#define OP_PCL_TLS11_AES_128_CBC_SHA_9 0x0094 -#define OP_PCL_TLS11_AES_128_CBC_SHA_10 0xc004 -#define OP_PCL_TLS11_AES_128_CBC_SHA_11 0xc009 -#define OP_PCL_TLS11_AES_128_CBC_SHA_12 0xc00e -#define OP_PCL_TLS11_AES_128_CBC_SHA_13 0xc013 -#define OP_PCL_TLS11_AES_128_CBC_SHA_14 0xc018 -#define OP_PCL_TLS11_AES_128_CBC_SHA_15 0xc01d -#define OP_PCL_TLS11_AES_128_CBC_SHA_16 0xc01e -#define OP_PCL_TLS11_AES_128_CBC_SHA_17 0xc01f - -#define OP_PCL_TLS11_AES_256_CBC_SHA 0x0035 -#define OP_PCL_TLS11_AES_256_CBC_SHA_2 0x0036 -#define OP_PCL_TLS11_AES_256_CBC_SHA_3 0x0037 -#define OP_PCL_TLS11_AES_256_CBC_SHA_4 0x0038 -#define OP_PCL_TLS11_AES_256_CBC_SHA_5 0x0039 -#define OP_PCL_TLS11_AES_256_CBC_SHA_6 0x003a -#define OP_PCL_TLS11_AES_256_CBC_SHA_7 0x008d -#define OP_PCL_TLS11_AES_256_CBC_SHA_8 0x0091 -#define OP_PCL_TLS11_AES_256_CBC_SHA_9 0x0095 -#define OP_PCL_TLS11_AES_256_CBC_SHA_10 0xc005 -#define OP_PCL_TLS11_AES_256_CBC_SHA_11 0xc00a -#define OP_PCL_TLS11_AES_256_CBC_SHA_12 0xc00f -#define OP_PCL_TLS11_AES_256_CBC_SHA_13 0xc014 -#define OP_PCL_TLS11_AES_256_CBC_SHA_14 0xc019 -#define OP_PCL_TLS11_AES_256_CBC_SHA_15 0xc020 -#define OP_PCL_TLS11_AES_256_CBC_SHA_16 0xc021 -#define OP_PCL_TLS11_AES_256_CBC_SHA_17 0xc022 - -/* #define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0x0023 */ - -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA 0x001f -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_2 0x008b -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_3 0x008f -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_4 0x0093 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_5 0x000a -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_6 0x000d -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_7 0x0010 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_8 0x0013 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_9 0x0016 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_10 0x001b -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_11 0xc003 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_12 0xc008 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_13 0xc00d -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_14 0xc012 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_15 0xc017 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_16 0xc01a -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_17 0xc01b -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_18 0xc01c - -#define OP_PCL_TLS11_DES40_CBC_MD5 0x0029 - -#define OP_PCL_TLS11_DES_CBC_MD5 0x0022 - -#define OP_PCL_TLS11_DES40_CBC_SHA 0x0008 -#define OP_PCL_TLS11_DES40_CBC_SHA_2 0x000b -#define OP_PCL_TLS11_DES40_CBC_SHA_3 0x000e -#define OP_PCL_TLS11_DES40_CBC_SHA_4 0x0011 -#define OP_PCL_TLS11_DES40_CBC_SHA_5 0x0014 -#define OP_PCL_TLS11_DES40_CBC_SHA_6 0x0019 -#define OP_PCL_TLS11_DES40_CBC_SHA_7 0x0026 - -#define OP_PCL_TLS11_DES_CBC_SHA 0x001e -#define OP_PCL_TLS11_DES_CBC_SHA_2 0x0009 -#define OP_PCL_TLS11_DES_CBC_SHA_3 0x000c -#define OP_PCL_TLS11_DES_CBC_SHA_4 0x000f -#define OP_PCL_TLS11_DES_CBC_SHA_5 0x0012 -#define OP_PCL_TLS11_DES_CBC_SHA_6 0x0015 -#define OP_PCL_TLS11_DES_CBC_SHA_7 0x001a - -#define OP_PCL_TLS11_RC4_128_MD5 0x0024 -#define OP_PCL_TLS11_RC4_128_MD5_2 0x0004 -#define OP_PCL_TLS11_RC4_128_MD5_3 0x0018 - -#define OP_PCL_TLS11_RC4_40_MD5 0x002b -#define OP_PCL_TLS11_RC4_40_MD5_2 0x0003 -#define OP_PCL_TLS11_RC4_40_MD5_3 0x0017 - -#define OP_PCL_TLS11_RC4_128_SHA 0x0020 -#define OP_PCL_TLS11_RC4_128_SHA_2 0x008a -#define OP_PCL_TLS11_RC4_128_SHA_3 0x008e -#define OP_PCL_TLS11_RC4_128_SHA_4 0x0092 -#define OP_PCL_TLS11_RC4_128_SHA_5 0x0005 -#define OP_PCL_TLS11_RC4_128_SHA_6 0xc002 -#define OP_PCL_TLS11_RC4_128_SHA_7 0xc007 -#define OP_PCL_TLS11_RC4_128_SHA_8 0xc00c -#define OP_PCL_TLS11_RC4_128_SHA_9 0xc011 -#define OP_PCL_TLS11_RC4_128_SHA_10 0xc016 - -#define OP_PCL_TLS11_RC4_40_SHA 0x0028 - -#define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0xff23 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA160 0xff30 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA224 0xff34 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA256 0xff36 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA384 0xff33 -#define OP_PCL_TLS11_3DES_EDE_CBC_SHA512 0xff35 -#define OP_PCL_TLS11_AES_128_CBC_SHA160 0xff80 -#define OP_PCL_TLS11_AES_128_CBC_SHA224 0xff84 -#define OP_PCL_TLS11_AES_128_CBC_SHA256 0xff86 -#define OP_PCL_TLS11_AES_128_CBC_SHA384 0xff83 -#define OP_PCL_TLS11_AES_128_CBC_SHA512 0xff85 -#define OP_PCL_TLS11_AES_192_CBC_SHA160 0xff20 -#define OP_PCL_TLS11_AES_192_CBC_SHA224 0xff24 -#define OP_PCL_TLS11_AES_192_CBC_SHA256 0xff26 -#define OP_PCL_TLS11_AES_192_CBC_SHA384 0xff23 -#define OP_PCL_TLS11_AES_192_CBC_SHA512 0xff25 -#define OP_PCL_TLS11_AES_256_CBC_SHA160 0xff60 -#define OP_PCL_TLS11_AES_256_CBC_SHA224 0xff64 -#define OP_PCL_TLS11_AES_256_CBC_SHA256 0xff66 -#define OP_PCL_TLS11_AES_256_CBC_SHA384 0xff63 -#define OP_PCL_TLS11_AES_256_CBC_SHA512 0xff65 - - -/* For TLS 1.2 - OP_PCLID_TLS12 */ -#define OP_PCL_TLS12_AES_128_CBC_SHA 0x002f -#define OP_PCL_TLS12_AES_128_CBC_SHA_2 0x0030 -#define OP_PCL_TLS12_AES_128_CBC_SHA_3 0x0031 -#define OP_PCL_TLS12_AES_128_CBC_SHA_4 0x0032 -#define OP_PCL_TLS12_AES_128_CBC_SHA_5 0x0033 -#define OP_PCL_TLS12_AES_128_CBC_SHA_6 0x0034 -#define OP_PCL_TLS12_AES_128_CBC_SHA_7 0x008c -#define OP_PCL_TLS12_AES_128_CBC_SHA_8 0x0090 -#define OP_PCL_TLS12_AES_128_CBC_SHA_9 0x0094 -#define OP_PCL_TLS12_AES_128_CBC_SHA_10 0xc004 -#define OP_PCL_TLS12_AES_128_CBC_SHA_11 0xc009 -#define OP_PCL_TLS12_AES_128_CBC_SHA_12 0xc00e -#define OP_PCL_TLS12_AES_128_CBC_SHA_13 0xc013 -#define OP_PCL_TLS12_AES_128_CBC_SHA_14 0xc018 -#define OP_PCL_TLS12_AES_128_CBC_SHA_15 0xc01d -#define OP_PCL_TLS12_AES_128_CBC_SHA_16 0xc01e -#define OP_PCL_TLS12_AES_128_CBC_SHA_17 0xc01f - -#define OP_PCL_TLS12_AES_256_CBC_SHA 0x0035 -#define OP_PCL_TLS12_AES_256_CBC_SHA_2 0x0036 -#define OP_PCL_TLS12_AES_256_CBC_SHA_3 0x0037 -#define OP_PCL_TLS12_AES_256_CBC_SHA_4 0x0038 -#define OP_PCL_TLS12_AES_256_CBC_SHA_5 0x0039 -#define OP_PCL_TLS12_AES_256_CBC_SHA_6 0x003a -#define OP_PCL_TLS12_AES_256_CBC_SHA_7 0x008d -#define OP_PCL_TLS12_AES_256_CBC_SHA_8 0x0091 -#define OP_PCL_TLS12_AES_256_CBC_SHA_9 0x0095 -#define OP_PCL_TLS12_AES_256_CBC_SHA_10 0xc005 -#define OP_PCL_TLS12_AES_256_CBC_SHA_11 0xc00a -#define OP_PCL_TLS12_AES_256_CBC_SHA_12 0xc00f -#define OP_PCL_TLS12_AES_256_CBC_SHA_13 0xc014 -#define OP_PCL_TLS12_AES_256_CBC_SHA_14 0xc019 -#define OP_PCL_TLS12_AES_256_CBC_SHA_15 0xc020 -#define OP_PCL_TLS12_AES_256_CBC_SHA_16 0xc021 -#define OP_PCL_TLS12_AES_256_CBC_SHA_17 0xc022 - -/* #define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0x0023 */ - -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA 0x001f -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_2 0x008b -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_3 0x008f -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_4 0x0093 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_5 0x000a -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_6 0x000d -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_7 0x0010 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_8 0x0013 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_9 0x0016 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_10 0x001b -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_11 0xc003 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_12 0xc008 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_13 0xc00d -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_14 0xc012 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_15 0xc017 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_16 0xc01a -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_17 0xc01b -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_18 0xc01c - -#define OP_PCL_TLS12_DES40_CBC_MD5 0x0029 - -#define OP_PCL_TLS12_DES_CBC_MD5 0x0022 - -#define OP_PCL_TLS12_DES40_CBC_SHA 0x0008 -#define OP_PCL_TLS12_DES40_CBC_SHA_2 0x000b -#define OP_PCL_TLS12_DES40_CBC_SHA_3 0x000e -#define OP_PCL_TLS12_DES40_CBC_SHA_4 0x0011 -#define OP_PCL_TLS12_DES40_CBC_SHA_5 0x0014 -#define OP_PCL_TLS12_DES40_CBC_SHA_6 0x0019 -#define OP_PCL_TLS12_DES40_CBC_SHA_7 0x0026 - -#define OP_PCL_TLS12_DES_CBC_SHA 0x001e -#define OP_PCL_TLS12_DES_CBC_SHA_2 0x0009 -#define OP_PCL_TLS12_DES_CBC_SHA_3 0x000c -#define OP_PCL_TLS12_DES_CBC_SHA_4 0x000f -#define OP_PCL_TLS12_DES_CBC_SHA_5 0x0012 -#define OP_PCL_TLS12_DES_CBC_SHA_6 0x0015 -#define OP_PCL_TLS12_DES_CBC_SHA_7 0x001a - -#define OP_PCL_TLS12_RC4_128_MD5 0x0024 -#define OP_PCL_TLS12_RC4_128_MD5_2 0x0004 -#define OP_PCL_TLS12_RC4_128_MD5_3 0x0018 - -#define OP_PCL_TLS12_RC4_40_MD5 0x002b -#define OP_PCL_TLS12_RC4_40_MD5_2 0x0003 -#define OP_PCL_TLS12_RC4_40_MD5_3 0x0017 - -#define OP_PCL_TLS12_RC4_128_SHA 0x0020 -#define OP_PCL_TLS12_RC4_128_SHA_2 0x008a -#define OP_PCL_TLS12_RC4_128_SHA_3 0x008e -#define OP_PCL_TLS12_RC4_128_SHA_4 0x0092 -#define OP_PCL_TLS12_RC4_128_SHA_5 0x0005 -#define OP_PCL_TLS12_RC4_128_SHA_6 0xc002 -#define OP_PCL_TLS12_RC4_128_SHA_7 0xc007 -#define OP_PCL_TLS12_RC4_128_SHA_8 0xc00c -#define OP_PCL_TLS12_RC4_128_SHA_9 0xc011 -#define OP_PCL_TLS12_RC4_128_SHA_10 0xc016 - -#define OP_PCL_TLS12_RC4_40_SHA 0x0028 - -/* #define OP_PCL_TLS12_AES_128_CBC_SHA256 0x003c */ -#define OP_PCL_TLS12_AES_128_CBC_SHA256_2 0x003e -#define OP_PCL_TLS12_AES_128_CBC_SHA256_3 0x003f -#define OP_PCL_TLS12_AES_128_CBC_SHA256_4 0x0040 -#define OP_PCL_TLS12_AES_128_CBC_SHA256_5 0x0067 -#define OP_PCL_TLS12_AES_128_CBC_SHA256_6 0x006c - -/* #define OP_PCL_TLS12_AES_256_CBC_SHA256 0x003d */ -#define OP_PCL_TLS12_AES_256_CBC_SHA256_2 0x0068 -#define OP_PCL_TLS12_AES_256_CBC_SHA256_3 0x0069 -#define OP_PCL_TLS12_AES_256_CBC_SHA256_4 0x006a -#define OP_PCL_TLS12_AES_256_CBC_SHA256_5 0x006b -#define OP_PCL_TLS12_AES_256_CBC_SHA256_6 0x006d - -/* AEAD_AES_xxx_CCM/GCM remain to be defined... */ - -#define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0xff23 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA160 0xff30 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA224 0xff34 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA256 0xff36 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA384 0xff33 -#define OP_PCL_TLS12_3DES_EDE_CBC_SHA512 0xff35 -#define OP_PCL_TLS12_AES_128_CBC_SHA160 0xff80 -#define OP_PCL_TLS12_AES_128_CBC_SHA224 0xff84 -#define OP_PCL_TLS12_AES_128_CBC_SHA256 0xff86 -#define OP_PCL_TLS12_AES_128_CBC_SHA384 0xff83 -#define OP_PCL_TLS12_AES_128_CBC_SHA512 0xff85 -#define OP_PCL_TLS12_AES_192_CBC_SHA160 0xff20 -#define OP_PCL_TLS12_AES_192_CBC_SHA224 0xff24 -#define OP_PCL_TLS12_AES_192_CBC_SHA256 0xff26 -#define OP_PCL_TLS12_AES_192_CBC_SHA384 0xff23 -#define OP_PCL_TLS12_AES_192_CBC_SHA512 0xff25 -#define OP_PCL_TLS12_AES_256_CBC_SHA160 0xff60 -#define OP_PCL_TLS12_AES_256_CBC_SHA224 0xff64 -#define OP_PCL_TLS12_AES_256_CBC_SHA256 0xff66 -#define OP_PCL_TLS12_AES_256_CBC_SHA384 0xff63 -#define OP_PCL_TLS12_AES_256_CBC_SHA512 0xff65 - -/* For DTLS - OP_PCLID_DTLS */ - -#define OP_PCL_DTLS_AES_128_CBC_SHA 0x002f -#define OP_PCL_DTLS_AES_128_CBC_SHA_2 0x0030 -#define OP_PCL_DTLS_AES_128_CBC_SHA_3 0x0031 -#define OP_PCL_DTLS_AES_128_CBC_SHA_4 0x0032 -#define OP_PCL_DTLS_AES_128_CBC_SHA_5 0x0033 -#define OP_PCL_DTLS_AES_128_CBC_SHA_6 0x0034 -#define OP_PCL_DTLS_AES_128_CBC_SHA_7 0x008c -#define OP_PCL_DTLS_AES_128_CBC_SHA_8 0x0090 -#define OP_PCL_DTLS_AES_128_CBC_SHA_9 0x0094 -#define OP_PCL_DTLS_AES_128_CBC_SHA_10 0xc004 -#define OP_PCL_DTLS_AES_128_CBC_SHA_11 0xc009 -#define OP_PCL_DTLS_AES_128_CBC_SHA_12 0xc00e -#define OP_PCL_DTLS_AES_128_CBC_SHA_13 0xc013 -#define OP_PCL_DTLS_AES_128_CBC_SHA_14 0xc018 -#define OP_PCL_DTLS_AES_128_CBC_SHA_15 0xc01d -#define OP_PCL_DTLS_AES_128_CBC_SHA_16 0xc01e -#define OP_PCL_DTLS_AES_128_CBC_SHA_17 0xc01f - -#define OP_PCL_DTLS_AES_256_CBC_SHA 0x0035 -#define OP_PCL_DTLS_AES_256_CBC_SHA_2 0x0036 -#define OP_PCL_DTLS_AES_256_CBC_SHA_3 0x0037 -#define OP_PCL_DTLS_AES_256_CBC_SHA_4 0x0038 -#define OP_PCL_DTLS_AES_256_CBC_SHA_5 0x0039 -#define OP_PCL_DTLS_AES_256_CBC_SHA_6 0x003a -#define OP_PCL_DTLS_AES_256_CBC_SHA_7 0x008d -#define OP_PCL_DTLS_AES_256_CBC_SHA_8 0x0091 -#define OP_PCL_DTLS_AES_256_CBC_SHA_9 0x0095 -#define OP_PCL_DTLS_AES_256_CBC_SHA_10 0xc005 -#define OP_PCL_DTLS_AES_256_CBC_SHA_11 0xc00a -#define OP_PCL_DTLS_AES_256_CBC_SHA_12 0xc00f -#define OP_PCL_DTLS_AES_256_CBC_SHA_13 0xc014 -#define OP_PCL_DTLS_AES_256_CBC_SHA_14 0xc019 -#define OP_PCL_DTLS_AES_256_CBC_SHA_15 0xc020 -#define OP_PCL_DTLS_AES_256_CBC_SHA_16 0xc021 -#define OP_PCL_DTLS_AES_256_CBC_SHA_17 0xc022 - -/* #define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0x0023 */ - -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA 0x001f -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_2 0x008b -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_3 0x008f -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_4 0x0093 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_5 0x000a -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_6 0x000d -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_7 0x0010 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_8 0x0013 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_9 0x0016 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_10 0x001b -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_11 0xc003 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_12 0xc008 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_13 0xc00d -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_14 0xc012 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_15 0xc017 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_16 0xc01a -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_17 0xc01b -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_18 0xc01c - -#define OP_PCL_DTLS_DES40_CBC_MD5 0x0029 - -#define OP_PCL_DTLS_DES_CBC_MD5 0x0022 - -#define OP_PCL_DTLS_DES40_CBC_SHA 0x0008 -#define OP_PCL_DTLS_DES40_CBC_SHA_2 0x000b -#define OP_PCL_DTLS_DES40_CBC_SHA_3 0x000e -#define OP_PCL_DTLS_DES40_CBC_SHA_4 0x0011 -#define OP_PCL_DTLS_DES40_CBC_SHA_5 0x0014 -#define OP_PCL_DTLS_DES40_CBC_SHA_6 0x0019 -#define OP_PCL_DTLS_DES40_CBC_SHA_7 0x0026 - - -#define OP_PCL_DTLS_DES_CBC_SHA 0x001e -#define OP_PCL_DTLS_DES_CBC_SHA_2 0x0009 -#define OP_PCL_DTLS_DES_CBC_SHA_3 0x000c -#define OP_PCL_DTLS_DES_CBC_SHA_4 0x000f -#define OP_PCL_DTLS_DES_CBC_SHA_5 0x0012 -#define OP_PCL_DTLS_DES_CBC_SHA_6 0x0015 -#define OP_PCL_DTLS_DES_CBC_SHA_7 0x001a - -#define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0xff23 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA160 0xff30 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA224 0xff34 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA256 0xff36 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA384 0xff33 -#define OP_PCL_DTLS_3DES_EDE_CBC_SHA512 0xff35 -#define OP_PCL_DTLS_AES_128_CBC_SHA160 0xff80 -#define OP_PCL_DTLS_AES_128_CBC_SHA224 0xff84 -#define OP_PCL_DTLS_AES_128_CBC_SHA256 0xff86 -#define OP_PCL_DTLS_AES_128_CBC_SHA384 0xff83 -#define OP_PCL_DTLS_AES_128_CBC_SHA512 0xff85 -#define OP_PCL_DTLS_AES_192_CBC_SHA160 0xff20 -#define OP_PCL_DTLS_AES_192_CBC_SHA224 0xff24 -#define OP_PCL_DTLS_AES_192_CBC_SHA256 0xff26 -#define OP_PCL_DTLS_AES_192_CBC_SHA384 0xff23 -#define OP_PCL_DTLS_AES_192_CBC_SHA512 0xff25 -#define OP_PCL_DTLS_AES_256_CBC_SHA160 0xff60 -#define OP_PCL_DTLS_AES_256_CBC_SHA224 0xff64 -#define OP_PCL_DTLS_AES_256_CBC_SHA256 0xff66 -#define OP_PCL_DTLS_AES_256_CBC_SHA384 0xff63 -#define OP_PCL_DTLS_AES_256_CBC_SHA512 0xff65 +/* + * For SSL/TLS/DTLS - OP_PCL_TLS + * For more details see IANA TLS Cipher Suite registry: + * https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml + * Note: for private/internal use (reserved by IANA) - OP_PCL_PVT_TLS + */ +#define OP_PCL_TLS_RSA_EXPORT_WITH_RC4_40_MD5 0x0003 +#define OP_PCL_TLS_RSA_WITH_RC4_128_MD5 0x0004 +#define OP_PCL_TLS_RSA_WITH_RC4_128_SHA 0x0005 +#define OP_PCL_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0008 +#define OP_PCL_TLS_RSA_WITH_DES_CBC_SHA 0x0009 +#define OP_PCL_TLS_RSA_WITH_3DES_EDE_CBC_SHA 0x000a +#define OP_PCL_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA 0x000b +#define OP_PCL_TLS_DH_DSS_WITH_DES_CBC_SHA 0x000c +#define OP_PCL_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA 0x000d +#define OP_PCL_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA 0x000e +#define OP_PCL_TLS_DH_RSA_WITH_DES_CBC_SHA 0x000f +#define OP_PCL_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA 0x0010 +#define OP_PCL_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA 0x0011 +#define OP_PCL_TLS_DHE_DSS_WITH_DES_CBC_SHA 0x0012 +#define OP_PCL_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA 0x0013 +#define OP_PCL_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0014 +#define OP_PCL_TLS_DHE_RSA_WITH_DES_CBC_SHA 0x0015 +#define OP_PCL_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x0016 +#define OP_PCL_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 0x0017 +#define OP_PCL_TLS_DH_anon_WITH_RC4_128_MD5 0x0018 +#define OP_PCL_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA 0x0019 +#define OP_PCL_TLS_DH_anon_WITH_DES_CBC_SHA 0x001a +#define OP_PCL_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA 0x001b +#define OP_PCL_TLS_KRB5_WITH_DES_CBC_SHA 0x001e +#define OP_PCL_TLS_KRB5_WITH_3DES_EDE_CBC_SHA 0x001f +#define OP_PCL_TLS_KRB5_WITH_RC4_128_SHA 0x0020 +#define OP_PCL_TLS_KRB5_WITH_3DES_EDE_CBC_MD5 0x0023 +#define OP_PCL_TLS_KRB5_WITH_DES_CBC_MD5 0x0022 +#define OP_PCL_TLS_KRB5_WITH_RC4_128_MD5 0x0024 +#define OP_PCL_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA 0x0026 +#define OP_PCL_TLS_KRB5_EXPORT_WITH_RC4_40_SHA 0x0028 +#define OP_PCL_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 0x0029 +#define OP_PCL_TLS_KRB5_EXPORT_WITH_RC4_40_MD5 0x002b +#define OP_PCL_TLS_RSA_WITH_AES_128_CBC_SHA 0x002f +#define OP_PCL_TLS_DH_DSS_WITH_AES_128_CBC_SHA 0x0030 +#define OP_PCL_TLS_DH_RSA_WITH_AES_128_CBC_SHA 0x0031 +#define OP_PCL_TLS_DHE_DSS_WITH_AES_128_CBC_SHA 0x0032 +#define OP_PCL_TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033 +#define OP_PCL_TLS_DH_anon_WITH_AES_128_CBC_SHA 0x0034 +#define OP_PCL_TLS_RSA_WITH_AES_256_CBC_SHA 0x0035 +#define OP_PCL_TLS_DH_DSS_WITH_AES_256_CBC_SHA 0x0036 +#define OP_PCL_TLS_DH_RSA_WITH_AES_256_CBC_SHA 0x0037 +#define OP_PCL_TLS_DHE_DSS_WITH_AES_256_CBC_SHA 0x0038 +#define OP_PCL_TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039 +#define OP_PCL_TLS_DH_anon_WITH_AES_256_CBC_SHA 0x003a +#define OP_PCL_TLS_RSA_WITH_AES_128_CBC_SHA256 0x003c +#define OP_PCL_TLS_RSA_WITH_AES_256_CBC_SHA256 0x003d +#define OP_PCL_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 0x003e +#define OP_PCL_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 0x003f +#define OP_PCL_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 0x0040 +#define OP_PCL_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x0067 +#define OP_PCL_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 0x0068 +#define OP_PCL_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 0x0069 +#define OP_PCL_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 0x006a +#define OP_PCL_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x006b +#define OP_PCL_TLS_DH_anon_WITH_AES_128_CBC_SHA256 0x006c +#define OP_PCL_TLS_DH_anon_WITH_AES_256_CBC_SHA256 0x006d +#define OP_PCL_TLS_PSK_WITH_RC4_128_SHA 0x008a +#define OP_PCL_TLS_PSK_WITH_3DES_EDE_CBC_SHA 0x008b +#define OP_PCL_TLS_PSK_WITH_AES_128_CBC_SHA 0x008c +#define OP_PCL_TLS_PSK_WITH_AES_256_CBC_SHA 0x008d +#define OP_PCL_TLS_DHE_PSK_WITH_RC4_128_SHA 0x008e +#define OP_PCL_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x008f +#define OP_PCL_TLS_DHE_PSK_WITH_AES_128_CBC_SHA 0x0090 +#define OP_PCL_TLS_DHE_PSK_WITH_AES_256_CBC_SHA 0x0091 +#define OP_PCL_TLS_RSA_PSK_WITH_RC4_128_SHA 0x0092 +#define OP_PCL_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x0093 +#define OP_PCL_TLS_RSA_PSK_WITH_AES_128_CBC_SHA 0x0094 +#define OP_PCL_TLS_RSA_PSK_WITH_AES_256_CBC_SHA 0x0095 +#define OP_PCL_TLS_RSA_WITH_AES_128_GCM_SHA256 0x009c +#define OP_PCL_TLS_RSA_WITH_AES_256_GCM_SHA384 0x009d +#define OP_PCL_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009e +#define OP_PCL_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009f +#define OP_PCL_TLS_DH_RSA_WITH_AES_128_GCM_SHA256 0x00a0 +#define OP_PCL_TLS_DH_RSA_WITH_AES_256_GCM_SHA384 0x00a1 +#define OP_PCL_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 0x00a2 +#define OP_PCL_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 0x00a3 +#define OP_PCL_TLS_DH_DSS_WITH_AES_128_GCM_SHA256 0x00a4 +#define OP_PCL_TLS_DH_DSS_WITH_AES_256_GCM_SHA384 0x00a5 +#define OP_PCL_TLS_DH_anon_WITH_AES_128_GCM_SHA256 0x00a6 +#define OP_PCL_TLS_DH_anon_WITH_AES_256_GCM_SHA384 0x00a7 +#define OP_PCL_TLS_PSK_WITH_AES_128_GCM_SHA256 0x00a8 +#define OP_PCL_TLS_PSK_WITH_AES_256_GCM_SHA384 0x00a9 +#define OP_PCL_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 0x00aa +#define OP_PCL_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 0x00ab +#define OP_PCL_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 0x00ac +#define OP_PCL_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 0x00ad +#define OP_PCL_TLS_PSK_WITH_AES_128_CBC_SHA256 0x00ae +#define OP_PCL_TLS_PSK_WITH_AES_256_CBC_SHA384 0x00af +#define OP_PCL_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 0x00b2 +#define OP_PCL_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 0x00b3 +#define OP_PCL_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 0x00b6 +#define OP_PCL_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 0x00b7 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xc002 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xc003 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xc004 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xc005 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xc007 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xc008 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xc009 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xc00a +#define OP_PCL_TLS_ECDH_RSA_WITH_RC4_128_SHA 0xc00c +#define OP_PCL_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xc00d +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xc00e +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xc00f +#define OP_PCL_TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xc011 +#define OP_PCL_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xc012 +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xc013 +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xc014 +#define OP_PCL_TLS_ECDH_anon_WITH_RC4_128_SHA 0xc016 +#define OP_PCL_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA 0xc017 +#define OP_PCL_TLS_ECDH_anon_WITH_AES_128_CBC_SHA 0xc018 +#define OP_PCL_TLS_ECDH_anon_WITH_AES_256_CBC_SHA 0xc019 +#define OP_PCL_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0xc01a +#define OP_PCL_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0xc01b +#define OP_PCL_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0xc01c +#define OP_PCL_TLS_SRP_SHA_WITH_AES_128_CBC_SHA 0xc01d +#define OP_PCL_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0xc01e +#define OP_PCL_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0xc01f +#define OP_PCL_TLS_SRP_SHA_WITH_AES_256_CBC_SHA 0xc020 +#define OP_PCL_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0xc021 +#define OP_PCL_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0xc022 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xc023 +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xc024 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 0xc025 +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 0xc026 +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xc027 +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xc028 +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 0xc029 +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 0xc02a +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xc02b +#define OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xc02c +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0xc02d +#define OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0xc02e +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xc02f +#define OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xc030 +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xc031 +#define OP_PCL_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 0xc032 +#define OP_PCL_TLS_ECDHE_PSK_WITH_RC4_128_SHA 0xc033 +#define OP_PCL_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0xc034 +#define OP_PCL_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 0xc035 +#define OP_PCL_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 0xc036 +#define OP_PCL_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0xc037 +#define OP_PCL_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0xc038 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_MD5 0xff23 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA160 0xff30 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA384 0xff33 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA224 0xff34 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA512 0xff35 +#define OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA256 0xff36 +#define OP_PCL_PVT_TLS_AES_256_CBC_SHA160 0xff60 +#define OP_PCL_PVT_TLS_AES_256_CBC_SHA384 0xff63 +#define OP_PCL_PVT_TLS_AES_256_CBC_SHA224 0xff64 +#define OP_PCL_PVT_TLS_AES_256_CBC_SHA512 0xff65 +#define OP_PCL_PVT_TLS_AES_256_CBC_SHA256 0xff66 +#define OP_PCL_PVT_TLS_AES_128_CBC_SHA160 0xff80 +#define OP_PCL_PVT_TLS_AES_128_CBC_SHA384 0xff83 +#define OP_PCL_PVT_TLS_AES_128_CBC_SHA224 0xff84 +#define OP_PCL_PVT_TLS_AES_128_CBC_SHA512 0xff85 +#define OP_PCL_PVT_TLS_AES_128_CBC_SHA256 0xff86 +#define OP_PCL_PVT_TLS_AES_192_CBC_SHA160 0xff90 +#define OP_PCL_PVT_TLS_AES_192_CBC_SHA384 0xff93 +#define OP_PCL_PVT_TLS_AES_192_CBC_SHA224 0xff94 +#define OP_PCL_PVT_TLS_AES_192_CBC_SHA512 0xff95 +#define OP_PCL_PVT_TLS_AES_192_CBC_SHA256 0xff96 +#define OP_PCL_PVT_TLS_MASTER_SECRET_PRF_FE 0xfffe +#define OP_PCL_PVT_TLS_MASTER_SECRET_PRF_FF 0xffff /* 802.16 WiMAX protinfos */ #define OP_PCL_WIMAX_OFDM 0x0201 diff --git a/drivers/crypto/dpaa2_sec/hw/desc/algo.h b/drivers/crypto/dpaa2_sec/hw/desc/algo.h index 91f3e06..febcb6d 100644 --- a/drivers/crypto/dpaa2_sec/hw/desc/algo.h +++ b/drivers/crypto/dpaa2_sec/hw/desc/algo.h @@ -410,6 +410,35 @@ cnstr_shdsc_kasumi_f9(uint32_t *descbuf, bool ps, bool swap, } /** + * cnstr_shdsc_crc - CRC32 Accelerator (IEEE 802 CRC32 protocol mode) + * @descbuf: pointer to descriptor-under-construction buffer + * @swap: must be true when core endianness doesn't match SEC endianness + * + * Return: size of descriptor written in words or negative number on error + */ +static inline int +cnstr_shdsc_crc(uint32_t *descbuf, bool swap) +{ + struct program prg; + struct program *p = &prg; + + PROGRAM_CNTXT_INIT(p, descbuf, 0); + if (swap) + PROGRAM_SET_BSWAP(p); + + SHR_HDR(p, SHR_ALWAYS, 1, 0); + + MATHB(p, SEQINSZ, SUB, MATH2, VSEQINSZ, 4, 0); + ALG_OPERATION(p, OP_ALG_ALGSEL_CRC, + OP_ALG_AAI_802 | OP_ALG_AAI_DOC, + OP_ALG_AS_FINALIZE, 0, DIR_ENC); + SEQFIFOLOAD(p, MSG2, 0, VLF | LAST2); + SEQSTORE(p, CONTEXT2, 0, 4, 0); + + return PROGRAM_FINALIZE(p); +} + +/** * cnstr_shdsc_gcm_encap - AES-GCM encap as a shared descriptor * @descbuf: pointer to descriptor-under-construction buffer * @ps: if 36/40bit addressing is desired, this parameter must be true @@ -614,33 +643,4 @@ cnstr_shdsc_gcm_decap(uint32_t *descbuf, bool ps, bool swap, return PROGRAM_FINALIZE(p); } -/** - * cnstr_shdsc_crc - CRC32 Accelerator (IEEE 802 CRC32 protocol mode) - * @descbuf: pointer to descriptor-under-construction buffer - * @swap: must be true when core endianness doesn't match SEC endianness - * - * Return: size of descriptor written in words or negative number on error - */ -static inline int -cnstr_shdsc_crc(uint32_t *descbuf, bool swap) -{ - struct program prg; - struct program *p = &prg; - - PROGRAM_CNTXT_INIT(p, descbuf, 0); - if (swap) - PROGRAM_SET_BSWAP(p); - - SHR_HDR(p, SHR_ALWAYS, 1, 0); - - MATHB(p, SEQINSZ, SUB, MATH2, VSEQINSZ, 4, 0); - ALG_OPERATION(p, OP_ALG_ALGSEL_CRC, - OP_ALG_AAI_802 | OP_ALG_AAI_DOC, - OP_ALG_AS_FINALIZE, 0, DIR_ENC); - SEQFIFOLOAD(p, MSG2, 0, VLF | LAST2); - SEQSTORE(p, CONTEXT2, 0, 4, 0); - - return PROGRAM_FINALIZE(p); -} - #endif /* __DESC_ALGO_H__ */ diff --git a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h b/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h index 35cc02a..d256a39 100644 --- a/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h +++ b/drivers/crypto/dpaa2_sec/hw/desc/ipsec.h @@ -522,44 +522,133 @@ enum ipsec_icv_size { /* * IPSec ESP Datapath Protocol Override Register (DPOVRD) + * IPSEC_N_* defines are for IPsec new mode. */ -#define IPSEC_DECO_DPOVRD_USE 0x80 +/** + * IPSEC_DPOVRD_USE - DPOVRD will override values specified in the PDB + */ +#define IPSEC_DPOVRD_USE BIT(31) -struct ipsec_deco_dpovrd { - uint8_t ovrd_ecn; - uint8_t ip_hdr_len; - uint8_t nh_offset; - union { - uint8_t next_header; /* next header if encap */ - uint8_t rsvd; /* reserved if decap */ - }; -}; +/** + * IPSEC_DPOVRD_ECN_SHIFT - Explicit Congestion Notification + * + * If set, MSB of the 4 bits indicates that the 2 LSBs will replace the ECN bits + * in the IP header. + */ +#define IPSEC_DPOVRD_ECN_SHIFT 24 -struct ipsec_new_encap_deco_dpovrd { -#define IPSEC_NEW_ENCAP_DECO_DPOVRD_USE 0x8000 - uint16_t ovrd_ip_hdr_len; /* OVRD + outer IP header material - * length - */ -#define IPSEC_NEW_ENCAP_OIMIF 0x80 - uint8_t oimif_aoipho; /* OIMIF + actual outer IP header - * offset - */ - uint8_t rsvd; -}; +/** + * IPSEC_DPOVRD_ECN_MASK - See IPSEC_DPOVRD_ECN_SHIFT + */ +#define IPSEC_DPOVRD_ECN_MASK (0xf << IPSEC_ENCAP_DPOVRD_ECN_SHIFT) -struct ipsec_new_decap_deco_dpovrd { - uint8_t ovrd; - uint8_t aoipho_hi; /* upper nibble of actual outer IP - * header - */ - uint16_t aoipho_lo_ip_hdr_len; /* lower nibble of actual outer IP - * header + outer IP header material - */ -}; +/** + * IPSEC_DPOVRD_IP_HDR_LEN_SHIFT - The length (in bytes) of the portion of the + * IP header that is not encrypted + */ +#define IPSEC_DPOVRD_IP_HDR_LEN_SHIFT 16 + +/** + * IPSEC_DPOVRD_IP_HDR_LEN_MASK - See IPSEC_DPOVRD_IP_HDR_LEN_SHIFT + */ +#define IPSEC_DPOVRD_IP_HDR_LEN_MASK (0xff << IPSEC_DPOVRD_IP_HDR_LEN_SHIFT) + +/** + * IPSEC_DPOVRD_NH_OFFSET_SHIFT - The location of the next header field within + * the IP header of the transport mode packet + * + * Encap: + * ESP_Trailer_NH <-- IP_Hdr[DPOVRD[NH_OFFSET]] + * IP_Hdr[DPOVRD[NH_OFFSET]] <-- DPOVRD[NH] + *Decap: + * IP_Hdr[DPOVRD[NH_OFFSET]] <-- ESP_Trailer_NH + */ +#define IPSEC_DPOVRD_NH_OFFSET_SHIFT 8 + +/** + * IPSEC_DPOVRD_NH_OFFSET_MASK - See IPSEC_DPOVRD_NH_OFFSET_SHIFT + */ +#define IPSEC_DPOVRD_NH_OFFSET_MASK (0xff << IPSEC_DPOVRD_NH_OFFSET_SHIFT) + +/** + * IPSEC_DPOVRD_NH_MASK - See IPSEC_DPOVRD_NH_OFFSET_SHIFT + * Valid only for encapsulation. + */ +#define IPSEC_DPOVRD_NH_MASK 0xff + +/** + * IPSEC_N_ENCAP_DPOVRD_OIM_LEN_SHIFT - Outer IP header Material length (encap) + * Valid only if L2_COPY is not set. + */ +#define IPSEC_N_ENCAP_DPOVRD_OIM_LEN_SHIFT 16 + +/** + * IPSEC_N_ENCAP_DPOVRD_OIM_LEN_MASK - See IPSEC_N_ENCAP_DPOVRD_OIM_LEN_SHIFT + */ +#define IPSEC_N_ENCAP_DPOVRD_OIM_LEN_MASK \ + (0xfff << IPSEC_N_ENCAP_DPOVRD_OIM_LEN_SHIFT) + +/** + * IPSEC_N_ENCAP_DPOVRD_L2_LEN_SHIFT - L2 header length + * Valid only if L2_COPY is set. + */ +#define IPSEC_N_ENCAP_DPOVRD_L2_LEN_SHIFT 16 -static inline void -__gen_auth_key(struct program *program, struct alginfo *authdata) +/** + * IPSEC_N_ENCAP_DPOVRD_L2_LEN_MASK - See IPSEC_N_ENCAP_DPOVRD_L2_LEN_SHIFT + */ +#define IPSEC_N_ENCAP_DPOVRD_L2_LEN_MASK \ + (0xff << IPSEC_N_ENCAP_DPOVRD_L2_LEN_SHIFT) + +/** + * IPSEC_N_ENCAP_DPOVRD_OIMIF - Outer IP header Material in Input Frame + */ +#define IPSEC_N_ENCAP_DPOVRD_OIMIF BIT(15) + +/** + * IPSEC_N_ENCAP_DPOVRD_L2_COPY - L2 header present in input frame + * + * Note: For Era <= 8, this bit is reserved (not used) by HW. + */ +#define IPSEC_N_ENCAP_DPOVRD_L2_COPY BIT(14) + +/** + * IPSEC_N_ENCAP_DPOVRD_AOIPHO_SHIFT - Actual Outer IP Header Offset (encap) + */ +#define IPSEC_N_ENCAP_DPOVRD_AOIPHO_SHIFT 8 + +/** + * IPSEC_N_ENCAP_DPOVRD_AOIPHO_MASK - See IPSEC_N_ENCAP_DPOVRD_AOIPHO_SHIFT + */ +#define IPSEC_N_ENCAP_DPOVRD_AOIPHO_MASK \ + (0x3c << IPSEC_N_ENCAP_DPOVRD_AOIPHO_SHIFT) + +/** + * IPSEC_N_ENCAP_DPOVRD_NH_MASK - Next Header + * + * Used in the Next Header field of the encapsulated payload. + */ +#define IPSEC_N_ENCAP_DPOVRD_NH_MASK 0xff + +/** + * IPSEC_N_DECAP_DPOVRD_AOIPHO_SHIFT - Actual Outer IP Header Offset (decap) + */ +#define IPSEC_N_DECAP_DPOVRD_AOIPHO_SHIFT 12 + +/** + * IPSEC_N_DECAP_DPOVRD_AOIPHO_MASK - See IPSEC_N_DECAP_DPOVRD_AOIPHO_SHIFT + */ +#define IPSEC_N_DECAP_DPOVRD_AOIPHO_MASK \ + (0xff << IPSEC_N_DECAP_DPOVRD_AOIPHO_SHIFT) + +/** + * IPSEC_N_DECAP_DPOVRD_OIM_LEN_MASK - Outer IP header Material length (decap) + */ +#define IPSEC_N_DECAP_DPOVRD_OIM_LEN_MASK 0xfff + +static inline void __gen_auth_key(struct program *program, + struct alginfo *authdata) { uint32_t dkp_protid; @@ -603,6 +692,7 @@ __gen_auth_key(struct program *program, struct alginfo *authdata) * @descbuf: pointer to buffer used for descriptor construction * @ps: if 36/40bit addressing is desired, this parameter must be true * @swap: if true, perform descriptor byte swapping on a 4-byte boundary + * @share: sharing type of shared descriptor * @pdb: pointer to the PDB to be used with this descriptor * This structure will be copied inline to the descriptor under * construction. No error checking will be made. Refer to the @@ -621,6 +711,7 @@ __gen_auth_key(struct program *program, struct alginfo *authdata) */ static inline int cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap, + enum rta_share_type share, struct ipsec_encap_pdb *pdb, struct alginfo *cipherdata, struct alginfo *authdata) @@ -638,7 +729,7 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap, PROGRAM_SET_BSWAP(p); if (ps) PROGRAM_SET_36BIT_ADDR(p); - phdr = SHR_HDR(p, SHR_SERIAL, hdr, 0); + phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); COPY_DATA(p, pdb->ip_hdr, pdb->ip_hdr_len); SET_LABEL(p, hdr); @@ -669,6 +760,7 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap, * @descbuf: pointer to buffer used for descriptor construction * @ps: if 36/40bit addressing is desired, this parameter must be true * @swap: if true, perform descriptor byte swapping on a 4-byte boundary + * @share: sharing type of shared descriptor * @pdb: pointer to the PDB to be used with this descriptor * This structure will be copied inline to the descriptor under * construction. No error checking will be made. Refer to the @@ -687,6 +779,7 @@ cnstr_shdsc_ipsec_encap(uint32_t *descbuf, bool ps, bool swap, */ static inline int cnstr_shdsc_ipsec_decap(uint32_t *descbuf, bool ps, bool swap, + enum rta_share_type share, struct ipsec_decap_pdb *pdb, struct alginfo *cipherdata, struct alginfo *authdata) @@ -704,7 +797,7 @@ cnstr_shdsc_ipsec_decap(uint32_t *descbuf, bool ps, bool swap, PROGRAM_SET_BSWAP(p); if (ps) PROGRAM_SET_36BIT_ADDR(p); - phdr = SHR_HDR(p, SHR_SERIAL, hdr, 0); + phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_decap_pdb(p, pdb, cipherdata->algtype); SET_LABEL(p, hdr); pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, BOTH|SHRD); @@ -1040,7 +1133,7 @@ cnstr_shdsc_ipsec_decap_des_aes_xcbc(uint32_t *descbuf, * layers to determine whether Outer IP Header and/or keys can be inlined or * not. To be used as first parameter of rta_inline_query(). */ -#define IPSEC_NEW_ENC_BASE_DESC_LEN (5 * CAAM_CMD_SZ + \ +#define IPSEC_NEW_ENC_BASE_DESC_LEN (12 * CAAM_CMD_SZ + \ sizeof(struct ipsec_encap_pdb)) /** @@ -1052,7 +1145,7 @@ cnstr_shdsc_ipsec_decap_des_aes_xcbc(uint32_t *descbuf, * layers to determine whether Outer IP Header and/or key can be inlined or * not. To be used as first parameter of rta_inline_query(). */ -#define IPSEC_NEW_NULL_ENC_BASE_DESC_LEN (4 * CAAM_CMD_SZ + \ +#define IPSEC_NEW_NULL_ENC_BASE_DESC_LEN (11 * CAAM_CMD_SZ + \ sizeof(struct ipsec_encap_pdb)) /** @@ -1061,6 +1154,7 @@ cnstr_shdsc_ipsec_decap_des_aes_xcbc(uint32_t *descbuf, * @descbuf: pointer to buffer used for descriptor construction * @ps: if 36/40bit addressing is desired, this parameter must be true * @swap: must be true when core endianness doesn't match SEC endianness + * @share: sharing type of shared descriptor * @pdb: pointer to the PDB to be used with this descriptor * This structure will be copied inline to the descriptor under * construction. No error checking will be made. Refer to the @@ -1080,11 +1174,21 @@ cnstr_shdsc_ipsec_decap_des_aes_xcbc(uint32_t *descbuf, * compute MDHA on the fly in HW. * Valid algorithm values - one of OP_PCL_IPSEC_* * + * Note: L2 header copy functionality is implemented assuming that bits 14 + * (currently reserved) and 16-23 (part of Outer IP Header Material Length) + * in DPOVRD register are not used (which is usually the case when L3 header + * is provided in PDB). + * When DPOVRD[14] is set, frame starts with an L2 header; in this case, the + * L2 header length is found at DPOVRD[23:16]. SEC uses this length to copy + * the header and then it deletes DPOVRD[23:16] (so there is no side effect + * when later running IPsec protocol). + * * Return: size of descriptor written in words or negative number on error */ static inline int cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, bool swap, + enum rta_share_type share, struct ipsec_encap_pdb *pdb, uint8_t *opt_ip_hdr, struct alginfo *cipherdata, @@ -1097,6 +1201,8 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, REFERENCE(pkeyjmp); LABEL(hdr); REFERENCE(phdr); + LABEL(l2copy); + REFERENCE(pl2copy); if (rta_sec_era < RTA_SEC_ERA_8) { pr_err("IPsec new mode encap: available only for Era %d or above\n", @@ -1109,7 +1215,7 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, PROGRAM_SET_BSWAP(p); if (ps) PROGRAM_SET_36BIT_ADDR(p); - phdr = SHR_HDR(p, SHR_SERIAL, hdr, 0); + phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_encap_pdb(p, pdb, cipherdata->algtype); @@ -1128,6 +1234,16 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, } SET_LABEL(p, hdr); + MATHB(p, DPOVRD, AND, IPSEC_N_ENCAP_DPOVRD_L2_COPY, NONE, 4, IMMED2); + pl2copy = JUMP(p, l2copy, LOCAL_JUMP, ALL_TRUE, MATH_Z); + MATHI(p, DPOVRD, RSHIFT, IPSEC_N_ENCAP_DPOVRD_L2_LEN_SHIFT, VSEQOUTSZ, + 1, 0); + MATHB(p, DPOVRD, AND, ~IPSEC_N_ENCAP_DPOVRD_L2_LEN_MASK, DPOVRD, 4, + IMMED2); + /* TODO: CLASS2 corresponds to AUX=2'b10; add more intuitive defines */ + SEQFIFOSTORE(p, METADATA, 0, 0, CLASS2 | VLF); + SET_LABEL(p, l2copy); + pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, SHRD); if (authdata->keylen) __gen_auth_key(p, authdata); @@ -1138,6 +1254,7 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, PROTOCOL(p, OP_TYPE_ENCAP_PROTOCOL, OP_PCLID_IPSEC_NEW, (uint16_t)(cipherdata->algtype | authdata->algtype)); + PATCH_JUMP(p, pl2copy, l2copy); PATCH_JUMP(p, pkeyjmp, keyjmp); PATCH_HDR(p, phdr, hdr); return PROGRAM_FINALIZE(p); @@ -1171,6 +1288,7 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, * @descbuf: pointer to buffer used for descriptor construction * @ps: if 36/40bit addressing is desired, this parameter must be true * @swap: must be true when core endianness doesn't match SEC endianness + * @share: sharing type of shared descriptor * @pdb: pointer to the PDB to be used with this descriptor * This structure will be copied inline to the descriptor under * construction. No error checking will be made. Refer to the @@ -1188,6 +1306,7 @@ cnstr_shdsc_ipsec_new_encap(uint32_t *descbuf, bool ps, static inline int cnstr_shdsc_ipsec_new_decap(uint32_t *descbuf, bool ps, bool swap, + enum rta_share_type share, struct ipsec_decap_pdb *pdb, struct alginfo *cipherdata, struct alginfo *authdata) @@ -1211,7 +1330,7 @@ cnstr_shdsc_ipsec_new_decap(uint32_t *descbuf, bool ps, PROGRAM_SET_BSWAP(p); if (ps) PROGRAM_SET_36BIT_ADDR(p); - phdr = SHR_HDR(p, SHR_SERIAL, hdr, 0); + phdr = SHR_HDR(p, share, hdr, 0); __rta_copy_ipsec_decap_pdb(p, pdb, cipherdata->algtype); SET_LABEL(p, hdr); pkeyjmp = JUMP(p, keyjmp, LOCAL_JUMP, ALL_TRUE, SHRD); diff --git a/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h b/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h index d9a5b0e..cf8dfb9 100644 --- a/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h +++ b/drivers/crypto/dpaa2_sec/hw/rta/protocol_cmd.h @@ -14,178 +14,176 @@ static inline int __rta_ssl_proto(uint16_t protoinfo) { switch (protoinfo) { - case OP_PCL_SSL30_RC4_40_MD5_2: - case OP_PCL_SSL30_RC4_128_MD5_2: - case OP_PCL_SSL30_RC4_128_SHA_5: - case OP_PCL_SSL30_RC4_40_MD5_3: - case OP_PCL_SSL30_RC4_128_MD5_3: - case OP_PCL_SSL30_RC4_128_SHA: - case OP_PCL_SSL30_RC4_128_MD5: - case OP_PCL_SSL30_RC4_40_SHA: - case OP_PCL_SSL30_RC4_40_MD5: - case OP_PCL_SSL30_RC4_128_SHA_2: - case OP_PCL_SSL30_RC4_128_SHA_3: - case OP_PCL_SSL30_RC4_128_SHA_4: - case OP_PCL_SSL30_RC4_128_SHA_6: - case OP_PCL_SSL30_RC4_128_SHA_7: - case OP_PCL_SSL30_RC4_128_SHA_8: - case OP_PCL_SSL30_RC4_128_SHA_9: - case OP_PCL_SSL30_RC4_128_SHA_10: - case OP_PCL_TLS_ECDHE_PSK_RC4_128_SHA: + case OP_PCL_TLS_RSA_EXPORT_WITH_RC4_40_MD5: + case OP_PCL_TLS_RSA_WITH_RC4_128_MD5: + case OP_PCL_TLS_RSA_WITH_RC4_128_SHA: + case OP_PCL_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5: + case OP_PCL_TLS_DH_anon_WITH_RC4_128_MD5: + case OP_PCL_TLS_KRB5_WITH_RC4_128_SHA: + case OP_PCL_TLS_KRB5_WITH_RC4_128_MD5: + case OP_PCL_TLS_KRB5_EXPORT_WITH_RC4_40_SHA: + case OP_PCL_TLS_KRB5_EXPORT_WITH_RC4_40_MD5: + case OP_PCL_TLS_PSK_WITH_RC4_128_SHA: + case OP_PCL_TLS_DHE_PSK_WITH_RC4_128_SHA: + case OP_PCL_TLS_RSA_PSK_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDH_ECDSA_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDH_RSA_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDHE_RSA_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDH_anon_WITH_RC4_128_SHA: + case OP_PCL_TLS_ECDHE_PSK_WITH_RC4_128_SHA: if (rta_sec_era == RTA_SEC_ERA_7) return -EINVAL; /* fall through if not Era 7 */ - case OP_PCL_SSL30_DES40_CBC_SHA: - case OP_PCL_SSL30_DES_CBC_SHA_2: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_5: - case OP_PCL_SSL30_DES40_CBC_SHA_2: - case OP_PCL_SSL30_DES_CBC_SHA_3: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_6: - case OP_PCL_SSL30_DES40_CBC_SHA_3: - case OP_PCL_SSL30_DES_CBC_SHA_4: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_7: - case OP_PCL_SSL30_DES40_CBC_SHA_4: - case OP_PCL_SSL30_DES_CBC_SHA_5: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_8: - case OP_PCL_SSL30_DES40_CBC_SHA_5: - case OP_PCL_SSL30_DES_CBC_SHA_6: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_9: - case OP_PCL_SSL30_DES40_CBC_SHA_6: - case OP_PCL_SSL30_DES_CBC_SHA_7: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_10: - case OP_PCL_SSL30_DES_CBC_SHA: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA: - case OP_PCL_SSL30_DES_CBC_MD5: - case OP_PCL_SSL30_3DES_EDE_CBC_MD5: - case OP_PCL_SSL30_DES40_CBC_SHA_7: - case OP_PCL_SSL30_DES40_CBC_MD5: - case OP_PCL_SSL30_AES_128_CBC_SHA: - case OP_PCL_SSL30_AES_128_CBC_SHA_2: - case OP_PCL_SSL30_AES_128_CBC_SHA_3: - case OP_PCL_SSL30_AES_128_CBC_SHA_4: - case OP_PCL_SSL30_AES_128_CBC_SHA_5: - case OP_PCL_SSL30_AES_128_CBC_SHA_6: - case OP_PCL_SSL30_AES_256_CBC_SHA: - case OP_PCL_SSL30_AES_256_CBC_SHA_2: - case OP_PCL_SSL30_AES_256_CBC_SHA_3: - case OP_PCL_SSL30_AES_256_CBC_SHA_4: - case OP_PCL_SSL30_AES_256_CBC_SHA_5: - case OP_PCL_SSL30_AES_256_CBC_SHA_6: - case OP_PCL_TLS12_AES_128_CBC_SHA256_2: - case OP_PCL_TLS12_AES_128_CBC_SHA256_3: - case OP_PCL_TLS12_AES_128_CBC_SHA256_4: - case OP_PCL_TLS12_AES_128_CBC_SHA256_5: - case OP_PCL_TLS12_AES_256_CBC_SHA256_2: - case OP_PCL_TLS12_AES_256_CBC_SHA256_3: - case OP_PCL_TLS12_AES_256_CBC_SHA256_4: - case OP_PCL_TLS12_AES_256_CBC_SHA256_5: - case OP_PCL_TLS12_AES_128_CBC_SHA256_6: - case OP_PCL_TLS12_AES_256_CBC_SHA256_6: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_2: - case OP_PCL_SSL30_AES_128_CBC_SHA_7: - case OP_PCL_SSL30_AES_256_CBC_SHA_7: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_3: - case OP_PCL_SSL30_AES_128_CBC_SHA_8: - case OP_PCL_SSL30_AES_256_CBC_SHA_8: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_4: - case OP_PCL_SSL30_AES_128_CBC_SHA_9: - case OP_PCL_SSL30_AES_256_CBC_SHA_9: - case OP_PCL_SSL30_AES_128_GCM_SHA256_1: - case OP_PCL_SSL30_AES_256_GCM_SHA384_1: - case OP_PCL_SSL30_AES_128_GCM_SHA256_2: - case OP_PCL_SSL30_AES_256_GCM_SHA384_2: - case OP_PCL_SSL30_AES_128_GCM_SHA256_3: - case OP_PCL_SSL30_AES_256_GCM_SHA384_3: - case OP_PCL_SSL30_AES_128_GCM_SHA256_4: - case OP_PCL_SSL30_AES_256_GCM_SHA384_4: - case OP_PCL_SSL30_AES_128_GCM_SHA256_5: - case OP_PCL_SSL30_AES_256_GCM_SHA384_5: - case OP_PCL_SSL30_AES_128_GCM_SHA256_6: - case OP_PCL_TLS_DH_ANON_AES_256_GCM_SHA384: - case OP_PCL_TLS_PSK_AES_128_GCM_SHA256: - case OP_PCL_TLS_PSK_AES_256_GCM_SHA384: - case OP_PCL_TLS_DHE_PSK_AES_128_GCM_SHA256: - case OP_PCL_TLS_DHE_PSK_AES_256_GCM_SHA384: - case OP_PCL_TLS_RSA_PSK_AES_128_GCM_SHA256: - case OP_PCL_TLS_RSA_PSK_AES_256_GCM_SHA384: - case OP_PCL_TLS_PSK_AES_128_CBC_SHA256: - case OP_PCL_TLS_PSK_AES_256_CBC_SHA384: - case OP_PCL_TLS_DHE_PSK_AES_128_CBC_SHA256: - case OP_PCL_TLS_DHE_PSK_AES_256_CBC_SHA384: - case OP_PCL_TLS_RSA_PSK_AES_128_CBC_SHA256: - case OP_PCL_TLS_RSA_PSK_AES_256_CBC_SHA384: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_11: - case OP_PCL_SSL30_AES_128_CBC_SHA_10: - case OP_PCL_SSL30_AES_256_CBC_SHA_10: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_12: - case OP_PCL_SSL30_AES_128_CBC_SHA_11: - case OP_PCL_SSL30_AES_256_CBC_SHA_11: - case OP_PCL_SSL30_AES_128_CBC_SHA_12: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_13: - case OP_PCL_SSL30_AES_256_CBC_SHA_12: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_14: - case OP_PCL_SSL30_AES_128_CBC_SHA_13: - case OP_PCL_SSL30_AES_256_CBC_SHA_13: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_15: - case OP_PCL_SSL30_AES_128_CBC_SHA_14: - case OP_PCL_SSL30_AES_256_CBC_SHA_14: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_16: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_17: - case OP_PCL_SSL30_3DES_EDE_CBC_SHA_18: - case OP_PCL_SSL30_AES_128_CBC_SHA_15: - case OP_PCL_SSL30_AES_128_CBC_SHA_16: - case OP_PCL_SSL30_AES_128_CBC_SHA_17: - case OP_PCL_SSL30_AES_256_CBC_SHA_15: - case OP_PCL_SSL30_AES_256_CBC_SHA_16: - case OP_PCL_SSL30_AES_256_CBC_SHA_17: - case OP_PCL_TLS_ECDHE_ECDSA_AES_128_CBC_SHA256: - case OP_PCL_TLS_ECDHE_ECDSA_AES_256_CBC_SHA384: - case OP_PCL_TLS_ECDH_ECDSA_AES_128_CBC_SHA256: - case OP_PCL_TLS_ECDH_ECDSA_AES_256_CBC_SHA384: - case OP_PCL_TLS_ECDHE_RSA_AES_128_CBC_SHA256: - case OP_PCL_TLS_ECDHE_RSA_AES_256_CBC_SHA384: - case OP_PCL_TLS_ECDH_RSA_AES_128_CBC_SHA256: - case OP_PCL_TLS_ECDH_RSA_AES_256_CBC_SHA384: - case OP_PCL_TLS_ECDHE_ECDSA_AES_128_GCM_SHA256: - case OP_PCL_TLS_ECDHE_ECDSA_AES_256_GCM_SHA384: - case OP_PCL_TLS_ECDH_ECDSA_AES_128_GCM_SHA256: - case OP_PCL_TLS_ECDH_ECDSA_AES_256_GCM_SHA384: - case OP_PCL_TLS_ECDHE_RSA_AES_128_GCM_SHA256: - case OP_PCL_TLS_ECDHE_RSA_AES_256_GCM_SHA384: - case OP_PCL_TLS_ECDH_RSA_AES_128_GCM_SHA256: - case OP_PCL_TLS_ECDH_RSA_AES_256_GCM_SHA384: - case OP_PCL_TLS_ECDHE_PSK_3DES_EDE_CBC_SHA: - case OP_PCL_TLS_ECDHE_PSK_AES_128_CBC_SHA: - case OP_PCL_TLS_ECDHE_PSK_AES_256_CBC_SHA: - case OP_PCL_TLS_ECDHE_PSK_AES_128_CBC_SHA256: - case OP_PCL_TLS_ECDHE_PSK_AES_256_CBC_SHA384: - case OP_PCL_TLS12_3DES_EDE_CBC_MD5: - case OP_PCL_TLS12_3DES_EDE_CBC_SHA160: - case OP_PCL_TLS12_3DES_EDE_CBC_SHA224: - case OP_PCL_TLS12_3DES_EDE_CBC_SHA256: - case OP_PCL_TLS12_3DES_EDE_CBC_SHA384: - case OP_PCL_TLS12_3DES_EDE_CBC_SHA512: - case OP_PCL_TLS12_AES_128_CBC_SHA160: - case OP_PCL_TLS12_AES_128_CBC_SHA224: - case OP_PCL_TLS12_AES_128_CBC_SHA256: - case OP_PCL_TLS12_AES_128_CBC_SHA384: - case OP_PCL_TLS12_AES_128_CBC_SHA512: - case OP_PCL_TLS12_AES_192_CBC_SHA160: - case OP_PCL_TLS12_AES_192_CBC_SHA224: - case OP_PCL_TLS12_AES_192_CBC_SHA256: - case OP_PCL_TLS12_AES_192_CBC_SHA512: - case OP_PCL_TLS12_AES_256_CBC_SHA160: - case OP_PCL_TLS12_AES_256_CBC_SHA224: - case OP_PCL_TLS12_AES_256_CBC_SHA256: - case OP_PCL_TLS12_AES_256_CBC_SHA384: - case OP_PCL_TLS12_AES_256_CBC_SHA512: - case OP_PCL_TLS_PVT_AES_192_CBC_SHA160: - case OP_PCL_TLS_PVT_AES_192_CBC_SHA384: - case OP_PCL_TLS_PVT_AES_192_CBC_SHA224: - case OP_PCL_TLS_PVT_AES_192_CBC_SHA512: - case OP_PCL_TLS_PVT_AES_192_CBC_SHA256: - case OP_PCL_TLS_PVT_MASTER_SECRET_PRF_FE: - case OP_PCL_TLS_PVT_MASTER_SECRET_PRF_FF: + case OP_PCL_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_RSA_WITH_DES_CBC_SHA: + case OP_PCL_TLS_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_DH_DSS_WITH_DES_CBC_SHA: + case OP_PCL_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_DH_RSA_WITH_DES_CBC_SHA: + case OP_PCL_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_DHE_DSS_WITH_DES_CBC_SHA: + case OP_PCL_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_DHE_RSA_WITH_DES_CBC_SHA: + case OP_PCL_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA: + case OP_PCL_TLS_DH_anon_WITH_DES_CBC_SHA: + case OP_PCL_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_KRB5_WITH_DES_CBC_SHA: + case OP_PCL_TLS_KRB5_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_KRB5_WITH_DES_CBC_MD5: + case OP_PCL_TLS_KRB5_WITH_3DES_EDE_CBC_MD5: + case OP_PCL_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA: + case OP_PCL_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5: + case OP_PCL_TLS_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DH_DSS_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DH_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DHE_DSS_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DHE_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DH_anon_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DH_DSS_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DH_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DHE_DSS_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DHE_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DH_anon_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DH_DSS_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DH_RSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DH_DSS_WITH_AES_256_CBC_SHA256: + case OP_PCL_TLS_DH_RSA_WITH_AES_256_CBC_SHA256: + case OP_PCL_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: + case OP_PCL_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256: + case OP_PCL_TLS_DH_anon_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DH_anon_WITH_AES_256_CBC_SHA256: + case OP_PCL_TLS_PSK_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_PSK_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_PSK_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_DHE_PSK_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_DHE_PSK_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_RSA_PSK_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_RSA_PSK_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_RSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_RSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DH_RSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DH_RSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DH_DSS_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DH_DSS_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DH_anon_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DH_anon_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_PSK_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_PSK_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_PSK_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_PSK_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDH_anon_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDH_anon_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: + case OP_PCL_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: + case OP_PCL_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA: + case OP_PCL_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA: + case OP_PCL_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA: + case OP_PCL_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384: + case OP_PCL_TLS_RSA_WITH_AES_128_CBC_SHA256: + case OP_PCL_TLS_RSA_WITH_AES_256_CBC_SHA256: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_MD5: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA160: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA224: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA256: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA384: + case OP_PCL_PVT_TLS_3DES_EDE_CBC_SHA512: + case OP_PCL_PVT_TLS_AES_128_CBC_SHA160: + case OP_PCL_PVT_TLS_AES_128_CBC_SHA224: + case OP_PCL_PVT_TLS_AES_128_CBC_SHA256: + case OP_PCL_PVT_TLS_AES_128_CBC_SHA384: + case OP_PCL_PVT_TLS_AES_128_CBC_SHA512: + case OP_PCL_PVT_TLS_AES_192_CBC_SHA160: + case OP_PCL_PVT_TLS_AES_192_CBC_SHA224: + case OP_PCL_PVT_TLS_AES_192_CBC_SHA256: + case OP_PCL_PVT_TLS_AES_192_CBC_SHA512: + case OP_PCL_PVT_TLS_AES_256_CBC_SHA160: + case OP_PCL_PVT_TLS_AES_256_CBC_SHA224: + case OP_PCL_PVT_TLS_AES_256_CBC_SHA384: + case OP_PCL_PVT_TLS_AES_256_CBC_SHA512: + case OP_PCL_PVT_TLS_AES_256_CBC_SHA256: + case OP_PCL_PVT_TLS_AES_192_CBC_SHA384: + case OP_PCL_PVT_TLS_MASTER_SECRET_PRF_FE: + case OP_PCL_PVT_TLS_MASTER_SECRET_PRF_FF: return 0; } @@ -323,6 +321,12 @@ static const uint32_t proto_blob_flags[] = { OP_PCL_BLOB_FORMAT_MASK | OP_PCL_BLOB_BLACK | OP_PCL_BLOB_TKEK | OP_PCL_BLOB_EKT | OP_PCL_BLOB_REG_MASK | OP_PCL_BLOB_SEC_MEM, OP_PCL_BLOB_FORMAT_MASK | OP_PCL_BLOB_BLACK | OP_PCL_BLOB_TKEK | + OP_PCL_BLOB_EKT | OP_PCL_BLOB_REG_MASK | OP_PCL_BLOB_SEC_MEM, + OP_PCL_BLOB_FORMAT_MASK | OP_PCL_BLOB_BLACK | OP_PCL_BLOB_TKEK | + OP_PCL_BLOB_EKT | OP_PCL_BLOB_REG_MASK | OP_PCL_BLOB_SEC_MEM, + OP_PCL_BLOB_FORMAT_MASK | OP_PCL_BLOB_BLACK | OP_PCL_BLOB_TKEK | + OP_PCL_BLOB_EKT | OP_PCL_BLOB_REG_MASK | OP_PCL_BLOB_SEC_MEM, + OP_PCL_BLOB_FORMAT_MASK | OP_PCL_BLOB_BLACK | OP_PCL_BLOB_TKEK | OP_PCL_BLOB_EKT | OP_PCL_BLOB_REG_MASK | OP_PCL_BLOB_SEC_MEM }; @@ -556,7 +560,7 @@ static const struct proto_map proto_table[] = { {OP_TYPE_UNI_PROTOCOL, OP_PCLID_TLS10_PRF, __rta_ssl_proto}, {OP_TYPE_UNI_PROTOCOL, OP_PCLID_TLS11_PRF, __rta_ssl_proto}, {OP_TYPE_UNI_PROTOCOL, OP_PCLID_TLS12_PRF, __rta_ssl_proto}, - {OP_TYPE_UNI_PROTOCOL, OP_PCLID_DTLS10_PRF, __rta_ssl_proto}, + {OP_TYPE_UNI_PROTOCOL, OP_PCLID_DTLS_PRF, __rta_ssl_proto}, {OP_TYPE_UNI_PROTOCOL, OP_PCLID_IKEV1_PRF, __rta_ike_proto}, {OP_TYPE_UNI_PROTOCOL, OP_PCLID_IKEV2_PRF, __rta_ike_proto}, {OP_TYPE_UNI_PROTOCOL, OP_PCLID_PUBLICKEYPAIR, __rta_dlc_proto}, @@ -568,7 +572,7 @@ static const struct proto_map proto_table[] = { {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_TLS10, __rta_ssl_proto}, {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_TLS11, __rta_ssl_proto}, {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_TLS12, __rta_ssl_proto}, - {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_DTLS10, __rta_ssl_proto}, + {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_DTLS, __rta_ssl_proto}, {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_MACSEC, __rta_macsec_proto}, {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_WIFI, __rta_wifi_proto}, {OP_TYPE_DECAP_PROTOCOL, OP_PCLID_WIMAX, __rta_wimax_proto}, diff --git a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h b/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h index 6e66610..5357187 100644 --- a/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h +++ b/drivers/crypto/dpaa2_sec/hw/rta/sec_run_time_asm.h @@ -497,6 +497,28 @@ __rta_out64(struct program *program, bool is_ext, uint64_t val) } } +static inline void __rta_out_be64(struct program *program, bool is_ext, + uint64_t val) +{ + if (is_ext) { + __rta_out_be32(program, upper_32_bits(val)); + __rta_out_be32(program, lower_32_bits(val)); + } else { + __rta_out_be32(program, lower_32_bits(val)); + } +} + +static inline void __rta_out_le64(struct program *program, bool is_ext, + uint64_t val) +{ + if (is_ext) { + __rta_out_le32(program, lower_32_bits(val)); + __rta_out_le32(program, upper_32_bits(val)); + } else { + __rta_out_le32(program, lower_32_bits(val)); + } +} + static inline unsigned int rta_word(struct program *program, uint32_t val) { diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index f571050..8f183e9 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -488,13 +488,15 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) if (ses->dir == DIR_ENC) { shared_desc_len = cnstr_shdsc_ipsec_new_encap( cdb->sh_desc, - true, swap, &ses->encap_pdb, + true, swap, SHR_SERIAL, + &ses->encap_pdb, (uint8_t *)&ses->ip4_hdr, &alginfo_c, &alginfo_a); } else if (ses->dir == DIR_DEC) { shared_desc_len = cnstr_shdsc_ipsec_new_decap( cdb->sh_desc, - true, swap, &ses->decap_pdb, + true, swap, SHR_SERIAL, + &ses->decap_pdb, &alginfo_c, &alginfo_a); } } else { From patchwork Thu Aug 30 05:50:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145497 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419358ljw; Wed, 29 Aug 2018 22:53:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBOlSGZIbeRKqMsq3QSc9SUymi195RmTt4dwOC4o3GKUzLCOWSYzrj+t09aHyxd4CmZoGc X-Received: by 2002:a1c:9f12:: with SMTP id i18-v6mr714098wme.124.1535608402225; Wed, 29 Aug 2018 22:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608402; cv=none; d=google.com; s=arc-20160816; b=Utn12mZS3JKRPLqIYT/Qs9F3nRV7ft8TX91oIQu1RovUe3akJWqeGPuz0bmWSs2Lf0 sisATrrn6hv3NkoOCysDzfjLwrG56e46qmHyDZ3uqLLPjnQr6nSl3b612wuk87AMf9tW T5wi1UJ+TyMSAgSwEa88auchmFyT2Qcav2mjPZJKYkeve3Rn/zubzbOBEbk+oyylytCp ijGsjAiJuYsEowZl0g9e9Cwrj/84qq0CZTGOE9U5xCp9gD8CD7YkUmiP9uG0iK0XWq9D zgSkp2AR9/rLV+ZRNChkcdXUyEOOJNM6XsZ2//V1aScfd34jbAarNcVlWlkhzRkp2+qn Hi+g== 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; bh=njtyMyNo/5R+1GX+NPjjxCIv+n3vFu36pynH949ahlU=; b=deO5E8XMjDcnVf6QS32PVMY3KoLV1qUqrrqyfgyv6scvSWF1njcXkMFP24954pmtjw /AOwK+1bOVRYwCd1S7VZjT8TJXcTX+21PP/m7OQr5XZL3XKyCeVcgkVyRzg/j+wH02y7 /PtrZJw37xGMhR4uioPhiFPpUZb9nJ8KoaPTuEzZzfr0XX59WRvQcgU3d3IzYbOSGidB aV+jW4fX08pFapPG4Wn+DcdSb+pjldFHoiyKqmDJOn24FeUk/U702Ry9z8nCktviJDSm EYCdrOTb8Vs1Y3zX5sBAMIEJS37+ZgoY+MKW4+gVO+hG7z539VSbN0pMP72DOKyFVWaJ TW9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=EQYWsfhf; 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 t62-v6si673362wmb.52.2018.08.29.22.53.22; Wed, 29 Aug 2018 22:53:22 -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=EQYWsfhf; 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 58FD84CA0; Thu, 30 Aug 2018 07:53:14 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10071.outbound.protection.outlook.com [40.107.1.71]) by dpdk.org (Postfix) with ESMTP id 9871EF11 for ; Thu, 30 Aug 2018 07:53:11 +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=njtyMyNo/5R+1GX+NPjjxCIv+n3vFu36pynH949ahlU=; b=EQYWsfhfVUPTCKRUHNgHrB7ZdRgeqCa6/xEa40E/JHtSwTnoMZU9dVSPxZSusKMKT6jIV+LDWXaVGCmBzIE6XRfe9i16xKL6xQZqihLRuqLnem4IDa6+3UJzK1eJQbZA2fDp05E6vpMsENkARbBz7F5p6pvl/1+1PR/uDozT38Y= 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:10 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:20:57 +0530 Message-Id: <1535608265-13323-3-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: d8d1c083-152f-48c4-a56e-08d60e3cde1e 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; 3:QThJnEEShMl0IH0BffaToaDK+jEOQ2humPUbrz0dJlp2oVdeZkyBytjlLkj7Ut0QOhnWEOJqIsoVHqAd18+TrM6n5lzYyKwEhb9bgXAyonBeNUkhNIgCT15Rm/+pNRnoe44lLrJECh23AmW1I4OH6YxcTtkIgKCTJJO313LNUgLZ2EggblTQzw+myveqy4CQPvlzSV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OnnydCTQ2qVd+6GKFVHOn+YK9pQX09lZtWX8y0abHwJOrGg34yicOxdiU2IddLy2T8RP2oTatQ01zYPBY0Ts90bcNxgGfftJ+tF+vhzKCouHlRClDZqcOlQ6M81KB0hZlVu6s2ITwscUuQriX; 4:Z/hBqA5YuFDmp5Dt9OM+sFcdz9QSNPERkMeG3g8Std1T+X6qLi7cBLAws67ScZfFWHzm7DqEdwQBeDcsEBOCJBQ/tNTpvBZVqoSjfo7vBvFilg/EWIPjStJLTQm/pGspup/hAl1/2fU6D6Ounj70PyBP9GABsIPeo5yUiOFAG6D5Bu4xrpYEvK86nOspPQARj5POVuIpsNl1llxmufMEKLvF8cYxdNl3B3OJWbU/hDungURcZWzonnBoex5zxxKpL2XzAMEU01wtilyfZ/ZMlrhRcdnbIuarz6gRht0vU6R0pXdrE0oCnD6yxoVSmI3j 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:s7TyxVT0tCkfAQx7ZtSewisTzrV8cxmW/hltFrn?= w1TvDK2zJGumNfV8RiNK5EzTLQNtUd1qnsA3ZP5+XE3l2cmXnB1Lw5vgcVM/MtP06xAhnxksKrp8PxQYxEq9wL5CuPjuO6FUfqsmEXcUrvfWYxTVq4vK/MaZrt9s1uexkXegc2PJxIry0RrL43BS+kcm3Ay3QZw4VDKfj2Jva9zcG13q2E27f5UA0YqkglXyaemXJBfXjWTXcFwdJkvUWG03HDyMaagWMcqcyWX6F/vnvD1yHT7ZeOrXffW0NTbfqSmZuuwYbY6PtrVp2SO5+d+Ci07OSWCb5EHKyG42slEUajCo1cDGF0c3/LqHxJFmLzX1zvFRH9NfcJyqOKpJHPXSCe4l1b4IXB7g+H3hI80ievYoJFZnp/Uf28IXBBMpUTDfEH7gj7BXEw+sa6tDpVsgG4bxb9liJuBd1kItXTUc3I/nDJz1JsWDGF9MEQAq8EjN1Ch7ngBUlpZ7Uu1v7iyYlD67VcmbLlbc81Ptw6fU2aryXCw/3U8cOpNfXWhwq0LGxlQXlXjU31OXvJKp2+Qne/BjLcG7P1OovWyh5yhDLowEP3BEgV6t6oR4BOCwQTMJJUC/qwjjXHvCArsfWekchjcyeQlTGpyb/I03fCiakooIJFuVXwobK/jGGwojPXJ6mZjEh8mZSwN0daoB8BBfrcq2x/yj2mYw3+Nvriq0mPtdxDCBdI0X7RdNfMC3jhANVtk7mPQULudVt6nEDf/4QIo8Ua4d6mkstsr9RtMMoXg7oK6bZ0+slW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LKBmb0BAZhGHRQGJMaz18bU2YJUZPDBv+XIJV+5VmzPPtV5dbjPVhlmOe7SSJk5vPn1Ot6aAkzThnnk0FvmIkB1jqOFT/bwgzWg9hYqYWCFDfZ26rmchVd1rD6hH32PBkxYumkjwVrlvhPzDdY0y7k8zYlb0/4GO7wgTriIs0z5bw7MVmOPV7PGqM1oPH+knGGXsRrexw8NErQzEu0xRXcRTrN3yYyEnYEr+b6YH9NOeSFYAb5ndm83Rcdgb1SkQktdBanHAoVENZ5EmBxIESj26PoD9uN+qGO3fBDKbgdeNUWOxwqtFZQ09glOsHxQ==; 5:lhnVBMNj6O6RKjbTx6Y5pVg0pUlnlhiSJx5eAlb5KXKaXn9qkGR/mXs2rc9uLJR5jcpxIyJxpgpH3+Qcscl/fGJcL+Dz04xabvvNUB3V4V1ao+OCzJF7TtZBT+enG/9oVIgoDDntB/uBayg8un+9votVsZm9ABL+Xgt0T9US/fU=; 7:1l7OyQdz5VLnUefBzq6f/OG1f1fHd2uLReOgCbg9pxhOSxHvmyWV9jwKnm03JyllPOzNY2xtLb75yOO3R9058lMCJSmRoldiZR1gvkEIiEspdd5dHG5SW+N/FS0yikv15GmXmE1j3tZ4EJuLDaa4905O8e3SCWp0WvBSTOKttgljJxvC5saoXDQuh3jCeAFifgyH2qCC21P0TwyiA33EkJIPsMl5gRpxh4I8Tawpk7HFqGwJwWwdnr8SaZ8/guWG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:10.0575 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8d1c083-152f-48c4-a56e-08d60e3cde1e 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 02/10] crypto/dpaa_sec: session reset before init 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" From: Akhil Goyal Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 ++ drivers/crypto/dpaa_sec/dpaa_sec.c | 2 ++ 2 files changed, 4 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 ac49029..27f2eca 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2099,6 +2099,7 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, return -1; } + memset(session, 0, sizeof(dpaa2_sec_session)); /* Default IV length = 0 */ session->iv.length = 0; @@ -2156,6 +2157,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); + memset(session, 0, sizeof(dpaa2_sec_session)); if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { cipher_xform = &conf->crypto_xform->cipher; auth_xform = &conf->crypto_xform->next->auth; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 8f183e9..95f317d 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1762,6 +1762,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, DPAA_SEC_ERR("invalid session struct"); return -EINVAL; } + memset(session, 0, sizeof(dpaa_sec_session)); /* Default IV length = 0 */ session->iv.length = 0; @@ -1896,6 +1897,7 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); + memset(session, 0, sizeof(dpaa_sec_session)); if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { cipher_xform = &conf->crypto_xform->cipher; auth_xform = &conf->crypto_xform->next->auth; From patchwork Thu Aug 30 05:50:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145499 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419621ljw; Wed, 29 Aug 2018 22:53:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZVMMgI0+a2KgsdFm15mwZDlDaYEfTPzKkV/zU8Uzaqyvn1H/F7FNfNBgt6cOVvru+aBQXQ X-Received: by 2002:adf:808f:: with SMTP id 15-v6mr6430838wrl.204.1535608424953; Wed, 29 Aug 2018 22:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608424; cv=none; d=google.com; s=arc-20160816; b=dzNlP12628gSy4BvwfepARgzyLcbMf5UOd3xOhElF4W5sHgN98Lpf+FrpeOEbTcGfA 20IjgikbFNmXu/0/I+a+r630oNEyhhzOjfusFyNd3ugA+ucarfy2b3+KBCOr3rubqdGE EUM/I/Tg1MYH3Axg4a5KEM7ZII+BhVaZ75S36fZcUa8f/nqt7NHtTSImBd3RYifLN6Gd 8rWI93dfdsmLVFfDgHePtkBsUlss0DadXi50glHQQW2oR0thdm74CmtlEpeDi93Sc4c1 VtQqmHiZtbjnGrWwIES2zQA6mflw47QzLjJsUreVUNcSri7MHBCfsSEzHh6QE8XdsXVx looQ== 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=X6Pfj0nzT1AZnB+IfUCWXMZdcmrNcftM7ofdH30Jn1c=; b=NkUm3htpBSfFwaecQItmpVgaA2aIL9lG+uTtUz7F6jbfhx3xv8MKGXvu4kVHEW0SXp /iHqoLb+3G9oWorxAhCjCUmSFds8zyNwtY3DCNK0qUJsmcmiXZSqDM0PUTpa2LsnNfdY g8GasI/iaieqXyA1ky3syLe0gtMuuc0HFl3/cII4LY854brXOKIjZvC9s+TSJfc5OWLL sFEIL6NFoH1j23CrX9JhKDWqF2JKpTX9qU6ybW5uJqAZnNdwL5xY5ZJvdEH9biHrz7pG 07Hd+xGYEQdPe6AzQbXPX+7n+BSPe4ZLCRQaJnNUhvTR4FC2Bj+fpwZ/8wcQNMv7xYM8 Kq7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=HdJGYBCC; 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 j66-v6si5311361wrj.130.2018.08.29.22.53.44; Wed, 29 Aug 2018 22:53:44 -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=HdJGYBCC; 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 826F04CBD; Thu, 30 Aug 2018 07:53:20 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10072.outbound.protection.outlook.com [40.107.1.72]) by dpdk.org (Postfix) with ESMTP id 127192BF7 for ; Thu, 30 Aug 2018 07:53:13 +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=X6Pfj0nzT1AZnB+IfUCWXMZdcmrNcftM7ofdH30Jn1c=; b=HdJGYBCCy3rCIb8Ereq2SG/cZM+uDqMaNVysh5+3nSkoUruhBMNKp3yF5a4u+OpOgsHGGyGEghA5/2duIVIR/UHfihEMRXEy/FCyOTOUkcbgWD8h1hQA0Kfp0K4Omtjd0X/3azhbMJrP4kZAanqbUUFKYkI3o0HyUTL27RdZ7+s= 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:11 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:20:58 +0530 Message-Id: <1535608265-13323-4-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: dd18cca5-0145-4a6b-b153-08d60e3cdebe 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; 3:C+5ndvGZb+lYjFIUKL8BZn7Wv66XZp3G4ANiZiUN55q6ecUcAjCdbArrY1CkXqxU5W1WfC4USfielq8cSflksOs6TdHkvXrHA678ok5eLBoCe5nrxE42rYyNVuSuaeYxtrQ73FuqTP79MjL+9MsOWNNCxEY+y6JtIEB/g/gQ6exLiGIZI4Fl5I7r6M9xTN3aJMxgDMHLq0MEy6wmwywJM1ZcxgvlNemR/XIx96NmWSBfVJWgMe1yzds5xJIip26t; 25:PDBfS/F2fKwzdvsG9/N/3auxpFNCXFj0OknIDuO/sB+g43QZKb8rZsnfpPCQPApdZqA16eVd1jncK5PXeBxNGBvqtpW27qup6hkrc5ULX4KsrEtoYryzkFQhHRL0ULp+bNWnlzFjBa1AKZ4QolRrMukIw/8yrS+9WuN6M0ZfvyoX9AVhfXvwa8AxYXl82zXXwyA53M+J+Jj+dcdtYzsifpQfJXm+D/tMeP/K9La/Q4XJXRRmhmVF1HANMJETuI+Kk0Nex+g5u7tozlYeaAC1ATHKjvYKz8xYd8BqFAlo+f1uDv8cB9SY4K63ISk5dPJ4BkFAE8RV0NI9pnqO8zm/+w==; 31:RHGuGFa6Gi3bqP1yheyUCGnJjVnY/n+bTPBCGzYD7XVBxe1y4SBLrdhLBVl6EIvCqVYHKS4DIHYFbHlTQ1U4NqUXjW8XRKpXnXSbGEH70Ek167RZabDrWu0ZebriUSlz8B4m3pxfBFh7REGPgJdiGqIGjG6UqV/n3BSSxAIKtMgRUoSJYFVl/CUyQAGyylQ+NYtwd0x7NJjgQu5sIoiYUCPg6C+6O2ZzIvQRvR7j/1s= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2541: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541; 20:MOnzTXpQNJ9xquJB3Yn5SqtWVYzPjXNNF9uEuwHjN12CZuX7mJfbHfGA91+3l7RW9W0aCzZs3/0t30PplTr4NtE5xJMUKPfP2gcedyTX9ia7rgnHQvSoNOtXe6aYBeaZ0CDY4ETun48/Bf9qeGry71zyzrvdpYe2OVz+3Of6XLNMIVZVvbjZ+0eFe22CXWe+2CLAv9DyYoHz031TvQTc/S2yI2EUvz44Oy4NClnrSsUmQ+dN1bYL1+o74tIoGNiuOEKBYWbzK+UZk+kAQovdBdTHesydICtsnpG4aI2tb14eimLUHWudabGjtF5q7Fe8ghmmE9+KEhEssx8htYyeye7IXBxC0BM5+4zcp3iRo43ve/gLvPL89k+FogSx/85SzxcDrTbqD3k7lwzEv7fJl8xc5BXoAkhdsFVj/UOu3BJJY3IhUMVx0a49vBOmhGVfNG/jniuy2Mr1wGSy/ZdGlAk/l0oALTvWf0bIidLgAxF8AvT2Lfxga1jNeGsZKl+f; 4:BGhioKNK5d6ZuaqPfUKMYHHcDhfpxz5uaeo6fLB0pIBOVWAQwDkLR7AuhviHwF7OeS02qOB/6xpraDXWg4hUomG0LRZnx0VjVlVrpRYlZUtGOzm010DRj+4U+4+lliD/fiXDKZTNYEuGqyb6SK4QueDV1sbfPDM5HfMnN900ak1zyqV/nczS522nFEO4vqeZMn0ppz0mCQ2fLZ9m6YloNbr3lYwP64Puaa3F8GdOMj+Fm0VAomyX0kPtXCIbOC2C7tVyC62QcUN5/uerfNTlA+UaDs7/VdqHB3SMdeW/igumqLQLoDSLwewAQ9rnym7O9VaUNwdEyNyrQMhsTz2fICLqOlTOUs8qO00g5suQzGM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(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)(5024004)(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:Mdh+qwWwm1NVdc894u+D24iOIFYqToFiy+WYAH2?= NByf7Oq76QLzUkZJ9WZIkloURVYcfwvaDUFOQKh7mWeq8CKv8apQDVhMi6BGQVF+SF0T2tJ8OrRAvTS0YY2XiBABuWrdHq8uEBVNn3dBYrRIBZ1X/JlKtzLtLOkn1cLwEdWSXsTj1kgv8p8yDk6cU+RWF7b+wiYgrCvPOSE2E4ijQiLpD0O+gSyzaVot/HeKVWJNKljFpIKvmnVmYGUas5OEs/UjgzXD1t0jbENr1aM+okLry6wpk8Qm3sunL6/vHNUICMyXYYuO4q+eRiq2IEFC/PFqJeQFxsCH2xN/WP7WSEdrZy8MxhPijC4A1rQ/+GMw65TQmz9mdKcQpjkFH9/27ox9aiVK75LXx8wugsGr8N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+QqECFVC3lxJuZ7hw5eX8bh/49nyA0iK0gEJNtYXl11CK430lFgv2DoKywI+2D3AkGUwpTJA91ZVon0iqzYTOzzkgX5KdZU1Sfp3L SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:11.1114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd18cca5-0145-4a6b-b153-08d60e3cdebe 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 03/10] crypto/dpaa_sec: add LOCK before Rx HW queue attach 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" From: Akhil Goyal This is to safegaurd as the session config can be done from multi-threads. Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++++ drivers/crypto/dpaa_sec/dpaa_sec.h | 1 + 2 files changed, 7 insertions(+) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 95f317d..35e4e3e 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -1810,7 +1811,9 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, return -EINVAL; } session->ctx_pool = internals->ctx_pool; + rte_spinlock_lock(&internals->lock); session->inq = dpaa_sec_attach_rxq(internals); + rte_spinlock_unlock(&internals->lock); if (session->inq == NULL) { DPAA_SEC_ERR("unable to attach sec queue"); goto err1; @@ -2037,7 +2040,9 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, } else goto out; session->ctx_pool = internals->ctx_pool; + rte_spinlock_lock(&internals->lock); session->inq = dpaa_sec_attach_rxq(internals); + rte_spinlock_unlock(&internals->lock); if (session->inq == NULL) { DPAA_SEC_ERR("unable to attach sec queue"); goto out; @@ -2288,6 +2293,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) security_instance->sess_cnt = 0; cryptodev->security_ctx = security_instance; + rte_spinlock_init(&internals->lock); for (i = 0; i < internals->max_nb_queue_pairs; i++) { /* init qman fq for queue pair */ qp = &internals->qps[i]; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index ac6c00a..e923942 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -150,6 +150,7 @@ struct dpaa_sec_dev_private { unsigned char inq_attach[RTE_DPAA_MAX_RX_QUEUE]; unsigned int max_nb_queue_pairs; unsigned int max_nb_sessions; + rte_spinlock_t lock; }; #define MAX_SG_ENTRIES 16 From patchwork Thu Aug 30 05:50:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145500 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419693ljw; Wed, 29 Aug 2018 22:53:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZJbiMPXz0SgPL0j1imcsZ117IvzdONkQbssxjLnBvjDOC7f6IJEsahgUXO4Vr2Ra762JqW X-Received: by 2002:a1c:65c5:: with SMTP id z188-v6mr715774wmb.57.1535608432736; Wed, 29 Aug 2018 22:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608432; cv=none; d=google.com; s=arc-20160816; b=BSf8xCmA8qPeO+LZKQULs1H13EtO+AqKA0IB3jdf8CYj+HNDygAM7OSwAIlmkkLNU8 prA7pnrIzAA2RSxoIJcnq5pFlYvfLShBssBiVbgjrg3UfVLxuSMd9cmziPdj8jEIvJP1 wj0nllI5ha01m7wHIZ/LDgoUY7VPm/ZVOVoxqoFEKhryy/v7hXNjTbC//1qR6khTOI7u Z3uk/TJOmzkASOa0PBCEfMjW4DiJznrExhY66H8S0fcIsO/msNmY/UZMnjDgeWY61y9n 7xp/5kj67PjBpucmre0GBjCbVCkZm/K0VFKWmMZpaFpGYy/dQEBqOB26lQiKktxVO9P9 loGw== 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; bh=bKDNDLS+qnt0az2ILmsR749axY/Basn+yeWSoVB+Ilc=; b=TT7TlI0Kpu/tOcMGBchOPVGvmYqsNgAGv9zvJaK22wIQG/sSVM6jIlKz/2Q78q4KqP v5o3FrbMjPUVCLle9hlKVqrX48X5EqLN8K3jzKhdJdRXFG2Py83AEWhislTC1uI4dL+e iXmp7MMfLDVmmRbYjrbRvS1Lipz/5tKgecJwvO2KgA3BzsqlzvS0Fm+w8h/umlJzrgMi F+Y2o2bcz+gDYh5dmYJcQDHGfeG5VirsQQwDJy9/kDWPeukyD8DakLu5WFbelPRkeHKK +HGEtHryLE9zjFlS9rX99CCTlrbbrsTZbhH3qQ+3Y+Oyb0bVQxzXjZfHO0dwLJ2z6q6H lUVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Lu8pdMaU; 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 e67-v6si678286wmg.44.2018.08.29.22.53.52; Wed, 29 Aug 2018 22:53:52 -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=Lu8pdMaU; 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 307A84D3A; Thu, 30 Aug 2018 07:53:22 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10045.outbound.protection.outlook.com [40.107.1.45]) by dpdk.org (Postfix) with ESMTP id BB7072BF7 for ; Thu, 30 Aug 2018 07:53:13 +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=bKDNDLS+qnt0az2ILmsR749axY/Basn+yeWSoVB+Ilc=; b=Lu8pdMaUrfxdxQoe6cAKBa5FbtvY6pWiRx8d5UlH76L0Vlc6oVK6HGih7Fb9TPJ2iH09WpxwAM+CnstIYUq+O/phaHbIxCmyqu8P15FeINCB5mWjCYv8PypbpdTylphvSv2uh9skVnqeZb3aSn4f0vkLR+GycO/Gv5m1BFJ2s0c= 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:12 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:20:59 +0530 Message-Id: <1535608265-13323-5-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: 68b708cb-a55e-4409-8463-08d60e3cdf5d 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; 3:gQEOtolOWgT7/BRuNhY676PBNEjksWjR3knF8tlKAAEJRiuPJ7R/5t62asodt3ox6vanknyADrWZfwZ9TS/73llMWcwE66Ss1aIkQltI66AJB7dC+mRtY8aZabXyOquEHVmyLn5/i2OoVWoXSggZTDp+Nwb5loSZBmHkcA3D1m4o/jDsMWFC6zp3hHrYIrxXpzCv0Ey4al852+u0ijyxbQNKlbQn5XRa0kSuShlul9DhWIKoTJ3teJi9JrPaXJ4e; 25:8vx7h/72tpBVCTCFes5C3HaPAeeSZNtukBopIe6VCflHoHjvZ4Qwbq5VbvdFsD6Ue4vGz8EUYHHu8+TZlQllvXo2zkUyzYgoVWMNAFhyK1v9vuKd3m69IDu21c2prBMp4q1MYg7PfO4HQUN1k1O4IHf0JoHSx8ju7MuqdLPg/BDseav/+42fdPfnugKtZ58YYp4qnjuynheJYMIAoIJOov6rGX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VPiIGh2w8jarG/waGJigfXV0wyzo+Y4viqBGPOZjAZG1oNAnV3cxgUCyxsERYY8nV/r/DPjMv8cXXAZQt5Zi5fAhBeoF8XvoU/GyONfpWjpoPlWNQcSTp1ekwqewEHvZZ3z1bDzfm+dH7MMfN6aNtPEknKzSvooTbLDfFVlU4MMY9U12HNlpyzQ4pFoRcmK9rH6CLy 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)(5024004)(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; VI1PR0401MB2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iHCjqEDrv4vx0Y3MKuNpDeaX6ctxSRQE3+w6tLQWPUlfDi9M1gQ==; 5:DB3RsJrXMkthNR9XsPgaM/bSqYFxeqiWvJMWiHgQLapB983jcmiGD3lkOK8B9HK9b6PsrEDyjqqPVMXSPw4RFM9vFqBKcc43chBAz7Pn1DEZlEgnV1QI9RY+68iyFEf0QWz4VfvlC+fv/nJF8i8nqZSAExRIwIWB+yi6JzL+JTA=; 7:AnFML7Va0nFlipu4OU2vcbvuGmDZuJ8AAqms7/gQERuQg0+O/ergRIE1fC4p8dglqrj5HUbue/33D398FuzxRZJRbz6UI3OarF2TKQXEt4Flda2vFmeyteBTil/HA0g17zfHkFPjUDqKv9L/b4O80ZZlXSbpxd2lSZgK7WaoJj6/mjO+bVEF0pJcAKRp+JQ4ouSfwwoAsKskLu9fE0V0+wfYOhsMu3T7oQfHoGmsHX9B9eljA2Lv8OVXxNUcrwHO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:12.1533 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68b708cb-a55e-4409-8463-08d60e3cdf5d 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 04/10] crypto/dpaa_sec: session qp should match with given qp 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" From: Akhil Goyal if session->qp != qp to be enqueued, it should show an error and not try to re-attach another qp. Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 35e4e3e..30c60e9 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1448,14 +1448,18 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, nb_ops = loop; goto send_pkts; } - if (unlikely(!ses->qp || ses->qp != qp)) { - DPAA_SEC_DP_ERR("sess->qp - %p qp %p", - ses->qp, qp); + if (unlikely(!ses->qp)) { if (dpaa_sec_attach_sess_q(qp, ses)) { frames_to_send = loop; nb_ops = loop; goto send_pkts; } + } else if (unlikely(ses->qp != qp)) { + DPAA_SEC_DP_ERR("Old:sess->qp = %p" + " New qp = %p\n", ses->qp, qp); + frames_to_send = loop; + nb_ops = loop; + goto send_pkts; } auth_only_len = op->sym->auth.data.length - From patchwork Thu Aug 30 05:51:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145501 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419822ljw; Wed, 29 Aug 2018 22:54:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdacxxE+6ixn4ArhFEb7W4qgjAeP3oOPj+B7v9RrtTV1PIuzqQorffB/Zn0hIvyZeLvAKzj3 X-Received: by 2002:a7b:c04c:: with SMTP id u12-v6mr748782wmc.24.1535608444152; Wed, 29 Aug 2018 22:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608444; cv=none; d=google.com; s=arc-20160816; b=OP32jB8zYWR3qIUgu3P05kpaTjIYbU2LNfdK+NWcy/wfhPP3TkyNv/VNL8KjJleFGO Zrr9+3KEAuYP79FYFcYnuzBb7AFzBjn+7RX0TR2dsxunZs/qjlJSagI3bkKL++V8toGw vn8I5fdLNLytJPB7r7COzS1UVjKjTEDcrjA1Wdzj8qPHtnPg5+KCXaAxufws5HYl4v/6 i7HdHN+83z+33EZ/ZFGEhLWka98k6ODzSLt3n1TVCJOEcAtVlw2zMgKG/PHAZsPozdPL IQHEXasTyZIn8745HE5xH6xkoxamUwusAv+FWXH2KrnqAjT/fRvKeZ/SqP3xv/N/gBvH CU5w== 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; bh=FcgBXEdjKIdRbVyLsKF9Dr1u2AwpP3HXFFICZ9Wyyw8=; b=ieLNZIksswso4D6eOARYynXSNQ5KERjXLRxXV8+RNyWDywdZqDQqb92tj3znpmCAfh yEqUEyhnUI/RwPh1AMslh+QmtU5lbxQDnmDDlvnezHjZSc8AwplVch5LB98OBeAmCHhS ipU+FqisauB1KmGWffXHSAjV7fNZ2YoajT+aRX1SRnUrNod5EBX8qORXrGx7q3uBLz4Z +EWYTo0BuS2oVx86c83f/3h7GD1LJjzSAkJWoK7HUpKr3oxnGwWEeWArxM6Xvb8rthR9 OACqDYhHbMrn4WgoKxzLjvc5pjBoJUtjS9izEoZlnrPqsxCf9XdYJBjtlwCt79txGs6S 3SkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=WlBj49+m; 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 a7-v6si648925wmg.230.2018.08.29.22.54.03; Wed, 29 Aug 2018 22:54:04 -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=WlBj49+m; 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 943A84F98; Thu, 30 Aug 2018 07:53:24 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10054.outbound.protection.outlook.com [40.107.1.54]) by dpdk.org (Postfix) with ESMTP id 22BDB4CA2 for ; Thu, 30 Aug 2018 07:53:15 +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=FcgBXEdjKIdRbVyLsKF9Dr1u2AwpP3HXFFICZ9Wyyw8=; b=WlBj49+mh/ny4E/s8umziXPe/fxUWdNYPPNfKy6I6tF6/I9BIk67FutN98VNw9ltdpd4yqFK/y6FILpDH435g1V5f7kE0Micet5akEXL4Q3m0mebaqO+vF0lsTAkG/1q7YALWSCU1QzGLdc+Zyc2A1+BFW6qP3iqgAHIsRTFYfA= 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:13 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:00 +0530 Message-Id: <1535608265-13323-6-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: fc1abf02-ae01-4505-4eca-08d60e3ce00b 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; 3:gzsFCP61Ave7ld+tnbGJzR/Z3PgTR6ppSw73stmTcQhQzKNIPIwAM3s+Wc5uWieGS/XKHo1tuM54Ouv7dL6Esai6FY7dRpJJPcfjBbq2tiZzCTjSew3PfGmDEfGXoQFnK8zsIpTbQZiFBeSCeJgIpfKxRz/08KhKfnDBWu/TAS+g8uq8IGNM0hY+17INj1JAgXX7S8dbsiUJVIl0tP6eTZMB55C8Hug4wtWZf5GFi65CWS0jj12NvNWTBhg0+kfJ; 25:PbPOcdtJCDnv3Um4jQfmp14UZfVgdk0apn0BQbwVsjsmdzjOqF5EqlyVvyRxYnj7Hk/a6OSAtVzizEaI9nFcUbiSVrzwjfp18TPvMVZj4fx7g2WDQ1I0G/d1Dzk4bz61Sz1gpm5bBTFwK8/r3kwv/kkqyDbRdb1rLASzGquybQrpzLMrVXZ9y+23gxhocTUHyWL6SDuxdoLSXkxlAd4lajpTBX/1cBK+3iEfJ2ll5Nu035a2B1yG1ayMyosXhKoeWDJAQ+QdJlE6Ot4lXgqwOCXM+azxyo6Y3Bnh88wRaPtZx50ysRURWmvKzUppc5GAzK9bE9S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M3NEqEGmHjjn3JayQcWjqPpVaEyXw23SP7U+N2ho+qcMnLzrE/n78I8u/qUIvPr0R6cjOGhpt3IFTXpDgowL 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:Bhjs5Qo3/kh//1cDV/5UqlbFMgUzqs7QqaYz+hR?= XRYlL29RsceeGA46oK/epRKqE1EODd3H2K9ToEXmWCDoyo8efBe28YqKylCl91//a9NyutHYgjTH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bx8cJ4ENSRZiSmfqP2jmQ6cPKo6HRRXKXqZdC3jwZaAN5zk97J8xvJv0aQtgWh2LatnO7oHqe3R3NvdMek3NLWyHyPkZ7i7yOHEff0E3uMgt9t7ERIMtB7D2W/3t8=; 7:u+mo+4tnMeggotyTNWVMnEvjbH+nwkjR6DYVuy/amOTdFY8CnzHDT09EmSkWO1dcfpMdcAAfJHj/PzAV9JMS5RBWfJK/7ZowySOzTiYE0kaO/FZgg7FvC+FEzRl5zcXZtncH8ZUUGrlwd9wGlU9KACf4nz4FQgjdHirbxnjRu+LAnkCDh5qzRMXGvAcw58W+A2W6SgvY/mqEKPPkhbFsQOH329TNoHwG/b3kosyIeA6V04vNDDuVgkj6l6up+0fY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:13.2872 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc1abf02-ae01-4505-4eca-08d60e3ce00b 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 05/10] crypto/dpaa_sec: reduce the number of QP per device 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/dpaa_sec/dpaa_sec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index e923942..f4b8784 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -137,7 +137,7 @@ struct dpaa_sec_qp { int tx_errs; }; -#define RTE_DPAA_MAX_NB_SEC_QPS 8 +#define RTE_DPAA_MAX_NB_SEC_QPS 2 #define RTE_DPAA_MAX_RX_QUEUE RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63 From patchwork Thu Aug 30 05:51:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145502 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp419932ljw; Wed, 29 Aug 2018 22:54:16 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYsFAG/AbytaQKHwdPt5ZHkARTsfo2eZ3iY+AY4Pfpd2nSwCY7g2vw1CVt3g+VLWhK2BGD1 X-Received: by 2002:a1c:c1c8:: with SMTP id r191-v6mr663358wmf.103.1535608456068; Wed, 29 Aug 2018 22:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608456; cv=none; d=google.com; s=arc-20160816; b=0y3lOvRBuMFDN781kD3m+NzvVfmiXRrtEzK74vikb+o/uawVPT1L7DTPEElYHeC1I8 fDTmQjnosan/OdERTzXx1PUYfJpDsar8SJaY9vz57LW1h44mNAF/aJ/RvUscMKGPJrD0 zlT4zH8UdlQK39efFifu9PKScQH8K3+y1LDqt5d0mTp82cdt8uP/P65AvmzmlNyMVR0f 8qWZQ2jAxFm23R5JjKIdUY+8IdfDsTv0ixQjEXjPF1YYsDe9OO2vDRC6yWhzzcVVKTVJ gt2RBd9sVWzXwAxwlDUVs00s0hTQ8AcZrGcW8G7+Za1gpArGX8X/ScGSDgvyqcBOarNZ NgCA== 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=zKMjzZeB148tLIb0utaBlquiCTfr7+FPWPynZmnaT94=; b=RyIxim0b2m0wjdP2okyrpYqKOS4hSbkR6tSSkZD720SF16CSAFCXz0+GzkiJMtzyqK WPExhpN89MWzrOZsM8kzSGiudcHUQWkt8DrF2qKgpglWtEJizMnVzNwReD59KjfWcKsO h+31gQF20bxyWpwMRoL2vVdc4ZZWCu35Fy9gLNv0B+wGeXYLtE5W8fMffHSZ0HivYgIJ 1Bm4YSO7AbH0nqzIpHx6x7524haVVivRAx65rX8h58a18TBocqF4J97BqbvZmtOdvVmg skxJibhEKEQa2fR2rzvUwyz3g8/oa9RvPvxnGlflPLIAFz1NBPL453+Yi8/Umw3RGZSw woHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=KvRZ2xz2; 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 r9-v6si5863691wre.269.2018.08.29.22.54.15; Wed, 29 Aug 2018 22:54:16 -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=KvRZ2xz2; 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 59DFB5688; Thu, 30 Aug 2018 07:53:27 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10082.outbound.protection.outlook.com [40.107.1.82]) by dpdk.org (Postfix) with ESMTP id 182DC4CA2 for ; Thu, 30 Aug 2018 07:53:16 +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=zKMjzZeB148tLIb0utaBlquiCTfr7+FPWPynZmnaT94=; b=KvRZ2xz2C7TGs0sIrg4PwkCLlkSUv9/4gmT14hEaE0hOEtb1VkzrXJdgj3j6XW+Ihy2oDKDcz7dmMa9nXXhdAFJnPUELz+eleTSNLHrRUtD6kDbm4ILT5Y2rqNp+MBx2vxPruks9QI3c89nKp1Pcu0XYN9jl/gyrIla3u0LtAHM= 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:14 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:01 +0530 Message-Id: <1535608265-13323-7-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: 2336a4a8-ea8b-458f-4e36-08d60e3ce0bc 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; 3:Ukwdk9qUTAhcCnln9czkqHq52gwi5wD8ddLjBZNN6H94zTClJ+OyaiFzR5I6h3w1JkjtILIvP014/Qvm2OwWTo1VeebDAeUFO5YjUUd5gbcX0c1wH+Suc7poeyj+qg6E/5C9/W34NW4zsuv8dli0/+Xa3vb+rNnP8ttc+mAEhxPvbTfw6Se5acwgVH5rx7Vdb+9XDExBiVfjnCgKCH2I8hHiUMHHn6tzIhjlA6h0d8WUt7nYTF/6eS6il6d1TUy1; 25:DzVVYqCFeMyliGpfQn5d+W62p9u3c7H/NsNr/n37uxDLYcc3FGqCAyEBdhPkDihvZNODIGR0hvPaJrHbM4GF4UsliLsG3rrVRFHFu+qTbUSxjxgYMbH/6wI4grtEDG6hPI4VaXZXBeQGggkxZ1WJopteqOZqbl51dvZ8OoETooiyINpwi7hI0BIPiqCIcEadmihvBEgjj95urlKayfg2rpYOZCqeu/5/KGjqU4T6VnYy5uBnXd6jta6P67OnRZz1lNc+Q9Bgl7DzSLicTi3O+7Npy02FerZxAM94TpB7hxWv9DDAJOqqafULqDpS9+pNxverWrmgcta1TKwYmWLI8Q==; 31:dB9fPK8HCDbZljnY+VfKC4RKtXk244stbS/K30PQ5Zh6dspwVhQEtmj17WRWKVQdnEOkVXLJ/OKFucTFzjXMEF7igQVnnFs7X+FYi9pCZ8ffG1shFnX7CfPN9yiEqybmu3ja9NjZc1DYhdEL/9gI1art9vPTm5gRQ59CGTnJw2YuJ6rkHOVOWx3Tb3KMiW/8zimwuWSWqpxfxFiETgQo5rFbqsX/E966DE0PXosjlnc= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2541: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541; 20:uMlRbvpfz0wQhxvu4b9F+BEkldv6s+CeQW02IbwU412iqMoDCD5yGmeYHcF+/XiZLwbCzC8NVgJSHOsdw9WxtYJWDjsKzJhQdI5YeivX6SX1Cb5zAlwHLOR/9ozR6qc3Vj64XGHbjpUA0TZSxjRgX73thhYbp2D+AqbMzsVxeX5R86KgwteDqCyKvrXlwmRNCWUUGVYXEdecCsx1PwBaFjHzPChTQXgH7x8pG/bAfX3A/uAwMs1N7roeL4/dzIEYvGtWi9Ept6wBXwI0ow94XAPe3mcqsWgrhnjBcNsq15rogIMLu560Mb4gvFJjW/Y3uVrzouI7bXzIeKGvA3wAamdGpjR51mjx6kZ1egPSJqI4mSmCEJI6GI1UyiLY+1IF4CctSpVoBvfURQMO63CN1sR6RNq9+M2hH4KwgBTJkAqjpJQtNCQ4HenXu89E4vBTz63n8AgaxuiHEQnhUYqGTRWCPhYWzwY7QK1tuqlM/v3d3WOnp16dTgWXoc5BAhLT; 4:y/cFV3XgVhAZLqMGr3dhV8CwseZQ2vpweuqv79VbLT9v3iJK0FSB1YzZqhSCNBWEDz68Noa14WfWSSx6UYHorzOap7c8KV84m8Ri+TYSLafujvMQAb8JOEWtuBzUpgOtpxK//DUbbiJA4uBsqcCrcxZC+PqIg+N2DFko6R1quXJZhUtghkzrHFY5Q5OLspv1H4cMOv8DYltgixcnsr4eUaaNMqTC2CTBfuyOSFb3qv2Kw8l033E2py8TZZTwhQ8F+n78hIDz6fiEvwAsRUWMlxurNhMcyj00tn7ZtQ/uTMKVKiCNye641S0DCShaKcIA 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)(979002)(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)(969003)(989001)(999001)(1009001)(1019001); 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:jaCkJ57tg4hF/+g7GURwK/bJeJos9QvyXWR1rSY?= QR7HcUH4LLVBoPB+7xZ+B0Snb8Loox/0ad78usdtqNXrRaTBjdSwTpNzlKV5R5cjCnKOSI4CizwuBNCJDrGOxL8PdhSS04VcuVv7xQLJdxyKHaQqGSJfcVqMIAygsx+9vFWCOCvVsA5v//Z/7S5uoIkeXl2DrXvMXQESGmAMdnxUGvihl/c+a2JyCM+bWxeXDyEvTxWJX2WkDcAOhgSpjldMx/sHQ1gp4uZY4asbNm4x8CQCMzfTcpg+bK7CsOuOSmY2x0PW5VWjM8ZSw5FYCitsVgnNiJykdckDnigFSHo1EKk97OYV5Z92YXw8QAr6/UZvfOsJYJEqI4sU/8RB5/fJekjh0RKpN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FBevF3RLShDPqmx9OVLjgVrzXIOQO2xfri0spy/2aEj7wmOgF8PY8PUBBrOfGFpJrG9GTTt5RkV7QqgNAFgVXWVFEl9ZwyJboJjs5eHvy8LdITsBP5lVhoQKiB3mAqw6emRgdJ8pP1Iy71KAbzq9HPhekFydSYU++5bMppERJmwQTRfwnWdit8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:14.4502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2336a4a8-ea8b-458f-4e36-08d60e3ce0bc 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 06/10] crypto/dpaa_sec: enable sequence no rollover 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" From: Akhil Goyal With this patch sequence number will be rolled over and SEC block will ignore the sequence number overflow error. Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 30c60e9..e5b18df 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2031,7 +2031,8 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) | PDBOPTS_ESP_OIHI_PDB_INL | PDBOPTS_ESP_IVSRC | - PDBHMO_ESP_ENCAP_DTTL; + PDBHMO_ESP_ENCAP_DTTL | + PDBHMO_ESP_SNR; session->encap_pdb.spi = ipsec_xform->spi; session->encap_pdb.ip_hdr_len = sizeof(struct ip); From patchwork Thu Aug 30 05:51:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145503 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp420014ljw; Wed, 29 Aug 2018 22:54:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbidudD8dBOIABIR6wL3EscmANfsfe5Hl6rer9gkJvqLHknW7oo2Gg11+DdjhiqCqFmXzJ4 X-Received: by 2002:adf:bc44:: with SMTP id a4-v6mr6760540wrh.255.1535608465816; Wed, 29 Aug 2018 22:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608465; cv=none; d=google.com; s=arc-20160816; b=aNrfQtCDh0VCMh2uZW9bkvZEAsxD1GPY9WDLNaygeMvqUUCzH/bv53Fem/4Dg+COdL DLibBPYg9g3pJDttoyHQJl/08JzT2y4qBrKEIDYEj0U4ofO3+5ZShMRn43wGhUtz6q0f lw9cdgNvVJ2j3RaYWU5a7nnhzsUBY/Cuq5D7j6yygiE/RBJItWKp4kOmVv6uzIgOnzof yo8Bu0HS2XgmJN7BWzpe90Uq2Tm6CUP4vw5X1AdgSa6wR0gYZjxU1N5Yz7dZtaD+dcW2 IkVQlyR8T7xhuNV9MnxV4rDbxaL8TzFQjx28SDH5nxdmG+0OdpO01yQcCF60GwUFFlXA N2Ww== 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=e/Ilft7y8OXLrvDuYmGiwKCbrn74V5r/7l75gs2Hkdg=; b=TaoFw6uto21t/tZds7NPY65HMF1ldbcfMQS/04XqLdDYwgDsXzUrOyeI4BJtthcyXs WrZGGGmyaB5QrEi0q2/sWxv4dmUAPD6TF4tU9zENtXzk67EUPZLAWkSYwhuHzPB5kktT bWScbEZduBbglr8ts2Cg3PRZEFNe3JFbqPhdsBykjyN8fr78ov51wjpsmC1hPI5+ixnq YjAKFdk4s7Ae1XMpBuZtZ5yf56gYUGpOKgB6hF1R+HH1UGPFxLJEhPDurRhv2H1xLmRo m6qqZa6n+nuGK06gRCtC+vf2Rex7yoNKMWd4ULHc5CK0df1l/GcDPG+UMyao+ZiYRf1B 3DlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=Oa2HF9gV; 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 93-v6si5635722wrq.89.2018.08.29.22.54.25; Wed, 29 Aug 2018 22:54:25 -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=Oa2HF9gV; 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 0B3A558C3; Thu, 30 Aug 2018 07:53:28 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10067.outbound.protection.outlook.com [40.107.1.67]) by dpdk.org (Postfix) with ESMTP id 3A3424CA9 for ; Thu, 30 Aug 2018 07:53:17 +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=e/Ilft7y8OXLrvDuYmGiwKCbrn74V5r/7l75gs2Hkdg=; b=Oa2HF9gVpeC0tuCFAEx8a5M6S5p52/vlwsV/y4wbyOgAKFpl981YsHl0yIoVC9t6AZgLs5C8Jj9sR2wyKoMDsDy61tFU/cJPdI1vnqVS5nWAlYsFVTQY7iztXIKPzWf6rG/5rHArvDXMk1t81tQsvRlxjPidAS1KzRRm0acsUJA= 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:15 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:02 +0530 Message-Id: <1535608265-13323-8-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: 93cda303-a602-4354-3bf6-08d60e3ce16c 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; 3:8MR/w8+bY2uix1x7Ky/v1H/XRTa7/N+L76Ziax2rHnIbegydhx9WnvGffCAuI6H8hGf2nG4jphuviNQVq08s5dfwm6oRYmSt+7F4K9Eq6eaIM+XWyo+G7T2B7fmtVlyFRt0MzXOR0oA6a7iVbh7Dl/bt4LPzp0SteG8oymgDcwPtlaWFa09rWs/J/n+KCEQmSXZLWtSVzJvKtGOmRFHnKqog78z48cSRCJOWCrtupzNB+5BqaBf8T1mKIM6MY2nm; 25:vOzthkx0D3YcMOePkhP5Xc/MBtBSEUPEeeTi5RILiu4ZijD0aMv6RzW3lTeFzZqwKQryQc9cjBzKBF+tRLBQZm+LoDf+rDlxGqze6hso5kqpEkyS1YHnr+oRwi89R4twRYdhzYvZ4NbJ41nW7UNBcNrCOgE0zSabIRySumlJknSinJ2K+6czOnzf+up+lej9vQ/2r18UIMebRflX5IS2B7BLx6vYNnCsx0taUck0SCFP1zQxoXBmc9ldaTXyDM8bsa7t9pY6NlLQMZVesRKAms4zuqAGYYy9mzVOSshzB6AJF05etUrq0zDQBtRQnLsdT7Av+VuMzX8O5LzM0imBmQ==; 31:/tGY3vwKX+DzKwXKsHuxMl8jD6okLkYooeAeb7mkU9hmfUUrB0Y+dMJ88qPi8omOYIoHFuPFNHJxxi4jDxC9LwWCCMFk753HG1NOrwc2aDlt2DUJZas0+dHy38t156lIAcHGpzkmefl9uya2Rixm3qBw2/2SR8TQjYqMA6TazeKjLnBtNrd1vNv2qLolqz+ESyiOX8vg27ZDAQsS1r4yXppHTS0WjeLGihPlSXojQ5U= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2541: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2541; 20:RIvoDRWlXS5+yP9jXH4ATRoNO7Ati7tBE6U4rasra2h87uIbvUnpO5DHGQEsrhzRMnV3qSPLDQN3QWzPnLtXCFNoffWv4iVuRPNf4lYbKfgsml4yg4JeH9Qv9eSn9pnx6BCxsTUAV1G/d2/ENZctq9ISbyLdyCvAzF+tL4iUM/zlhCZa65EHQK1KZlT75LM/dSIfUOeUptBdKZhWhgD3w8e/XpRbDcdPYJmT/CAoe5qF7aVAGnuEH/Yix/1tFp7rLNaLHnY3GvjIZy07U/wQQxUfcHMPOsIm13dwGJ7s3+X9BKLBBEyJrGB+MfMCXMx70LyPqTsSwDHO/0NRLQf3R+JvvqQS07LDDlrisLq5JQ61AJzarRMkl102/TrRbikoeEXgBVrnPreS4upW/JCfumFGlAgJtytgiTOn3chZQH5cJfRMrZnAspO2wiO0oUcHRwowXWsJ3JrZ3o7AaQ08ls1I/m+4JAwm97n9tikKsDhJB3dgEvu1KFe9616dpiEf; 4:+o9MnNiDyqh11HBH6WO/Y/xpuBeqgzrezFdVtNSOzwuKkChZIf5zoai+5TBzNcS3FYi08iivFdbHG/fKobl7/OZ348C6sGVQrevud41vslhaqk0rkaVIY8GhmtUzB8s3Rj+GTMEydoKH71SlFK7Os683dEvoI0D2Mwe+yrQUPYm9+WMuoJUIwBUQ4TssxvMQ/Vk3wAYwkoPvvYWxeQMpk4LFkuUcDqWe3zokROqU3//WzOSQXHN9Scz31I8UyqsYq4TRpt7bodU33NSTLNk2xSwXtIeezh05PCuQ42Gdz7bLrtM4Gi837cP8VHZpQmy2 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:9p83Tkzx/Je+4nL11fMLBbdv3alMJvfLNslDVkC?= Ha4ALOPjqwEQgWvmt4qdtmX1eXaxI6glOt2G+TMO2sHGFC52pXNLLO9mOJYd3/62j8YBIjCoxsPsT8mNrsHtqqkkG2pdw7JjXLuvOg8YU6IWVMicqdUv+GnUN/DRCPZcjIzZ+iHVUSU6ZFUwoR2mXoO5SjmNp9aR47QTAJkHSwuDQLQRA8fpT7efi4B1mBCE79pkkNxicYxaUIjQ0RzAFqVSQY0XMhjwHW1jb581/7whjaGaE0a9RCgXdcFXqJj+gl/Mup40FKISdT9TGNRhRJ37rB+ltubXRLbnaCeGV2B4jElb60sBGo+cwtWwU2UKzJY+FgyrlxRMIPwui9IaKYBScm58fuexLeWxiUlKzi5uxTq59sukRlAEvobZS+bwJhib5ssQI2VO6unleQ51A1Y4V3lrMfh6UWJJ22dZbQ74DgDn9P/0/y5LnpMw6oi2mbaOF/87eZ8hvQYg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pamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:15.6032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93cda303-a602-4354-3bf6-08d60e3ce16c 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 07/10] crypto/dpaa2_sec: enable sequence no rollover 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" From: Akhil Goyal With this patch sequence number will be rolled over and SEC block will ignore the sequence number overflow error. Signed-off-by: Akhil Goyal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 27f2eca..99cc719 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2324,7 +2324,8 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, encap_pdb.options = (IPVERSION << PDBNH_ESP_ENCAP_SHIFT) | PDBOPTS_ESP_OIHI_PDB_INL | PDBOPTS_ESP_IVSRC | - PDBHMO_ESP_ENCAP_DTTL; + PDBHMO_ESP_ENCAP_DTTL | + PDBHMO_ESP_SNR; encap_pdb.spi = ipsec_xform->spi; encap_pdb.ip_hdr_len = sizeof(struct ip); 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; 3:6DSyUi18ToKIHamZDYa0uochL3/kVBQO/O1Sj8LymBHIL0C6D8sd9sz6isTuuKmj3CWmIm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gxGsuKKAWMPGxKRjznI+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/F72sJR2Far3lPSGcd4wfZgSHFJ5MltDQd6d5tD6GVSRLo1T52u1GqPTIkIyjN7Dlf4NZHPv8GgenCabRDQ8XyOKOT5TS1tLd2NMoX0b70fVsxFNJJpkM0TcenzfWu6OBOximCBkKpQ/TFDIp7Z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e8edKL+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; From patchwork Thu Aug 30 05:51:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145505 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp420212ljw; Wed, 29 Aug 2018 22:54:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaWIkJRPNg5ZnSUePhHttK6krx30YoRtykAZsVKMEZFX2oPPYc8wwjNzzNA2rA4hNmOAqDe X-Received: by 2002:a1c:c44a:: with SMTP id u71-v6mr693760wmf.43.1535608483307; Wed, 29 Aug 2018 22:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608483; cv=none; d=google.com; s=arc-20160816; b=NxGVVSp9K2i45+HZoETq3/Bz1wRM8n8ydhW51lWAdvJ6d4OAADhAX1ld9In7mh1h3u yOl/ljkwX8ic4OguEnCFl/oOFCxqJAzwTXqsz3BO/ul3VU1ERMmVpylN1IB86Li0bPa+ 1HsqQCvYGldYaSpG3uE5aOw9MJOi+LmQPW+nQcaSJ6ZwFxOwDrlrK4xIzTy6ncIl8zSt XxBW5b2gv1/ocE925DrnX/89gNYFmwhuflUfuddIYGpqc6DQIxlfLuhcQ5Jm1JTyUKvs gVTh3aGeViH2lLYKov9LwpVzCoqI9+ZxLE+08o+UsY1v6T151igPUs4DhVAveLxqgKZ0 B/pA== 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=TpOZ9UbMJs6NyMNMLJM7GMckJwUniFFueJzPI/qaFN0=; b=Uc8dEtrRdLEbBi4SjZlmbo/b43FLvIZw9YlVKDASJ7+vrWYjA5kQ0g+3voXViWzi3+ 109hduwDE3mVX2uXGoWaXHFVFdkU5IK+g/zTk71aVNAQvm++Gb9Aq51y2uH6WZdWPKvE 95QJ0kO3XSQsfUMCorWkpOnJsm8+8MqzNaHTvFGnqW1JlNWUHGbELhlZLvqqXmoCg793 VGU82E9rAS/1FWPGVJ4+p2dZMBnqlq+rc/a56q6z/a8BMZRpFahyC3THsFXYbAikJGP7 hdWzLLq7wE4BH3obXAlviXSH+u+hjZpvKKXNtNqscRVHuzNQ/spbMlxtBsHD7XX0QKHO pqkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=UF+KsWv3; 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 g4-v6si4819498wru.338.2018.08.29.22.54.43; Wed, 29 Aug 2018 22:54:43 -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=UF+KsWv3; 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 30A815A6A; Thu, 30 Aug 2018 07:53:32 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10055.outbound.protection.outlook.com [40.107.1.55]) by dpdk.org (Postfix) with ESMTP id ACD3C4CB1 for ; Thu, 30 Aug 2018 07:53:19 +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=TpOZ9UbMJs6NyMNMLJM7GMckJwUniFFueJzPI/qaFN0=; b=UF+KsWv3CfgfYJBBFB63QSFBv1D5YKQCa6gen+i/92C6xDHBkl7Jy7X22mdk7ITLTbXozUds+tKyrUTBwpzgwo+l7y+txNsV8iNKqj1iVJZmEwQaU1Q6cGR11m4unbUmWodWICh19nH68SoBJLHF69/mCNtsfQp4Pm7NzqZrSHc= 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:17 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:04 +0530 Message-Id: <1535608265-13323-10-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: 7a6bd7d8-9a50-4419-5cac-08d60e3ce2bc 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; 3:wGNhVwrCNnRD6TTCxFQyMBwuwooQHNApm13mqmKn3Q5oxZGTAAqPNt8Y0ChwfoJf9LLQnVSNd2M37Z3AuYcvNVMoicWVtCfO8o3p+wyFAipaAlyOb4swSIxVggq8yIM8e5+KrcZiY70e5HYwGaiJM+OwAx4yfZ6549TBnMkiCdcunN2oqga9SHX0slS9V0q78d6ZCNAoGdVv0N552ctk9aAjOkxXt7I+t/dUhFfImzxmtz9TdUo+Gw+xofNRNMAX; 25:6onNbZJ6PIThD3It9TeFZdrii2yN977dA262o0EPgy4cL6tt/RFFMxot0ltTQGzVbsF5C9Z3OoUrbAYGT5O4L0djU4gNS9ldP2NxnJdNTPychudTCIQMJS2y/4qNfw5YmdtD1ngr24RSgE3NSb/DfqHdg3Y/7uibZiTpswTRsHFu/jVpW10/r53bAiMoiZXFLchx+4mt6RYvLCasOcIBuruHSsTeTXKaeksiFsmvXqE5GPdSs6kyg9MGjn61u5FCzSnb3fpU59V/m/XNrom9Pqa/J3YeXdUDhhzW9vtRL9ANN+tcQZ4Z4ta6mSu9jvlPS2jKA7bXauYzXlyqBybNoA==; 31:jPd3D3VMnTBds4wCVPlf1BdUAIOWN4ZWjN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JGo758x3ifbDw1T/6YIBNm9tnIm9wOhbikXdY 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)(575784001)(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:YTxCfD5oQRmftOFUMrA1eOO5NMJAFqZu5iCdR8I?= 2HzSOWA9ukKGj1s5vmTDQ+bjjsWIN2iQyU8oUkeHVqFhlEY9ay9UgFM0QX09pagGcNnbI2I7gN4jEWDo+rb080AyiZ2reHmjJDzj5LwZLZrX723r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z4x8xhv/SctJM088WrW4EDzN09cAn32s0AXf4AHCltJ2nMfax+R3xaWf3QmYf3G729DaIjCzKRDh3q2XxBP4MgtOjKCN5EJh3pR8gEnkNRoOULzQpyGmwSm4Hy4/ZkDDWDrb3KA6ZAp/9/z5PCSRM=; 7:1mL8btEkwKpOeVJFiPPodjKNSLmbx3FlKohGWtZiwmBKd2aTgzrdhtv/RwLPYHhnXy9MxQV1YWiWYzGPZeEplPl2YLKStjkXo8l0ntmEmSbeRiCRLPwJL66OosfXM10+KOhYhE37bI/T/HdFiN+mKAnVOuD4RcyvZpE4WrT6EPnU/Tj+5OHnNGDcXXxbPc9iDnR6+3DOIqUXjFMyjCNBUI/9FCT/h0LJpgxdr10H981KvE6E1Dn1lb5lWxl6Hp2U SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:17.8060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a6bd7d8-9a50-4419-5cac-08d60e3ce2bc 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 09/10] crypto/dpaa2_sec: multi algo support for ipsec session 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 | 294 ++++++++++++++++++---------- 1 file changed, 190 insertions(+), 104 deletions(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index ca6ddad..e3dafeb 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2214,110 +2214,127 @@ dpaa2_sec_set_session_parameters(struct rte_cryptodev *dev, } static int -dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, - struct rte_security_session_conf *conf, - void *sess) +dpaa2_sec_ipsec_aead_init(struct rte_crypto_aead_xform *aead_xform, + dpaa2_sec_session *session, + struct alginfo *aeaddata) { - struct rte_security_ipsec_xform *ipsec_xform = &conf->ipsec; - struct rte_crypto_auth_xform *auth_xform; - struct rte_crypto_cipher_xform *cipher_xform; - dpaa2_sec_session *session = (dpaa2_sec_session *)sess; - struct ctxt_priv *priv; - struct ipsec_encap_pdb encap_pdb; - struct ipsec_decap_pdb decap_pdb; - 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(); - memset(session, 0, sizeof(dpaa2_sec_session)); - if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { - cipher_xform = &conf->crypto_xform->cipher; - auth_xform = &conf->crypto_xform->next->auth; - } else { - auth_xform = &conf->crypto_xform->auth; - cipher_xform = &conf->crypto_xform->next->cipher; + session->aead_key.data = rte_zmalloc(NULL, aead_xform->key.length, + RTE_CACHE_LINE_SIZE); + if (session->aead_key.data == NULL && aead_xform->key.length > 0) { + DPAA2_SEC_ERR("No Memory for aead key"); + return -1; } - priv = (struct ctxt_priv *)rte_zmalloc(NULL, - sizeof(struct ctxt_priv) + - sizeof(struct sec_flc_desc), - RTE_CACHE_LINE_SIZE); + memcpy(session->aead_key.data, aead_xform->key.data, + aead_xform->key.length); - if (priv == NULL) { - DPAA2_SEC_ERR("No memory for priv CTXT"); - return -ENOMEM; - } + session->digest_length = aead_xform->digest_length; + session->aead_key.length = aead_xform->key.length; - priv->fle_pool = dev_priv->fle_pool; - flc = &priv->flc_desc[0].flc; + aeaddata->key = (size_t)session->aead_key.data; + aeaddata->keylen = session->aead_key.length; + aeaddata->key_enc_flags = 0; + aeaddata->key_type = RTA_DATA_IMM; - session->ctxt_type = DPAA2_SEC_IPSEC; - session->cipher_key.data = rte_zmalloc(NULL, - cipher_xform->key.length, - RTE_CACHE_LINE_SIZE); - if (session->cipher_key.data == NULL && - cipher_xform->key.length > 0) { - DPAA2_SEC_ERR("No Memory for cipher key"); - rte_free(priv); - return -ENOMEM; + switch (aead_xform->algo) { + case RTE_CRYPTO_AEAD_AES_GCM: + aeaddata->algtype = OP_ALG_ALGSEL_AES; + aeaddata->algmode = OP_ALG_AAI_GCM; + session->aead_alg = RTE_CRYPTO_AEAD_AES_GCM; + break; + case RTE_CRYPTO_AEAD_AES_CCM: + aeaddata->algtype = OP_ALG_ALGSEL_AES; + aeaddata->algmode = OP_ALG_AAI_CCM; + session->aead_alg = RTE_CRYPTO_AEAD_AES_CCM; + break; + default: + DPAA2_SEC_ERR("Crypto: Undefined AEAD specified %u", + aead_xform->algo); + return -1; } + session->dir = (aead_xform->op == RTE_CRYPTO_AEAD_OP_ENCRYPT) ? + DIR_ENC : DIR_DEC; - session->cipher_key.length = cipher_xform->key.length; - session->auth_key.data = rte_zmalloc(NULL, - auth_xform->key.length, - RTE_CACHE_LINE_SIZE); - if (session->auth_key.data == NULL && - auth_xform->key.length > 0) { - DPAA2_SEC_ERR("No Memory for auth key"); - rte_free(session->cipher_key.data); - rte_free(priv); - return -ENOMEM; + return 0; +} + +static int +dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, + struct rte_crypto_auth_xform *auth_xform, + dpaa2_sec_session *session, + struct alginfo *cipherdata, + struct alginfo *authdata) +{ + if (cipher_xform) { + session->cipher_key.data = rte_zmalloc(NULL, + cipher_xform->key.length, + RTE_CACHE_LINE_SIZE); + if (session->cipher_key.data == NULL && + cipher_xform->key.length > 0) { + DPAA2_SEC_ERR("No Memory for cipher key"); + return -ENOMEM; + } + + session->cipher_key.length = cipher_xform->key.length; + memcpy(session->cipher_key.data, cipher_xform->key.data, + cipher_xform->key.length); + session->cipher_alg = cipher_xform->algo; + } else { + session->cipher_key.data = NULL; + session->cipher_key.length = 0; + session->cipher_alg = RTE_CRYPTO_CIPHER_NULL; + } + + if (auth_xform) { + session->auth_key.data = rte_zmalloc(NULL, + auth_xform->key.length, + RTE_CACHE_LINE_SIZE); + if (session->auth_key.data == NULL && + auth_xform->key.length > 0) { + DPAA2_SEC_ERR("No Memory for auth key"); + return -ENOMEM; + } + session->auth_key.length = auth_xform->key.length; + memcpy(session->auth_key.data, auth_xform->key.data, + auth_xform->key.length); + session->auth_alg = auth_xform->algo; + } else { + session->auth_key.data = NULL; + session->auth_key.length = 0; + session->auth_alg = RTE_CRYPTO_AUTH_NULL; } - session->auth_key.length = auth_xform->key.length; - memcpy(session->cipher_key.data, cipher_xform->key.data, - cipher_xform->key.length); - memcpy(session->auth_key.data, auth_xform->key.data, - auth_xform->key.length); - authdata.key = (size_t)session->auth_key.data; - authdata.keylen = session->auth_key.length; - authdata.key_enc_flags = 0; - authdata.key_type = RTA_DATA_IMM; - switch (auth_xform->algo) { + authdata->key = (size_t)session->auth_key.data; + authdata->keylen = session->auth_key.length; + authdata->key_enc_flags = 0; + authdata->key_type = RTA_DATA_IMM; + switch (session->auth_alg) { case RTE_CRYPTO_AUTH_SHA1_HMAC: - authdata.algtype = OP_PCL_IPSEC_HMAC_SHA1_96; - authdata.algmode = OP_ALG_AAI_HMAC; - session->auth_alg = RTE_CRYPTO_AUTH_SHA1_HMAC; + authdata->algtype = OP_PCL_IPSEC_HMAC_SHA1_96; + authdata->algmode = OP_ALG_AAI_HMAC; break; case RTE_CRYPTO_AUTH_MD5_HMAC: - authdata.algtype = OP_PCL_IPSEC_HMAC_MD5_96; - authdata.algmode = OP_ALG_AAI_HMAC; - session->auth_alg = RTE_CRYPTO_AUTH_MD5_HMAC; + authdata->algtype = OP_PCL_IPSEC_HMAC_MD5_96; + authdata->algmode = OP_ALG_AAI_HMAC; break; case RTE_CRYPTO_AUTH_SHA256_HMAC: - authdata.algtype = OP_PCL_IPSEC_HMAC_SHA2_256_128; - authdata.algmode = OP_ALG_AAI_HMAC; - session->auth_alg = RTE_CRYPTO_AUTH_SHA256_HMAC; + authdata->algtype = OP_PCL_IPSEC_HMAC_SHA2_256_128; + authdata->algmode = OP_ALG_AAI_HMAC; break; case RTE_CRYPTO_AUTH_SHA384_HMAC: - authdata.algtype = OP_PCL_IPSEC_HMAC_SHA2_384_192; - authdata.algmode = OP_ALG_AAI_HMAC; - session->auth_alg = RTE_CRYPTO_AUTH_SHA384_HMAC; + authdata->algtype = OP_PCL_IPSEC_HMAC_SHA2_384_192; + authdata->algmode = OP_ALG_AAI_HMAC; break; case RTE_CRYPTO_AUTH_SHA512_HMAC: - authdata.algtype = OP_PCL_IPSEC_HMAC_SHA2_512_256; - authdata.algmode = OP_ALG_AAI_HMAC; - session->auth_alg = RTE_CRYPTO_AUTH_SHA512_HMAC; + authdata->algtype = OP_PCL_IPSEC_HMAC_SHA2_512_256; + authdata->algmode = OP_ALG_AAI_HMAC; break; case RTE_CRYPTO_AUTH_AES_CMAC: - authdata.algtype = OP_PCL_IPSEC_AES_CMAC_96; - session->auth_alg = RTE_CRYPTO_AUTH_AES_CMAC; + authdata->algtype = OP_PCL_IPSEC_AES_CMAC_96; break; case RTE_CRYPTO_AUTH_NULL: - authdata.algtype = OP_PCL_IPSEC_HMAC_NULL; - session->auth_alg = RTE_CRYPTO_AUTH_NULL; + authdata->algtype = OP_PCL_IPSEC_HMAC_NULL; break; case RTE_CRYPTO_AUTH_SHA224_HMAC: case RTE_CRYPTO_AUTH_AES_XCBC_MAC: @@ -2333,50 +2350,119 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, case RTE_CRYPTO_AUTH_AES_CBC_MAC: case RTE_CRYPTO_AUTH_ZUC_EIA3: DPAA2_SEC_ERR("Crypto: Unsupported auth alg %u", - auth_xform->algo); - goto out; + session->auth_alg); + return -1; default: DPAA2_SEC_ERR("Crypto: Undefined Auth specified %u", - auth_xform->algo); - goto out; + session->auth_alg); + return -1; } - cipherdata.key = (size_t)session->cipher_key.data; - cipherdata.keylen = session->cipher_key.length; - cipherdata.key_enc_flags = 0; - cipherdata.key_type = RTA_DATA_IMM; + cipherdata->key = (size_t)session->cipher_key.data; + cipherdata->keylen = session->cipher_key.length; + cipherdata->key_enc_flags = 0; + cipherdata->key_type = RTA_DATA_IMM; - switch (cipher_xform->algo) { + switch (session->cipher_alg) { case RTE_CRYPTO_CIPHER_AES_CBC: - cipherdata.algtype = OP_PCL_IPSEC_AES_CBC; - cipherdata.algmode = OP_ALG_AAI_CBC; - session->cipher_alg = RTE_CRYPTO_CIPHER_AES_CBC; + cipherdata->algtype = OP_PCL_IPSEC_AES_CBC; + cipherdata->algmode = OP_ALG_AAI_CBC; break; case RTE_CRYPTO_CIPHER_3DES_CBC: - cipherdata.algtype = OP_PCL_IPSEC_3DES; - cipherdata.algmode = OP_ALG_AAI_CBC; - session->cipher_alg = RTE_CRYPTO_CIPHER_3DES_CBC; + cipherdata->algtype = OP_PCL_IPSEC_3DES; + cipherdata->algmode = OP_ALG_AAI_CBC; break; case RTE_CRYPTO_CIPHER_AES_CTR: - cipherdata.algtype = OP_PCL_IPSEC_AES_CTR; - cipherdata.algmode = OP_ALG_AAI_CTR; - session->cipher_alg = RTE_CRYPTO_CIPHER_AES_CTR; + cipherdata->algtype = OP_PCL_IPSEC_AES_CTR; + cipherdata->algmode = OP_ALG_AAI_CTR; break; case RTE_CRYPTO_CIPHER_NULL: - cipherdata.algtype = OP_PCL_IPSEC_NULL; + cipherdata->algtype = OP_PCL_IPSEC_NULL; break; case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: case RTE_CRYPTO_CIPHER_3DES_ECB: case RTE_CRYPTO_CIPHER_AES_ECB: case RTE_CRYPTO_CIPHER_KASUMI_F8: DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %u", - cipher_xform->algo); - goto out; + session->cipher_alg); + return -1; default: DPAA2_SEC_ERR("Crypto: Undefined Cipher specified %u", - cipher_xform->algo); + session->cipher_alg); + return -1; + } + + return 0; +} + +#ifdef RTE_LIBRTE_SECURITY_TEST +static uint8_t aes_cbc_iv[] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; +#endif + +static int +dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, + struct rte_security_session_conf *conf, + void *sess) +{ + struct rte_security_ipsec_xform *ipsec_xform = &conf->ipsec; + struct rte_crypto_cipher_xform *cipher_xform = NULL; + struct rte_crypto_auth_xform *auth_xform = NULL; + struct rte_crypto_aead_xform *aead_xform = NULL; + dpaa2_sec_session *session = (dpaa2_sec_session *)sess; + struct ctxt_priv *priv; + struct ipsec_encap_pdb encap_pdb; + struct ipsec_decap_pdb decap_pdb; + struct alginfo authdata, cipherdata; + int bufsize; + struct sec_flow_context *flc; + struct dpaa2_sec_dev_private *dev_priv = dev->data->dev_private; + int ret = -1; + + PMD_INIT_FUNC_TRACE(); + + priv = (struct ctxt_priv *)rte_zmalloc(NULL, + sizeof(struct ctxt_priv) + + sizeof(struct sec_flc_desc), + RTE_CACHE_LINE_SIZE); + + if (priv == NULL) { + DPAA2_SEC_ERR("No memory for priv CTXT"); + return -ENOMEM; + } + + priv->fle_pool = dev_priv->fle_pool; + flc = &priv->flc_desc[0].flc; + + memset(session, 0, sizeof(dpaa2_sec_session)); + + if (conf->crypto_xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { + cipher_xform = &conf->crypto_xform->cipher; + if (conf->crypto_xform->next) + auth_xform = &conf->crypto_xform->next->auth; + ret = dpaa2_sec_ipsec_proto_init(cipher_xform, auth_xform, + session, &cipherdata, &authdata); + } else if (conf->crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) { + auth_xform = &conf->crypto_xform->auth; + if (conf->crypto_xform->next) + cipher_xform = &conf->crypto_xform->next->cipher; + ret = dpaa2_sec_ipsec_proto_init(cipher_xform, auth_xform, + session, &cipherdata, &authdata); + } else if (conf->crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) { + aead_xform = &conf->crypto_xform->aead; + ret = dpaa2_sec_ipsec_aead_init(aead_xform, + session, &cipherdata); + } else { + DPAA2_SEC_ERR("XFORM not specified"); + ret = -EINVAL; + goto out; + } + if (ret) { + DPAA2_SEC_ERR("Failed to process xform"); goto out; } + session->ctxt_type = DPAA2_SEC_IPSEC; if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { struct ip ip4_hdr; @@ -2388,7 +2474,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, ip4_hdr.ip_id = 0; ip4_hdr.ip_off = 0; ip4_hdr.ip_ttl = ipsec_xform->tunnel.ipv4.ttl; - ip4_hdr.ip_p = 0x32; + ip4_hdr.ip_p = IPPROTO_ESP; ip4_hdr.ip_sum = 0; ip4_hdr.ip_src = ipsec_xform->tunnel.ipv4.src_ip; ip4_hdr.ip_dst = ipsec_xform->tunnel.ipv4.dst_ip; @@ -2452,7 +2538,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, rte_free(session->auth_key.data); rte_free(session->cipher_key.data); rte_free(priv); - return -1; + return ret; } static int From patchwork Thu Aug 30 05:51:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 145506 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp420297ljw; Wed, 29 Aug 2018 22:54:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZgEZ/R4PZmzbUSm25TU0a+tYgGChKo+YiXM6asOp0iffZefNtiwo3TviG12ZBbB+L1wNFn X-Received: by 2002:a1c:c3:: with SMTP id 186-v6mr713072wma.126.1535608493366; Wed, 29 Aug 2018 22:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535608493; cv=none; d=google.com; s=arc-20160816; b=fq8RyEShsK7/O8Fi5zJ/tsIIuBrFsDMKPXSXC2OpLa8WI7K5ycX9f+W3HrNrM4rXl8 EK7PfQRa/i/eVVJUpr/fzxoV32gwHzX30rPQs3ILOOHLicf+WQq27eETitrp7HUOgiSm F+B4Jle3P9QcCKGBIwBY+9MtFNDmFPy2WL1a0pb+oS7E/sA54QKeE/7fZVYDqEJFEv7K IsezwyDqyiKRYCpiR8g4D6w7CzooZuROhNJ86rWchK+kASWlcWcIg8EbnHRpPOwdMq32 oIA5+9WIfL7rKilwDBXlHzOH7knmBMyaH5Zr6V0CQ85YwtzI7EtAniecmM/Aegckq0XP bwpw== 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=OAXZsGT5pccuokismpn/enb8RY3yoXO56zYYYs3EjF8=; b=xN9G6bKk9osFam4+sgL/EQpCf66h5ECE8Y51JnfS6oSYmlElvIG8DPShGiJOyfrZJH uPX9TXUxNQ66eBZYbRMQwOUsP7wNzoPBRdvaXc1kYMsRAa+5uzgwIOxEy80r26MG+awG 49/yaxESSpDWmdw76hn8XQn2Z3w6xk8H007ATUMcf2ahYjoENf1jC4Mncd1Pnl1LstXw HzLn4r2Nzp51fhAcAWw6wmSnIGOdWIb6XDVApHZgbpKOvkN/h1qJoSFV1J68lWTNrNt4 7D+fir9V5f/zT9I7yhjxh/YGHiwgvFbVCn6xs72sLWTSZD5WoiGF8SREfUJzJGjZXwMy xX6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=g6hcp6Ez; 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 a16-v6si4720240wrv.161.2018.08.29.22.54.53; Wed, 29 Aug 2018 22:54:53 -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=g6hcp6Ez; 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 B6C645B34; Thu, 30 Aug 2018 07:53:33 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10071.outbound.protection.outlook.com [40.107.1.71]) by dpdk.org (Postfix) with ESMTP id A6F0F4CC3 for ; Thu, 30 Aug 2018 07:53:20 +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=OAXZsGT5pccuokismpn/enb8RY3yoXO56zYYYs3EjF8=; b=g6hcp6Ezrb4dv3yxOt86sewxYmRoGC98SijC5hWkdS1MQNXtb1X+4OJjatdEJfAF3Z9zukjSTDQ46e0IE9lru4VZHZrJELhP6gW0N+bz/8StecKxIi9zwDxDaUoCTj/9pd4Xzg4WcDleELBxEt0zNxCOMomuurth7v521pIKLKw= 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:18 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Thu, 30 Aug 2018 11:21:05 +0530 Message-Id: <1535608265-13323-11-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: da31737c-b49b-4149-38c2-08d60e3ce36b 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; 3:EuKwxNy9XXYEmOffwEp1DFwzm6eXRh3quKAyFnZKdWDgMe/NJhydmgM9Rkit4MuO6gee2Kfgajkr4mz4jYl5QfBe97ezloFVVA9oDTPSHd9yr0kruc6R7RtwMjVyP3NtAsvcw8+864rdwtHmcCRiA6o0BZV3COG189HsWDsmHSLVLxKchaXwjmHRcBscmFrh9X7KHvAVLHPhkjMUTRnOzhnIrbJ87KAYSMFerJxWpmZuPgLDmAn5DuX217o5zHVA; 25:JGehxbQd4HcOeem4UlfEWa714iPiBaXZy0x4iXOv0UQhoPCT1JtfA+Us94ep11FeinJigZtGBf9LOKTX0u2BR9aqs9p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4:Yb6V4GCrfe7xemkW1Ery014lU9sVd5CAwLqEi8WdxUy4iOt2QbwGrQZ/qolfWmvj6oxT/wk5i40ezb5xIcJRnvE9muAuxf27aMI+kqpYT/og71IdHLgS6URecvtGGIrCagwqy11XC+AwXouz5XhOmg5MYMiS9JPZAY1AOpl03ivCU533bS+CrvLklrgftMyaUpiweXgFvur23CfyFNod1ENTIEeAuxWGUYuDAToOX8MdmUnYnMYieC0uTmsWj8KJIXyuOcYcl2NM33a+8KBfBc5ZTTEJIhlcEyUYt91rjIUsbb1Lf+fSzYgMoqzWjZeM 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)(575784001)(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:Lml/g3HnfNzK6WxVOoFLe9XLYd/m8mMm/PO292g?= XY+PNvmCGTCYcZtr64Pj9exDtbxSNcDbRdnCY8b7YxZqQbaGo8rMS4EIS6wro5tHSKJe7BdwaDBfs5WpSLaGNAl4oU+eGab/TVje2MOVOzv1GKuujGe9N2DxMpXpiT6bSDf3PaCFwxXiCHudJb+L9Z3FOkpm949xVlH17G917WkThGTiSZRuG1lPMvteA2/Lmha/NCDFVQYRZ+Mf7ayl3P1/z4VBKPr0y1h2To5J3KH6co5LQFFrjbqzYilK/nw+szixNosqh6OKuqUvPyYe1/hU9AHSlENO+jQe9eScBpKsM+iRdYYmPVXl0763+HQZVh/wEZMXp0njjJ5GdbaBws7aQSEAMjQ0mBZmSZJZMz+Lk55J7XDfGyEbROpL1pdd9b+/VCbMjE5pHVFIUgcHT5VlPRDLdYdspN5BmFHCMBW5gbWhKWdVZD+zzfqtWcM7wKN1uqlKUz7T4UBdsTI0jHmBCGJhyoN4tbQnBJ4+CjB+0kKP43ZGps2EhwbFOByOHVUnkBnQL/j0wVrgCXUrEb/uDyphemkTPVt5j/tqEqvJrsKxX+o4b1D7bkmJCwxt6xKIqjfdCT3IVtewjABf/JRkFdVCZW4/SHTp3sUj0tj55+JqKMuF3Jyv6p72VeYrD9QJ+B6uzVCTXOahwB31ljAs23skJYW42Ga+G0jOiH0v+ABXtkt9GcUa4CM9++Hhb8Wg4chlCtxHWtYChORFIuUHLqkvPZFwOI4sqI/3E9gnp3ysQ8kjC8uTXc100bBkVkWCfWDGgd+jUL+N444TiGpxjvxQW+EY2okh4IkklfZ1IvGK/Rz1r/IoLIfNkUDUkqLJStNmVY95Cwj4lT0K0BnfjcaIaSuvJanZTiFHq/0u7oeZhTfF6TeJpYWBsAYDH9Ts0BvVa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sbuOukClzgd3AZ3A6PdF2OD56clqKOvbiDAdzD7cZaQaxdAu2GrWnLDlI2kVjSm7FUziY1Nuhez5WrgjtFl5ndrAQHFmF3usHOHqoXhSDopSEMZGY7J9jns7VSX36LbCPDPRwTXGC8gC4J0mrKNnYZkk6a3yvmpoDZWeMBVYsXZoV/SH4LCzj45VnD2C/Str0jMDPA3zquQ==; 5:PlTa+LIYFzaQBiy+1sO28niWZ3OkymQjKhgVWSZKFOxp+dsFSBPe9r0/68VxS3fjS+WgFSoTpHEMGKQw8KRxLl8n7m5/XhNy8Tr8/FLAVFhqUzcY4H1thoRwBVXabkMM9oHvFTsFncEcRKLHYiXWEiVBPgMTY9r59nkdmj+L2MA=; 7:DZx7i8Hh5cm567P0XFg4JrELwU4F27/VF0iiajx4Rz9aNg7vSsyVFS/rt1e98Pls5fTMhqp+21xTmAxduok02MfvsqQqS70jN7YwkY1AbR2yWaVhc9zrT9l0wer/nCVY4QknskeGfDKAmw9AYM9jBmdBAHe1CgL9KTrmKi3Wh351ZnmUcZ2GN+qiqLflIsl8IKrs0ll0avIeFJ/KWGAgMeSgvKuTnDzVmjRjxsTIGMs7p7NmhUF9+46tgHyRBLNQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 05:53:18.9520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da31737c-b49b-4149-38c2-08d60e3ce36b 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 10/10] crypto/dpaa_sec: ipsec offload add null algo 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/dpaa_sec/dpaa_sec.c | 284 +++++++++++++++++++++---------------- 1 file changed, 165 insertions(+), 119 deletions(-) -- 2.7.4 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index e5b18df..2f0a5d2 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -275,6 +275,9 @@ caam_auth_alg(dpaa_sec_session *ses, struct alginfo *alginfo_a) { switch (ses->auth_alg) { case RTE_CRYPTO_AUTH_NULL: + alginfo_a->algtype = + (ses->proto_alg == RTE_SECURITY_PROTOCOL_IPSEC) ? + OP_PCL_IPSEC_HMAC_NULL : 0; ses->digest_length = 0; break; case RTE_CRYPTO_AUTH_MD5_HMAC: @@ -323,6 +326,9 @@ caam_cipher_alg(dpaa_sec_session *ses, struct alginfo *alginfo_c) { switch (ses->cipher_alg) { case RTE_CRYPTO_CIPHER_NULL: + alginfo_c->algtype = + (ses->proto_alg == RTE_SECURITY_PROTOCOL_IPSEC) ? + OP_PCL_IPSEC_NULL : 0; break; case RTE_CRYPTO_CIPHER_AES_CBC: alginfo_c->algtype = @@ -360,6 +366,87 @@ caam_aead_alg(dpaa_sec_session *ses, struct alginfo *alginfo) } } +/* prepare ipsec proto command block of the session */ +static int +dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses) +{ + struct alginfo cipherdata = {0}, authdata = {0}; + struct sec_cdb *cdb = &ses->cdb; + int32_t shared_desc_len = 0; + int err; +#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN + int swap = false; +#else + int swap = true; +#endif + + caam_cipher_alg(ses, &cipherdata); + if (cipherdata.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { + DPAA_SEC_ERR("not supported cipher alg"); + return -ENOTSUP; + } + + cipherdata.key = (size_t)ses->cipher_key.data; + cipherdata.keylen = ses->cipher_key.length; + cipherdata.key_enc_flags = 0; + cipherdata.key_type = RTA_DATA_IMM; + + caam_auth_alg(ses, &authdata); + if (authdata.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { + DPAA_SEC_ERR("not supported auth alg"); + return -ENOTSUP; + } + + authdata.key = (size_t)ses->auth_key.data; + authdata.keylen = ses->auth_key.length; + authdata.key_enc_flags = 0; + authdata.key_type = RTA_DATA_IMM; + + cdb->sh_desc[0] = cipherdata.keylen; + cdb->sh_desc[1] = authdata.keylen; + err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN, + MIN_JOB_DESC_SIZE, + (unsigned int *)cdb->sh_desc, + &cdb->sh_desc[2], 2); + + if (err < 0) { + DPAA_SEC_ERR("Crypto: Incorrect key lengths"); + return err; + } + if (cdb->sh_desc[2] & 1) + cipherdata.key_type = RTA_DATA_IMM; + else { + cipherdata.key = (size_t)dpaa_mem_vtop( + (void *)(size_t)cipherdata.key); + cipherdata.key_type = RTA_DATA_PTR; + } + if (cdb->sh_desc[2] & (1<<1)) + authdata.key_type = RTA_DATA_IMM; + else { + authdata.key = (size_t)dpaa_mem_vtop( + (void *)(size_t)authdata.key); + authdata.key_type = RTA_DATA_PTR; + } + + cdb->sh_desc[0] = 0; + cdb->sh_desc[1] = 0; + cdb->sh_desc[2] = 0; + if (ses->dir == DIR_ENC) { + shared_desc_len = cnstr_shdsc_ipsec_new_encap( + cdb->sh_desc, + true, swap, SHR_SERIAL, + &ses->encap_pdb, + (uint8_t *)&ses->ip4_hdr, + &cipherdata, &authdata); + } else if (ses->dir == DIR_DEC) { + shared_desc_len = cnstr_shdsc_ipsec_new_decap( + cdb->sh_desc, + true, swap, SHR_SERIAL, + &ses->decap_pdb, + &cipherdata, &authdata); + } + return shared_desc_len; +} /* prepare command block of the session */ static int @@ -377,7 +464,9 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) memset(cdb, 0, sizeof(struct sec_cdb)); - if (is_cipher_only(ses)) { + if (is_proto_ipsec(ses)) { + shared_desc_len = dpaa_sec_prep_ipsec_cdb(ses); + } else if (is_cipher_only(ses)) { caam_cipher_alg(ses, &alginfo_c); if (alginfo_c.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { DPAA_SEC_ERR("not supported cipher alg"); @@ -485,30 +574,13 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) cdb->sh_desc[0] = 0; cdb->sh_desc[1] = 0; cdb->sh_desc[2] = 0; - if (is_proto_ipsec(ses)) { - if (ses->dir == DIR_ENC) { - shared_desc_len = cnstr_shdsc_ipsec_new_encap( - cdb->sh_desc, - true, swap, SHR_SERIAL, - &ses->encap_pdb, - (uint8_t *)&ses->ip4_hdr, - &alginfo_c, &alginfo_a); - } else if (ses->dir == DIR_DEC) { - shared_desc_len = cnstr_shdsc_ipsec_new_decap( - cdb->sh_desc, - true, swap, SHR_SERIAL, - &ses->decap_pdb, - &alginfo_c, &alginfo_a); - } - } else { - /* Auth_only_len is set as 0 here and it will be - * overwritten in fd for each packet. - */ - shared_desc_len = cnstr_shdsc_authenc(cdb->sh_desc, - true, swap, &alginfo_c, &alginfo_a, - ses->iv.length, 0, - ses->digest_length, ses->dir); - } + /* Auth_only_len is set as 0 here and it will be + * overwritten in fd for each packet. + */ + shared_desc_len = cnstr_shdsc_authenc(cdb->sh_desc, + true, swap, &alginfo_c, &alginfo_a, + ses->iv.length, 0, + ses->digest_length, ses->dir); } if (shared_desc_len < 0) { @@ -1465,7 +1537,9 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, auth_only_len = op->sym->auth.data.length - op->sym->cipher.data.length; if (rte_pktmbuf_is_contiguous(op->sym->m_src)) { - if (is_auth_only(ses)) { + if (is_proto_ipsec(ses)) { + cf = build_proto(op, ses); + } else if (is_auth_only(ses)) { cf = build_auth_only(op, ses); } else if (is_cipher_only(ses)) { cf = build_cipher_only(op, ses); @@ -1474,8 +1548,6 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, auth_only_len = ses->auth_only_len; } else if (is_auth_cipher(ses)) { cf = build_cipher_auth(op, ses); - } else if (is_proto_ipsec(ses)) { - cf = build_proto(op, ses); } else { DPAA_SEC_DP_ERR("not supported ops"); frames_to_send = loop; @@ -1898,8 +1970,8 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, { struct dpaa_sec_dev_private *internals = dev->data->dev_private; struct rte_security_ipsec_xform *ipsec_xform = &conf->ipsec; - struct rte_crypto_auth_xform *auth_xform; - struct rte_crypto_cipher_xform *cipher_xform; + struct rte_crypto_auth_xform *auth_xform = NULL; + struct rte_crypto_cipher_xform *cipher_xform = NULL; dpaa_sec_session *session = (dpaa_sec_session *)sess; PMD_INIT_FUNC_TRACE(); @@ -1907,103 +1979,77 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, memset(session, 0, sizeof(dpaa_sec_session)); if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) { cipher_xform = &conf->crypto_xform->cipher; - auth_xform = &conf->crypto_xform->next->auth; + if (conf->crypto_xform->next) + auth_xform = &conf->crypto_xform->next->auth; } else { auth_xform = &conf->crypto_xform->auth; - cipher_xform = &conf->crypto_xform->next->cipher; + if (conf->crypto_xform->next) + cipher_xform = &conf->crypto_xform->next->cipher; } session->proto_alg = conf->protocol; - session->cipher_key.data = rte_zmalloc(NULL, - cipher_xform->key.length, - RTE_CACHE_LINE_SIZE); - if (session->cipher_key.data == NULL && - cipher_xform->key.length > 0) { - DPAA_SEC_ERR("No Memory for cipher key"); - return -ENOMEM; - } - session->cipher_key.length = cipher_xform->key.length; - session->auth_key.data = rte_zmalloc(NULL, - auth_xform->key.length, - RTE_CACHE_LINE_SIZE); - if (session->auth_key.data == NULL && - auth_xform->key.length > 0) { - DPAA_SEC_ERR("No Memory for auth key"); - rte_free(session->cipher_key.data); - return -ENOMEM; + if (cipher_xform && cipher_xform->algo != RTE_CRYPTO_CIPHER_NULL) { + session->cipher_key.data = rte_zmalloc(NULL, + cipher_xform->key.length, + RTE_CACHE_LINE_SIZE); + if (session->cipher_key.data == NULL && + cipher_xform->key.length > 0) { + DPAA_SEC_ERR("No Memory for cipher key"); + return -ENOMEM; + } + memcpy(session->cipher_key.data, cipher_xform->key.data, + cipher_xform->key.length); + session->cipher_key.length = cipher_xform->key.length; + + switch (cipher_xform->algo) { + case RTE_CRYPTO_CIPHER_AES_CBC: + case RTE_CRYPTO_CIPHER_3DES_CBC: + case RTE_CRYPTO_CIPHER_AES_CTR: + break; + default: + DPAA_SEC_ERR("Crypto: Unsupported Cipher alg %u", + cipher_xform->algo); + goto out; + } + session->cipher_alg = cipher_xform->algo; + } else { + session->cipher_key.data = NULL; + session->cipher_key.length = 0; + session->cipher_alg = RTE_CRYPTO_CIPHER_NULL; } - session->auth_key.length = auth_xform->key.length; - memcpy(session->cipher_key.data, cipher_xform->key.data, - cipher_xform->key.length); - memcpy(session->auth_key.data, auth_xform->key.data, - auth_xform->key.length); - switch (auth_xform->algo) { - case RTE_CRYPTO_AUTH_SHA1_HMAC: - session->auth_alg = RTE_CRYPTO_AUTH_SHA1_HMAC; - break; - case RTE_CRYPTO_AUTH_MD5_HMAC: - session->auth_alg = RTE_CRYPTO_AUTH_MD5_HMAC; - break; - case RTE_CRYPTO_AUTH_SHA256_HMAC: - session->auth_alg = RTE_CRYPTO_AUTH_SHA256_HMAC; - break; - case RTE_CRYPTO_AUTH_SHA384_HMAC: - session->auth_alg = RTE_CRYPTO_AUTH_SHA384_HMAC; - break; - case RTE_CRYPTO_AUTH_SHA512_HMAC: - session->auth_alg = RTE_CRYPTO_AUTH_SHA512_HMAC; - break; - case RTE_CRYPTO_AUTH_AES_CMAC: - session->auth_alg = RTE_CRYPTO_AUTH_AES_CMAC; - break; - case RTE_CRYPTO_AUTH_NULL: + if (auth_xform && auth_xform->algo != RTE_CRYPTO_AUTH_NULL) { + session->auth_key.data = rte_zmalloc(NULL, + auth_xform->key.length, + RTE_CACHE_LINE_SIZE); + if (session->auth_key.data == NULL && + auth_xform->key.length > 0) { + DPAA_SEC_ERR("No Memory for auth key"); + rte_free(session->cipher_key.data); + return -ENOMEM; + } + memcpy(session->auth_key.data, auth_xform->key.data, + auth_xform->key.length); + session->auth_key.length = auth_xform->key.length; + + switch (auth_xform->algo) { + case RTE_CRYPTO_AUTH_SHA1_HMAC: + case RTE_CRYPTO_AUTH_MD5_HMAC: + case RTE_CRYPTO_AUTH_SHA256_HMAC: + case RTE_CRYPTO_AUTH_SHA384_HMAC: + case RTE_CRYPTO_AUTH_SHA512_HMAC: + case RTE_CRYPTO_AUTH_AES_CMAC: + break; + default: + DPAA_SEC_ERR("Crypto: Unsupported auth alg %u", + auth_xform->algo); + goto out; + } + session->auth_alg = auth_xform->algo; + } else { + session->auth_key.data = NULL; + session->auth_key.length = 0; session->auth_alg = RTE_CRYPTO_AUTH_NULL; - break; - case RTE_CRYPTO_AUTH_SHA224_HMAC: - case RTE_CRYPTO_AUTH_AES_XCBC_MAC: - case RTE_CRYPTO_AUTH_SNOW3G_UIA2: - case RTE_CRYPTO_AUTH_SHA1: - case RTE_CRYPTO_AUTH_SHA256: - case RTE_CRYPTO_AUTH_SHA512: - case RTE_CRYPTO_AUTH_SHA224: - case RTE_CRYPTO_AUTH_SHA384: - case RTE_CRYPTO_AUTH_MD5: - case RTE_CRYPTO_AUTH_AES_GMAC: - case RTE_CRYPTO_AUTH_KASUMI_F9: - case RTE_CRYPTO_AUTH_AES_CBC_MAC: - case RTE_CRYPTO_AUTH_ZUC_EIA3: - DPAA_SEC_ERR("Crypto: Unsupported auth alg %u", - auth_xform->algo); - goto out; - default: - DPAA_SEC_ERR("Crypto: Undefined Auth specified %u", - auth_xform->algo); - goto out; - } - - switch (cipher_xform->algo) { - case RTE_CRYPTO_CIPHER_AES_CBC: - session->cipher_alg = RTE_CRYPTO_CIPHER_AES_CBC; - break; - case RTE_CRYPTO_CIPHER_3DES_CBC: - session->cipher_alg = RTE_CRYPTO_CIPHER_3DES_CBC; - break; - case RTE_CRYPTO_CIPHER_AES_CTR: - session->cipher_alg = RTE_CRYPTO_CIPHER_AES_CTR; - break; - case RTE_CRYPTO_CIPHER_NULL: - case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: - case RTE_CRYPTO_CIPHER_3DES_ECB: - case RTE_CRYPTO_CIPHER_AES_ECB: - case RTE_CRYPTO_CIPHER_KASUMI_F8: - DPAA_SEC_ERR("Crypto: Unsupported Cipher alg %u", - cipher_xform->algo); - goto out; - default: - DPAA_SEC_ERR("Crypto: Undefined Cipher specified %u", - cipher_xform->algo); - goto out; } if (ipsec_xform->direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {