Skip to content

Conversation

@lin755
Copy link
Collaborator

@lin755 lin755 commented Dec 30, 2024

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

Yang Shen and others added 7 commits December 30, 2024 10:17
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>
@CaptainMiaow
Copy link

lgtm

Copy link
Collaborator

@Liulongfang Liulongfang left a 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

@Liulongfang Liulongfang merged commit 7770226 into Linaro:master Dec 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants