From patchwork Fri Sep 23 02:40:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 608579 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp37715pvb; Thu, 22 Sep 2022 19:41:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Sa/uCRfQH4HBgC0dj1wYJJuWqSlM12MbcWzEILxjxFgMVFadNCjQAyKtPK4BORimR+EjC X-Received: by 2002:a05:600c:282:b0:3b4:76c8:da3c with SMTP id 2-20020a05600c028200b003b476c8da3cmr4457119wmk.153.1663900877352; Thu, 22 Sep 2022 19:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663900877; cv=none; d=google.com; s=arc-20160816; b=xjimOtI0AljGrv8SomR/D+i09BZCEY8Ai5ZeLlX15cnuI1zU2epuB6KSRmHaMKTSNj jQjATuq4q1/aNn/1IpRwJGgvjKUONzrJLK5iiiPKNi2RKvK1Z0ir3ACqkpsKBU1r+P2k Mldaeep8KdLJCF1Eigd22NHN0kI/BvX8hjuimaeUZOkYpLQDY0awApr0Adj5zyTXXuTX sG+h14rT66huFG2YiF2I6ovyZC/NrXLwzBgL6TIdhmuVsNI1JIqtBzsSnRRLjKNjdGxn hAiS9XRNa1nZdhghs0SAhoEKqPmC1issztwDpkSlOCe85N19hXIM2RvoFcphuRREEJ7E qcRA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=na9S0XUANIdkKUlVww4MNFwq9DfE+aDS+tu0zk16z6w=; b=lEL5DLkNEDzvff1ZPOD6PSlPI5GIgiXcKBS3KS296OPcOTc8Z39PqPqtZ7nc2/Zwwy GN+zEoQWkLzvYKx/afgn3wAkOwI558P1OHJSdvK4cM8tOybyGQqUPtgOfliQKBt+hqV8 wjLzvpbvUw490QMez0jdZfxXzsgLfMfCKy2lyM8RnuHXu+TAUUMbWq7O2BAWijm13KMC YnDNHxLfJJHm5bDAW6Z2ho+95DdkRP9riqXNh4YNvswAYKmPZGNhgMwdnOfbe4w+eAM5 zn9SC0Tj04oU/70onDz+WcYZiQQ3EM3IjpTCYrxzJ7MeRIdU7sIxnvvIJbr8QPO93kE9 nx9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ubhj7FlG; 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 co9-20020a0560000a0900b0022a09bbf14dsi4978995wrb.154.2022.09.22.19.41.17; Thu, 22 Sep 2022 19:41:17 -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=ubhj7FlG; 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 16BF542905; Fri, 23 Sep 2022 04:41:13 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 89F1942B75 for ; Fri, 23 Sep 2022 04:41:10 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id e5so11117046pfl.2 for ; Thu, 22 Sep 2022 19:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=na9S0XUANIdkKUlVww4MNFwq9DfE+aDS+tu0zk16z6w=; b=ubhj7FlGbCo4EEEmqqKbTX0nn6iGTxfdQuSlGVQwt6efDloh3Wdxwy9S2sRN1fZ7wu U0EMDW9IgAiFUGnn0hWEet8tMklEO777Aidl7uPJvE3F/TXtScGZtSH6+vqk55Y8TCrm MbdGsBjCXlVvGc722FxY1V3uXJxy0aotNLoqVkFUzoYtSX2PxaNmJ4H3pk1RiEIqa2a2 uP2/mX8irT1R1P5xsvb7ymbveAw6/fYCdopidiGnhWAE+8oAuMiWG4rCCmQgcAvJzkHc lmTcZrpXY/DTkJUaLOo9qd9vFVsqzpAMODB73bhJaJLH01s/iIIjenog5TjKPnatO88Q 5y4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=na9S0XUANIdkKUlVww4MNFwq9DfE+aDS+tu0zk16z6w=; b=FpJraarfrnoSfwinImI/EMkFdESj2g50j41qJS0iutWMEjKIz2g1YTmvxvS/AMhc25 jy/sF0JQyNzE+82PDStTibZoZc1XUtztMrThO3yejUyI1/SJ5jC9A4RweUHjELu1DHAJ ubTEQyMbaZq+LR+zEWBwhc/6JG3LZFRQF2GDmdKOXskuHyb/oXslqrNqHrGoXzRu0+U3 n3VGEUZEJ0q0wj07x091UDAmEuMN5AZS9RzDEWWOonp7NZ1fZGUQoToS6c5hh1n9YPys WZSoJsPcmTTjf9etCx1fXUmQHSJXfk0lCpghEs5aAvqzTAyK0AGrRKwoHz3F6J4JiWNz 9XAg== X-Gm-Message-State: ACrzQf2C/nVxU7L8MLE+RF1bZ1LrHTNxvV7ZHcXsSUh3oPKTXsPLUnX5 q1VAZXh7nTJk9AwvtJqH/D3e4g== X-Received: by 2002:a63:b957:0:b0:434:c30d:84b0 with SMTP id v23-20020a63b957000000b00434c30d84b0mr5771420pgo.293.1663900869796; Thu, 22 Sep 2022 19:41:09 -0700 (PDT) Received: from localhost.localdomain ([199.101.192.56]) by smtp.gmail.com with ESMTPSA id t5-20020a625f05000000b0053e8940c4absm5075011pfb.209.2022.09.22.19.41.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2022 19:41:09 -0700 (PDT) From: Zhangfei Gao To: Akhil Goyal , Declan Doherty , Fan Zhang , Ashish Gupta , Ray Kinsella Cc: dev@dpdk.org, acc@openeuler.org, Zhangfei Gao Subject: [PATCH v2 5/5] doc: Update doc for UADK crypto PMD Date: Fri, 23 Sep 2022 10:40:23 +0800 Message-Id: <20220923024023.15849-6-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220923024023.15849-1-zhangfei.gao@linaro.org> References: <20220923024023.15849-1-zhangfei.gao@linaro.org> 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 Update doc for the new UADK crypto PMD, which relies on UADK library [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. [1] https://github.com/Linaro/uadk Signed-off-by: Zhangfei Gao --- MAINTAINERS | 6 ++ doc/guides/cryptodevs/features/uadk.ini | 54 +++++++++++++++++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/uadk.rst | 77 +++++++++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 doc/guides/cryptodevs/features/uadk.ini create mode 100644 doc/guides/cryptodevs/uadk.rst diff --git a/MAINTAINERS b/MAINTAINERS index 32ffdd1a61..f485cec2ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1061,6 +1061,12 @@ M: Fan Zhang F: drivers/crypto/scheduler/ F: doc/guides/cryptodevs/scheduler.rst +HiSilicon UADK crypto +M: Zhangfei Gao +F: drivers/crypto/uadk/ +F: doc/guides/cryptodevs/uadk.rst +F: doc/guides/cryptodevs/features/uadk.ini + Intel QuickAssist M: Fan Zhang F: drivers/crypto/qat/ diff --git a/doc/guides/cryptodevs/features/uadk.ini b/doc/guides/cryptodevs/features/uadk.ini new file mode 100644 index 0000000000..1418959bd4 --- /dev/null +++ b/doc/guides/cryptodevs/features/uadk.ini @@ -0,0 +1,54 @@ +; +; Supported features of the 'uadk' crypto driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Symmetric crypto = Y +HW Accelerated = Y + +; +; Supported crypto algorithms of the 'uadk' crypto driver. +; +[Cipher] +AES CBC (128) = Y +AES CBC (192) = Y +AES CBC (256) = Y +AES ECB (128) = Y +AES ECB (192) = Y +AES ECB (256) = Y +AES XTS (128) = Y +AES XTS (256) = Y +DES CBC = Y +; +; Supported authentication algorithms of the 'uadk' crypto driver. +; +[Auth] +MD5 = Y +MD5 HMAC = Y +SHA1 = Y +SHA1 HMAC = Y +SHA224 = Y +SHA224 HMAC = Y +SHA256 = Y +SHA256 HMAC = Y +SHA384 = Y +SHA384 HMAC = Y +SHA512 = Y +SHA512 HMAC = Y + +; +; Supported AEAD algorithms of the 'uadk' crypto driver. +; +[AEAD] + +; +; Supported Asymmetric algorithms of the 'uadk' crypto driver. +; +[Asymmetric] + +; +; Supported Operating systems of the 'uadk' crypto driver. +; +[OS] +Linux = Y diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst index 39cca6dbde..cb4ce227e9 100644 --- a/doc/guides/cryptodevs/index.rst +++ b/doc/guides/cryptodevs/index.rst @@ -30,5 +30,6 @@ Crypto Device Drivers scheduler snow3g qat + uadk virtio zuc diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst new file mode 100644 index 0000000000..15633be010 --- /dev/null +++ b/doc/guides/cryptodevs/uadk.rst @@ -0,0 +1,77 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright 2022-2023 Huawei Technologies Co.,Ltd. All rights reserved. + Copyright 2022-2023 Linaro ltd. + +UADK Crypto Poll Mode Driver +======================================================= + +UADK crypto PMD provides poll mode driver +All cryptographic operations are using UADK crypto API. +Hardware accelerators using UADK are supposed to be supported. + + +Features +-------- + +UADK crypto PMD has support for: + +Cipher algorithms: + +* ``RTE_CRYPTO_CIPHER_AES_ECB`` +* ``RTE_CRYPTO_CIPHER_AES_CBC`` +* ``RTE_CRYPTO_CIPHER_AES_XTS`` +* ``RTE_CRYPTO_CIPHER_DES_CBC`` + +Hash algorithms: + +* ``RTE_CRYPTO_AUTH_MD5`` +* ``RTE_CRYPTO_AUTH_MD5_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA1`` +* ``RTE_CRYPTO_AUTH_SHA1_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA224`` +* ``RTE_CRYPTO_AUTH_SHA224_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA256`` +* ``RTE_CRYPTO_AUTH_SHA256_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA384`` +* ``RTE_CRYPTO_AUTH_SHA384_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA512`` +* ``RTE_CRYPTO_AUTH_SHA512_HMAC`` + +Test steps +----------- + + .. code-block:: console + + 1. Build + cd dpdk + mkdir build + meson build (--reconfigure) + cd build + ninja + sudo ninja install + + 2. Prepare + echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages + echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages + echo 1024 > /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages + echo 1024 > /sys/devices/system/node/node3/hugepages/hugepages-2048kB/nr_hugepages + mkdir -p /mnt/huge_2mb + mount -t hugetlbfs none /mnt/huge_2mb -o pagesize=2MB + + 2 Test with crypto_uadk + sudo dpdk-test --vdev=crypto_uadk (--log-level=6) + RTE>>cryptodev_uadk_autotest + RTE>>quit + +Dependency +------------ + +UADK crypto PMD relies on UADK library [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. +As a result, 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