-
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
Adapter part2 #642
base: master
Are you sure you want to change the base?
Adapter part2 #642
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]>
Now wd_init_sched will copy sched memory, later the &sched will be directly used without copy. So use static var instead of temp var, which will be freed. Signed-off-by: Zhangfei Gao <[email protected]>
poll_ctx adds para wd_sched to transfer para, since different driver may use different pool. Signed-off-by: Zhangfei Gao <[email protected]>
wd_find_drv is used to find drv with name and alg, also takes idx to search the idx'th drv Signed-off-by: Zhangfei Gao <[email protected]>
Using uadk_adapter_worker to record driver and resources. So adding multi driver is adding workers. The worker priority and mode can be set by env UADK_CONF. For export UADK_CONF=TO_PATH/uadk.conf Example: uadk.conf mode=1 driver_name=isa_ce_sm3 driver_name=hisi_sec2 If env UADK_CONF exist, only parse UADK_CONF and add to adapter->workers[] one by one. So the first driver has higher priority Otherwise, parse all drivers and choose the top two priorities drivers to adapter->workers[] Signed-off-by: Zhangfei Gao <[email protected]>
Using uadk_adapter_worker to record driver and resources. so adding multi driver is adding workers. To make sure different worker can work. Signed-off-by: Zhangfei Gao <[email protected]>
case 1: sync or async error, switch worker case 2: roundrobin mode, switch worker after worker->looptime (10) Signed-off-by: Zhangfei Gao <[email protected]>
By default each worker loop 10 times in roundrobin mode, except looptime is set in UADK_CONF For example: uadk.conf looptime=5 mode=1 Signed-off-by: Zhangfei Gao <[email protected]>
如何使用
命令和之前一样
细节参考 |
adapter part 2,
part1 is #636