126 Star 3 Fork 18

src-openEuler/libwd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0014-uadk-fix-control-range-of-environmemt-variable.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
JangShui Yang 提交于 2024-04-07 18:05 . libwd: update the source code
From 7869d42227f03754e4117a17751e6959b3f93bca Mon Sep 17 00:00:00 2001
From: Zhiqi Song <songzhiqi1@huawei.com>
Date: Mon, 11 Mar 2024 18:07:23 +0800
Subject: [PATCH 14/44] uadk: fix control range of environmemt variable
Environment variable will not be used in non-hardware
situation to config the ctx num. So add an interception
condition to avoid the impact of environment variables
on the initialization of non-hardware situations.
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
wd_util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/wd_util.c b/wd_util.c
index 39909ca..b8e755c 100644
--- a/wd_util.c
+++ b/wd_util.c
@@ -2111,8 +2111,9 @@ int wd_ctx_param_init(struct wd_ctx_params *ctx_params,
return -WD_ENOMEM;
}
+ /* Only hw driver support environment variable */
var_s = secure_getenv(env_name);
- if (var_s && strlen(var_s)) {
+ if (var_s && strlen(var_s) && driver->calc_type == UADK_ALG_HW) {
/* environment variable has the highest priority */
ret = wd_env_set_ctx_nums(driver->alg_name, env_name, var_s,
ctx_params, max_op_type);
--
2.25.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/libwd.git
git@gitee.com:src-openeuler/libwd.git
src-openeuler
libwd
libwd
master

搜索帮助