mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 00/11] crypto: hisilicon - add fallback function for hisilicon accelerater driver
@ 2025-12-18 13:44 Chenghai Huang
  2025-12-18 13:44 ` [PATCH v4 01/11] crypto: hisilicon/zip - adjust the way to obtain the req in the callback function Chenghai Huang
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Chenghai Huang @ 2025-12-18 13:44 UTC (permalink / raw)
  To: herbert, davem
  Cc: linux-kernel, linux-crypto, fanghao11, liulongfang, qianweili,
	linwenkai6, wangzhou1, lizhi206, taoqi10

1.Supports multiple tfms sharing the same device queue to avoid tfm
creation failure.
2.Support fallback for zip/sec2/hpre when queue allocation fails or
when processing unsupported specifications.

When pf_q_num is less than the number of tfms, queues will be
obtained from devices with fewer references and closer NUMA
distances(priority: ref counts -> NUMA distances).

We can test by zswap:
modprobe hisi_zip uacce_mode=1 pf_q_num=2
cat /sys/class/uacce/hisi_zip-?/available_instances
echo hisi-deflate-acomp > /sys/module/zswap/parameters/compressor

---
V3: https://lore.kernel.org/all/20251122074916.2793717-1-huangchenghai2@huawei.com/
Updates:
- In patch 7, fix the issue of skipping qp enablement due to incorrect
  reference count judgment.
- In patch 6, Supplement the device power wake-up operation before
  applying for the qp.

V2: https://lore.kernel.org/all/20250818065714.1916898-1-huangchenghai2@huawei.com/
Updates:
- According to crypto framework, support shared queues to address
  the hardware resource limitation on tfm.
- Remove the fallback modification for x25519.

V1: https://lore.kernel.org/all/20250809070829.47204-1-huangchenghai2@huawei.com/
Updates:
- Remove unnecessary callback completions.
- Add CRYPTO_ALG_NEED_FALLBACK to hisi_zip's cra_flags.

---
Chenghai Huang (8):
  crypto: hisilicon/zip - adjust the way to obtain the req in the
    callback function
  crypto: hisilicon/sec - move backlog management to qp and store sqe in
    qp for callback
  crypto: hisilicon/qm - enhance the configuration of req_type in queue
    attributes
  crypto: hisilicon/qm - centralize the sending locks of each module
    into qm
  crypto: hisilicon - consolidate qp creation and start in
    hisi_qm_alloc_qps_node
  crypto: hisilicon/qm - add reference counting to queues for tfm kernel
    reuse
  crypto: hisilicon/qm - optimize device selection priority based on
    queue ref count and NUMA distance
  crypto: hisilicon/zip - support fallback for zip

Qi Tao (1):
  crypto: hisilicon/sec2 - support skcipher/aead fallback for hardware
    queue unavailable

Weili Qian (1):
  crypto: hisilicon/hpre - support the hpre algorithm fallback

lizhi (1):
  crypto: hisilicon/hpre: extend tag field to 64 bits for better
    performance

 drivers/crypto/hisilicon/Kconfig            |   1 +
 drivers/crypto/hisilicon/hpre/hpre.h        |   5 +-
 drivers/crypto/hisilicon/hpre/hpre_crypto.c | 416 +++++++++++---------
 drivers/crypto/hisilicon/hpre/hpre_main.c   |   2 +-
 drivers/crypto/hisilicon/qm.c               | 206 +++++++---
 drivers/crypto/hisilicon/sec2/sec.h         |   7 -
 drivers/crypto/hisilicon/sec2/sec_crypto.c  | 159 ++++----
 drivers/crypto/hisilicon/sec2/sec_main.c    |  21 +-
 drivers/crypto/hisilicon/zip/zip.h          |   2 +-
 drivers/crypto/hisilicon/zip/zip_crypto.c   | 133 ++++---
 drivers/crypto/hisilicon/zip/zip_main.c     |   4 +-
 include/linux/hisi_acc_qm.h                 |  14 +-
 12 files changed, 574 insertions(+), 396 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-16  6:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-18 13:44 [PATCH v4 00/11] crypto: hisilicon - add fallback function for hisilicon accelerater driver Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 01/11] crypto: hisilicon/zip - adjust the way to obtain the req in the callback function Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 02/11] crypto: hisilicon/sec - move backlog management to qp and store sqe in qp for callback Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 03/11] crypto: hisilicon/hpre: extend tag field to 64 bits for better performance Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 04/11] crypto: hisilicon/qm - enhance the configuration of req_type in queue attributes Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 05/11] crypto: hisilicon/qm - centralize the sending locks of each module into qm Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 06/11] crypto: hisilicon - consolidate qp creation and start in hisi_qm_alloc_qps_node Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 07/11] crypto: hisilicon/qm - add reference counting to queues for tfm kernel reuse Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 08/11] crypto: hisilicon/qm - optimize device selection priority based on queue ref count and NUMA distance Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 09/11] crypto: hisilicon/zip - support fallback for zip Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 10/11] crypto: hisilicon/hpre - support the hpre algorithm fallback Chenghai Huang
2025-12-18 13:44 ` [PATCH v4 11/11] crypto: hisilicon/sec2 - support skcipher/aead fallback for hardware queue unavailable Chenghai Huang
2026-01-16  6:05 ` [PATCH v4 00/11] crypto: hisilicon - add fallback function for hisilicon accelerater driver Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®