From: Akhil Goyal <gakhil@marvell.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>,
"Marchand, David" <david.marchand@redhat.com>,
Aaron Conole <aconole@redhat.com>
Cc: Fan Zhang <fanzhang.oss@gmail.com>,
Ashish Gupta <ashishg@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>
Subject: RE: [EXTERNAL] [PATCH 0/2] uadk: realize async mode
Date: Thu, 22 May 2025 11:50:16 +0000 [thread overview]
Message-ID: <CO6PR18MB448446151350E98857F883FFD899A@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CABQgh9E0Kh115U4YbkVPOCR-65cbFb__V-+pRGFdRGoqLVYMtg@mail.gmail.com>
> Hi, Akhil
>
> On Wed, 21 May 2025 at 20:39, Akhil Goyal <gakhil@marvell.com> wrote:
> >
> > > Realize async mode to replace sync mode for better performance
> > >
> > > Zhangfei Gao (2):
> > > compress/uadk: use async mode to replace sync mode
> > > crypto/uadk: use async mode to replace sync mode
> > >
> > > drivers/compress/uadk/uadk_compress_pmd.c | 107 ++++--
> > > .../compress/uadk/uadk_compress_pmd_private.h | 2 +-
> > > drivers/crypto/uadk/uadk_crypto_pmd.c | 321 +++++++++++++-----
> > > drivers/crypto/uadk/uadk_crypto_pmd_private.h | 8 +-
> > > 4 files changed, 318 insertions(+), 120 deletions(-)
> >
> > This patchset is not building for me atleast. Please fix compilation.
> >
> > ninja: Entering directory `./build-gcc-static'
> > [2/31] Compiling C object
> drivers/libtmp_rte_compress_uadk.a.p/compress_uadk_uadk_compress_pmd.c.
> o
> > FAILED:
> drivers/libtmp_rte_compress_uadk.a.p/compress_uadk_uadk_compress_pmd.c.
> o
> > ccache gcc -Idrivers/libtmp_rte_compress_uadk.a.p -Idrivers -I../drivers -
> Idrivers/compress/uadk -I../drivers/compress/uadk -Ilib/compressdev -
> I../lib/compressdev -Ilib/eal/common -I../lib/eal/common -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 -
> I../kernel/linux -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -
> Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/mbuf -
> I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -
> Idrivers/bus/vdev -I../drivers/bus/vdev -
> I/home/gakhil/up/uadk/build_x86/include -fdiagnostics-color=always -
> D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O2 -g -
> include rte_config.h -Wvla -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-packed-not-aligned -Wno-
> missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -mrtm -
> DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation
> -Wno-address-of-packed-member -
> DRTE_LOG_DEFAULT_LOGTYPE=pmd.compress.uadk -MD -MQ
> drivers/libtmp_rte_compress_uadk.a.p/compress_uadk_uadk_compress_pmd.c.
> o -MF
> drivers/libtmp_rte_compress_uadk.a.p/compress_uadk_uadk_compress_pmd.c.
> o.d -o
> drivers/libtmp_rte_compress_uadk.a.p/compress_uadk_uadk_compress_pmd.c.
> o -c ../drivers/compress/uadk/uadk_compress_pmd.c
> > ../drivers/compress/uadk/uadk_compress_pmd.c: In function
> ‘uadk_compress_pmd_config’:
> > ../drivers/compress/uadk/uadk_compress_pmd.c:35:9: error: variable
> ‘cparams’ has initializer but incomplete type
> > 35 | struct wd_ctx_params cparams = {0};
> > | ^~~~~~~~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:35:34: error: excess elements
> in struct initializer [-Werror]
> > 35 | struct wd_ctx_params cparams = {0};
> > | ^
> > ../drivers/compress/uadk/uadk_compress_pmd.c:35:34: note: (near
> initialization for ‘cparams’)
> > ../drivers/compress/uadk/uadk_compress_pmd.c:35:23: error: storage size of
> ‘cparams’ isn’t known
> > 35 | struct wd_ctx_params cparams = {0};
> > | ^~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:42:42: error: dereferencing
> pointer to incomplete type ‘struct wd_ctx_nums’
> > 42 | ctx_set_num = calloc(WD_DIR_MAX, sizeof(*ctx_set_num));
> > | ^~~~~~~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:50:16: error: implicit
> declaration of function ‘numa_allocate_nodemask’ [-Werror=implicit-function-
> declaration]
> > 50 | cparams.bmp = numa_allocate_nodemask();
> > | ^~~~~~~~~~~~~~~~~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:50:16: error: nested extern
> declaration of ‘numa_allocate_nodemask’ [-Werror=nested-externs]
> > ../drivers/compress/uadk/uadk_compress_pmd.c:57:2: error: implicit
> declaration of function ‘numa_bitmask_setall’ [-Werror=implicit-function-
> declaration]
> > 57 | numa_bitmask_setall(cparams.bmp);
> > | ^~~~~~~~~~~~~~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:57:2: error: nested extern
> declaration of ‘numa_bitmask_setall’ [-Werror=nested-externs]
> > ../drivers/compress/uadk/uadk_compress_pmd.c:60:14: error: invalid use of
> undefined type ‘struct wd_ctx_nums’
> > 60 | ctx_set_num[i].async_ctx_num = UADK_COMP_DEF_CTXS;
> > | ^
> > ../drivers/compress/uadk/uadk_compress_pmd.c:62:8: error: implicit
> declaration of function ‘wd_comp_init2_’; did you mean ‘wd_comp_init’? [-
> Werror=implicit-function-declaration]
> > 62 | ret = wd_comp_init2_(alg_name, SCHED_POLICY_RR, TASK_HW,
> &cparams);
> > | ^~~~~~~~~~~~~~
> > | wd_comp_init
> > ../drivers/compress/uadk/uadk_compress_pmd.c:62:8: error: nested extern
> declaration of ‘wd_comp_init2_’ [-Werror=nested-externs]
> > ../drivers/compress/uadk/uadk_compress_pmd.c:62:50: error: ‘TASK_HW’
> undeclared (first use in this function)
> > 62 | ret = wd_comp_init2_(alg_name, SCHED_POLICY_RR, TASK_HW,
> &cparams);
> > | ^~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:62:50: note: each undeclared
> identifier is reported only once for each function it appears in
> > ../drivers/compress/uadk/uadk_compress_pmd.c:63:2: error: implicit
> declaration of function ‘numa_free_nodemask’ [-Werror=implicit-function-
> declaration]
> > 63 | numa_free_nodemask(cparams.bmp);
> > | ^~~~~~~~~~~~~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c:63:2: error: nested extern
> declaration of ‘numa_free_nodemask’ [-Werror=nested-externs]
> > ../drivers/compress/uadk/uadk_compress_pmd.c:35:23: error: unused variable
> ‘cparams’ [-Werror=unused-variable]
> > 35 | struct wd_ctx_params cparams = {0};
> > | ^~~~~~~
> > ../drivers/compress/uadk/uadk_compress_pmd.c: In function
> ‘uadk_compress_pmd_close’:
> > ../drivers/compress/uadk/uadk_compress_pmd.c:97:3: error: implicit
> declaration of function ‘wd_comp_uninit2’; did you mean ‘wd_comp_uninit’? [-
> Werror=implicit-function-declaration]
> > 97 | wd_comp_uninit2();
> > | ^~~~~~~~~~~~~~~
> > | wd_comp_uninit
> > ../drivers/compress/uadk/uadk_compress_pmd.c:97:3: error: nested extern
> declaration of ‘wd_comp_uninit2’ [-Werror=nested-externs]
>
> I am sorry for the error.
>
> There are two reasons, one is using a newer uadk api, the other is
> dependence on numa.
> When using the old version uadk, I can reproduce a similar build
> error, though not exactly the same.
> And it can be solved by using a newer uadk version, at least 2.6, uadk
> master branch does not have issues.
>
> a. 2.6 version exports the new api
> b. building uadk library itself requires install numa, like yum
> install numactl-devel
> c. 2.6 header file +#include <numa.h>, which will be included automatically.
>
> Will add version dependence in the next version.
Yes this is what I also suspected.
But we cannot just change the version dependency without prior deprecation notice.
I would suggest sending a deprecation notice in this release and use it in next release.
@David/Aaron, your thoughts?
>
> diff --git a/drivers/compress/uadk/meson.build
> b/drivers/compress/uadk/meson.build
> index 34113cd08c..e251af14cf 100644
> --- a/drivers/compress/uadk/meson.build
> +++ b/drivers/compress/uadk/meson.build
> @@ -13,7 +13,7 @@ sources = files(
> )
>
> deps += 'bus_vdev'
> -dep = dependency('libwd_comp', required: false, method: 'pkg-config')
> +dep = dependency('libwd_comp', version: '>=2.6', required: false,
> method: 'pkg-config')
> if not dep.found()
> build = false
> reason = 'missing dependency, "libwd_comp"'
> @@ -21,7 +21,7 @@ else
> ext_deps += dep
> endif
>
> -dep = dependency('libwd', required: false, method: 'pkg-config')
> +dep = dependency('libwd', version: '>=2.6', required: false, method:
> 'pkg-config')
> if not dep.found()
> build = false
> reason = 'missing dependency, "libwd"'
> diff --git a/drivers/crypto/uadk/meson.build b/drivers/crypto/uadk/meson.build
> index e46abd21e5..52db344c8e 100644
> --- a/drivers/crypto/uadk/meson.build
> +++ b/drivers/crypto/uadk/meson.build
> @@ -13,7 +13,7 @@ sources = files(
> )
>
> deps += 'bus_vdev'
> -dep = dependency('libwd_crypto', required: false, method: 'pkg-config')
> +dep = dependency('libwd_crypto', version: '>=2.6', required: false,
> method: 'pkg-config')
> if not dep.found()
> build = false
> reason = 'missing dependency, "libwd_crypto"'
> @@ -21,7 +21,7 @@ else
> ext_deps += dep
> endif
>
> -dep = dependency('libwd', required: false, method: 'pkg-config')
> +dep = dependency('libwd', version: '>=2.6', required: false, method:
> 'pkg-config')
> if not dep.found()
> build = false
> reason = 'missing dependency, "libwd"'
>
> Thanks
prev parent reply other threads:[~2025-05-22 11:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 7:41 Zhangfei Gao
2025-05-08 7:41 ` [PATCH 1/2] compress/uadk: use async mode to replace sync mode Zhangfei Gao
2025-05-08 7:41 ` [PATCH 2/2] crypto/uadk: " Zhangfei Gao
2025-05-21 12:39 ` [EXTERNAL] [PATCH 0/2] uadk: realize async mode Akhil Goyal
2025-05-22 10:02 ` Zhangfei Gao
2025-05-22 11:50 ` Akhil Goyal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO6PR18MB448446151350E98857F883FFD899A@CO6PR18MB4484.namprd18.prod.outlook.com \
--to=gakhil@marvell.com \
--cc=aconole@redhat.com \
--cc=ashishg@marvell.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fanzhang.oss@gmail.com \
--cc=thomas@monjalon.net \
--cc=zhangfei.gao@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).