Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/qat/qat_api/common/compression/include/dc_datapath.h
Show All 20 Lines | |||||
/* Restriction on the source buffer size for compression due to the firmware | /* Restriction on the source buffer size for compression due to the firmware | ||||
* processing */ | * processing */ | ||||
#define DC_SRC_BUFFER_MIN_SIZE (15) | #define DC_SRC_BUFFER_MIN_SIZE (15) | ||||
/* Restriction on the destination buffer size for compression due to | /* Restriction on the destination buffer size for compression due to | ||||
* the management of skid buffers in the firmware */ | * the management of skid buffers in the firmware */ | ||||
#define DC_DEST_BUFFER_DYN_MIN_SIZE (128) | #define DC_DEST_BUFFER_DYN_MIN_SIZE (128) | ||||
#define DC_DEST_BUFFER_STA_MIN_SIZE (64) | #define DC_DEST_BUFFER_STA_MIN_SIZE (64) | ||||
#define DC_DEST_BUFFER_DYN_MIN_SIZE_GEN4 (512) | |||||
#define DC_DEST_BUFFER_STA_MIN_SIZE_GEN4 (1024) | |||||
/* C62x and C3xxx pcie rev0 devices require an additional 32bytes */ | /* C62x and C3xxx pcie rev0 devices require an additional 32bytes */ | ||||
#define DC_DEST_BUFFER_STA_ADDITIONAL_SIZE (32) | #define DC_DEST_BUFFER_STA_ADDITIONAL_SIZE (32) | ||||
/* C4xxx device only requires 47 bytes */ | /* C4xxx device only requires 47 bytes */ | ||||
#define DC_DEST_BUFFER_MIN_SIZE (47) | #define DC_DEST_BUFFER_MIN_SIZE (47) | ||||
/* Minimum destination buffer size for decompression */ | /* Minimum destination buffer size for decompression */ | ||||
#define DC_DEST_BUFFER_DEC_MIN_SIZE (1) | #define DC_DEST_BUFFER_DEC_MIN_SIZE (1) | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
/* Mask used to check the CompressAndVerifyAndRecover capability bit */ | /* Mask used to check the CompressAndVerifyAndRecover capability bit */ | ||||
#define DC_CNVNR_EXTENDED_CAPABILITY (0x100) | #define DC_CNVNR_EXTENDED_CAPABILITY (0x100) | ||||
/* Default values for CNV integrity checks, | /* Default values for CNV integrity checks, | ||||
* those are used to inform hardware of specifying CRC parameters to be used | * those are used to inform hardware of specifying CRC parameters to be used | ||||
* when calculating CRCs */ | * when calculating CRCs */ | ||||
#define DC_CRC_POLY_DEFAULT 0x04c11db7 | #define DC_CRC_POLY_DEFAULT 0x04c11db7 | ||||
#define DC_CRC64_POLY_DEFAULT 0x42f0e1eba9ea3693ULL | |||||
#define DC_XOR_FLAGS_DEFAULT 0xe0000 | #define DC_XOR_FLAGS_DEFAULT 0xe0000 | ||||
#define DC_XOR_OUT_DEFAULT 0xffffffff | #define DC_XOR_OUT_DEFAULT 0xffffffff | ||||
#define DC_XOR64_OUT_DEFAULT 0x0ULL | |||||
#define DC_INVALID_CRC 0x0 | #define DC_INVALID_CRC 0x0 | ||||
/** | /** | ||||
******************************************************************************* | ******************************************************************************* | ||||
* @ingroup cpaDc Data Compression | * @ingroup cpaDc Data Compression | ||||
* Compression cookie | * Compression cookie | ||||
* @description | * @description | ||||
* This cookie stores information for a particular compression perform op. | * This cookie stores information for a particular compression perform op. | ||||
Show All 36 Lines | typedef struct dc_compression_cookie_s { | ||||
/**< Total length of the destination data */ | /**< Total length of the destination data */ | ||||
dc_request_dir_t compDecomp; | dc_request_dir_t compDecomp; | ||||
/**< Used to know whether the request is compression or decompression. | /**< Used to know whether the request is compression or decompression. | ||||
* Useful when defining the session as combined */ | * Useful when defining the session as combined */ | ||||
CpaBufferList *pUserSrcBuff; | CpaBufferList *pUserSrcBuff; | ||||
/**< virtual userspace ptr to source SGL */ | /**< virtual userspace ptr to source SGL */ | ||||
CpaBufferList *pUserDestBuff; | CpaBufferList *pUserDestBuff; | ||||
/**< virtual userspace ptr to destination SGL */ | /**< virtual userspace ptr to destination SGL */ | ||||
CpaDcCallbackFn pCbFunc; | |||||
/**< Callback function defined for the traditional sessionless API */ | |||||
CpaDcChecksum checksumType; | |||||
/**< Type of checksum */ | |||||
dc_integrity_crc_fw_t dataIntegrityCrcs; | |||||
/**< Data integrity table */ | |||||
} dc_compression_cookie_t; | } dc_compression_cookie_t; | ||||
/** | /** | ||||
***************************************************************************** | ***************************************************************************** | ||||
* @ingroup Dc_DataCompression | * @ingroup Dc_DataCompression | ||||
* Callback function called for compression and decompression requests in | * Callback function called for compression and decompression requests in | ||||
* asynchronous mode | * asynchronous mode | ||||
* | * | ||||
* @description | * @description | ||||
* Called to process compression and decompression response messages. This | * Called to process compression and decompression response messages. This | ||||
* callback will check for errors, update the statistics and will call the | * callback will check for errors, update the statistics and will call the | ||||
* user callback | * user callback | ||||
* | * | ||||
* @param[in] pRespMsg Response message | * @param[in] pRespMsg Response message | ||||
* | * | ||||
*****************************************************************************/ | *****************************************************************************/ | ||||
void dcCompression_ProcessCallback(void *pRespMsg); | void dcCompression_ProcessCallback(void *pRespMsg); | ||||
CpaStatus dcCheckOpData(sal_compression_service_t *pService, | |||||
CpaDcOpData *pOpData); | |||||
/** | /** | ||||
***************************************************************************** | ***************************************************************************** | ||||
* @ingroup Dc_DataCompression | * @ingroup Dc_DataCompression | ||||
* Describes CNV and CNVNR modes | * Describes CNV and CNVNR modes | ||||
* | * | ||||
* @description | * @description | ||||
* This enum is used to indicate the CNV modes. | * This enum is used to indicate the CNV modes. | ||||
Show All 12 Lines |