Message ID | 20221019125753.1700071-1-zhangfei.gao@linaro.org (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 6CD59A0584; Wed, 19 Oct 2022 15:04:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F332427F3; Wed, 19 Oct 2022 15:04:10 +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 0BE7B410D1 for <dev@dpdk.org>; Wed, 19 Oct 2022 15:04:09 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id l32so12884569wms.2 for <dev@dpdk.org>; Wed, 19 Oct 2022 06:04:09 -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=tjn6o3EVhvAeuXHPhmEJ/GduuREDApgkA2Y0McaXkBA=; b=zQUF/4zhL/eiiseAm1p0FseFIZI2yCHbF3CJc2bUxxhTIJyLLmZ132pxC4+0JdyDBf R+owLdr3TX7MJG4kGTWj+ObpM73a7lSWYfHX1E/UqsUh0XbTjtMOszzMc1YS0GeXXFQT HFjSSBzun5+iUrnow63Dg6iPbHmUDCrr4IJfjOr7r9RY+DXpygSg4yCDI3VoiDe+xT07 qBGR2whtPRd3UOPsdI9ihCDKzaISZRVWHt3pYB+7ul8tPKt4jPZ6nNpcCPnrwnFajgAH WltDdBKfsnw+XuCGXvpfZcySFGv0EPSCzyjCbgNkIsxWsT4b5UKuvU6qicKEQE3pJE/D Y3PA== 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=tjn6o3EVhvAeuXHPhmEJ/GduuREDApgkA2Y0McaXkBA=; b=Fy73Fmw063Yg6u7fygIIJM0gXroEFC8YWyG43Y9AE0N/gvZsLNFwY+9oJjxuxdg7a3 coMQ/Trn61m4Aq+z6eIAtTabHGTWj5KX4xx4hjPmVC5UdvQXek3Gk1Kmh+pA92ohaKxn 50gFhUuNnOi0S0hayasAqFErL9wMsA6PBIaIjQdDv+MUN76YpqfLHMyDgWAmkai+ttYB UQ/p8Yu/r3VqOVlQqy7iBOH7VNjWw/oH1QDaugf72Fu5IwGpfUySNw2eNz8/WigOittd na+R6XL5uL5Q80aM0NhrQlLI/HuHItb8UnyETG3qBa6QCyNAQCqZdwMwMESvlXe/nJtI cVTA== X-Gm-Message-State: ACrzQf0vvPYyM9AGvqSYDe+fS4JyvkJsEXn+NI25j17gak34sywyr1fT dvLLKkgdAgfnXExVK2PO/DndIg== X-Google-Smtp-Source: AMsMyM7VsdneoJEnQyy5UY76k6wtm4fxU6gnGakqDVHc5aRXcrid5R4wTStGs9AczGG5U37H1c9hhA== X-Received: by 2002:a05:600c:3d05:b0:3b4:9a42:10d0 with SMTP id bh5-20020a05600c3d0500b003b49a4210d0mr5753115wmb.135.1666184648680; Wed, 19 Oct 2022 06:04:08 -0700 (PDT) Received: from localhost.localdomain ([213.146.143.36]) by smtp.gmail.com with ESMTPSA id b7-20020adfe307000000b0022cbf4cda62sm16807051wrj.27.2022.10.19.06.04.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 06:04:08 -0700 (PDT) From: Zhangfei Gao <zhangfei.gao@linaro.org> To: Akhil Goyal <gakhil@marvell.com>, Declan Doherty <declan.doherty@intel.com>, Fan Zhang <royzhang1980@gmail.com>, Ashish Gupta <ashish.gupta@marvell.com>, Ray Kinsella <mdr@ashroe.eu> Cc: dev@dpdk.org, acc@openeuler.org, Zhangfei Gao <zhangfei.gao@linaro.org> Subject: [PATCH v4 0/6] crypto/uadk: introduce uadk crypto driver Date: Wed, 19 Oct 2022 20:57:47 +0800 Message-Id: <20221019125753.1700071-1-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.25.1 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
crypto/uadk: introduce uadk crypto driver
|
|
Message
Zhangfei Gao
Oct. 19, 2022, 12:57 p.m. UTC
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 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 <gakhil@marvell.com> 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: add cryptodev_uadk_autotest MAINTAINERS | 6 + 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 | 88 ++ drivers/crypto/meson.build | 1 + drivers/crypto/uadk/meson.build | 30 + drivers/crypto/uadk/uadk_crypto_pmd.c | 1145 +++++++++++++++++++++++ drivers/crypto/uadk/version.map | 3 + 10 files changed, 1337 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/version.map
Comments
> 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://urldefense.proofpoint.com/v2/url?u=https- > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > Test: > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > RTE>>cryptodev_uadk_autotest > RTE>>quit > > 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. > I tried with the latest TOT of UADK. This resolved the openssl issue. But it does not allow me to install UADK into a specific directory. It installs /usr/local/lib only. And what is the use of pkg-config if I cannot use a specific directory To install the libs and headers. And even if I install at default location, I am seeing below errors while compiling DPDK [2453/3738] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c ../drivers/crypto/uadk/uadk_crypto_pmd.c:9:10: fatal error: rte_comp.h: No such file or directory 9 | #include <rte_comp.h> | ^~~~~~~~~~~~ compilation terminated. ninja: Entering directory `build' [65/1253] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:10: fatal error: uadk/wd_cipher.h: No such file or directory 11 | #include <uadk/wd_cipher.h> > 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 <gakhil@marvell.com> > 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: add cryptodev_uadk_autotest > > MAINTAINERS | 6 + > 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 | 88 ++ > drivers/crypto/meson.build | 1 + > drivers/crypto/uadk/meson.build | 30 + > drivers/crypto/uadk/uadk_crypto_pmd.c | 1145 +++++++++++++++++++++++ > drivers/crypto/uadk/version.map | 3 + > 10 files changed, 1337 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/version.map > > -- > 2.36.1
> 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://urldefense.proofpoint.com/v2/url?u=https- > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > Test: > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > RTE>>cryptodev_uadk_autotest > RTE>>quit > > 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. > Please fix documentation build errors as well reported by CI http://mails.dpdk.org/archives/test-report/2022-October/316805.html
On Thu, 20 Oct 2022 at 22:46, Akhil Goyal <gakhil@marvell.com> wrote: > > > 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://urldefense.proofpoint.com/v2/url?u=https- > > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > > > Test: > > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > > RTE>>cryptodev_uadk_autotest > > RTE>>quit > > > > 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. > > > I tried with the latest TOT of UADK. This resolved the openssl issue. > But it does not allow me to install UADK into a specific directory. What's the error? I am sorry, I will check this tomorrow. > It installs /usr/local/lib only. > And what is the use of pkg-config if I cannot use a specific directory > To install the libs and headers. Test with --prefix cd uadk mkdir build ./autogen.sh ./configure --prefix=$PWD/build make; make install $ ls build bin include lib $ ls build/lib/pkgconfig/ libwd_comp.pc libwd_crypto.pc libwd.pc export PKG_CONFIG_PATH=$PWD/build/lib/pkgconfig dpdk$ ninja -C build ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:28: fatal error: uadk/wd_cipher.h: No such file or directory compilation terminated. [2403/3371] Compiling C object drivers/libtmp_rte_crypto_octeontx.a.p/crypto_octeontx_otx_cryptodev_ops.c.o ninja: build stopped: subcommand failed. Will check tomorrow, a bit late. Thanks > > And even if I install at default location, I am seeing below errors while compiling DPDK > > [2453/3738] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. > FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > ../drivers/crypto/uadk/uadk_crypto_pmd.c:9:10: fatal error: rte_comp.h: No such file or directory > 9 | #include <rte_comp.h> > | ^~~~~~~~~~~~ > compilation terminated. > > ninja: Entering directory `build' > [65/1253] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. > FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:10: fatal error: uadk/wd_cipher.h: No such file or directory > 11 | #include <uadk/wd_cipher.h> > > > > 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 <gakhil@marvell.com> > > 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: add cryptodev_uadk_autotest > > > > MAINTAINERS | 6 + > > 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 | 88 ++ > > drivers/crypto/meson.build | 1 + > > drivers/crypto/uadk/meson.build | 30 + > > drivers/crypto/uadk/uadk_crypto_pmd.c | 1145 +++++++++++++++++++++++ > > drivers/crypto/uadk/version.map | 3 + > > 10 files changed, 1337 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/version.map > > > > -- > > 2.36.1 >
> On Thu, 20 Oct 2022 at 22:46, Akhil Goyal <gakhil@marvell.com> wrote: > > > > > 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://urldefense.proofpoint.com/v2/url?u=https- > > > > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > > > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > > > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > > > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > > > > > Test: > > > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > > > RTE>>cryptodev_uadk_autotest > > > RTE>>quit > > > > > > 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. > > > > > I tried with the latest TOT of UADK. This resolved the openssl issue. > > But it does not allow me to install UADK into a specific directory. > > What's the error? > > I am sorry, I will check this tomorrow. > > > It installs /usr/local/lib only. > > And what is the use of pkg-config if I cannot use a specific directory > > To install the libs and headers. > > Test with --prefix > > cd uadk > mkdir build > ./autogen.sh > ./configure --prefix=$PWD/build > make; make install > > $ ls build > bin include lib > > $ ls build/lib/pkgconfig/ > libwd_comp.pc libwd_crypto.pc libwd.pc > > export PKG_CONFIG_PATH=$PWD/build/lib/pkgconfig > Above sequence worked. I would suggest to write this clearly in uadk.rst. Also I made a few below changes to make compilation work. Here, I see that you are creating a dependency on compressdev to compile a crypto Driver. Do you really need that? I believe you should segregate the compressdev related stuff in compress PMD. -------------------------------------------------------------------------------------------------------- diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst index 8f09e4390e..e00398414d 100644 --- a/doc/guides/cryptodevs/uadk.rst +++ b/doc/guides/cryptodevs/uadk.rst @@ -3,7 +3,7 @@ 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. @@ -38,7 +38,7 @@ Hash algorithms: * ``RTE_CRYPTO_AUTH_SHA512_HMAC`` Test steps ------------ +---------- .. code-block:: console @@ -61,7 +61,7 @@ Test steps 3. Run test app Dependency ------------- +---------- UADK crypto PMD relies on UADK library [1] @@ -72,7 +72,7 @@ As a result, user application can directly use virtual address for device dma, which enhances the performance as well as easy usability. Build & Install UADK ------------ +-------------------- .. code-block:: console diff --git a/drivers/crypto/uadk/meson.build b/drivers/crypto/uadk/meson.build index f6fae0a239..66418f1878 100644 --- a/drivers/crypto/uadk/meson.build +++ b/drivers/crypto/uadk/meson.build @@ -12,7 +12,7 @@ sources = files( 'uadk_crypto_pmd.c', ) -deps += 'bus_vdev' +deps += ['bus_vdev', 'compressdev'] dep = dependency('libwd_crypto', required: false, method: 'pkg-config') if not dep.found() build = false diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c index a166efa36c..2f8ef3562d 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd.c +++ b/drivers/crypto/uadk/uadk_crypto_pmd.c @@ -8,9 +8,9 @@ #include <rte_bus_vdev.h> #include <rte_comp.h> #include <stdlib.h> -#include <uadk/wd_cipher.h> -#include <uadk/wd_digest.h> -#include <uadk/wd_sched.h> +#include <wd_cipher.h> +#include <wd_digest.h> +#include <wd_sched.h> /* Maximum length for digest (SHA-512 needs 64 bytes) */ #define DIGEST_LENGTH_MAX 64 > dpdk$ ninja -C build > ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:28: fatal error: > uadk/wd_cipher.h: No such file or directory > compilation terminated. > [2403/3371] Compiling C object > drivers/libtmp_rte_crypto_octeontx.a.p/crypto_octeontx_otx_cryptodev_ops.c. > o > ninja: build stopped: subcommand failed. > > Will check tomorrow, a bit late. > > Thanks > > > > > > And even if I install at default location, I am seeing below errors while > compiling DPDK > > > > [2453/3738] Compiling C object > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o'. > > FAILED: > drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd > .c.o > > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers - > I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev - > I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include - > Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include - > I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal > -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics - > Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool - > I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev - > I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe - > D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h > -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security - > Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style- > definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef - > Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned - > Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native - > DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format- > truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o' -MF > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o.d' -o > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > > ../drivers/crypto/uadk/uadk_crypto_pmd.c:9:10: fatal error: rte_comp.h: No > such file or directory > > 9 | #include <rte_comp.h> > > | ^~~~~~~~~~~~ > > compilation terminated. > > > > ninja: Entering directory `build' > > [65/1253] Compiling C object > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o'. > > FAILED: > drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd > .c.o > > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers - > I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev - > I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include - > Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include - > I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal > -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics - > Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool - > I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev - > I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe - > D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h > -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security - > Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style- > definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef - > Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned - > Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native - > DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format- > truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o' -MF > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o.d' -o > 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pm > d.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > > ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:10: fatal error: > uadk/wd_cipher.h: No such file or directory > > 11 | #include <uadk/wd_cipher.h> > > > > > > > > > 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 <gakhil@marvell.com> > > > 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: add cryptodev_uadk_autotest > > > > > > MAINTAINERS | 6 + > > > 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 | 88 ++ > > > drivers/crypto/meson.build | 1 + > > > drivers/crypto/uadk/meson.build | 30 + > > > drivers/crypto/uadk/uadk_crypto_pmd.c | 1145 > +++++++++++++++++++++++ > > > drivers/crypto/uadk/version.map | 3 + > > > 10 files changed, 1337 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/version.map > > > > > > -- > > > 2.36.1 > >
On Fri, 21 Oct 2022 at 01:12, Akhil Goyal <gakhil@marvell.com> wrote: > > > On Thu, 20 Oct 2022 at 22:46, Akhil Goyal <gakhil@marvell.com> wrote: > > > > > > > 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://urldefense.proofpoint.com/v2/url?u=https- > > > > > > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > > > > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > > > > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > > > > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > > > > > > > Test: > > > > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > > > > RTE>>cryptodev_uadk_autotest > > > > RTE>>quit > > > > > > > > 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. > > > > > > > I tried with the latest TOT of UADK. This resolved the openssl issue. > > > But it does not allow me to install UADK into a specific directory. > > > > What's the error? > > > > I am sorry, I will check this tomorrow. > > > > > It installs /usr/local/lib only. > > > And what is the use of pkg-config if I cannot use a specific directory > > > To install the libs and headers. > > > > Test with --prefix > > > > cd uadk > > mkdir build > > ./autogen.sh > > ./configure --prefix=$PWD/build > > make; make install > > > > $ ls build > > bin include lib > > > > $ ls build/lib/pkgconfig/ > > libwd_comp.pc libwd_crypto.pc libwd.pc > > > > export PKG_CONFIG_PATH=$PWD/build/lib/pkgconfig > > > > Above sequence worked. I would suggest to write this clearly in uadk.rst. Have updated to +Test steps +---------- + + .. code-block:: console + + 1. Build UADK + $ git clone https://github.com/Linaro/uadk.git + $ cd uadk + $ mkdir build + $ ./autogen.sh + $ ./configure --prefix=$PWD/build + $ make + $ make install + + * Without --prefix, UADK will be installed to /usr/local/lib by default + * If get error:"cannot find -lnuma", please install the libnuma-dev + + 2. Run pkg-config libwd to ensure env is setup correctly + $ export PKG_CONFIG_PATH=$PWD/build/lib/pkgconfig + $ pkg-config libwd --cflags --libs + -I/usr/local/include -L/usr/local/lib -lwd + + * export PKG_CONFIG_PATH is required on demand, + not needed if UADK is installed to /usr/local/lib + + 3. Build DPDK + $ cd dpdk + $ mkdir build + $ meson build (--reconfigure) + $ cd build + $ ninja + $ sudo ninja install + + 4. Prepare hugepage for dpdk + $ 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 + + 5. Run test app + https://github.com/Linaro/dpdk/blob/next-9.11-v5/doc/guides/cryptodevs/uadk.rst > > Also I made a few below changes to make compilation work. > Here, I see that you are creating a dependency on compressdev to compile a crypto > Driver. > Do you really need that? > I believe you should segregate the compressdev related stuff in compress PMD. Sorry, has updated. > -------------------------------------------------------------------------------------------------------- > > diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst > index 8f09e4390e..e00398414d 100644 > --- a/doc/guides/cryptodevs/uadk.rst > +++ b/doc/guides/cryptodevs/uadk.rst > @@ -3,7 +3,7 @@ > 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. > @@ -38,7 +38,7 @@ Hash algorithms: > * ``RTE_CRYPTO_AUTH_SHA512_HMAC`` > > Test steps > ------------ > +---------- > > .. code-block:: console > > @@ -61,7 +61,7 @@ Test steps > 3. Run test app > > Dependency > ------------- > +---------- > > UADK crypto PMD relies on UADK library [1] > > @@ -72,7 +72,7 @@ As a result, user application can directly use virtual address for device dma, > which enhances the performance as well as easy usability. > > Build & Install UADK > ------------ > +-------------------- > > .. code-block:: console > > diff --git a/drivers/crypto/uadk/meson.build b/drivers/crypto/uadk/meson.build > index f6fae0a239..66418f1878 100644 > --- a/drivers/crypto/uadk/meson.build > +++ b/drivers/crypto/uadk/meson.build > @@ -12,7 +12,7 @@ sources = files( > 'uadk_crypto_pmd.c', > ) > > -deps += 'bus_vdev' > +deps += ['bus_vdev', 'compressdev'] > dep = dependency('libwd_crypto', required: false, method: 'pkg-config') > if not dep.found() > build = false > diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c > index a166efa36c..2f8ef3562d 100644 > --- a/drivers/crypto/uadk/uadk_crypto_pmd.c > +++ b/drivers/crypto/uadk/uadk_crypto_pmd.c > @@ -8,9 +8,9 @@ > #include <rte_bus_vdev.h> > #include <rte_comp.h> > #include <stdlib.h> > -#include <uadk/wd_cipher.h> > -#include <uadk/wd_digest.h> > -#include <uadk/wd_sched.h> > +#include <wd_cipher.h> > +#include <wd_digest.h> > +#include <wd_sched.h> > > /* Maximum length for digest (SHA-512 needs 64 bytes) */ > #define DIGEST_LENGTH_MAX 64 > > Thanks Akhil
On Thu, 20 Oct 2022 at 22:46, Akhil Goyal <gakhil@marvell.com> wrote: > > > 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://urldefense.proofpoint.com/v2/url?u=https- > > 3A__github.com_Linaro_uadk&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Dn > > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=AkCizMeraG64B9u- > > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=Tm7UGDJ- > > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e= > > > > Test: > > sudo dpdk-test --vdev=crypto_uadk (--log-level=6) > > RTE>>cryptodev_uadk_autotest > > RTE>>quit > > > > 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. > > > I tried with the latest TOT of UADK. This resolved the openssl issue. > But it does not allow me to install UADK into a specific directory. > It installs /usr/local/lib only. > And what is the use of pkg-config if I cannot use a specific directory > To install the libs and headers. > > And even if I install at default location, I am seeing below errors while compiling DPDK > > [2453/3738] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. > FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > ../drivers/crypto/uadk/uadk_crypto_pmd.c:9:10: fatal error: rte_comp.h: No such file or directory > 9 | #include <rte_comp.h> > | ^~~~~~~~~~~~ > compilation terminated. > > ninja: Entering directory `build' > [65/1253] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o'. > FAILED: drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o > ccache cc -Idrivers/a715181@@tmp_rte_crypto_uadk@sta -Idrivers -I../drivers -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/telemetry/../metrics -I../lib/telemetry/../metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Idrivers/bus/vdev -I../drivers/bus/vdev -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -DRTE_LOG_DEFAULT_LOGTYPE=pmd.crypto.uadk -MD -MQ 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -MF 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o.d' -o 'drivers/a715181@@tmp_rte_crypto_uadk@sta/crypto_uadk_uadk_crypto_pmd.c.o' -c ../drivers/crypto/uadk/uadk_crypto_pmd.c > ../drivers/crypto/uadk/uadk_crypto_pmd.c:11:10: fatal error: uadk/wd_cipher.h: No such file or directory > 11 | #include <uadk/wd_cipher.h> > We originally install header file under uadk folder, like /usr/local/include/uadk/xx.h After switch to pkgconfig, the uadk is removed, like /usr/local/include/xx.h After re-thinking, we still think using the folder uadk will be better and cleaner, without polluting the system, like openssl, also for back-compatibility. So fix the uadk lib by using pkginclude_HEADERS and nobase_pkginclude_HEADERS accordingly. Thanks