From patchwork Thu Apr 19 16:52:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133838 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp856913ljf; Thu, 19 Apr 2018 09:54:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/kPIQdiWAIJK307JoPgyVMC8iAI829eDM/nbcjtQBTmkHL/GmfhuvqrR7fwEzXP/4CEkcc X-Received: by 10.28.147.83 with SMTP id v80mr5337897wmd.91.1524156890482; Thu, 19 Apr 2018 09:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524156890; cv=none; d=google.com; s=arc-20160816; b=0t/WjWWpfvbaRD/U3Q56PnMvONPrLrjpcXK7GAasIsoTsj0m31jt9JeKYkHIQsyjPz zh+HzRPOozR6MGVyX3hr/f1HKDCwwlh5gJxTS2oD8eBz4enxRcDtvpVeE2Vobo79B0uB qMOOYtHPDqKW5zf+LY3Ecl3txfdra+fCOcKCnXb7LGQP1BqhxpFvz3iFS+xGyEJDiyGZ 5tTJJ8VZHQVEB5UOXCHPydi5qgS27CQt0rMmzQ4sbaedeJRSu2vYHJGle4p+jWpALNAN offiC3JrowV3pGwAdCksy0eyVH57BfuivddHEipXmk89KoTyMAfDdfLjMySjGpGswWXx GkGA== 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:message-id:date:cc:to:from :dkim-signature:arc-authentication-results; bh=1U6axKQSuxNJA+D5n7HqlysWIYWoKmNP5uWTk+7TJq0=; b=zAJBh12XUDg0JqeYuA37wZ0lc1ImROn5lw9AWFj7/PnY6n0Xay5hlCtQcVqzcyPZJD 5xMNrp0Ww1MrfKy6nrpH1v1BBZwLWgSUSMUsjHr4oNvLxF55NHj/hE55N0+Ht66WsjW9 g0MFYhzs3Ry7tXJXP/Tln6Oo1Rox2QmJEN4/3Q6omOJsRHgjd+IwiTWYjPlt0zcD5Vc7 epzS73phVfVj+Q2KjRNFEAzj6JSaTEl/go7Ka4X+epgHipc8g2Goa84yWFmbgABPBK+Y /XteT6I+Jet4nsrCR8w2Do4lzy8HdxqLP/bHxFAiRkTg2om7O5/1GFDWC9MsDfn+St49 8rEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=tsMGBwli; 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 e10si3137556wmc.180.2018.04.19.09.54.50; Thu, 19 Apr 2018 09:54:50 -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=tsMGBwli; 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 A3E75AAEE; Thu, 19 Apr 2018 18:54:49 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0080.outbound.protection.outlook.com [104.47.1.80]) by dpdk.org (Postfix) with ESMTP id 551B6AAC4 for ; Thu, 19 Apr 2018 18:54:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1U6axKQSuxNJA+D5n7HqlysWIYWoKmNP5uWTk+7TJq0=; b=tsMGBwliGcOsK6ZC/lIl6SEXX18+6oCZIUyrOM0aPHQOlHDn1NLVX/F30fOVUHFNKoy1ZC3fdf6BgraInrgxnPcYvD7bXg9Us6YmTzNlqZ39yR9mnT474JfRw/WNg+5C+A9aQ+XcU+IpTOT4FqNqOBiGcGrsr281nbNfT4LaAI0= Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.15; Thu, 19 Apr 2018 16:54:44 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com Date: Thu, 19 Apr 2018 22:22:36 +0530 Message-Id: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0055.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::17) To DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0768; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 3:s5cE9O67CALxKGxAPGpl2gPkVb/uX68GUypisvcfNxoX8C1fj7PRxvMNx0cewOcx2LeiDlrEZyKYQa1+J3Zyv2i/XLbgObGci/oXPjJR+rI2CzvMSASmVYNH/URx/vVsiZ1CmBHF2JbBrKZA2wmKgggH9Rss4pHRCK9Av8rt0ryzVyLE2Bj5XF2t+p77jdHFN7GNbFYT1475Mm6ZW51RjhstaWE8EdsTTwPH/V+tXoYAYpUrrwXcn3Dd8HBgq9lu; 25:TsY38a8w5REIJmgVl7fjoTPzoCEm8I6ZFUTi6k7HJ4VKS1GRmCabfXHT4w7TNSxW6N2/xbCTrdsSfHWfw5SPSE8zAOi59QQZP7Qv5wGkZNPxljRK1TcCjLvPSF+Q9xn1o1Z8ru8A4C656FuNv4nbSNxdYlkL2w3/LzUKxpUdOtl3LFj0MfDHXADr6LmBSRjSrDukrdtQI9eOHRsxbj76kMsDTduXsFY2FtJ6dhKTNEeDH2eKHzvXInYSxeFoJDaWq59XrHk5lnF7wZmQYsS5oJrn5VgYs6jlLg79H8uj0ZfKbA8uhKx3KK9CSYwi6i+38I/kypCDAj8grhkWaIPIXQ==; 31:YU4v3urfyGOwmpPv/dIxOCk8jjQSYrxIaT/4PtnjdJbh7mhLDINNdEo0HVfXHG5CoRrzbnXr6fToVEjL2If0GGCHjYnhbv+dkLt94H6haAMklIKgNJ00iNgTNlFK4dl4gBMmvMJXXr6lHJeL4hjKAj7vPdR6oztlJUSTBH9Or7N3+vwVipSVxhZfsBNsGcztRSgVj9XDVmCaX3EVfLayksQdCUPzm9NxuuVzFVa2bsU= X-MS-TrafficTypeDiagnostic: DB4PR04MB0768: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 20:0waM/7Q6ZWktoY+cfzwY/QndWzanNmZevWB74kUzBElVty0ocIfeXe2PXYtNt1SdbbIndydjlzpfL9GIFBymDtZ803i5q4RfLwF4CjvYVQ3LNMoFkh1ZFoJubq2Gr2mV7vgEckQeF3p+wmlTxX44HSYbCQluQqF8f0Z3SEmxkXOqPjEp3rWx7e7/IiDEbUiiU6EIaRMJRrSijsHcjVGXUzwXr5OPVt49qUTCym2NTmikK7Pwv+Yo7I7rBe1Xea1Ob9+lCUh73KEedSPcDiS/9UZMNiyKYZw9FUF5baFmQPNTngOuYcS9suGuuQ5E8SUUGHGPnYQgxTaUApBmtENwPADa/WCd+f4Af0xvIGyf6qXuD0KWRdKqhjho3VepGREgkz8z23hUkhplW+SgmTn0CMa7E4YcoNOWD2+qsVZEyXn6ygq8skRPsxqHbglfCEsnftT+Vt/oroTjMOhs3HLVYhC9YrtUjZ6uRx3HDtGfTbs2/yR1JQSwXd5PeIWSdo+w; 4:M/Efa+cSYHPZ5R7J+FuBORY3ymbYfN9mXXThv87Vs5IGX6s8YBDvN1kqN9TlCSjaI3aXTSFNfIOwaFreZ//SQK7HaXTf30tv30DbB03Qek5AJHLNQ28wFRfcHPRY2ZbJ3Hd4gkUxncHaNJl/ujYYBpEITwN/czKeHBYHmJVIi13gdFoachRJejlSS+FMtKcij8Xn8arRk0v5ekRpyfvUePiz+3K02s96biBkqZT3PR4CPd38tcnegqnfoKdBCE7Nm2nlSfzhPOA8s1cG7zR4EkEUMejHAhT6g3skYUmVI6JMQI1iIAkHlaCuteyIQrreEh69s64Fbuo/jgxZ5UoLfekK25mKNQ/UOnbTxKLeXjY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231232)(944501383)(52105095)(3002001)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0768; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0768; X-Forefront-PRVS: 0647963F84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(50226002)(476003)(86362001)(26005)(478600001)(316002)(51416003)(16586007)(8676002)(16526019)(55236004)(2351001)(5660300001)(186003)(2361001)(956004)(81166006)(8936002)(2616005)(2906002)(36756003)(59450400001)(6666003)(6486002)(6512007)(66066001)(50466002)(6506007)(386003)(47776003)(6916009)(6116002)(5009440100003)(305945005)(48376002)(3846002)(7736002)(25786009)(52116002)(53936002)(5890100001)(44832011)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0768; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; MLV:nov; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0768; 23:Mgbiz6OpZhVOEQVhhPbSM1CLSdjrNJ8AK4TOdplMa?= dX0rtaxQS3Pn8buBEoQZdxU1GO8ObNgHiAVFRvvn+2U2T/PjqpwRURPi0N8fBWmg8oJ1jii9wSi/6bq8M9Zz3q8C6q/LBy+7Y/jIzh6HuL1CTK+xahH26Wi/ak4Rx01uvUrvk5+QKuPK01BRI+Jo/1FvxTTNVm9ljXeH55tPreilv5DlcFYDJoosrYk5OQSkBkORDSzN2xBlXylvLufe6yJtVa6ZfE7KZvK78az9N9FhVdjpk8n9Rnk02m34bZfzMy7GsC5sijb5HGKqbLoF4IaoUfBxbfgHB/+GWo/UY5UzQpTXUru3DDyNJYjht7mtzFbaIhVjzQIABHyoOYnL6kqN1Et8ywj3UCVO8QWTy/m5wFyyTRBf5g9HMGsZO3TG8Jlp03zbwCqhb+JWuAUajfjq1ijQbOeypvvbClW/YuzrktbIg2a3ymnVUhrp7hY4S3jlrmCy9BBdZ/YMbV9R1Ie/fStBvdQ9DDlH9rW8RZ/PXfQdW4Gu8UveiWUc2AX4obgwKplEIzdcSEYhYm5vr5ZhH/8EGvusvTmfN6VtCzMvtXD4HOZkTtSL0denTKuqc/FWwVhJd+wHjxxjIiJcfeyy6Q6YaosFUcpd5ezNtzf6KTRBCJHy3azImqVmlbXWo2/Rl+K7UgnKPoCcNwnEVLjD29yFHLHU5/6rzq0Ymu/rbB4GC7AncpydalBO5OpwQlkRWxzNcx5qaNr+h6i4uvzxZ7ZYta6qn/yfq71/ZgFevgVjHR8ksdN6kzAEjKnfsVzjF6GyqIAdcbzn/hQpS7Nc+utkz0qCAjql2fbHivOH2pdMFn078f3+yGAEU3fKwHr134TmzzbeO7G3ZBY4d3p2U1S594Z2PDfQSTRNbMrJIENF2W2Howe2jfwIB5dSGhgGfbM2QibSt6HUp89WnA0FdqThSq7Q01FlyOrkEde1PADiDlDmD/Nbyc/0pls+GlSTUSpjbQNdqYG41hIvp+cxK7lU09JR5pQrr3oKv4/nquyCBTdkkIVcYmS/gcMIQZxWvQIXEjEblcWqwdi0Bd33czUsx8mhRsoGLM/EJa+dDnXP7yoJdWL+FyoUoKoLyGiIkf6R65ZCtF7Og8hd5IB9jOpmmD7zlUvCtpu1DUBLw== X-Microsoft-Antispam-Message-Info: bxDUYnbtJMICSrx1vHMhrZzRAlXQMW8VoIXprVfodCQCd4pOzAzR+sr2zNy2pV/oZthA7evi3paaTcYdufpc5mBfw4Umu8grS5okTPIjGYKCuf6UbJpuv3oWOmjwgKUvnE5S7khB4/OPKh8LPoyhVYkwrdlDXCWzGjbbxQayviBvur0I3eSEk8sSHtpGcyhE X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 6:Es5C23R/OThEBJaXVNZiMCFqSUkMncZR7ancadk2wu56NagATCP16cbJjmlunGi5nanfyFamMxKQvdfYHO2U2P9pG1eXb9cYUnKqFcr0dY4tQ7TVnYdmTPm5SD1q8uetESmXQlvj/FEnQ6IwZ4zpZdGSww4/Ac29mFDK2gRqXwJeePDFoVnDp6SdWkCHbUPD/Tv5o0v8+hBcICBrWfG1N3Z8c0pmVnZNaUg+nvGay6kFNzLPeOjp/RJwghQYjW5Orf6M1U3s7KFDotbKZCyB1Ij8Zc0jlVFqx+YLGfpCOyoTi93HfUwjopRshO6ABkKLbhehms+Z1OhT69NoszxFKScBIAyduXW0HeHK2w3AxxP3gCDJukokv8nzrLVpYyWfgZRIaAsRNCmUEVZynAF98XIddXuKyPg/G1LFr9uvJv8oHj5QJmNlga62Zw7EN8tbxWWJcF0zcNSyOkw3h2v7yA==; 5:rHq8cKHO6tXNDFMQS8oY5SQYuOBtN3/tnk+r3RRbqhgNHR0DeQ547Uhz6skVp8yaCmUIAGqAldyU4NpXCPp6vlTRNdaEKKJ699GxR1KY37JAeMabpIXK5jRdDQuQoVId8p/ZWtXUPdlrVmEQL7k+pv5ro3NIHWyVUtQyfmzbvOE=; 24:cA6NwyBM6GGLzKXqrDr8V+6dk+TOoDdJihuVbodHyczzLGS2LCjnS431eAOb4ar3IRGQbfcp9Wt/o7b+7+U6LvE1f5aKoZLj3PxEDZ5Haew= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 7:vvFJ6M8f0N8wgRY8F4cIiGUzZhfgpzccOAonJfuPpDUcv0tPXZSe7WEASMgq5kxgsp3bajmudPUxa9fTplei6xLWlOwwBNmDECaAhUSoYZr4JNOlmJifUoaG8CCftcRMjHjWSobCILbilbyt8We9YMtODumYSjXBBb07RRVvoSXY5UylQdxpQ+NAxTSaU6TYZoI3Kk5XOJV/MT1dprISlTiJNAhgPGBotopQcqlt7WwfloGAn0Zpjcg9KmyzqR2y X-MS-Office365-Filtering-Correlation-Id: a9421025-d856-4bb1-f2d3-08d5a6164151 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 16:54:44.7236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9421025-d856-4bb1-f2d3-08d5a6164151 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0768 Subject: [dpdk-dev] [PATCH 1/4] crypto/dpaa_sec: support dynamic logging 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" This patch adds the support for dynamic logging in dpaa_sec. Signed-off-by: Hemant Agrawal --- config/common_base | 3 - config/defconfig_arm64-dpaa-linuxapp-gcc | 7 -- doc/guides/cryptodevs/dpaa_sec.rst | 21 +++-- drivers/crypto/dpaa_sec/Makefile | 5 - drivers/crypto/dpaa_sec/dpaa_sec.c | 155 ++++++++++++++++--------------- drivers/crypto/dpaa_sec/dpaa_sec_log.h | 65 +++++++------ 6 files changed, 124 insertions(+), 132 deletions(-) -- 2.7.4 Acked-by: Akhil Goyal diff --git a/config/common_base b/config/common_base index e57fe3a..7e45412 100644 --- a/config/common_base +++ b/config/common_base @@ -473,9 +473,6 @@ CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048 # NXP DPAA caam - crypto driver # CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4 CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048 diff --git a/config/defconfig_arm64-dpaa-linuxapp-gcc b/config/defconfig_arm64-dpaa-linuxapp-gcc index 52bfc79..147ea5d 100644 --- a/config/defconfig_arm64-dpaa-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa-linuxapp-gcc @@ -21,10 +21,3 @@ CONFIG_RTE_PKTMBUF_HEADROOM=128 # NXP DPAA Bus CONFIG_RTE_LIBRTE_DPAA_DEBUG_DRIVER=n CONFIG_RTE_LIBRTE_DPAA_HWDEBUG=n - -# -# FSL DPAA caam - crypto driver -# -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n -CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst index b98f786..2964e83 100644 --- a/doc/guides/cryptodevs/dpaa_sec.rst +++ b/doc/guides/cryptodevs/dpaa_sec.rst @@ -132,15 +132,6 @@ Please note that enabling debugging options may affect system performance. By default it is only enabled in defconfig_arm64-dpaa-* config. Toggle compilation of the ``librte_pmd_dpaa_sec`` driver. -* ``CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT`` (default ``n``) - Toggle display of initialization related driver messages - -* ``CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER`` (default ``n``) - Toggle display of driver runtime messages - -* ``CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX`` (default ``n``) - Toggle display of receive fast path run-time message - * ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS`` By default it is set as 2048 in defconfig_arm64-dpaa-* config. It indicates Number of sessions to create in the session memory pool @@ -155,3 +146,15 @@ following ``make`` command: cd make config T=arm64-dpaa-linuxapp-gcc install + +Enabling logs +------------- + +For enabling logs, use the following EAL parameter: + +.. code-block:: console + + ./your_crypto_application --log-level=pmd.crypto.dpaa, + +Using ``pmd.crypto.dpaa`` as log matching criteria, all Crypto PMD logs can be +enabled which are lower than logging ``level``. diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile index fe2c593..9be4470 100644 --- a/drivers/crypto/dpaa_sec/Makefile +++ b/drivers/crypto/dpaa_sec/Makefile @@ -12,13 +12,8 @@ LIB = librte_pmd_dpaa_sec.a # build flags CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -D _GNU_SOURCE -ifeq ($(CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT),y) -CFLAGS += -O0 -g -CFLAGS += "-Wno-error" -else CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -endif CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 2dac510..e456fd5 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2017 NXP + * Copyright 2017-2018 NXP * */ @@ -39,6 +39,8 @@ enum rta_sec_era rta_sec_era; +int dpaa_logtype_sec; + static uint8_t cryptodev_driver_id; static __thread struct rte_crypto_op **dpaa_sec_ops; @@ -53,7 +55,7 @@ dpaa_sec_op_ending(struct dpaa_sec_op_ctx *ctx) if (!ctx->fd_status) { ctx->op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; } else { - PMD_RX_LOG(ERR, "SEC return err: 0x%x", ctx->fd_status); + DPAA_SEC_DP_WARN("SEC return err: 0x%x", ctx->fd_status); ctx->op->status = RTE_CRYPTO_OP_STATUS_ERROR; } @@ -69,7 +71,7 @@ dpaa_sec_alloc_ctx(dpaa_sec_session *ses) retval = rte_mempool_get(ses->ctx_pool, (void **)(&ctx)); if (!ctx || retval) { - PMD_TX_LOG(ERR, "Alloc sec descriptor failed!"); + DPAA_SEC_DP_WARN("Alloc sec descriptor failed!"); return NULL; } /* @@ -119,8 +121,8 @@ ern_sec_fq_handler(struct qman_portal *qm __rte_unused, struct qman_fq *fq, const struct qm_mr_entry *msg) { - RTE_LOG_DP(ERR, PMD, "sec fq %d error, RC = %x, seqnum = %x\n", - fq->fqid, msg->ern.rc, msg->ern.seqnum); + DPAA_SEC_DP_ERR("sec fq %d error, RC = %x, seqnum = %x\n", + fq->fqid, msg->ern.rc, msg->ern.seqnum); } /* initialize the queue with dest chan as caam chan so that @@ -148,11 +150,11 @@ dpaa_sec_init_rx(struct qman_fq *fq_in, rte_iova_t hwdesc, fq_in->cb.ern = ern_sec_fq_handler; - PMD_INIT_LOG(DEBUG, "in-%x out-%x", fq_in->fqid, fqid_out); + DPAA_SEC_DEBUG("in-%x out-%x", fq_in->fqid, fqid_out); ret = qman_init_fq(fq_in, flags, &fq_opts); if (unlikely(ret != 0)) - PMD_INIT_LOG(ERR, "qman_init_fq failed %d", ret); + DPAA_SEC_ERR("qman_init_fq failed %d", ret); return ret; } @@ -211,7 +213,7 @@ dpaa_sec_init_tx(struct qman_fq *fq) ret = qman_create_fq(0, flags, fq); if (unlikely(ret)) { - PMD_INIT_LOG(ERR, "qman_create_fq failed"); + DPAA_SEC_ERR("qman_create_fq failed"); return ret; } @@ -226,7 +228,7 @@ dpaa_sec_init_tx(struct qman_fq *fq) ret = qman_init_fq(fq, 0, &opts); if (unlikely(ret)) { - PMD_INIT_LOG(ERR, "unable to init caam source fq!"); + DPAA_SEC_ERR("unable to init caam source fq!"); return ret; } @@ -318,7 +320,7 @@ caam_auth_alg(dpaa_sec_session *ses, struct alginfo *alginfo_a) alginfo_a->algmode = OP_ALG_AAI_HMAC; break; default: - PMD_INIT_LOG(ERR, "unsupported auth alg %u", ses->auth_alg); + DPAA_SEC_ERR("unsupported auth alg %u", ses->auth_alg); } } @@ -347,7 +349,7 @@ caam_cipher_alg(dpaa_sec_session *ses, struct alginfo *alginfo_c) alginfo_c->algmode = OP_ALG_AAI_CTR; break; default: - PMD_INIT_LOG(ERR, "unsupported cipher alg %d", ses->cipher_alg); + DPAA_SEC_ERR("unsupported cipher alg %d", ses->cipher_alg); } } @@ -360,7 +362,7 @@ caam_aead_alg(dpaa_sec_session *ses, struct alginfo *alginfo) alginfo->algmode = OP_ALG_AAI_GCM; break; default: - PMD_INIT_LOG(ERR, "unsupported AEAD alg %d", ses->aead_alg); + DPAA_SEC_ERR("unsupported AEAD alg %d", ses->aead_alg); } } @@ -384,7 +386,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) if (is_cipher_only(ses)) { caam_cipher_alg(ses, &alginfo_c); if (alginfo_c.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { - PMD_TX_LOG(ERR, "not supported cipher alg\n"); + DPAA_SEC_ERR("not supported cipher alg"); return -ENOTSUP; } @@ -402,7 +404,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) } else if (is_auth_only(ses)) { caam_auth_alg(ses, &alginfo_a); if (alginfo_a.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { - PMD_TX_LOG(ERR, "not supported auth alg\n"); + DPAA_SEC_ERR("not supported auth alg"); return -ENOTSUP; } @@ -418,7 +420,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) } else if (is_aead(ses)) { caam_aead_alg(ses, &alginfo); if (alginfo.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { - PMD_TX_LOG(ERR, "not supported aead alg\n"); + DPAA_SEC_ERR("not supported aead alg"); return -ENOTSUP; } alginfo.key = (size_t)ses->aead_key.data; @@ -441,7 +443,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) } else { caam_cipher_alg(ses, &alginfo_c); if (alginfo_c.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { - PMD_TX_LOG(ERR, "not supported cipher alg\n"); + DPAA_SEC_ERR("not supported cipher alg"); return -ENOTSUP; } @@ -452,7 +454,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) caam_auth_alg(ses, &alginfo_a); if (alginfo_a.algtype == (unsigned int)DPAA_SEC_ALG_UNSUPPORT) { - PMD_TX_LOG(ERR, "not supported auth alg\n"); + DPAA_SEC_ERR("not supported auth alg"); return -ENOTSUP; } @@ -469,7 +471,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) &cdb->sh_desc[2], 2); if (err < 0) { - PMD_TX_LOG(ERR, "Crypto: Incorrect key lengths"); + DPAA_SEC_ERR("Crypto: Incorrect key lengths"); return err; } if (cdb->sh_desc[2] & 1) @@ -514,7 +516,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) } if (shared_desc_len < 0) { - PMD_TX_LOG(ERR, "error in preparing command block\n"); + DPAA_SEC_ERR("error in preparing command block"); return shared_desc_len; } @@ -573,7 +575,7 @@ dpaa_sec_deq(struct dpaa_sec_qp *qp, struct rte_crypto_op **ops, int nb_ops) if (!ctx->fd_status) { op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; } else { - printf("\nSEC return err: 0x%x", ctx->fd_status); + DPAA_SEC_DP_WARN("SEC return err:0x%x", ctx->fd_status); op->status = RTE_CRYPTO_OP_STATUS_ERROR; } ops[pkts++] = op; @@ -604,8 +606,8 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) extra_segs = 2; if ((mbuf->nb_segs + extra_segs) > MAX_SG_ENTRIES) { - PMD_TX_LOG(ERR, "Auth: Max sec segs supported is %d\n", - MAX_SG_ENTRIES); + DPAA_SEC_DP_ERR("Auth: Max sec segs supported is %d", + MAX_SG_ENTRIES); return NULL; } ctx = dpaa_sec_alloc_ctx(ses); @@ -757,8 +759,8 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) } if (req_segs > MAX_SG_ENTRIES) { - PMD_TX_LOG(ERR, "Cipher: Max sec segs supported is %d\n", - MAX_SG_ENTRIES); + DPAA_SEC_DP_ERR("Cipher: Max sec segs supported is %d", + MAX_SG_ENTRIES); return NULL; } @@ -910,7 +912,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) req_segs++; if (req_segs > MAX_SG_ENTRIES) { - PMD_TX_LOG(ERR, "AEAD: Max sec segs supported is %d\n", + DPAA_SEC_DP_ERR("AEAD: Max sec segs supported is %d", MAX_SG_ENTRIES); return NULL; } @@ -1158,7 +1160,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses) } if (req_segs > MAX_SG_ENTRIES) { - PMD_TX_LOG(ERR, "Cipher-Auth: Max sec segs supported is %d\n", + DPAA_SEC_DP_ERR("Cipher-Auth: Max sec segs supported is %d", MAX_SG_ENTRIES); return NULL; } @@ -1432,15 +1434,15 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, op->sym->sec_session); break; default: - PMD_TX_LOG(ERR, + DPAA_SEC_DP_ERR( "sessionless crypto op not supported"); frames_to_send = loop; nb_ops = loop; goto send_pkts; } if (unlikely(!ses->qp || ses->qp != qp)) { - PMD_INIT_LOG(DEBUG, "sess->qp - %p qp %p", - ses->qp, qp); + DPAA_SEC_DP_ERR("sess->qp - %p qp %p", + ses->qp, qp); if (dpaa_sec_attach_sess_q(qp, ses)) { frames_to_send = loop; nb_ops = loop; @@ -1463,7 +1465,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, } else if (is_proto_ipsec(ses)) { cf = build_proto(op, ses); } else { - PMD_TX_LOG(ERR, "not supported sec op"); + DPAA_SEC_DP_ERR("not supported ops"); frames_to_send = loop; nb_ops = loop; goto send_pkts; @@ -1479,7 +1481,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, } else if (is_auth_cipher(ses)) { cf = build_cipher_auth_sg(op, ses); } else { - PMD_TX_LOG(ERR, "not supported sec op"); + DPAA_SEC_DP_ERR("not supported ops"); frames_to_send = loop; nb_ops = loop; goto send_pkts; @@ -1535,7 +1537,7 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, dpaa_qp->rx_pkts += num_rx; dpaa_qp->rx_errs += nb_ops - num_rx; - PMD_RX_LOG(DEBUG, "SEC Received %d Packets\n", num_rx); + DPAA_SEC_DP_DEBUG("SEC Received %d Packets\n", num_rx); return num_rx; } @@ -1550,11 +1552,11 @@ dpaa_sec_queue_pair_release(struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); - PMD_INIT_LOG(DEBUG, "dev =%p, queue =%d", dev, qp_id); + DPAA_SEC_DEBUG("dev =%p, queue =%d", dev, qp_id); internals = dev->data->dev_private; if (qp_id >= internals->max_nb_queue_pairs) { - PMD_INIT_LOG(ERR, "Max supported qpid %d", + DPAA_SEC_ERR("Max supported qpid %d", internals->max_nb_queue_pairs); return -EINVAL; } @@ -1576,12 +1578,11 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, struct dpaa_sec_dev_private *internals; struct dpaa_sec_qp *qp = NULL; - PMD_INIT_LOG(DEBUG, "dev =%p, queue =%d, conf =%p", - dev, qp_id, qp_conf); + DPAA_SEC_DEBUG("dev =%p, queue =%d, conf =%p", dev, qp_id, qp_conf); internals = dev->data->dev_private; if (qp_id >= internals->max_nb_queue_pairs) { - PMD_INIT_LOG(ERR, "Max supported qpid %d", + DPAA_SEC_ERR("Max supported qpid %d", internals->max_nb_queue_pairs); return -EINVAL; } @@ -1642,7 +1643,7 @@ dpaa_sec_cipher_init(struct rte_cryptodev *dev __rte_unused, session->cipher_key.data = rte_zmalloc(NULL, xform->cipher.key.length, RTE_CACHE_LINE_SIZE); if (session->cipher_key.data == NULL && xform->cipher.key.length > 0) { - PMD_INIT_LOG(ERR, "No Memory for cipher key\n"); + DPAA_SEC_ERR("No Memory for cipher key"); return -ENOMEM; } session->cipher_key.length = xform->cipher.key.length; @@ -1664,7 +1665,7 @@ dpaa_sec_auth_init(struct rte_cryptodev *dev __rte_unused, session->auth_key.data = rte_zmalloc(NULL, xform->auth.key.length, RTE_CACHE_LINE_SIZE); if (session->auth_key.data == NULL && xform->auth.key.length > 0) { - PMD_INIT_LOG(ERR, "No Memory for auth key\n"); + DPAA_SEC_ERR("No Memory for auth key"); return -ENOMEM; } session->auth_key.length = xform->auth.key.length; @@ -1690,7 +1691,7 @@ dpaa_sec_aead_init(struct rte_cryptodev *dev __rte_unused, session->aead_key.data = rte_zmalloc(NULL, xform->aead.key.length, RTE_CACHE_LINE_SIZE); if (session->aead_key.data == NULL && xform->aead.key.length > 0) { - PMD_INIT_LOG(ERR, "No Memory for aead key\n"); + DPAA_SEC_ERR("No Memory for aead key\n"); return -ENOMEM; } session->aead_key.length = xform->aead.key.length; @@ -1715,7 +1716,7 @@ dpaa_sec_attach_rxq(struct dpaa_sec_dev_private *qi) return &qi->inq[i]; } } - PMD_DRV_LOG(ERR, "All ses session in use %x", qi->max_nb_sessions); + DPAA_SEC_WARN("All ses session in use %x", qi->max_nb_sessions); return NULL; } @@ -1744,20 +1745,20 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess) sess->qp = qp; ret = dpaa_sec_prep_cdb(sess); if (ret) { - PMD_DRV_LOG(ERR, "Unable to prepare sec cdb"); + DPAA_SEC_ERR("Unable to prepare sec cdb"); return -1; } if (unlikely(!RTE_PER_LCORE(dpaa_io))) { ret = rte_dpaa_portal_init((void *)0); if (ret) { - PMD_DRV_LOG(ERR, "Failure in affining portal"); + DPAA_SEC_ERR("Failure in affining portal"); return ret; } } ret = dpaa_sec_init_rx(sess->inq, dpaa_mem_vtop(&sess->cdb), qman_fq_fqid(&qp->outq)); if (ret) - PMD_DRV_LOG(ERR, "Unable to init sec queue"); + DPAA_SEC_ERR("Unable to init sec queue"); return ret; } @@ -1800,7 +1801,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); if (unlikely(sess == NULL)) { - RTE_LOG(ERR, PMD, "invalid session struct\n"); + DPAA_SEC_ERR("invalid session struct"); return -EINVAL; } @@ -1825,7 +1826,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, dpaa_sec_cipher_init(dev, xform, session); dpaa_sec_auth_init(dev, xform->next, session); } else { - PMD_DRV_LOG(ERR, "Not supported: Auth then Cipher"); + DPAA_SEC_ERR("Not supported: Auth then Cipher"); return -EINVAL; } @@ -1836,7 +1837,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, dpaa_sec_auth_init(dev, xform, session); dpaa_sec_cipher_init(dev, xform->next, session); } else { - PMD_DRV_LOG(ERR, "Not supported: Auth then Cipher"); + DPAA_SEC_ERR("Not supported: Auth then Cipher"); return -EINVAL; } @@ -1846,13 +1847,13 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev, dpaa_sec_aead_init(dev, xform, session); } else { - PMD_DRV_LOG(ERR, "Invalid crypto type"); + DPAA_SEC_ERR("Invalid crypto type"); return -EINVAL; } session->ctx_pool = internals->ctx_pool; session->inq = dpaa_sec_attach_rxq(internals); if (session->inq == NULL) { - PMD_DRV_LOG(ERR, "unable to attach sec queue"); + DPAA_SEC_ERR("unable to attach sec queue"); goto err1; } @@ -1878,15 +1879,13 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); if (rte_mempool_get(mempool, &sess_private_data)) { - CDEV_LOG_ERR( - "Couldn't get object from session mempool"); + DPAA_SEC_ERR("Couldn't get object from session mempool"); return -ENOMEM; } ret = dpaa_sec_set_session_parameters(dev, xform, sess_private_data); if (ret != 0) { - PMD_DRV_LOG(ERR, "DPAA PMD: failed to configure " - "session parameters"); + DPAA_SEC_ERR("failed to configure session parameters"); /* Return session to mempool */ rte_mempool_put(mempool, sess_private_data); @@ -1952,7 +1951,7 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, RTE_CACHE_LINE_SIZE); if (session->cipher_key.data == NULL && cipher_xform->key.length > 0) { - RTE_LOG(ERR, PMD, "No Memory for cipher key\n"); + DPAA_SEC_ERR("No Memory for cipher key"); return -ENOMEM; } @@ -1962,7 +1961,7 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, RTE_CACHE_LINE_SIZE); if (session->auth_key.data == NULL && auth_xform->key.length > 0) { - RTE_LOG(ERR, PMD, "No Memory for auth key\n"); + DPAA_SEC_ERR("No Memory for auth key"); rte_free(session->cipher_key.data); return -ENOMEM; } @@ -2007,11 +2006,11 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, case RTE_CRYPTO_AUTH_KASUMI_F9: case RTE_CRYPTO_AUTH_AES_CBC_MAC: case RTE_CRYPTO_AUTH_ZUC_EIA3: - RTE_LOG(ERR, PMD, "Crypto: Unsupported auth alg %u\n", + DPAA_SEC_ERR("Crypto: Unsupported auth alg %u", auth_xform->algo); goto out; default: - RTE_LOG(ERR, PMD, "Crypto: Undefined Auth specified %u\n", + DPAA_SEC_ERR("Crypto: Undefined Auth specified %u", auth_xform->algo); goto out; } @@ -2031,11 +2030,11 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, case RTE_CRYPTO_CIPHER_3DES_ECB: case RTE_CRYPTO_CIPHER_AES_ECB: case RTE_CRYPTO_CIPHER_KASUMI_F8: - RTE_LOG(ERR, PMD, "Crypto: Unsupported Cipher alg %u\n", + DPAA_SEC_ERR("Crypto: Unsupported Cipher alg %u", cipher_xform->algo); goto out; default: - RTE_LOG(ERR, PMD, "Crypto: Undefined Cipher specified %u\n", + DPAA_SEC_ERR("Crypto: Undefined Cipher specified %u", cipher_xform->algo); goto out; } @@ -2080,7 +2079,7 @@ dpaa_sec_set_ipsec_session(__rte_unused struct rte_cryptodev *dev, session->ctx_pool = internals->ctx_pool; session->inq = dpaa_sec_attach_rxq(internals); if (session->inq == NULL) { - PMD_DRV_LOG(ERR, "unable to attach sec queue"); + DPAA_SEC_ERR("unable to attach sec queue"); goto out; } @@ -2104,8 +2103,7 @@ dpaa_sec_security_session_create(void *dev, int ret; if (rte_mempool_get(mempool, &sess_private_data)) { - CDEV_LOG_ERR( - "Couldn't get object from session mempool"); + DPAA_SEC_ERR("Couldn't get object from session mempool"); return -ENOMEM; } @@ -2120,9 +2118,7 @@ dpaa_sec_security_session_create(void *dev, return -EINVAL; } if (ret != 0) { - PMD_DRV_LOG(ERR, - "DPAA2 PMD: failed to configure session parameters"); - + DPAA_SEC_ERR("failed to configure session parameters"); /* Return session to mempool */ rte_mempool_put(mempool, sess_private_data); return ret; @@ -2176,12 +2172,12 @@ dpaa_sec_dev_configure(struct rte_cryptodev *dev, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0); if (!internals->ctx_pool) { - RTE_LOG(ERR, PMD, "%s create failed\n", str); + DPAA_SEC_ERR("%s create failed\n", str); return -ENOMEM; } } else - RTE_LOG(INFO, PMD, "mempool already created for dev_id : %d\n", - dev->data->dev_id); + DPAA_SEC_INFO("mempool already created for dev_id : %d", + dev->data->dev_id); return 0; } @@ -2283,8 +2279,8 @@ dpaa_sec_uninit(struct rte_cryptodev *dev) rte_mempool_free(internals->ctx_pool); rte_free(internals); - PMD_INIT_LOG(INFO, "Closing DPAA_SEC device %s on numa socket %u\n", - dev->data->name, rte_socket_id()); + DPAA_SEC_INFO("Closing DPAA_SEC device %s on numa socket %u", + dev->data->name, rte_socket_id()); return 0; } @@ -2321,7 +2317,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) * RX function */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) { - PMD_INIT_LOG(DEBUG, "Device already init by primary process"); + DPAA_SEC_WARN("Device already init by primary process"); return 0; } @@ -2340,7 +2336,7 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) qp = &internals->qps[i]; ret = dpaa_sec_init_tx(&qp->outq); if (ret) { - PMD_INIT_LOG(ERR, "config tx of queue pair %d", i); + DPAA_SEC_ERR("config tx of queue pair %d", i); goto init_error; } } @@ -2351,16 +2347,16 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev) /* create rx qman fq for sessions*/ ret = qman_create_fq(0, flags, &internals->inq[i]); if (unlikely(ret != 0)) { - PMD_INIT_LOG(ERR, "sec qman_create_fq failed"); + DPAA_SEC_ERR("sec qman_create_fq failed"); goto init_error; } } - PMD_INIT_LOG(DEBUG, "driver %s: created\n", cryptodev->data->name); + RTE_LOG(INFO, PMD, "%s cryptodev init\n", cryptodev->data->name); return 0; init_error: - PMD_INIT_LOG(ERR, "driver %s: create failed\n", cryptodev->data->name); + DPAA_SEC_ERR("driver %s: create failed\n", cryptodev->data->name); dpaa_sec_uninit(cryptodev); return -EFAULT; @@ -2461,3 +2457,12 @@ static struct cryptodev_driver dpaa_sec_crypto_drv; RTE_PMD_REGISTER_DPAA(CRYPTODEV_NAME_DPAA_SEC_PMD, rte_dpaa_sec_driver); RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver.driver, cryptodev_driver_id); + +RTE_INIT(dpaa_sec_init_log); +static void +dpaa_sec_init_log(void) +{ + dpaa_logtype_sec = rte_log_register("pmd.crypto.dpaa"); + if (dpaa_logtype_sec >= 0) + rte_log_set_level(dpaa_logtype_sec, RTE_LOG_NOTICE); +} diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_log.h b/drivers/crypto/dpaa_sec/dpaa_sec_log.h index 992a79f..9784fcb 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec_log.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec_log.h @@ -1,44 +1,43 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright NXP 2017. + * Copyright 2017-2018 NXP * */ #ifndef _DPAA_SEC_LOG_H_ #define _DPAA_SEC_LOG_H_ -#define PMD_INIT_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) - -#ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_INIT -#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -#else -#define PMD_INIT_FUNC_TRACE() do { } while (0) -#endif - -#ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_RX -#define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_RX_LOG(level, fmt, args...) do { } while (0) -#endif - -#ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_TX -#define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG_DP(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_LOG(level, fmt, args...) do { } while (0) -#endif - -#ifdef RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER -#define PMD_DRV_LOG_RAW(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) -#else -#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) -#endif - -#define PMD_DRV_LOG(level, fmt, args...) \ - PMD_DRV_LOG_RAW(level, fmt "\n", ## args) +extern int dpaa_logtype_sec; + +#define DPAA_SEC_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, dpaa_logtype_sec, "dpaa_sec: " \ + fmt "\n", ##args) + +#define DPAA_SEC_DEBUG(fmt, args...) \ + rte_log(RTE_LOG_DEBUG, dpaa_logtype_sec, "dpaa_sec: %s(): " \ + fmt "\n", __func__, ##args) + +#define PMD_INIT_FUNC_TRACE() DPAA_SEC_LOG(DEBUG, " >>") + +#define DPAA_SEC_INFO(fmt, args...) \ + DPAA_SEC_LOG(INFO, fmt, ## args) +#define DPAA_SEC_ERR(fmt, args...) \ + DPAA_SEC_LOG(ERR, fmt, ## args) +#define DPAA_SEC_WARN(fmt, args...) \ + DPAA_SEC_LOG(WARNING, fmt, ## args) + +/* DP Logs, toggled out at compile time if level lower than current level */ +#define DPAA_SEC_DP_LOG(level, fmt, args...) \ + RTE_LOG_DP(level, PMD, fmt, ## args) + +#define DPAA_SEC_DP_DEBUG(fmt, args...) \ + DPAA_SEC_DP_LOG(DEBUG, fmt, ## args) +#define DPAA_SEC_DP_INFO(fmt, args...) \ + DPAA_SEC_DP_LOG(INFO, fmt, ## args) +#define DPAA_SEC_DP_WARN(fmt, args...) \ + DPAA_SEC_DP_LOG(WARNING, fmt, ## args) +#define DPAA_SEC_DP_ERR(fmt, args...) \ + DPAA_SEC_DP_LOG(ERR, fmt, ## args) #endif /* _DPAA_SEC_LOG_H_ */ From patchwork Thu Apr 19 16:52:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133839 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp857062ljf; Thu, 19 Apr 2018 09:55:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+WQAr9S0DSHa2iD3tt8DtlYrA5SHbcOs9Gh3f8PgaGMzWuZuUCJ+eZmiJHQSe+jkQIJdO8 X-Received: by 10.28.150.194 with SMTP id y185mr5464882wmd.29.1524156900052; Thu, 19 Apr 2018 09:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524156900; cv=none; d=google.com; s=arc-20160816; b=CykaEs/Cd0mrfHK9QkEmsrn8DfjOh/Sr3nXFefeoS/mTJ8Tm5cMwBmuafnuHNQ3zGk ppkdAex2NkvxnqPDO3WhsPk2XMT72AFtw16vwo48Q1E4lT3g2RYW6aVSyWbXhC8L39xF 6N53uHchFJ90p4amStfrFkwCEupLfBdQP1LL66hpuOdlOrFMIJUFPX6E2wcDfcORppES VSBZEGwCWLmGwcUSGQVHzbpdTeaHEcow/JbIorYnrs5yM1F5cX4TXHIWOyPyM5Itj38A Q+Lt/023tMZVshIUdPBjCV+OhFYdDgyCJWIY4T7ecZyVkUUT+aw0bHrLXOr0P+ui5fFt Ug4w== 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=SaMxEcBOSeW5ux9ArY3dIpts+0UHzgLdI+EjTDkqWwI=; b=h3z7vplu+MLz0N2sGkjsKhyYYRu6S6/L4CUbF8mOIIxFzFeZ9SAmNLXD3lalFP7Qcj LVgr0ecalJy/ncecnB9HxxXj4JGgFgqcBuQzAyxjlNNealwx7hUtmIiU5YwDCmnGcicZ 4roOuKLnFCpVcRe+gzsPuySniwEkh22h/uMN/SqBXdjBTvyuVCoqUqy3yXo1BkUIsHiC R0dsrkDoSpslvWx+ZD2DjQf1qsDQAk2goGv5xs5uCqYkJk6MnXYFUE+fpLQBm1nIdEJ6 MaSq7vcGj//OBgWkP4/6Z+9+PRm3hdZAKKERelpiWjOT1na0ohC91Awo6snnKtRqT0go 469Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=K1w+XEh8; 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 j14si2831860wme.149.2018.04.19.09.54.59; Thu, 19 Apr 2018 09:55:00 -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=K1w+XEh8; 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 EACDE12008; Thu, 19 Apr 2018 18:54:51 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0086.outbound.protection.outlook.com [104.47.1.86]) by dpdk.org (Postfix) with ESMTP id E28C7AAC4; Thu, 19 Apr 2018 18:54:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SaMxEcBOSeW5ux9ArY3dIpts+0UHzgLdI+EjTDkqWwI=; b=K1w+XEh8ROi8FDoVTc1/uQbe7l46u9eZpqLQEFXn9f61EzGL56bScQNAlzMLF1e9qGWyAELUPNvoKNoOAUeNEE7YfidnEnr46TxeP99v5/d14fRrYjdRgZVNgmPWc0IFnQ8ogXTdVSHr+pIIPE1c8V3416MJPNgZJBndBwTtkJc= Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.15; Thu, 19 Apr 2018 16:54:46 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com, stable@dpdk.org, Nipun Gupta Date: Thu, 19 Apr 2018 22:22:37 +0530 Message-Id: <1524156759-12931-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> References: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0055.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::17) To DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0768; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 3:BY1zi2LieHKoAp79C3WYx5csgsqjk3oG5tlHw3GHqfvjukJ6WfNV8IiAGe1FJR9Px3ulMT6zS/jNAHWi7Rz1pjGs3sMgHN+LK5E63n5s34VqxOuRziUaa15tiSS6W4jyDomrlg5vo6LZVSxz/SnjnmX22Nsh6Mdvyrb+jsZxfxn4gVWWqC4MxFYtv5ZcGdJlaEsjHFeCG5aIfarMZxfZCQPHVub1okwOHDulZPgGFCgLWw7VVqxWQ2zPzfdeNUEj; 25:e8eyxP4MQC1GMSE+OCpIZeKCCIvUpxherDRLuNsWkfbRf9A4LVKLfLMtts6q68KSeMcL9nmIOx7C+S33eKjPwO53mINU9H9x7M0xR+XObc8EwUYAeIrE0+w3vZ9hAGINYLrjjoDDLkshRa4KeN2x0FCdM6MI0wtwdHJbEwXSkpaREeOmg3RtczgzKqjBDMSXmk6agE9gmpta/+nCMyHvRy9sQvJwvHlWLUDKnx+3bE4i2m8cZ8bHKdysm+2XQSN27Qby4wczSBj6/fZnMiNPFDy4YYAtor8BRwEqH7CpL8MTnACCUQQ8vYbeftw2scUef1OhrMl3KMJTapLAQkCaaw==; 31:5+ZSYSlbUIcsZ+CSnOLghMkl9x5Y2H3COfevQGF7qngI96D8G44+6NVbbv3Y+n8SV2oPBJ+VP5bcsRd/hswMINp5aMwkFmzktJIwlKOhWA6zgn8VmYiEgQthUWOjJ3prm8lFwnrUdB0kC5+LU4rYFcDPAmvHzQVYZS9bhgGvPk+EvZUcrZx3E1cX8l5qMj9hFKaxCFkz6vZ/AlZx7O4u7k5Pe20SwFqMWQFq68NuBj0= X-MS-TrafficTypeDiagnostic: DB4PR04MB0768: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 20:1NMe1FG1gNBB9VlCpvWyL/lWNTF4zg/w7q0XrvL4HatKU6MNT5ug2ECXWVif9bwhessxBLniHwgBCWubiISb4txh4EL0lYDqTvjtsLl2NfvRcGs03k3Ovcq2Tv+JQBjNUA4gAUpXvyUwjX+IDFqBVwpvT6G9rh57ZIFBmyswYBnvQX05BNrDOnLQy2cv7Lkgube8rnvAN1UYO38+8ydpXGZOvhb4uTR4RcT16y5bmzFwfPNh00Va6f/dkkeWpuPrRGCI4mgZgm10o7vB1lI7zFn385BDDAJcfdGHaJaUScAyM7xU/Id7a6koG5Z3WV4/+qgkizOfjbXDYlOOS+iYVpvKa6YYQRp2STi8FcMcBU1XSo39nHizSb6tT/UCkMz7fFxqNeiLcllw7yihHD87DFygY1Di6neZCYDRv64oIT720z5vGKBW53VEVxI4bWZvYlU8fNRLFDD7lRnDycggOYx9XN9JqW5ZRcSxg9aWaEeEErQAnBH66XLf1dY2YTkc; 4:I8kbyUNtIbBu/MO2ohRET9Ud/sxHE7Por4EGSzuLCZ5Iva0cO/y4RSl6yUDqYI4lYPZ6lvfQIUGw5PxZHQPYF0YAEdrnLzlKsacytcBlJYpg6FBFbiHaXyVceSgNljLWw8GLyPoALNzGGOt/ax74tYc5zZLj37br8Hec7JQnYqCQjTbHnz4TYOZ5ejIFlKvNd6bwOCYOimCM3fE4opvRBL8ZIio9C/INzcvzL77Mfj6kTu62Z+IT8PHjLPAqDrN3SmgSzzrHPmEU1Y/EU+a/7ucb7iqfd6K3QWnmGWQoyeYwDR21neISz74GTw5idnB6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231232)(944501383)(52105095)(3002001)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0768; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0768; X-Forefront-PRVS: 0647963F84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(18543002)(50226002)(476003)(86362001)(26005)(478600001)(316002)(51416003)(16586007)(8676002)(11346002)(16526019)(446003)(55236004)(2351001)(5660300001)(186003)(2361001)(956004)(81166006)(8936002)(2616005)(2906002)(36756003)(6666003)(6486002)(6512007)(66066001)(50466002)(6506007)(386003)(47776003)(6916009)(6116002)(76176011)(5009440100003)(305945005)(48376002)(3846002)(7736002)(25786009)(52116002)(53936002)(44832011)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0768; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; MLV:nov; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0768; 23:LBmI1J8Loa7Wd3+UC80eObkgUK3dVZF++fSn0nFUL?= y9Xm9b1/Vhf9D6EkBwgh+S74h0mpf+GyuAeojxxwBclcTSZyadAkQnlrQ1qzwBOpnaXBbYxImlAIODkNbWacBOw2ccjp6NuohGSdjB5PC1L3+cwQDo4iAfu8Qapp6Rvo/U7xkSPyS2wAb+8hx5qxZCn9yI7GkH83trvgbUZHnJk58hx6f510mFbwk4ISQeiMw5VPGHlW7ert8uOfeDb2/4XuxTe6TesAzkvrizcmvXEcUzQckHonn/o9PIoWtra0HkaP9ONUifSC09mEzFtQx2wy0gAYA1owzhskOdkjwtPEmRwSiYKQZnEe19Fh4mTerRAV4qgkd0fHKfrFoynCjNiCmNnO7ZMzZ6IN7y9s/jov0LIEftedDgc3WC6mE7AuMbflV1cq+V7OWA4oybNEU0/zkk/kUzQlomSQ51MU22b6bAhbKJnFg3M3LFGRzuv9YU1NMVaR2+lpvTG0ODk2gNzFo+xJ4Uo1Ywx9xPQG/a2Lj5gLfo9d+oMe+x+Wnkv5wP/dcYZDrsMKyaqDjDy3pnNanNEJ68AsUdYIFtH/L56WnJ+jzIe1FHSteSJWTaI7pgM7P9KbgYYZIxjIMvosaNfWyQnb2vdn5Uj8vZvmeeeYBKsP57WVidLRPGlqo+B6vZY5/AD14kpYFGEToGSZZFDZ3cTc2K5QD2N6KV5aE3Nb7eY8Brx8qbD1nWLwES46bu5h1FrXiuCbpqwvdzgZoeCI9RcOdUO2tiWY25dQaAnryQu5z6tX62pjO2GTzALrO9yaoJjt3gZEEZoFy1uKjx5WAAnJXR9eYsh6QVcU/TSqexM+Snzvop8mTfu5WzqfAHTSrfekfJZPVWz8Zc3KT9IzbdW678/t8nRZK6lUxkidkvfmpoaKx4+Ed++ys/3S/AuM2oNWPu6V5mya4Ciqevbyq4PQ9ke63L5/94TmfBwSUbKTY+vDeuFJ1hr96FIIpdfIhkBAdqNy+66GY0gE36pQPna5ZJHVQoIwMrZeVtlQ1QH3YXmia47nPdzeceQxja1j3+GtQWuoob45fwBYojQHWVOQOXBfXSquC58+5VNnGoebCL8MCau4BzoY5rYhGizGrmQhSLjztDtorV0HY78SRbskVQTU5urnF/pZL/Fh0eR/1NXHR6PpsvIpzlNn4o= X-Microsoft-Antispam-Message-Info: HdE1Sl2ZN3j3a9ZI4H8UX/BdwWQfKpZ6rPZ8B9JeQL6/8WeDAzUI82/DcExQgZOpQn60Pn//uXdlzAVk+KTzEoymfG3UEt+IlIe47QamuKqH5FJSDk5snm8MBRcIZPuf6tf8LHWCXShrGDu7jzi9izBsuCdmeLgipM5iXjOT1pYRRfDvJRWOZF1Z/Toa5+80 X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 6:lJlIdXdp+LZlIdkbb3wPWU+Cj74l72JAe0vnl75DGZHSyooyovi4WMI7xmLXciJoS+DobX6PD9/ITO4BQxZUzyY3h18T6T52d4+yj7h+OIrM6SUx9simHcdXh7YrnMyIcO+VC+7CllQDghG7gmPNBqzKSiJ5U1hXf1HAe5kTFYtwWjqh+lPL87uPw5TzbFcf3CuZyVAF55ItEvLN9QcROXA+u5DFTigFIgIi/z8ULiK23lT9KtTP0H7T58bUAkeyPnYTrtlaFOdjztOnMAWJjaeSWOX5TUrakVWFOV+t5CaAzcLaHm1wbuvjRuEhe7X+VNz9U7JAU4PfSGYpIHCS9NSTOfPL3DC5fG6ZF4vp1trw51J7u2//X1IPOEP0T42SxyDux19dTqDaFIegeIIAQ1toTBD1e1bfdj9wb/+3mibFHJSRvYc/cS0Gx9Gmo9ixfToaJSz0oPuw8iXr4Swwcg==; 5:vm5aEIZVN0OWlNVnWpcINm9Gt0B1MUyDeuHMRvXuW5ZVzvQE12W2k86IdhQEALK4r6FhapBDXhpFvEtuD4QOTipKz4dkJhc77MhA/mEbU/sytxrr7c4wiJQtXuChkO9kXWvIaL13VRNaJUEt6OUY+2VdRBoW3Zvm1BmK0cuto50=; 24:aYTR9Z6CbQf0MKRvgJShL9+f1yt3+RZ2piNug+tupVLujL/RLvcR6OJGputvFoQQXB0s1A1Q3OSaOzfAsf4rZOsdCesCMoQkNpG22MMiQ+s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 7:POraZxmsVr1R3Ie9yQ/mbp3q15fLgNu9YiyXI6IHHGW42FhYC8oz2ZpubrBzrfPLxUTua8V94QaZgf6tdvPItmMHatRUBoScSR/eIuOKz/aIp3PvcStWT7llrLA3J707j86ntMJwwXSzUAgf67U+wpbRCa00tbk+ly2WmrVO7sB2EQ1HmleRUCCPRHl3cvvXs9EytlHIpFQK6z+colRgVjpGs/TgL7sVxeh9oWpoRagRkBM9F4X2XiXfyeKNR8v+ X-MS-Office365-Filtering-Correlation-Id: 8668b544-7fe3-4e3f-82bf-08d5a6164285 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 16:54:46.3486 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8668b544-7fe3-4e3f-82bf-08d5a6164285 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0768 Subject: [dpdk-dev] [PATCH 2/4] crypto/dpaa_sec: fix HMAC supported digest sizes 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" For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported digest sizes are not a fixed value, but a range between 1 and the maximum digest size for those algorithms. Also setting iv_size as 0. Fixes: c3e85bdcc6e6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform") Cc: stable@dpdk.org Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa_sec/dpaa_sec.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) -- 2.7.4 Acked-by: Akhil Goyal diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index b8f7bd2..1433595 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -185,10 +185,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 16, + .min = 1, .max = 16, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, @@ -205,10 +206,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 20, + .min = 1, .max = 20, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, @@ -225,10 +227,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 28, + .min = 1, .max = 28, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, @@ -245,10 +248,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 32, + .min = 1, .max = 32, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, @@ -265,10 +269,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 48, + .min = 1, .max = 48, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, @@ -285,10 +290,11 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 64, + .min = 1, .max = 64, - .increment = 0 + .increment = 1 }, + .iv_size = { 0 } }, } }, } }, From patchwork Thu Apr 19 16:52:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133840 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp857281ljf; Thu, 19 Apr 2018 09:55:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+bo+TWN13unVaNpIij9E7WRfLFB5f8fQcmF2fqZT7ofmTtCs8BY6xRVWNA7q0/U9jAukin X-Received: by 2002:adf:afce:: with SMTP id y14-v6mr5632610wrd.249.1524156912915; Thu, 19 Apr 2018 09:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524156912; cv=none; d=google.com; s=arc-20160816; b=Xg5UhhESO2+YrjJwozEpzcr5+rMyc/eWEogRHRB/pilWHgOaAfG9JneHXzxqLO/NIO RzcuD/Lbc9RNmausrBHcJbRH+uUCNmKCTMxxuJi65a7fSMI1FFa499AC64ureNmBfwiF bOwBl8dH1r0vde9VDmkpuUcHkHzlNl1R8Pg56Kbvh++ORF11th3sXedcXENoB6Sqj0xE BEhLV7rWxwkuZIboNds1zpFWUmrDZhNKtRJQyDwtGh5Sgp0205ASHVETAeuapHWk1Xsc bjbK03pDzk8M26DwPAnrNuBMQ32jPQvU771zw94lwc+g+K204fD/bFIRLbgLmyNEsgWD Q5bw== 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=jl7puiHs9kFgZG+UFMcAF1JcgNHXTARrt/1J9cKKEk4=; b=v2LMYWPi4upMR2FUBwuH31SoX7I/YSFdAO4J5R1pKdl8nwMa68SmuOK1PwAPrSPTmD x7TKoXFDmPlbsh58ZEiTYlhRW4eW51nPQV4St+Qrm3njWSz9VCCur90p8NzcYB3qQUMl wuexJNE/Of7fMOPeNmUtoUPyRetUPSXKT1wc2py/zgGqvAX0+MOhZTTPd6yyS62oTTzV /0sieBtnJGg2Tdd9MSpMcyMVWMXUdiy/nyMvHdUh+UQCVLW6BMS0OV7iSGBzZsSYiLYl TDFfUrI7ZmHQoho4vp6srnI1pToReK6MPsuxTgSu4bCTXYXq2T5H4ysi8QjzOSsntGG5 ryFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=n2KHvI5N; 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 n129si276525wmn.1.2018.04.19.09.55.12; Thu, 19 Apr 2018 09:55:12 -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=n2KHvI5N; 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 757B51B01E; Thu, 19 Apr 2018 18:54:55 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0066.outbound.protection.outlook.com [104.47.1.66]) by dpdk.org (Postfix) with ESMTP id D4CFBD4CE; Thu, 19 Apr 2018 18:54:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jl7puiHs9kFgZG+UFMcAF1JcgNHXTARrt/1J9cKKEk4=; b=n2KHvI5NlsnMW9K+/ctJI0qI7Uay0nj4X0Ylb8pFQUBKQ6bnG8C7yQujgZwI5mjW2KZ2zEqROXzK7gw2gr5AkP4K1RQZQCYexN9skr+w4ZGFYilCfqMLxiB2MyzaqUibxRsITYVTbrHrnaqbdcincXzmaz6a1polNyODN2VVuKw= Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.15; Thu, 19 Apr 2018 16:54:48 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com, stable@dpdk.org, Nipun Gupta Date: Thu, 19 Apr 2018 22:22:38 +0530 Message-Id: <1524156759-12931-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> References: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0055.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::17) To DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0768; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 3:63BBueOJM+xHfPmN6aZpN0FmfrRH978ZUbWgodXASu3RLKA57Q4lQT/nXHwqgViskTsIJsYMH7ZthV8HxZOdY+zGKheQe36NZP0AjanTd6JtA7Tr3MGYTQsgFpxla6XXKjDKVefcN9NxG/Yds9ohb0Z4pBmO9eBskVb2PlEVk0jSLV9M80HzMKLOJpgWXkZbgslkXtqZoQzJe7NuyQBoXRqv8e/sMmttQkkhjDqP3BVJjKyDpdVwN2knBZMJlequ; 25:x4WFrSanXlrH+r1NqOGrtYESl+rOh3sNToJtaS4II1Pohrew9FWcZeNFXkEAigA63AFMNzDn3A/pYK9d5vzhLqZX24InnkNf53TL2P2r6YkHUIIqSdz25wKfhkJnegTKZIgmfE1EW+i23PAcqMtTe8cJPTggkIfMv5Jo328XGJdRiR9jTb2CsjR8yg+kYXQFwGzalcFNhQ3o95QnKTYu9UNI5X/jNGN689rBaPGBX876phs/sbXnKo/+THEQu43FBI/CkWVwgGs/DqZnkai4DH1Jd02qHnNcUp8jiSMizO7GEzZDtqawfote7Lxm0rp6PTjhXAjWqbTSq5dlNkaPqA==; 31:EubFCpx/P7BVMQzMRYm37AFtIg58FjWPK9I0F92/CT8EMhv2kLt2PaoJUAKyKz/ZTWpZBwRzAj0RKU13kmOVIQxWjXQp2YgNQr2W8jsaQCWWMu09P/7rnTK726b4eI2MEced+lVJrK9fCNRlaUuxfs2vm0K12M1fBovnReyXbJbZQvT5QFWm7L314eoRNAjMyECCdLAvpJAKaeVrhpW2rqS+lrnMm7bhzp0LKX5KjdM= X-MS-TrafficTypeDiagnostic: DB4PR04MB0768: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 20:Ft8QClhN+yQdAlSmhifMTeKjguUnUa15U5QycytVH1nxxc6zFDsIb3Cc95SbDvmSk0qxyeKohW+Sg1xasa7y6imn0WAUo1JEptsI3mmYQR98oyNZ2mQi0RV4j+wfPsZLIa/XHWbBDTtKWSKgQr9Svlk9Joohd9Ugwu+JoTXVkunysKqz8y+6VPNLcvi+ccKJ0Yw6qoXiCLT1O4KvwN+eW5cZQWlGq1WQ22BmTeDEW5spuzwqxhUJL4z7vwu5fTYWQL4gJtaG4inDhiiPYrpQioLftLYjaiSG8osiv1ww8X56SHZx//56lkbtW/uHOEVLqFnfokCSHMdbbHStXzONCVyb8PNXY9ZeIqNItQKECGXmJaK+i7WoC8+B4lLDHJ0kzIK7BD4sb+HwnrVtffTSDvaNVfnb2b5PqVwngXfOBXcm0oKBOJMicTLlpH03ftPbIx/Svx216t5GJyjDsJe+Ab6WYRUfskEeyhHNjDeh6kKVo+/Wy98sgXJ7pO7qRYLx; 4:tl4FxafddKLNcVPYrp5GftK9YCUHauqwSKoKtXQX9dEbgV7pp34EjTkuSjlGDRkwp1uHYNF0jRi98TlNBsPQWVP6v5ccdZO73a1Mq/siaYLW1qOvQP2J/rGJpXJaUsW2eaMiMQjMH1GGx7DpT8rs1LJV1CaUGDmJRFMhgWLko02okh+Y5jUSpZ+u+NRPmGP5fzve5BjpuLuyhWbi/8hCquok6eBYWx7EAQ6d1JOFg1QAWg+tL/zki0iIv4DIeYUhmP/3Hydqscpbn7KOxrDJlaOCwekEZyJu5ED518i78RXF/nYdFKS33amx4jTWdNqM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231232)(944501383)(52105095)(3002001)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0768; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0768; X-Forefront-PRVS: 0647963F84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(18543002)(50226002)(476003)(86362001)(26005)(478600001)(316002)(51416003)(16586007)(8676002)(11346002)(16526019)(446003)(55236004)(2351001)(5660300001)(186003)(2361001)(956004)(81166006)(8936002)(2616005)(2906002)(36756003)(6666003)(6486002)(6512007)(66066001)(50466002)(6506007)(386003)(47776003)(6916009)(6116002)(76176011)(5009440100003)(305945005)(48376002)(3846002)(7736002)(25786009)(52116002)(53936002)(44832011)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0768; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; MLV:nov; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0768; 23:TCdKRAE3qlv5W+POUDHWE0MrqVUVnX3R2QdbE+fSh?= rNPnGnHjlJkrBXBvt8dDh0Z1tQbMVh8239b1siPO0oh3xfiA+stC9MfyMav960iRSeJeb8pUcgyl+bSJTPLBZqRrfcoHUSM6HHVwNnQqhLwMU1DQ3ckFFJ5PW33dTecmccQMGtfF9KcVgvtMpceXLWDoPv5hqxRJroudEACHxoZTfPFj3yf17uWMdeMPjDVb6FHY6ag4ZAVzOwUuuvIq+9KIoXH4ivoNIl8Imqf0BzETwv4TPmPGrp1ZY68eGg9ZLLKCR7QdxAXchffZ5a89UAkSNmFQRgZf5PJOdbzczKlhXcTmZ/pjW5sksR3raUshcgUJdh5U9Mnk4yRtyv4HSk59EXf2mi5yB84yV1szGtgqkyxuPDBsSwRY5Wo1mLh9fS/mRqW4y8ukrDW9gHz85H3UDO9KaDfuiHJJ8qqFebpg+tpQBAYaT07L+ZuUi97q5IjPRgkUBbUXJPM0YKFfegQRyuydN4Dr+/aVb0+UZQuPQOxAR85JgvzLdiRcy/6Xw1Dm3k4YUyb+4SvXV71xumr0jVtUAY+1XUbIdDjwC55byqusDD3srdl4RAI1hWzRQGyNIkGuxCjhFMgmggAbPawBuql38PfIDp4bId/RfQBTBGcy5LBtZDGoOEEekzFfgUv84Jc+2WPK//6+DcwoRLLJO/HckPifRTrgfZ7F3kA2FjaA4F/K5j4v+fLo6FuSP9CCtYtdd/ir5j8kGCUBNH9B6Ewf8kCLyvzUIo9v78EG4EBhSSnce03rfNcVwQHa/14m0Td2VbFre6cBwNsHJgNAzZDRwDGmeA1Hvv6McltJBQZTjMFSmUMZdeiR+b5BHzySsvcsUs7c3qvqkMalvZKMJcoFe1TLKvz18yWovVUmXn+ZmOT4A+1JJfTy/8lJrKysOoUuAou0hxfRnIWikWdc22QnZ5GOtcSl04C/so/AUJtzJVt6ZE5cAnwAqcScblUut+2sF7DV22tozTrPS+mRV0iEeKAUk89SSbPTpJlrb8BKXn6ylapE+LxTjSr+2oheNah9vmVKJLOTmaWUVPWXOTg7zSNy0cInNerbnkfIyE8uqNeXTZ9Ni+TMN8BZcpmgw4w8XQOTfvTpfcieAjUYnRv54L3WnnCq/Aq5TfiDYuQP6rzwYrk1GMi18k2yz8= X-Microsoft-Antispam-Message-Info: Hu6Sn+YW5eoniuCO7HqTNmhhZ1eMQXgfmeGYCfTrjhIqtQadSNRpCM0teXA1DNgymUccgg1F3s5HGF2D/iKhBS2G3AzAJy71zzWK9U2gFp7ljPqlVUS6zrpdFrzWw3FlEgVg27ikIXIgMdIQ8VY8E3IAcFYmWl/v/G4WHaoWpCxfW+2tdSmclGSyJndAYsRy X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 6:BfkVZ/iHFAzpjwtEeqyhNGIj70jgRG5t8izR9NUyKSz0uaaLYhWy02FidXR6MyAkK92wIf8ojaie2DXvaHJFrMn98uDzqCEYykBqmX63qIs7Ae0M6E88RkQnmv2HO7WA4vjkyOWjTzn8KLxtweB0i7PxDfLk9COVUBYKXo5WpDfwNTyiBDfA8rT4ibTUJW11Y9k1YfGO6YOqzZcE33Wfow6e7FzahglC0+28mAi4ek/N4zgScVydXg4VZqkfbDBlKh81ybe7TWNsRkAO7N1Y8hy1oO5xvFUTmp/VW5b3jJYkqdIFQsVvYwESr1UKAtiTS8rX5ppIZ7ymyALdobPtKgL4nJP9U7qFw+hsdHSEGuXS+874ETNA4eq4CMbNAs045si+O5OWVjS0KWmv0zdYg60wt1AOZxWBVLb2VfvJ7725Czqib8vxyoLEAOJp3Ti5yn0srzkWAQzBlQG3rNOXEw==; 5:I4YgncqIUhB+O2yrl4o2lSwEfAS8Uyly5f1yLV8CiBS9piY/Dr7E0690yHWrF+gOOmRbINIAblf8KH8GTUUYVuEqdZIdWV1PWbTQn70GiDExzcFUgyuZFuNHbZBPUek8gOjHTK5caFyNgG/sbvEozi5rzqRQhoczb4deIjRZe4w=; 24:eBXetnA73OSF63uoJJ8w+ErMGQWANgY+QnGSrt8Y63RVbTKZ+n/4B/ybLpSBY5trDH0dtsYsyMVxUu1FQIJ6QiGhMonierHBOTmVbmNIQGk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 7:rQ99sJTEKr5S3rm2IIkHH//HXV8qtm7Tav1ASfDMgqbjnex0bRUepvGY74gDdDm40aH8vPhHz8N19L9VbricMnxsudL5xWBICu6iXi6R+0dt2ZSPNQqKOReYx30u8b2QSwixpJ7rSG/lK3CWpFMGfYempy5EdboI/RdDu7/5KhIWltjE+7K9tQqIsNfdyJGdo6Zepq4fGUHMQ2GQYv+qXrGkjpeo3ttg038uq4h5QeAOlm5kfFm/1GfFwdasWgHW X-MS-Office365-Filtering-Correlation-Id: 2838d403-df60-4a40-b059-08d5a61643b6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 16:54:48.3174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2838d403-df60-4a40-b059-08d5a61643b6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0768 Subject: [dpdk-dev] [PATCH 3/4] crypto/dpaa2_sec: fix HMAC supported digest sizes 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" For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported digest sizes are not a fixed value, but a range between 1 and the maximum digest size for those algorithms. Fixes: f947fd77185f ("crypto/dpaa2_sec: fix HMAC supported key sizes") Cc: stable@dpdk.org Signed-off-by: Nipun Gupta Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) -- 2.7.4 Acked-by: Akhil Goyal diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index e8ac95b..a9d83eb 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -185,9 +185,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 16, + .min = 1, .max = 16, - .increment = 0 + .increment = 1 }, .iv_size = { 0 } }, } @@ -206,9 +206,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 20, + .min = 1, .max = 20, - .increment = 0 + .increment = 1 }, .iv_size = { 0 } }, } @@ -227,9 +227,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 28, + .min = 1, .max = 28, - .increment = 0 + .increment = 1 }, .iv_size = { 0 } }, } @@ -248,9 +248,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 32, - .max = 32, - .increment = 0 + .min = 1, + .max = 32, + .increment = 1 }, .iv_size = { 0 } }, } @@ -269,9 +269,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 48, + .min = 1, .max = 48, - .increment = 0 + .increment = 1 }, .iv_size = { 0 } }, } @@ -290,9 +290,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .increment = 1 }, .digest_size = { - .min = 64, + .min = 1, .max = 64, - .increment = 0 + .increment = 1 }, .iv_size = { 0 } }, } From patchwork Thu Apr 19 16:52:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133841 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp857441ljf; Thu, 19 Apr 2018 09:55:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mANY/3TqZNklnVV7i6SxpnODWOMP6Cl7wTmB1g9NwEEjrt36w3PKyOw+L/s0tFcu5fSpb X-Received: by 2002:adf:9e06:: with SMTP id u6-v6mr5655839wre.142.1524156924147; Thu, 19 Apr 2018 09:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524156924; cv=none; d=google.com; s=arc-20160816; b=vPaP3F5HD2R6uZgTP0YHG9mh4KNv527yka30uCxQC0CgD4U1x+WsvQTwd4LwkjADW8 166XJdcSKLQo3LfMc9OMRX2gCJGUbq7ZdYy0iSqRjgantL31tU/pcZMSt3NYPRTGwGo4 xXB3VyEyLCdeBYzZE5pS0E5py5/oZ88UJd99PMoBfnfxQ0NejF5SUN4M0LdkgUAwebp9 2O7roOa6QgiUXgCPBpYeMUSFYKvK87VCWcmAe9PqdovcvOx/sTIA+yP2/TInfch6ft0w fJX+p8CoJSCoIIPmGvX5cHNmFkFZFPQHl9oO/pN2glsoDEukC1nEGZdzGbaX/cHRzqHa SgTQ== 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=VB72abtKIhppnYU3pY+Ss/HYb4eF1W/Xuek8m3V4UTU=; b=cLTjg7Gmz1wcQ24tXcWX0V3dgY8CByHAGbUcMxJ9wTYd6eAA+TLJcfPUcVXvQLfQHR sMkpyoAkrp0h5ams84BhVIfax7c8fECiLLkka/dPxAM/1rB9esK3OflyHENxcdlFqQL6 dfa2QAO+iyNk6KZ7S7E6cPyHv6m/GrBGP2CQQ9kzzEsVa5sx1R9RitRV5i7tpw99poTn JwknCIOuGDQ+z9I9sDL7tTgkReoWAoa3GeOJjcMiGzfRIbYop0ZsAk6EF4fMiUmbIb/c P0qCs+CdtrpS+Ie4/5daFGH0ZWtmoIr7jqDyRmnnKljE7YR/hNGnjsbJJ5RnFsxPfi1o cU/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=od32s73v; 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 77si3097703wmx.81.2018.04.19.09.55.23; Thu, 19 Apr 2018 09:55:24 -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=od32s73v; 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 9C6C91B04C; Thu, 19 Apr 2018 18:54:57 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0045.outbound.protection.outlook.com [104.47.1.45]) by dpdk.org (Postfix) with ESMTP id 7CDC61AEF1 for ; Thu, 19 Apr 2018 18:54:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VB72abtKIhppnYU3pY+Ss/HYb4eF1W/Xuek8m3V4UTU=; b=od32s73vx1Ruu7/yywZnYHJf1NG6KHjgvAtoOMB8eB+R9+7TkNd6XzX8XS3JZlnN07t2dxH/q0Ab/d1vxahtiuFrPBBzMZ8tyzDSAbv0dNlbL68OR5NDzb3OFh2C8n23Zz4lOAl/xcJ2W++TzJo6ohRYUUL77WMhacOF0GM+HWA= Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.15; Thu, 19 Apr 2018 16:54:50 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, akhil.goyal@nxp.com, Nipun Gupta Date: Thu, 19 Apr 2018 22:22:39 +0530 Message-Id: <1524156759-12931-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> References: <1524156759-12931-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0055.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::17) To DB4PR04MB0768.eurprd04.prod.outlook.com (2a01:111:e400:984d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0768; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 3:zCBUC7cP1m3+/eRtCsR3R+zFQPhmK+UFGZBnkbxRE37WG5a483iv5YAgOUaYSpIrzSN2S6i72Z9oJfc75XHzkTG6HcATLOwo8LtKWNW/mRiZNmdrGDFIcEAUYrNN8saO/WYBshnhnD42jS5aVXDu4UudMoKtfSLLzLC5Cq1iFiR+T1MeONf7PYvO+0yM0CeCf8Q8zKRlYTe8rVkF9N7MViq3n++71oTpI5e8Y7o4qwb5djXwwThv2vJdaQxFCgmb; 25:RMzT28M1lIPG7VylbybJBXujsG1drcovlehE4x9s5fau1K1kDv0dFXYca7VuQcSfEZyZi34tMRkb4Eb2zrxJqZrIi8jshEyU0+prCfFv3Pu/4UUB6GawX/ZbcML4iHFPg88WaUrCSgQIrtqOOTdVmwSNtvrQGMY32bj7SqmRG/64xvlzGLp8Z1Hetf1U8kziXigLc+ZfyhyEqaWt8t2DnDSK9l0wYhUiPSjvQq4S7XnHCPuwasmCxE18CIzPIReav/Ok4kGOZUd4nycVH/m6lj7tZVgb5FwNq/2clNIii0Icnz7nFCsYwMxcQSDfbGFNhJI7DbG9edNG06NRC7b0Fg==; 31:JMtXeIckVIhnTm5ArHRyY1fMXMCX9vI0ul0wle+mY/q/r37rWAqDFzROm5GtJmlziKgyUmxIW63baW0ukJy9t9pu8vC1DZR1s/hGcinN/JYGL3Q2vpod120D1wfY7l8pGMdhmp6I0rRrvQxQAhti+qx0dQ5mIBRb7mIOG7DuNOnlcgk7lyPH7K2FgWTFJdDGGMR3Q2ywVMooVv5Cs+eq11uyaaxmxj6/lUua50FJg+c= X-MS-TrafficTypeDiagnostic: DB4PR04MB0768: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 20:Z0E2idOvvWo93HbSeNgjTNWYg85eHsD/NsGmmhH3pjhrv1Pp/fcVEzdU9r0uUgY99i5rb+VIk30kCHaUXl4x14tD+dRJUEwg74GH+4Bh267HMq4yoRbnRWBJi/aypZap23esT4wI0vc6pPw4LCypMdOABGXIsXBEeZ2tpFe133YIdFs4Uf96J4v7rz1JUvvBwRzd59Rvj8M6AohOejlchTW+TcaeZz3fiUc/rlGwhhA0BcM2zT++m5vzwKymbMHkyaZ9uAT4CW+dm4ILzsCaycVp9wXbgumfd4XJDM4X/Ap3SYK1hOpBovfG0N5GvoN++P2jp4vbmeZhg7thKYXOPHvvH7gJN9J+yIgfYplePdQ3wSH6Mvei1q3z9S2wqhZcc+CbUxZCTv9SyR3O+C1ZouK7z1ScJtagj8K5JZo7sBehnj1CCXEkiYF4nA5Hpvg8Yq4UUVmZgfAjmVikP+ONOlYexm2KSUj4ZJ708+DCxDeqsK2OrixySa6s+hbFjEb7; 4:iWdP5hVcGfpWiCUXWQzpVy2vN0fYnr+m6/3ub5UYTL+6lFkYUpWks5lEtc08jBi2l42rKYJlgxjukkA7n4h2Vcevuh6MFAZiAR0QzxqyeTkD/AhqVtl5ZbZcEPvyP6mAYSma97gCBCrzLdtBVwYsZun7Gj0E8ZzfQMtckxbb4rnd72RkEQ+giu0HfvbgLBpUiQ5EACF1VAFwwX3XXBZ0laVIINI/RgkTrzj8tODy1jRKMnZc5wzThvJWL3M5FR8cyIOyOWlV1qDncJjJdmCub1cdl+fA0G/i8Cgbt1p35DfpdzXlMVOmQz1jJ6uR58lS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231232)(944501383)(52105095)(3002001)(6055026)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0768; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0768; X-Forefront-PRVS: 0647963F84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(50226002)(476003)(86362001)(26005)(478600001)(316002)(51416003)(16586007)(8676002)(11346002)(16526019)(446003)(55236004)(2351001)(5660300001)(186003)(2361001)(956004)(81166006)(8936002)(2616005)(2906002)(36756003)(59450400001)(6666003)(6486002)(6512007)(66066001)(50466002)(6506007)(386003)(47776003)(6916009)(6116002)(76176011)(5009440100003)(305945005)(48376002)(3846002)(7736002)(25786009)(52116002)(53936002)(44832011)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0768; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; MLV:nov; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0768; 23:yswHveLqouvmmieVygovAqDivtXewfZ6LDWtr+pnS?= mqsShjMKNyZrRopOL8ngKhcKZp9QhUmnctZfAsTgCU73MjTdTo5rRfrh9yPvlNdFQR8s66gMnULaKxMkM2RiMtR+xBuX3ZO1LsW0+pYeWHnUZ6Hc1B5PmcdwMc7kWn+HZg3BchWxKNR+ALF05Bzzhad9Phx05MJMgO67cZIvsAYlAG01+xEC3vkOfQSRXD2rzlFWC06UnCLKwClMW3hQBiHjK013DUgkniT6rS+K2eCmULls2qKD365QhrsRhSdLrcAcDGNAb4wcJOfXA/rfQd5O9gKL8ZvMtUuLHITSeHySJYwl93S+qgmYtbW/vTodmsOBzkOlvQr7Qo477hOVHlc606sHM8iLzExoWkwLsC6/0wU4+nApKIvAPcysMucNjBXEk9d1NVEN6z1PH1CUIuRpcK1aCGCgtrm9N4RMBmV53L7jiqg5+9TMldR5TFUpCq2wFo9PNGlf6vchfzKWzYY+IdOHATEPD5qdhfc1neyONoVCmahRHkiIBIBj6PcV3pFmobBTP7fjV53t/cEpVCEsMHyE2uacSEBu+keyKc15co0rw0bnr6EkyqRrbif077VMFScwWuegkqyax2QlRDXY3nprZZJYORyqVyvUQR5aMsspJluCUze8gHadie5AZnG39/TdAvO7AlzQkHpM8VaZq02tO3ar7jCvCvt3RVSVdqyjlev08pseyfsEkT2IqS9fsIH/0ghtG3Q7/+MxXcplju96Il2koWwcly0It2e/b3wMlubHBDuKnUQEDeQ1aong2X4Xs36vYpRAYVRX+CF4f6WWus+cdG+7YlOf1qzNRjCPF1YibW9xnW21iIvVmKce/PRxYnY/dEzD9+wloDMeGgs41mv7nnaQYKdlE1mGNCAHTEQIndD1LZL/u7YzpqtXiFsEygVqQa8I5MI6G+mn6v+QTSZE2BiOcRxU8H9SnLp3r9ulnGTrxTICSgKITWxTqoE9f2JwQnQ/lkJybyMNbO/lQK3cmXfmkwcC9gxAoaTeBOhonUsBjpf3WU88LuuiLPBzD/LgO0Oa1MktE6mkItTadjBb8ZBveXQ+8SS20qf8fv3z9uWf74AcySWJwh7H5V0aPQYBlLnkog64YXvmRt6N6unxIe5iRcnq9EzgYn9oUd3fTDjWInS2EUujgU= X-Microsoft-Antispam-Message-Info: gZPw6lIct4kaX9V6aSlf+BYCCEiD3DSFFv3vO2lBuvYU+FMEPYdfChP9LIaVrr6yqtfj5sk7VJI5Q2Bx1JyF00/AK1h4/rnVnX++ezHLoV+kBpdnbyDsXikR1JTFSjr6UUZtGjTgWL6AMFc3XvSFSjvs4j2OW/RJe7Nw06VkK4bEYhd17jEe1AxkTb+Aq6f8 X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 6:LE88fdwd26J7l/ScqxT6Ij6hAm0QiP7GZUuDJdbDFrifM532tv+UZn3uc4LJZxFZ+iKj0aSDWZV6Cakj+KYIa/n8SGYm2S1knO+pfTkyuyaMsGt8P0Zz0SgyuBpIj+G0Giuucjoi/BlPruoPBALhfL5wuHlj+bKqIS0ygSMA17HLMtI8vLJh4ZhmoCK/hSAMllcNikPVfod202KGlHs4WziUpoqE93dQyaXLFu1mqbC/jWl7eEtXT1oxtx3fj9X4VHCxSq7WPVnbC34S4Jpz18EyR0nEmC4v+VQIZEpFiUbD016TY9T429/LU+5y8o51XU8qOYT8FFjVDn4EUM8M7urbcaUwM/ygCWJ1q5Lm1ngs6QhXr0PcqYcD2lEy8B3DjEiAd8JssvqA678TVBomhEkc1FWvfis5Q3TjVQpbdcRtta2FbfqBXT+H5awgonqBw+HQE+VZf7QKRFst85ZMVw==; 5:STpPpMHHt7EcmyqDFiGHyqgRsSDU33HlWG/LFVFN4fAd3FuXLMteYZ42OvypOVTUn4BhxP+FDnlqxcFLboNJY/Fl4NWzfNXWKyRxUKmiMzhjEUqR3BFPEYCxuaaSfRwWAeyeWsyJiDqkoeRBwESzIjPHwsye5TwoUuz0rcLpn2Y=; 24:5oFLpMZrhTmr/pjtfWefVQ8EYCHoWE7iljwYF5XzrZgjEOj3syXLUCxnc0hdNz7U5l8O/a9bNIWaE87pyVKgpHA3ud9Od3xxXK9R7EJWmjY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0768; 7:RajzzkHSSfCtSu4IroMnvZOBVhOs5tRNuDe6/MrubuyXLhwjYh4lOj20NSa66KHatrOR6BynqBeu31vySfqZc4Hz2QjIcJtRaiabfzOgU08BDzQRwF0awyMByFKCdf8n3T5lN1RdsdtdiCEE7DUWoolP5gRAhm77VXLpZeoRjdU8TVHKmJOV3h2kYJi5RMf1zgiXw9eUVMWuB3qbP1Zo9ahUh0J2EAM3EhGxBBkdoy33IycXEBMn0Uj9etHbVn9d X-MS-Office365-Filtering-Correlation-Id: 51dc8878-23ee-41bf-cc7c-08d5a61644b5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 16:54:50.2236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51dc8878-23ee-41bf-cc7c-08d5a61644b5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0768 Subject: [dpdk-dev] [PATCH 4/4] crypto/dpaa_sec: update maximum queue pairs to 2 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: Nipun Gupta Signed-off-by: Nipun Gupta --- 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 1433595..5b25aa1 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -136,7 +136,7 @@ struct dpaa_sec_qp { int tx_errs; }; -#define RTE_DPAA_MAX_NB_SEC_QPS 1 +#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