Skip to content
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

Sched 12.25 #604

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Sched 12.25 #604

wants to merge 11 commits into from

Conversation

gaozhangfei
Copy link
Collaborator

RFC:

patch 1
cipher: support mutil-driver

1. alloc_sess will pick driver according to setup.para.task_type & alg,
   will reuse task_type & alg from init2 if no setup.para to compatible with v2
   will reuse setting.driver to compatible with v1
2. alloc_sess will add drivers to sched.drv[]
3. poll_ctx will poll all drivers in sched.drv[]
4. sw and hw will reuse common resources: sched, pool and ctxs.
5. Only hw will request real ctxs.

patch 2
uadk: add op_ctx to make sw easier

sw has no hw_ctx, but still need ctx_id to get pool msg
for multi-threads. so use op_ctx taking info like ctx_id
and mode: sync/async.

@gaozhangfei gaozhangfei force-pushed the sched-12.25 branch 4 times, most recently from bf803df to f714fa8 Compare December 29, 2023 12:05
1. alloc_sess will pick driver according to setup.para.task_type & alg,
   will reuse task_type & alg from init2 if no setup.para to compatible with v2
   will reuse setting.driver to compatible with v1
2. alloc_sess will add drivers to sched.drv[]
3. poll_ctx will poll all drivers in sched.drv[]
4. sw and hw will reuse common resources: sched, pool and ctxs.
5. Only hw will request real ctxs.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
sw has no hw_ctx, but still need ctx_id to get pool msg
for multi-threads. so use op_ctx taking info like ctx_id
and mode: sync/async.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
1. alloc_sess will pick driver according to setup.para.task_type & alg,
   will reuse task_type & alg from init2 if no setup.para to compatible with v2
   will reuse setting.driver to compatible with v1
2. alloc_sess will add drivers to sched.drv[]
3. poll_ctx will poll all drivers in sched.drv[]
4. sw and hw will reuse common resources: sched, pool and ctxs.
5. Only hw will request real ctxs.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
sw has no hw_ctx, but still need ctx_id to get pool msg
for multi-threads. so use op_ctx taking info like ctx_id
and mode: sync/async.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
In order to simulate cpu instruction accelerator, this patch adds
zlib drv, which does not require accelerator at all.
So may not require wd_xxx_init, and ctx and sched which relates
to queue.

Btw, zlib is required.
yum install zlib-devel
apt-get install zlib1g-dev

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Will use hisi_zlib to test adapter, so let UADK_ALG_SOFT register to uadk

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
sw and hw will share common resources like ctxs and pool.
sw may works on platform no accerator dev, or has dev but
no ctx, or sw driver has no op.
Ignore these error as normal cases.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
1. alloc_sess will pick driver according to setup.para.task_type & alg,
   will reuse task_type & alg from init2 if no setup.para to compatible with v2
   will reuse setting.driver to compatible with v1
2. alloc_sess will add drivers to sched.drv[]
3. poll_ctx will poll all drivers in sched.drv[]
4. sw and hw will reuse common resources: sched, pool and ctxs.
5. Only hw will request real ctxs.
6. alloc_sess will parse para.alg to set digest_type and digest_mode

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
sw has no hw_ctx, but still need ctx_id to get pool msg
for multi-threads. so use op_ctx taking info like ctx_id
and mode: sync/async.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
@gaozhangfei gaozhangfei force-pushed the sched-12.25 branch 2 times, most recently from e27b914 to 62b5299 Compare January 3, 2024 14:38
User want to choose sve or ce instruction explicitly,
so modify wd_request_drv to request drv via para
alg_task_type

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants