From patchwork Thu Oct 27 03:24:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 619169 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp21506pvb; Wed, 26 Oct 2022 20:31:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM69Jjj/40fH2oNbwPhQ3jQIyivXyo6wLHuhLW0iCdV3PDIjb4sNcSRkCuJwLMyiR+uZuEdM X-Received: by 2002:a05:600c:3b11:b0:3c6:c02d:babb with SMTP id m17-20020a05600c3b1100b003c6c02dbabbmr4272867wms.69.1666841519233; Wed, 26 Oct 2022 20:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666841519; cv=none; d=google.com; s=arc-20160816; b=eJSTsUTmEN1P2daKBnJigfVJmeS2fzebqKa3tPtUUYU/bKJZtohsdQIilajoVnQZfU t3KTeIZPkaLCUfHda7gQhrbQpozXlbbcBZ/HfbdzQre0c6a9frqlxMsJ5iyuotked2wb e6/LIgpe8cvfNu7c2vpnD5OTTxKaEeLEcd5nl0HLBLftDY8e8b1K7NHZchq8HQjkQzVs 1fNxs1nGemjeyyxGk21U/9JWbiMfIGyV+zN0JYo0AyW6YDnLJ2jDBsB1DgF0P5XfqPE5 9Zjtm44WQQFArUNJ+aMRPdF4LO0UDsNkgdF3l2zBsdwrZbRYUgZMmAwE85lNEJ1F4fNe j4WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=v0EkdDl+8GzeOxiikIhhkrZvi6EzfMzzgpAJYabFNRw=; b=anzexIrvwuBTyl+AlKaAbCZF+mR7F40qKauHTkx36d7lwlHaweaYrNqjw6lFjipOcR umjYPttkromaFhfvzb/1+59SIeB9QRjCSoR6UU8a0OsjdlDKWXDNrtNwZSf57OyYs8M0 AL9l6HOBvP/GYkuyII+aqW84EJYsEAsUeCUyTf1F3iJl30glS9i5zCVgSp+FOOnFdfoT X8wBOC6RojRxWJJzvR7Gu4MUMOvg1ZSULGd9R4kz01L060EBFz54ZdxP9IVyB7Q6rPQL nHCQ5se2i/pJg4T7/QpzvVfyoghdF4dx7pFjCrynZ7x3JtVgorQIwmrNN6TlV71KskYG dotA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jAqSgWHw; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id e23-20020a05600c4b9700b003c601729c7csi159965wmp.93.2022.10.26.20.31.58; Wed, 26 Oct 2022 20:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jAqSgWHw; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AAD140A7E; Thu, 27 Oct 2022 05:31:58 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 53AA7400D5 for ; Thu, 27 Oct 2022 05:31:57 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id w14so77270wru.8 for ; Wed, 26 Oct 2022 20:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v0EkdDl+8GzeOxiikIhhkrZvi6EzfMzzgpAJYabFNRw=; b=jAqSgWHwFLIE00x+Ys5RGvrSd6dlzq4y0ZgpIS8VpNymq3Ydd/u6SnDjxp453YjS/M G3E34QRfsJ5KuC/PCCY5LmA0c/DTtQSUiwdZkQS7yaN6nWZKecmD5MJi6joadtOGzO7T G4yeEFYNCxeNs9umHSFSx2AjKsms+P736g5tnSaVWbj+7y7CoNkIbBkGNbbnC5VE1qyx KgkpWy+MsHpxiYSwHyTsiknHNlCiugfezFak4ziYqcpiqKx5hnlwFdfdBB8ItUm9Y3kp y+KNkiyZrk4mf9lyWOdSQbjZIJnoSqEgAru1hVDz66lqCki5/YRqySYsL87ZkTr8ibPl cV0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v0EkdDl+8GzeOxiikIhhkrZvi6EzfMzzgpAJYabFNRw=; b=kIVd9Y7WY8u7gssGTtr7MxARZ8M6KecgzjqJizc3xhgNlG8RJa+xLdtXXRV6Gqj+i2 OM0D9Um+dlx5CeNEsYLyWVlP603KCe8Z61AnKtpRCORTUqZviFqXfkQrjUaoUFx7jOym d+K2YKEebSwoHBqznrM4xA9YWX/95UY5Tl38AjKwIrtYaVGNNo5Bl/uwGKhD1a9XEBxR GWzjlVNFQPIm8i3ShzluH1yU56v1MGbQOpdojeDX/Oyu27QZngxLlMl641yqVf44M4vP ZlDdzveaPdVEXgfoLALQp7m6USk4eRrDCRmWlkTOxJ+3U3Ws1yJjrTjzvQ7z3MrjNN2K MtNw== X-Gm-Message-State: ACrzQf21ME/O41gnIEjZ3JkebYhILYx+gWG6XgttkkF5gV547B8dNziR vmu/UTxu/EAfWnusUdOjTli6Ng== X-Received: by 2002:adf:c5c4:0:b0:236:87bc:a8fa with SMTP id v4-20020adfc5c4000000b0023687bca8famr5727784wrg.151.1666841517006; Wed, 26 Oct 2022 20:31:57 -0700 (PDT) Received: from localhost.localdomain ([213.146.143.36]) by smtp.gmail.com with ESMTPSA id c12-20020a05600c0a4c00b003c83465ccbfsm3339220wmq.35.2022.10.26.20.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 20:31:56 -0700 (PDT) From: Zhangfei Gao To: Akhil Goyal , Declan Doherty , Fan Zhang , Ashish Gupta , Ray Kinsella , "thomas@monjalon.net" Cc: dev@dpdk.org, acc@openeuler.org, Zhangfei Gao Subject: [PATCH v7 0/6] crypto/uadk: introduce uadk crypto driver Date: Thu, 27 Oct 2022 11:24:59 +0800 Message-Id: <20221027032505.1948351-1-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Introduce a new crypto PMD for hardware accelerators based on UADK [1]. UADK is a framework for user applications to access hardware accelerators. UADK relies on IOMMU SVA (Shared Virtual Address) feature, which share the same page table between IOMMU and MMU. Thereby user application can directly use virtual address for device dma, which enhances the performance as well as easy usability. [1] https://github.com/Linaro/uadk Test: sudo dpdk-test --vdev=crypto_uadk (--log-level=6) RTE>>cryptodev_uadk_autotest RTE>>quit Update in v7: 05: fix key_size of SHA384 HMAC Update in v6: Akhil helped review the v5, and address all the comments from Akhil 01: add rel_notes info, update uadk.rst, put struct in header, etc. 02: move struct to header 04: move struct to header, remove RTE_CRYPTODEV_FF_SYM_SESSIONLESS 05: fixed key_size in HMAC mode 06: updated app/test/meson.build and uadk.rst in the mean time. Update in v5 Patch 1 fix the build issue when uadk is installed to specific folder And update doc accordingly Update in v4: Akril suggest dpdk use pkg-config, So Enable uadk support x86 local build, and support pkg-config. Use pkg-config feature for the uadk crypto pmd. Add build uadk library steps in doc Test on both x86 and arm. x86 can build and install, but can not test since no device. Resend v3: Rebase on next/for-main, which just merged the series "cryptodev: rework session framework". Update in v3: Split patches according to Akhil's suggestions Please split the patches as below. 1. introduce driver - create files with meson.build and with probe/remove and device ops defined but not implemented. You do not need to write empty functions. Add basic documentation also which defines what the driver is. You can explain the build dependency here. 2. define queue structs and setup/remove APIs 3. Add data path 4. implement cipher op. Add capabilities and documentation of what is supported in each of the patches. Add feature flags etc. 5. implement auth, add capabilities and documentation 6. test app changes. Update in v2: Change uadk_supported_platform to uadk_crypto_version, which matches better than platform. enum uadk_crypto_version { UADK_CRYPTO_V2, UADK_CRYPTO_V3, }; Update in v1, compared with rfc Suggested from Akhil Goyal Only consider crypto PMD first Split patch into small (individually compiled) patches. Update MAINTAINERS and doc/guides/cryptodevs/features/uadk.ini Zhangfei Gao (6): crypto/uadk: introduce uadk crypto driver crypto/uadk: support basic operations crypto/uadk: support enqueue/dequeue operations crypto/uadk: support cipher algorithms crypto/uadk: support auth algorithms test/crypto: support uadk PMD MAINTAINERS | 6 + app/test/meson.build | 1 + app/test/test_cryptodev.c | 7 + app/test/test_cryptodev.h | 1 + doc/guides/cryptodevs/features/uadk.ini | 55 + doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/uadk.rst | 96 ++ doc/guides/rel_notes/release_22_11.rst | 6 + drivers/crypto/meson.build | 1 + drivers/crypto/uadk/meson.build | 30 + drivers/crypto/uadk/uadk_crypto_pmd.c | 1081 +++++++++++++++++ drivers/crypto/uadk/uadk_crypto_pmd_private.h | 79 ++ drivers/crypto/uadk/version.map | 3 + 13 files changed, 1367 insertions(+) create mode 100644 doc/guides/cryptodevs/features/uadk.ini create mode 100644 doc/guides/cryptodevs/uadk.rst create mode 100644 drivers/crypto/uadk/meson.build create mode 100644 drivers/crypto/uadk/uadk_crypto_pmd.c create mode 100644 drivers/crypto/uadk/uadk_crypto_pmd_private.h create mode 100644 drivers/crypto/uadk/version.map