Commit 25407e00 authored by Yizhen Fan's avatar Yizhen Fan Committed by fanyizhen1995
Browse files

ub: ubcore add register/unregister seg api.



driver inclusion
category: feature
bugzilla: NA
CVE: NA

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

Ubcore add register/unregister seg api, which will finally call hw driver's
registered method register/unregister seg.

register_seg:
The UB Core invokes the UBN driver to register the segment and key.
Input parameter:
dev: UB device that registers the segment.
cfg: basic information about the segment to be registered.
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.
Output parameter:
None.
Return value:
If the registration is successful, the segment structure pointer is
returned. The returned information includes the segment key ID.
The registration fails and NULL is returned.

unregister_seg:
The UB Core invokes the UBN driver to deregister the segment and ukey.
Input parameter:
tseg: pointer to the target segment to be deregistered
Return value:
The value 0 indicates that the deregistration is successful,
and other values indicate that the deregistration fails.

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