From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3384A00C3; Sun, 11 Sep 2022 07:24:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5B61427F3; Sun, 11 Sep 2022 07:24:51 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 000BC427F3 for ; Sun, 11 Sep 2022 07:24:50 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id t3so5589793ply.2 for ; Sat, 10 Sep 2022 22:24:50 -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=QIJmCNhgKMbCLLjYtKQBhxgAslbXzlK4XmTkHnMh2Ik=; b=ZTNkxDgCahKuzfJA6WVcyjgcK7NJAfOqE7kV0sHTDc+7Yolq153UnGMIVeokd/6Vlj DRLphoSjpyLthR+6+1eCQ6j9zRxbbmWe77ug1etPQeB1Yg7fSymyhqUQZ6W7ieawZZng rWq9BO2tVq4/LDuvWZrMlZEzoQsQRI77DmAdPfkDR51IMBUOtVqd/SCjDizogqzzAjdu REVo/64JmuCH/GSXoM4y+hX/+sYS9UMPItvM0jJL0cri/Rtt2qV9IanRBE42Vg5ukEFp 9wcV+R2Q3pRcINQ7v6YfjoeS2n7h+QCbhTQcn7U7fs8gTP8i1y7HHZXiHNb+Fy/t1jGU lMJQ== 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=QIJmCNhgKMbCLLjYtKQBhxgAslbXzlK4XmTkHnMh2Ik=; b=acOS6tJJDdOePCsQVl9huaHCcN3K+d+NoRDoYK+hXkYR1PdbnlQYgjedE+4houxtDN qhwlARVa/mw/pbi7nIeZeqidy1y1dUeyLShZR61MNIM1GhhLCm/y4VETNMu6Fxrmc06M 6hBObRApF/qTgayts2R7XlKvRb16KTot8mxyoGZ9vsoa5InkdiLKq14CB71T017EkuNV Er7wu9GFIycBbqhh8tcvY0LkIvqWXFc0poy+xZBoyVDwMLfKt8NAF/dC8ip7MgV5JTHe Vd6pPkB/9NuCCoK+BNoYdLp4Cjd2fVifaPTchv4Czf0uhKGv9a2bwv5xrc2Pk+q9klyz kvAA== X-Gm-Message-State: ACgBeo2sCNaskmC1oHk+cywGx6Ds+hkpN9IJHckK+cfcWTafRfAchbCp +vivHuK15VnQsTa0zKDdwWC3lZa5Y2Y1ZQ== X-Google-Smtp-Source: AA6agR4pQGvzSiJCZyMfmnA9Ioh0xOOX53T3e/5NUzN76hJNbNfnwZcFNZaDD33lZTWvM/dGPpVIwg== X-Received: by 2002:a17:902:d54e:b0:178:2da7:1bea with SMTP id z14-20020a170902d54e00b001782da71beamr126119plf.161.1662873890219; Sat, 10 Sep 2022 22:24:50 -0700 (PDT) Received: from localhost.localdomain ([199.101.192.45]) by smtp.gmail.com with ESMTPSA id z11-20020a170902cccb00b00173cfaed233sm3215860ple.62.2022.09.10.22.24.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Sep 2022 22:24:49 -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 5/5] doc: Update doc for UADK crypto PMD Date: Sun, 11 Sep 2022 13:23:44 +0800 Message-Id: <20220911052344.31239-6-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220911052344.31239-1-zhangfei.gao@linaro.org> References: <20220911052344.31239-1-zhangfei.gao@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 | 80 +++++++++++++++++++++++++ 4 files changed, 141 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..ec00b509b2 --- /dev/null +++ b/doc/guides/cryptodevs/uadk.rst @@ -0,0 +1,80 @@ +.. 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. +Support for the following hardware accelerator devices: + +* ``HiSilicon Kunpeng920`` +* ``HiSilicon Kunpeng930`` + + +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 -- 2.36.1