Sometimes decompressing QAT may fail, the return value of QAT cpaDcCompressData will be 11, which corresponds to a CPA_DC_OVERFLOW error type.
An overflow state is not really an error but an exception that can be handled. It usually requires a resubmission with a larger output buffer. The usual process to follow after an overflow detection is:
The compression overflow exception happens for two reasons:
To minimize the impact of resubmitting data after an overflow exception, the API cpaDcDeflateCompressBound() can be used. This API will provide to the application a recommended destination buffer size to avoid the exception. This API must be called by the application before allocating the destination buffer.
Refer to the Intel® QAT Programmer's Guide of your respective Intel® QAT Hardware Version for more details about handling data compression overflow exceptions.