Skip to content

crypto: hisilicon - add fallback function for hisilicon accelerater driver

Chenghai Huang linux-crypto lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest11 patches 1 replyIn review
  2. v311 patches 2 repliesSuperseded
  3. v23 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11crypto: hisilicon/zip - adjust the way to obtain the req in the callback functiondrivers/crypto/hisilicon/zip/zip_crypto.c+9 -150 replies
2/11crypto: hisilicon/sec - move backlog management to qp and store sqe in qp for callbackdrivers/crypto/hisilicon/qm.c drivers/crypto/hisilicon/sec2/sec.h drivers/crypto/hisilicon/sec2/sec_crypto.c +1 more+69 -540 replies
3/11crypto: hisilicon/hpre: extend tag field to 64 bits for better performancedrivers/crypto/hisilicon/hpre/hpre.h drivers/crypto/hisilicon/hpre/hpre_crypto.c+25 -1220 replies
4/11crypto: hisilicon/qm - enhance the configuration of req_type in queue attributesdrivers/crypto/hisilicon/hpre/hpre_main.c drivers/crypto/hisilicon/qm.c drivers/crypto/hisilicon/sec2/sec_crypto.c +5 more+34 -200 replies
5/11crypto: hisilicon/qm - centralize the sending locks of each module into qmdrivers/crypto/hisilicon/hpre/hpre_crypto.c drivers/crypto/hisilicon/qm.c drivers/crypto/hisilicon/zip/zip_crypto.c +1 more+13 -110 replies
6/11crypto: hisilicon - consolidate qp creation and start in hisi_qm_alloc_qps_nodedrivers/crypto/hisilicon/hpre/hpre_crypto.c drivers/crypto/hisilicon/qm.c drivers/crypto/hisilicon/sec2/sec_crypto.c +2 more+66 -960 replies
7/11crypto: hisilicon/qm - add reference counting to queues for tfm kernel reusedrivers/crypto/hisilicon/qm.c include/linux/hisi_acc_qm.h+52 -140 replies
8/11crypto: hisilicon/qm - optimize device selection priority based on queue ref count and NUMA distancedrivers/crypto/hisilicon/qm.c+25 -100 replies
9/11crypto: hisilicon/zip - support fallback for zipdrivers/crypto/hisilicon/Kconfig drivers/crypto/hisilicon/zip/zip_crypto.c+43 -80 replies
10/11crypto: hisilicon/hpre - support the hpre algorithm fallbackdrivers/crypto/hisilicon/hpre/hpre_crypto.c+199 -390 replies
11/11crypto: hisilicon/sec2 - support skcipher/aead fallback for hardware queue unavailabledrivers/crypto/hisilicon/sec2/sec_crypto.c+47 -150 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by.

PatchLongfang Liu
1/11
2/11
3/11
4/11
5/11
6/11
7/11R-b
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/11] crypto: hisilicon - add fallback function for hisilicon accelerater driver

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/[email protected]/
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/[email protected]/
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/[email protected]/
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(-)
Signature · 1 line
2.33.0