From patchwork Sun Sep 11 05:23:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 604781 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:2213:b0:1da:4c02:b5e7 with SMTP id z19csp1853679ltw; Sat, 10 Sep 2022 22:24:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pXdv1ta/KtQYNWmfx99uWehhYiFYEVLrzsFfWTDxwKH+IHPFTGR5KYsm1FJymorJL7WB+ X-Received: by 2002:adf:fc91:0:b0:228:afa5:2432 with SMTP id g17-20020adffc91000000b00228afa52432mr11730779wrr.255.1662873892071; Sat, 10 Sep 2022 22:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662873892; cv=none; d=google.com; s=arc-20160816; b=ZIC3/ekFiZpLrqLQnwD0JLH6CZkxgb0srJwCpzprYYRPIRYLxbSul5lXYuJpqguGkE zWGITz6iiyiJMZZ7opWrmCR66yUI83NoSMa4MRvVToASICTcIlmcr2KV1Miq48HdW0u3 b0ARWbUUBy9tanVKeIRQ1y4cF2I7/UgM8gZbPPwF3CDkTuzNf9tTkFB7bKDw35iG6e1T MQNutemI9mv/t0RxZvMKGrOr/LIL3mT2QaBKD6JRP30sbQx9GMDnpomCXUidKiUukFeq E53OCG8c1kwQOcpk6atD4zpNsOOOUBny3yzPDeFotzBTh56LXfdofs8XoPojhELvSZ9O GWQA== 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=QIJmCNhgKMbCLLjYtKQBhxgAslbXzlK4XmTkHnMh2Ik=; b=P5pkNSEf/hGphrVDnXwNA+i6n4ZbS4hiub4YdipgoInoE7NSCAPzi8B/nrf8rVRVk2 MdylRXomo+ITbBWWBlGa6bTY4YmgHjLQVZT2MJtxfb1E9Xwrbs9pW19YwbWf30pFJqz7 +OD8AxAfg/+lVdKuhGjQ4iiE4zkiY4y7a/H/ZiRuTFpCXFb10+G879ROh81MLXhNnobI W0sPmjQVDNwbOdnuxQ8XkIcwGWOhsL5I1OL4o8PeJLdKfXkmwGgLYjmhNrIYoTmbMbd1 KxCguH8qLF21NsEf9biIMswQ8ndDwmmft1ZWG95gzYluuRzuVUw49f/i6CZLexwyubMk kv8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZTNkxDgC; 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 m15-20020a7bca4f000000b003a30fab2540si2796892wml.29.2022.09.10.22.24.51; Sat, 10 Sep 2022 22:24:52 -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=ZTNkxDgC; 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 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-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 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