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 6D04AA0553; Thu, 20 Oct 2022 17:56:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C5BE410EE; Thu, 20 Oct 2022 17:56:31 +0200 (CEST) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mails.dpdk.org (Postfix) with ESMTP id 32AC440694 for ; Thu, 20 Oct 2022 17:56:30 +0200 (CEST) Received: by mail-ed1-f50.google.com with SMTP id m16so185664edc.4 for ; Thu, 20 Oct 2022 08:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=E6MPtQbqk+khz0tCAo5BM9RCZRvXprPEi0VK5PHU3ZI=; b=on9gJAfF+677HrjRSNGJVDyDJptIkfxe+cTOGMK/lXeICnU1xPMzXN1VGy8rnR2uEn MpOufZZok7uzuwmixZ3BU7X//IRX5eyI3y7l15WNXcE0Lgrr2+k4aQ1m4qhmCNRG+OZU 1h+IjJvESYFVwocsDfPx2knskfGi7YZydZ4tu06T0nKLYKQe6aYxotv7iH2bmPa59nPR mMwZhmQITMFwl4pvDhmLjLefVRFAk2rH9GkFrfk9TzkO7LlCR7BaWaeoKqy0scFasLkz bjdDgqm71ADE7BxLQ5NLifG8mmbpQQiNJl5V3L4v8r0A3lT2Iic8SPX/vU/P0EWVR62Y Y1lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E6MPtQbqk+khz0tCAo5BM9RCZRvXprPEi0VK5PHU3ZI=; b=aA1yDojmjsDo02JNi6GZyvblw/MVvUc7YUv7yVpTwdBF+eNQV1PTTWOAGE+tWyNNFm +YkWGKY6qAdK8cnh8zC8SzFsKjxwkyf7YdY8x/t/rIR4Vlk+fM/sGZJKh+xjVgpP9q+f 6cYIqbpDv7qSiHCovmqNWZHHbIi5tJ1J2khQNpj1NoDuo8Y5aTG1O/xONRuIkIDIKRaN PSnVAZWXowmL58NvoZZvbCU9H1Of9P9mEkQaX9qh2CnbHV1/GRXOCcWABe7Xns1NoTF4 Bgh4NsQ1BcQ2pJuWoqkhRps6Y7RXBpXDn/GLt3hA6jaHjyleBflMfvqMhi+BbaZh6fR8 yVkQ== X-Gm-Message-State: ACrzQf1wrwEeZjon5aoFwXP2HjZLa8hoQA7Lif5fFHLNzOytet7JMTxk KyezlICz+K4NzaeJviGFa2GIlQ8QY1uP2BELvUwZDw== X-Google-Smtp-Source: AMsMyM6qAOA7+62gQZweSwgduLny6XDifPLtebRBs1h7qWxFOvhTfFK4jpPSSCUO1yVR79ePtB0BMVSyicd7rAj+HrE= X-Received: by 2002:aa7:c78e:0:b0:456:c524:90ec with SMTP id n14-20020aa7c78e000000b00456c52490ecmr12844861eds.192.1666281389843; Thu, 20 Oct 2022 08:56:29 -0700 (PDT) MIME-Version: 1.0 References: <20221019125753.1700071-1-zhangfei.gao@linaro.org> In-Reply-To: From: Zhangfei Gao Date: Thu, 20 Oct 2022 23:56:17 +0800 Message-ID: Subject: Re: [EXT] [PATCH v4 0/6] crypto/uadk: introduce uadk crypto driver To: Akhil Goyal Cc: Declan Doherty , Fan Zhang , Ashish Gupta , Ray Kinsella , "dev@dpdk.org" , "acc@openeuler.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, 20 Oct 2022 at 22:46, Akhil Goyal wrote: > > > Introduce a new crypto PMD for hardware accelerators based on UADK [1]. > > > > UADK is a framework for user applications to access hardware accelerato= rs. > > 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 dm= a, > > which enhances the performance as well as easy usability. > > > > [1] https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > > 3A__github.com_Linaro_uadk&d=3DDwIDAg&c=3DnKjWec2b6R0mOyPaz7xtfQ&r=3DDn > > L7Si2wl_PRwpZ9TWey3eu68gBzn7DkPwuqhd6WNyo&m=3DAkCizMeraG64B9u- > > h4gp5S2CYP3SiD5dpvFqvj2WHC4Cfuw6TbzZSeCk1Ryz-qLo&s=3DTm7UGDJ- > > 3QUjCzOkIRUG_tjJA3ckOdK6kSOxuk7V5PQ&e=3D > > > > Test: > > sudo dpdk-test --vdev=3Dcrypto_uadk (--log-level=3D6) > > 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=3D$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=3D$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../drive= rs -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/= cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/inc= lude -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/inclu= de -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../l= ib/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=3Dalways -pipe -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid= -pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -W= format-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-protot= ypes -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=3Dnative -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-= truncation -DRTE_LOG_DEFAULT_LOGTYPE=3Dpmd.crypto.uadk -MD -MQ 'drivers/a71= 5181@@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 'dr= ivers/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: N= o such file or directory > 9 | #include > | ^~~~~~~~~~~~ > compilation terminated. > > ninja: Entering directory `build' > [65/1253] Compiling C object 'drivers/a715181@@tmp_rte_crypto_uadk@sta/cr= ypto_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../drive= rs -Idrivers/crypto/uadk -I../drivers/crypto/uadk -Ilib/cryptodev -I../lib/= cryptodev -I. -I../ -Iconfig -I../config -Ilib/eal/include -I../lib/eal/inc= lude -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/inclu= de -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../l= ib/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=3Dalways -pipe -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid= -pch -Wextra -O3 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -W= format-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-protot= ypes -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=3Dnative -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-= truncation -DRTE_LOG_DEFAULT_LOGTYPE=3Dpmd.crypto.uadk -MD -MQ 'drivers/a71= 5181@@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 'dr= ivers/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_ciph= er.h: No such file or directory > 11 | #include > > > > 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/remo= ve > > 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: 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 >