Skip to content

crypto: qat - enable configuration for 4xxx

Giovanni Cabiddu linux-crypto 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Updated target kernel version in documentation (from 5.19 to 5.20).
- Fixed commit message in patch #1 and updated documentation in patch #4 after review from Vladis Dronov.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: qat - expose device state through sysfs for 4xxxDocumentation/ABI/testing/sysfs-driver-qat drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.h +5 more+151 -10 replies
2/4crypto: qat - change behaviour of adf_cfg_add_key_value_param()drivers/crypto/qat/qat_common/adf_cfg.c+40 -10 replies
3/4crypto: qat - relocate and rename adf_sriov_prepare_restart()drivers/crypto/qat/qat_common/adf_common_drv.h drivers/crypto/qat/qat_common/adf_init.c drivers/crypto/qat/qat_common/adf_sriov.c+28 -270 replies
4/4crypto: qat - expose device config through sysfs for 4xxxDocumentation/ABI/testing/sysfs-driver-qat drivers/crypto/qat/qat_common/adf_sysfs.c+116 -40 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAdam GuerinFiona TraheWojciech ZiembaVladis Dronov
SeriesR-b
1/4R-b R-b R-b R-b
2/4R-b R-b R-b R-b
3/4R-b R-b R-b R-b
4/4R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] crypto: qat - enable configuration for 4xxx

qat_4xxx devices can be configured to allow either crypto or compression operations. By default, devices are configured statically according to following rule:
- odd numbered devices assigned to compression services
- even numbered devices assigned to crypto services

This set exposes two attributes in sysfs that allow to report and change the state and the configuration of a QAT 4xxx device.
The first, /sys/bus/pci/devices/<BDF>/qat/state, allows to bring a device down in order to change the configuration, and bring it up again. The second, /sys/bus/pci/devices/<BDF>/qat/cfg_services, allows to inspect the current configuration of a device (i.e. crypto or compression) and change it.

    # cat /sys/bus/pci/devices/<BDF>/qat/state
    up
    # cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
    sym;asym
    # echo down > /sys/bus/pci/devices/<BDF>/qat/state
    # echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
    # echo up > /sys/bus/pci/devices/<BDF>/qat/state
    # cat /sys/bus/pci/devices/<BDF>/qat/state
    dc

Changes from v1:
- Updated target kernel version in documentation (from 5.19 to 5.20).
- Fixed commit message in patch #1 and updated documentation in patch #4 after review from Vladis Dronov.

Giovanni Cabiddu (4):
crypto: qat - expose device state through sysfs for 4xxx
crypto: qat - change behaviour of adf_cfg_add_key_value_param()
crypto: qat - relocate and rename adf_sriov_prepare_restart()
crypto: qat - expose device config through sysfs for 4xxx

 Documentation/ABI/testing/sysfs-driver-qat    |  61 ++++++
 .../crypto/qat/qat_4xxx/adf_4xxx_hw_data.c    |   1 +
 .../crypto/qat/qat_4xxx/adf_4xxx_hw_data.h    |   1 +
 drivers/crypto/qat/qat_4xxx/adf_drv.c         |   6 +-
 drivers/crypto/qat/qat_common/Makefile        |   1 +
 .../crypto/qat/qat_common/adf_accel_devices.h |   1 +
 drivers/crypto/qat/qat_common/adf_cfg.c       |  41 +++-
 .../crypto/qat/qat_common/adf_common_drv.h    |   3 +
 drivers/crypto/qat/qat_common/adf_init.c      |  26 +++
 drivers/crypto/qat/qat_common/adf_sriov.c     |  28 +--
 drivers/crypto/qat/qat_common/adf_sysfs.c     | 191 ++++++++++++++++++
 11 files changed, 331 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-qat
 create mode 100644 drivers/crypto/qat/qat_common/adf_sysfs.c
Signature · 1 line
2.36.1