The sched_policy and task_type parameters were passed to wd_xxx_init2_ in the wrong order, which caused the initialization to use incorrect scheduling and task type values. Swap them to the correct order so the hardware queue is initialized with the round-robin policy and the expected task type. Signed-off-by: Weili Qian <qianweili@huawei.com> --- src/uadk_prov_aead.c | 2 +- src/uadk_prov_cipher.c | 2 +- src/uadk_prov_digest.c | 2 +- src/uadk_prov_hmac.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uadk_prov_aead.c b/src/uadk_prov_aead.c index 93929a0..623bc54 100644 --- a/src/uadk_prov_aead.c +++ b/src/uadk_prov_aead.c @@ -316,7 +316,7 @@ static int uadk_prov_aead_dev_init(struct aead_priv_ctx *priv) if (aprov.pid == getpid()) goto free_nodemask; - ret = wd_aead_init2_(priv->alg_name, TASK_MIX, SCHED_POLICY_RR, &cparams); + ret = wd_aead_init2_(priv->alg_name, SCHED_POLICY_RR, TASK_MIX, &cparams); if (unlikely(ret)) { ret = UADK_AEAD_FAIL; UADK_ERR("failed to init aead!\n"); diff --git a/src/uadk_prov_cipher.c b/src/uadk_prov_cipher.c index 2606c2f..caa0cba 100644 --- a/src/uadk_prov_cipher.c +++ b/src/uadk_prov_cipher.c @@ -567,7 +567,7 @@ static int uadk_prov_cipher_dev_init(struct cipher_priv_ctx *priv) if (prov.pid == getpid()) goto init_err; - ret = wd_cipher_init2_(priv->alg_name, TASK_MIX, SCHED_POLICY_RR, &cparams); + ret = wd_cipher_init2_(priv->alg_name, SCHED_POLICY_RR, TASK_MIX, &cparams); if (unlikely(ret)) { UADK_ERR("failed to init cipher!\n"); ret = UADK_P_FAIL; diff --git a/src/uadk_prov_digest.c b/src/uadk_prov_digest.c index 0b24a26..2da3a36 100644 --- a/src/uadk_prov_digest.c +++ b/src/uadk_prov_digest.c @@ -368,7 +368,7 @@ static int uadk_prov_digest_dev_init(struct digest_priv_ctx *priv) if (dprov.pid == getpid()) goto free_nodemask; - ret = wd_digest_init2_(priv->alg_name, TASK_MIX, SCHED_POLICY_RR, &cparams); + ret = wd_digest_init2_(priv->alg_name, SCHED_POLICY_RR, TASK_MIX, &cparams); if (unlikely(ret && ret != -WD_EEXIST)) { UADK_ERR("uadk failed to initialize digest dev, ret = %d\n", ret); goto free_nodemask; diff --git a/src/uadk_prov_hmac.c b/src/uadk_prov_hmac.c index ad1aa2e..3f7de9e 100644 --- a/src/uadk_prov_hmac.c +++ b/src/uadk_prov_hmac.c @@ -437,7 +437,7 @@ static int uadk_prov_hmac_dev_init(struct hmac_priv_ctx *priv) if (hprov.pid == getpid()) goto free_nodemask; - ret = wd_digest_init2_((char *)alg_name, TASK_MIX, SCHED_POLICY_RR, &cparams); + ret = wd_digest_init2_((char *)alg_name, SCHED_POLICY_RR, TASK_MIX, &cparams); if (unlikely(ret && ret != -WD_EEXIST)) { UADK_ERR("uadk failed to initialize hmac, ret = %d\n", ret); goto free_nodemask; -- 2.53.0.windows.2