mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: hisilicon/qm - add reference counting to queues for tfm kernel reuse
Add reference counting to queues. When all queues are occupied, tfm will reuse queues with the same algorithm type that have already been allocated in the kernel. The corresponding queue will be released when the reference count reaches 1. Reviewed-by: Longfang Liu <liulongfang@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
72f3bbebff
commit
4705489742
@@ -475,6 +475,7 @@ struct hisi_qp {
|
||||
u16 pasid;
|
||||
struct uacce_queue *uacce_q;
|
||||
|
||||
u32 ref_count;
|
||||
spinlock_t qp_lock;
|
||||
struct instance_backlog backlog;
|
||||
const void **msg;
|
||||
|
||||
Reference in New Issue
Block a user