-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use common func wd_find_msg_in_pool to replace wd_xxx_get_msg #646
base: develop
Are you sure you want to change the base?
Conversation
Use the common func wd_find_msg_in_pool to replace the different wd_xxx_get_msg via passing the pool to the drv.priv->config.poll Signed-off-by: Zhangfei Gao <[email protected]>
The wd_util.c and wd_shced.c should be in libwd.so No need to export in every algo.so Signed-off-by: Zhangfei Gao <[email protected]>
@@ -48,6 +48,7 @@ uadk_drivers_LTLIBRARIES=libhisi_sec.la libhisi_hpre.la libhisi_zip.la \ | |||
libisa_ce.la libisa_sve.la libhisi_dae.la | |||
|
|||
libwd_la_SOURCES=wd.c wd_mempool.c wd.h wd_alg.c wd_alg.h \ | |||
wd_sched.c wd_util.c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think it is unnecessary for alg.so, you should remove it from alg_SOURCE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果完全其他库Makefile删掉wd_sched.c wd_util.c,
那libwd.map 还需要export 蛮多函数的
这些函数都是其他库用到的,
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_alg_get_env_param' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_parse_async_poll_en'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_get_msg_from_pool' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_check_ctx'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_alg_attrs_init' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_ctx_param_init'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_add_task_to_async_queue' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_clear_ctx_config'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_alg_try_init' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_check_datalist'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_check_src_dst' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_init_sched'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_alg_uninit_driver' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_alg_drv_bind'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_set_ctx_attr' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_alg_env_init'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_uninit_async_request_pool' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_init_ctx_config'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_clear_sched' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_alg_drv_unbind'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_dlopen_drv' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_alg_env_uninit'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_ctx_param_uninit' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_put_msg_to_pool'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_alg_attrs_uninit' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_init_param_check'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_handle_msg_sync' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_alg_init_driver'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_parse_ctx_num' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_init_async_request_pool'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_memset_zero' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_set_epoll_en'
/usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to wd_get_lib_file_path' /usr/bin/ld: /home/linaro/work/uadk/.libs/libwd_crypto.so: undefined reference to
wd_dlclose_drv'
-
wd_sched_rr_instance;
-
wd_sched_rr_alloc;
-
wd_sched_rr_release;
-
wd_find_msg_in_pool;
这几个函数是app 或者是驱动用到的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那这样的逻辑下你无法删除原有的引用,反而要在libwd中新增了wd_sched和wd_util,它的目的在于什么地方呢?如果说你把所有接口全部整改那这个逻辑我理解是成立的,所有公共部分全部放到libwd中,alg对公共的依赖由libwd提供就好。但是现在的修改方案既不能保证alg和公共文件的解耦,由让libwd和公共文件耦合,无法理解它的好处。
仅我个人观点而言,第二个patch [uadk: use wd_find_msg_in_pool to replace wd_xxx_get_msg] 的修改不是很有必要,理由有: |
这是两个事情
当然patch2 不要也行,只是简化下,不用每个库都export 下这几个app/drv 用到的函数 |
It is recommended to put this patches to the PR: Adapter part2 #647 |
replace pr636, target to develop branch