crypto: qat - add rate limiting sysfs interface
Add an interface for the rate limiting feature which allows to add, remove and modify a QAT SLA (Service Level Agreement). This adds a new sysfs attribute group, `qat_rl`, which can be accessed from /sys/bus/pci/devices/<BUS:DEV:FUNCTION> with the following hierarchy: |-+ qat_rl |---- id (RW) # SLA identifier |---- cir (RW) # Committed Information Rate |---- pir (RW) # Peak Information Rate |---- srv (RW) # Service to be rate limited |---- rp (RW) (HEX) # Ring pairs to be rate limited |---- cap_rem (RW) # Remaining capability for a service |---- sla_op (WO) # Allows to perform an operation on an SLA The API works by setting the appropriate RW attributes and then issuing a command through the `sla_op`. For example, to create an SLA, a user needs to input the necessary data into the attributes cir, pir, srv and rp and then write into `sla_op` the command `add` to execute the operation. The API also provides `cap_rem` attribute to get information about the remaining device capability within a certain service which is required when setting an SLA. Signed-off-by:Ciunas Bennett <ciunas.bennett@intel.com> Reviewed-by:
Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by:
Damian Muszynski <damian.muszynski@intel.com> Reviewed-by:
Tero Kristo <tero.kristo@linux.intel.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
Showing
- Documentation/ABI/testing/sysfs-driver-qat_rl 226 additions, 0 deletionsDocumentation/ABI/testing/sysfs-driver-qat_rl
- drivers/crypto/intel/qat/qat_common/Makefile 1 addition, 0 deletionsdrivers/crypto/intel/qat/qat_common/Makefile
- drivers/crypto/intel/qat/qat_common/adf_rl.c 10 additions, 0 deletionsdrivers/crypto/intel/qat/qat_common/adf_rl.c
- drivers/crypto/intel/qat/qat_common/adf_rl.h 7 additions, 0 deletionsdrivers/crypto/intel/qat/qat_common/adf_rl.h
- drivers/crypto/intel/qat/qat_common/adf_sysfs_rl.c 451 additions, 0 deletionsdrivers/crypto/intel/qat/qat_common/adf_sysfs_rl.c
- drivers/crypto/intel/qat/qat_common/adf_sysfs_rl.h 11 additions, 0 deletionsdrivers/crypto/intel/qat/qat_common/adf_sysfs_rl.h
Please register or sign in to comment