Skip to content

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

@docularxu

Description

@docularxu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions