Commit 7e21c7d3 authored by Yizhen Fan's avatar Yizhen Fan Committed by fanyizhen1995
Browse files

ub: ubcore add alloc and free key id api.



driver inclusion
category: feature
bugzilla: NA
CVE: NA

--------------------------------

Ubcore add alloc and free key id api, which will finally call hw driver's
registered method to alloc/free key id.

alloc_key_id:
The UB Core invokes the UBN driver to allocate the key ID.
Input parameter:
dev: specifies the key ID allocated to the UB device.
udata: contains the pointer of the URMA context and the address of the
private data exchanged between the UBN user-mode driver and kernel-mode
driver.
Return value:
If the value is not NULL, the key ID is successfully allocated.
If the value is NULL, the key ID fails to be allocated.

free_key_id:
The UB Core invokes the UBN driver to release the key ID.
Input parameter:
key_id: ID of the key to be released specified by the
ubcore protocol stack.
Return value:
The value 0 indicates that the key ID is successfully released.
The value other than 0 indicates that the key ID fails to be released.

Signed-off-by: default avatarGuoxin Qian <qianguoxin@huawei.com>
Signed-off-by: default avatarYizhen Fan <fanyizhen@huawei.com>
parent 7139bde3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment