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

uadk_cipher: hardware platform checking shouldn't exist in UADK-Engine layer #126

Open
docularxu opened this issue Mar 30, 2022 · 0 comments

Comments

@docularxu
Copy link
Collaborator

Currently, in uadk_cipher.c, there is a checking about the underlining hardware platform (Kunpeng920 or Kunpeng930). From a software design view point, such hardware platform checking should be done in lower layers, such as UADK layer. And in UADK Engine, only the available cipher methods are registered.

Refer to uadk_cipher.c

cipher_920_nids[]
cipher_930_nids[]


static int uadk_get_accel_platform(char *alg_name)
{
	struct uacce_dev *dev;

	dev = wd_get_accel_dev("cipher");
	if (dev == NULL)
		return 0;

	if (!strcmp(dev->api, "hisi_qm_v2"))
		platform = KUNPENG920;
	else
		platform = KUNPENG930;
	free(dev);

	return 1;
}
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

No branches or pull requests

1 participant