mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-19 20:13:49 -04:00
QAT GEN4 devices support chained compression operations. These
allow, with a single request to firmware, to hash then compress
data.
Extend the configuration to enable such mode. The cfg_services
operations in sysfs are extended to allow the string "dcc". When
selected, the driver downloads to the device both the symmetric
crypto and the compression firmware images and sends an admin message
to firmware which enables `chained` operations.
In addition, it sets the device's capabilities as the combination
of compression and symmetric crypto capabilities, while excluding
the ICP_ACCEL_CAPABILITIES_CRYPTO_SYMMETRIC bit to indicate
that in this mode, symmetric crypto instances are not supported.
When "dcc" is enabled, the device will handle compression requests
as if the "dc" configuration is loaded ("dcc" is a variation of "dc")
and the driver will register the acomp algorithms.
As for the other extended configurations, "dcc" is only available for
qat_4xxx devices and the chaining service will be only accessible from
user space.
Signed-off-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
54 lines
2.0 KiB
C
54 lines
2.0 KiB
C
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */
|
|
/* Copyright(c) 2014 - 2020 Intel Corporation */
|
|
#ifndef ADF_CFG_STRINGS_H_
|
|
#define ADF_CFG_STRINGS_H_
|
|
|
|
#define ADF_GENERAL_SEC "GENERAL"
|
|
#define ADF_KERNEL_SEC "KERNEL"
|
|
#define ADF_ACCEL_SEC "Accelerator"
|
|
#define ADF_NUM_CY "NumberCyInstances"
|
|
#define ADF_NUM_DC "NumberDcInstances"
|
|
#define ADF_RING_SYM_SIZE "NumConcurrentSymRequests"
|
|
#define ADF_RING_ASYM_SIZE "NumConcurrentAsymRequests"
|
|
#define ADF_RING_DC_SIZE "NumConcurrentRequests"
|
|
#define ADF_RING_ASYM_TX "RingAsymTx"
|
|
#define ADF_RING_SYM_TX "RingSymTx"
|
|
#define ADF_RING_ASYM_RX "RingAsymRx"
|
|
#define ADF_RING_SYM_RX "RingSymRx"
|
|
#define ADF_RING_DC_TX "RingTx"
|
|
#define ADF_RING_DC_RX "RingRx"
|
|
#define ADF_ETRMGR_BANK "Bank"
|
|
#define ADF_RING_SYM_BANK_NUM "BankSymNumber"
|
|
#define ADF_RING_ASYM_BANK_NUM "BankAsymNumber"
|
|
#define ADF_RING_DC_BANK_NUM "BankDcNumber"
|
|
#define ADF_CY "Cy"
|
|
#define ADF_DC "Dc"
|
|
#define ADF_CFG_DC "dc"
|
|
#define ADF_CFG_CY "sym;asym"
|
|
#define ADF_CFG_SYM "sym"
|
|
#define ADF_CFG_ASYM "asym"
|
|
#define ADF_CFG_ASYM_SYM "asym;sym"
|
|
#define ADF_CFG_ASYM_DC "asym;dc"
|
|
#define ADF_CFG_DC_ASYM "dc;asym"
|
|
#define ADF_CFG_SYM_DC "sym;dc"
|
|
#define ADF_CFG_DC_SYM "dc;sym"
|
|
#define ADF_CFG_DCC "dcc"
|
|
#define ADF_SERVICES_ENABLED "ServicesEnabled"
|
|
#define ADF_PM_IDLE_SUPPORT "PmIdleSupport"
|
|
#define ADF_ETRMGR_COALESCING_ENABLED "InterruptCoalescingEnabled"
|
|
#define ADF_ETRMGR_COALESCING_ENABLED_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCING_ENABLED
|
|
#define ADF_ETRMGR_COALESCE_TIMER "InterruptCoalescingTimerNs"
|
|
#define ADF_ETRMGR_COALESCE_TIMER_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCE_TIMER
|
|
#define ADF_ETRMGR_COALESCING_MSG_ENABLED "InterruptCoalescingNumResponses"
|
|
#define ADF_ETRMGR_COALESCING_MSG_ENABLED_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_COALESCING_MSG_ENABLED
|
|
#define ADF_ETRMGR_CORE_AFFINITY "CoreAffinity"
|
|
#define ADF_ETRMGR_CORE_AFFINITY_FORMAT \
|
|
ADF_ETRMGR_BANK "%d" ADF_ETRMGR_CORE_AFFINITY
|
|
#define ADF_ACCEL_STR "Accelerator%d"
|
|
#define ADF_HEARTBEAT_TIMER "HeartbeatTimer"
|
|
|
|
#endif
|