-
Notifications
You must be signed in to change notification settings - Fork 38
uadk: add some bugfix #652
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
Merged
Merged
Conversation
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
In Warpdrive sync mode, the driver writes a tag in the SQE to mark the owner and checks this tag when a request is completed. To ensure it functions properly, we added a lock to protect the receiving process. However, pthread_spin_lock is a CAS lock, which results in a situation where a thread can repeatedly acquire the lock while the completed request does not belong to it until timeout. Therefore, we introduce a fair lock to replace pthread_spin_lock. This way, every thread can acquire the lock in a round-robin manner. Signed-off-by: Yang Shen <shenyang39@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com>
When the weak parameter of __atomic_compare_exchange_n is set to true, the session state may fails to be set, so we used the strong variation here, also, we set the success_memmodel parameter to acquire to enhance stability. On the other hand, we need to check the session state after the exchange and return an error directly if it is not required by the input or output task. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Qi Tao <taoqi10@huawei.com>
1. Switch missing default case [-Wswitch-default]; 2. Initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]; 3. The format specifier does not match the actual argument type [-Wformat=]. Signed-off-by: Qi Tao <taoqi10@huawei.com>
When testing the async encryption performance of the AEAD algorithm, the same bd_pool may not be processed completely and is sent as a new request in the next loop. As a result, incorrect encrypted data is stored in the dst. When the incorrect encrypted data is stored for decryption, a decryption error occurs. This problem can be solved by restricting the sending times of the first bd_pool only once and saving the dst data in the first bd_pool to a file for decryption. Signed-off-by: Qi Tao <taoqi10@huawei.com>
The key data sent by the user may be non-byte aligned and the low-order byte is 0x00. Use original 'dsize' will make the key data be truncated after being transformed. Therefore, 'dsize' should be changned after the key format is transformed. Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com>
The key data sent by the user may be non-byte aligned and the low-order byte is 0x00. Use original 'dsize' will make the key data be truncated after being transformed. Therefore, 'dsize' should be changned after the key format is transformed. Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com>
Remove redundant variable definition of key format transform function. Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com> Signed-off-by: Qi Tao <taoqi10@huawei.com>
|
lgtm |
Liulongfang
approved these changes
Dec 30, 2024
Collaborator
Liulongfang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
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.
Qi Tao (2):
uadk: add compilation options
uadk_tool: fix error in saving the aead dst data
Wenkai Lin (1):
uadk: fix for set hashagg session state
Yang Shen (1):
uadk/v1 - add fair lock to replace CAS
Zhiqi Song (3):
uadk/hpre: modify privkey transform method of ecc
v1/hpre: modify privkey transform method of ecc
uadk/v1: cleanup key format transform function