adapt uadk to new registration framework - #770
Open
IAMHCHCH wants to merge 17 commits into
Open
Conversation
Conduct a comprehensive update of the scheduler's internal triple-array-based pooling scheme. Adopt new data organization methods such as hash buckets and segment linked lists to achieve efficient insertion and query operations. Implement pre-fetch queue processing for business thread sessions, creating thread-level sub-queue pools for fast packet reception queries. Provide new scheduling algorithms for the new UADK framework. Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
In the new UADK framework, update the dynamic registration management for user-space driver algorithm-driver pairs. After decoupling the framework and driver layers, ensure service scheduling, resource initialization, and the integrity of packet send/receive functionality, while maintaining the normal operation of existing features. Signed-off-by: Longfang Liu <liulongfang@huawei.com>
In the updated UADK framework, the management functions for hardware queue allocation and release have been decoupled from the framework layer to the user-space driver layer. However, for existing uacce hardware queues and pure software computation queues, we have created a set of common allocation and release interfaces, thereby reducing redundancy in the driver layer code and improving the reusability of the framework code. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
This represents the core modification of the new framework. It implements unified abstract processing for all device queues across the entire UADK, and unifies the channel for service requests from UADK to user devices into queues. These queues simultaneously support hardware device queues, software computation queues, and instruction queues, thereby achieving unified queue management. Additionally, the binding relationship between the algorithm layer and the driver has been decoupled, allowing a single algorithm layer to map and utilize multiple types of devices simultaneously for algorithm acceleration, thus enabling heterogeneous fusion accelerated computing. Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: lizhi <lizhi206@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
This modification primarily aims to enable the UADK Cipher algorithm to support the new heterogeneous scheduling framework, while the corresponding user-space driver must also be adapted accordingly. Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
This modification enables the UADK AEAD algorithm to support the new heterogeneous scheduling framework by adapting the corresponding user-space driver to the new wd_alg_driver registration framework. Specifically, wd_aead.c is updated to replace the old binding model with wd_get_drv_array/wd_ctx_bind_drivers, and the wd_aead_sess priv field is changed from void* to void** to accommodate per-context private data. Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
In the updated UADK framework, for asymmetric encryption algorithms such as RSA, DH, and ECC, the API layer needs to be adapted to the new UADK heterogeneous hybrid acceleration framework to ensure these algorithms can achieve heterogeneous hybrid acceleration. Signed-off-by: lizhi <lizhi206@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
For compression algorithms in the updated UADK framework, the API layer needs to be adapted to the new UADK heterogeneous hybrid acceleration framework, thereby ensuring that both compression and decompression algorithms can achieve heterogeneous hybrid acceleration. Signed-off-by: Zongyu Wu <wuzongyu1@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
For the newly added UDMA algorithm type, the API layer needs to be adapted to the new UADK heterogeneous hybrid acceleration framework, thereby ensuring that the data movement functionality can achieve hybrid acceleration combining hardware acceleration and instruction acceleration capabilities. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
For big data acceleration algorithms, the API layer needs to be adapted to the new UADK heterogeneous hybrid acceleration framework, thereby ensuring that big data acceleration functionality can be adapted to and support the new hybrid acceleration framework. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
For data digest algorithms, the API layer needs to be adapted to the new UADK heterogeneous hybrid acceleration framework, thereby ensuring that hash algorithms and authentication algorithm acceleration functions can adapt to and support the new hybrid acceleration framework, while supporting the fusion of hardware acceleration, instruction acceleration, and vector acceleration capabilities. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
Convert GB2312 A3AC bytes to the UTF-8 mojibake form (C2 A3 C2 AC) so that subsequent patches in this series apply cleanly. The bytes render as the '£¬' mojibake — they will be corrected to ',' by the next patch. Signed-off-by: iamhchchch <510725557@qq.com>
With the UADK framework updated to support heterogeneous hybrid acceleration functionality, the corresponding uadk_tool test framework also needs to be adapted and updated. It must simultaneously support both the legacy init interface and the new init2 interface, match new scheduling algorithm types, and add new DAE test functionality. Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com> Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: lizhi <lizhi206@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
The ZIP hardware design is compatible with the old BD, eliminating the need for uadk adaptation. Therefore, the special processing for v5 has been removed. In stateful decompression, the hardware reports its context state in ctx_core_status (the low 9 bits of dw30/isize). When ctx_core_status is non-zero while neither input is consumed nor output produced, the hardware needs the request to be resent. Return WD_EAGAIN to the user so that the request can be retried. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Strengthen the initialization logic in wd_alg_init2_ by adding WD_INIT2_MAX_RETRY (32) retry limit across all 10 algorithm modules (aead, agg, cipher, comp, dh, digest, ecc, join_gather, rsa, udma) to prevent infinite retry loops when no device is available. Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Add --enable-debug configure option in configure.ac and Makefile.am. When enabled, build with -g -O0 -fno-omit-frame-pointer -DDEBUG to preserve symbols and disable optimization for full stack traces during debugging. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
Drop redundant priv sentinel field from all algorithm modules (aead, cipher, comp, dh, digest, ecc, rsa) and replace with wd_alg_get_init() status guard. Clear comp drv_count on uninit to prevent use-after-free. Fix build errors Signed-off-by: Weili Qian <qianweili@huawei.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.