crypto: qat - add rp2svc sysfs attribute

Add the attribute `rp2svc` to the `qat` attribute group. This provides a
way for a user to query a specific ring pair for the type of service
that is currently configured for.

When read, the service will be returned for the defined ring pair.
When written to this value will be stored as the ring pair to return
the service of.

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>
This commit is contained in:
Ciunas Bennett
2023-10-20 15:49:30 +02:00
committed by Herbert Xu
parent db74e16258
commit dbc8876dd8
3 changed files with 104 additions and 0 deletions

View File

@@ -340,6 +340,11 @@ struct adf_pm {
char __user *buf, size_t count, loff_t *pos);
};
struct adf_sysfs {
int ring_num;
struct rw_semaphore lock; /* protects access to the fields in this struct */
};
struct adf_accel_dev {
struct adf_etr_data *transport;
struct adf_hw_device_data *hw_device;
@@ -361,6 +366,7 @@ struct adf_accel_dev {
struct adf_timer *timer;
struct adf_heartbeat *heartbeat;
struct adf_rl *rate_limiting;
struct adf_sysfs sysfs;
union {
struct {
/* protects VF2PF interrupts access */