X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcompress%2Fqat%2Fqat_comp.c;h=533e34f6bbfca02974142411aa2bb2f0d5a5c5d9;hb=c3e33304a7f6;hp=8717b7432f15eb074a9e91004afaa75eaefe7335;hpb=82822753bd7c8124dd001cd04d060d72f43fc82c;p=dpdk.git diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c index 8717b7432f..533e34f6bb 100644 --- a/drivers/compress/qat/qat_comp.c +++ b/drivers/compress/qat/qat_comp.c @@ -324,10 +324,32 @@ qat_comp_process_response(void **op, uint8_t *resp, void *op_cookie, (!cmp_err_code && xlat_err_code == ERR_CODE_OVERFLOW_ERROR) || (cmp_err_code == ERR_CODE_OVERFLOW_ERROR && - xlat_err_code == ERR_CODE_OVERFLOW_ERROR)) - rx_op->status = + xlat_err_code == ERR_CODE_OVERFLOW_ERROR)){ + + struct icp_qat_fw_resp_comp_pars *comp_resp = + (struct icp_qat_fw_resp_comp_pars *)&resp_msg->comp_resp_pars; + + /* handle recoverable out-of-buffer condition */ + /* in stateless compression scenario */ + if (comp_resp->input_byte_counter) { + if ((qat_xform->qat_comp_request_type + == QAT_COMP_REQUEST_FIXED_COMP_STATELESS) || + (qat_xform->qat_comp_request_type + == QAT_COMP_REQUEST_DYNAMIC_COMP_STATELESS)) { + + rx_op->status = + RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE; + rx_op->consumed = + comp_resp->input_byte_counter; + rx_op->produced = + comp_resp->output_byte_counter; + } else + rx_op->status = + RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED; + } else + rx_op->status = RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED; - else + } else rx_op->status = RTE_COMP_OP_STATUS_ERROR; ++(*dequeue_err_count);