From patchwork Wed Oct 26 10:54: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: 119156 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB3EAA04FD; Wed, 26 Oct 2022 13:01:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91F6240F17; Wed, 26 Oct 2022 13:01:19 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id E1A9F40041 for ; Wed, 26 Oct 2022 13:01:17 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id 5so2146978wmo.1 for ; Wed, 26 Oct 2022 04:01:17 -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=ZScTSfCYkmn2xw7NM8InNPxS2cJG8aHS7fQ16ky87l4=; b=WsPWhSDjlKvlgIgNautzME3UIMgVjFOwGuwpjxa5wPVi4wWBe7XRd9hPVAUbvTNlyu hHMnVqMz6D3GgHNdsPI5RWJPrbxh1jyXRPHhTZ3kFZgFBuJR5czjzyqerd+5rVVJQIa/ 7t/HiYbscVbM4QQHxtAPTE4sEKv5koTqHtAea9OsdvmM15OjkOkz2pB2fWzk39o/CQ4U kAxtJPe4mj3hUS8MYjNNIYTHaEpX3GqTlMindouJ+I31Q3ivHM3fnaIoGUAtTtrpV5T1 nDeXmE46na57nbXGRPP/UU47oLGD0EQ+r4COh0USYpvtq8T56my4lecKukh199wo7ktx 9b9A== 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=ZScTSfCYkmn2xw7NM8InNPxS2cJG8aHS7fQ16ky87l4=; b=Ed3rVakgWgHnnG8APEVi/X/f/XbtnQw0AOcNmh//skdKZiT1Kjxfdkpnv2c5aqvULI ko8vz0UdN2tBWW/6C0PZc0fMu67QrubDYgLQk8vNBgBzBS3Bba87vfgRjUnzFx5T0L6Y +g2DNz7//7/oqveS0CAAbcC0q1H9q3GsqqTrYA2uHHwL3yycq2yldiZUDuoCvwAB2D5l n74fJ6jdAzXv3MhQQVc6Ob0knVGprrMGXO6xjD89PLlaIxoVsqci02lTLrXqF9fZ3/iz eo+xDNkWwwaHqYkLJHkC/u9SBB3XvnHp56wn/Fv6g/k/sJ6i21lZTjuJLM74MdFRPwOd V9LQ== X-Gm-Message-State: ACrzQf1VpIHwyOKuzEeQFAKMB1Q3ZaS0oJO98Rfah9pzYCygIlmy2CcO 2e8WxavfFOw17EwSqVkbgjmcJQ== X-Google-Smtp-Source: AMsMyM5l5YqI3Iq3EP+wiqxl8iL+S6MEgqe+Cy6H5DcvbIyNKac4i5S8ARCWtkJjJUn35gA2Ifbh/Q== X-Received: by 2002:a05:600c:3b1d:b0:3c6:ff0d:6a60 with SMTP id m29-20020a05600c3b1d00b003c6ff0d6a60mr1981478wms.183.1666782077647; Wed, 26 Oct 2022 04:01:17 -0700 (PDT) Received: from localhost.localdomain ([213.146.143.36]) by smtp.gmail.com with ESMTPSA id h14-20020a5d688e000000b0023660f6cecfsm4856094wru.80.2022.10.26.04.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:01:17 -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 v6 0/6] crypto/uadk: introduce uadk crypto driver Date: Wed, 26 Oct 2022 18:54:23 +0800 Message-Id: <20221026105429.1899867-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 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 | 1075 +++++++++++++++++ drivers/crypto/uadk/uadk_crypto_pmd_private.h | 79 ++ drivers/crypto/uadk/version.map | 3 + 13 files changed, 1361 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