compress/qat: fix status return on error building request
Checks
Commit Message
This patch fixes error status which should be set inside
qat_comp_build_request function in case any errors are detected.
In these cases op.status is set to
RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug.
Fixes: 1947bd18580b ("compress/qat: support scatter-gather buffers")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
drivers/compress/qat/qat_comp.c | 3 +++
1 file changed, 3 insertions(+)
Comments
> -----Original Message-----
> From: Jozwiak, TomaszX
> Sent: Friday, December 14, 2018 4:20 AM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>; akhil.goyal@nxp.com; stable@dpdk.org
> Subject: [PATCH] compress/qat: fix status return on error building request
>
> This patch fixes error status which should be set inside
> qat_comp_build_request function in case any errors are detected.
> In these cases op.status is set to
> RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug.
>
> Fixes: 1947bd18580b ("compress/qat: support scatter-gather buffers")
> Cc: stable@dpdk.org
>
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
On 12/15/2018 12:18 AM, Trahe, Fiona wrote:
>
>> -----Original Message-----
>> From: Jozwiak, TomaszX
>> Sent: Friday, December 14, 2018 4:20 AM
>> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
>> <tomaszx.jozwiak@intel.com>; akhil.goyal@nxp.com; stable@dpdk.org
>> Subject: [PATCH] compress/qat: fix status return on error building request
>>
>> This patch fixes error status which should be set inside
>> qat_comp_build_request function in case any errors are detected.
>> In these cases op.status is set to
>> RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug.
>>
>> Fixes: 1947bd18580b ("compress/qat: support scatter-gather buffers")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Applied to dpdk-next-crypto
Thanks
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Trahe, Fiona
> Sent: Friday, December 14, 2018 6:48 PM
> To: Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>; dev@dpdk.org;
> akhil.goyal@nxp.com; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] compress/qat: fix status return on error
> building request
>
>
>
> > -----Original Message-----
> > From: Jozwiak, TomaszX
> > Sent: Friday, December 14, 2018 4:20 AM
> > To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak,
> > TomaszX <tomaszx.jozwiak@intel.com>; akhil.goyal@nxp.com;
> > stable@dpdk.org
> > Subject: [PATCH] compress/qat: fix status return on error building
> > request
> >
> > This patch fixes error status which should be set inside
> > qat_comp_build_request function in case any errors are detected.
> > In these cases op.status is set to
> > RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug.
> >
> > Fixes: 1947bd18580b ("compress/qat: support scatter-gather buffers")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Applied to dpdk-next-crypto.
Thanks,
Pablo
@@ -36,6 +36,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
QAT_DP_LOG(ERR, "QAT PMD only supports stateless compression "
"operation requests, op (%p) is not a "
"stateless operation.", op);
+ op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return -EINVAL;
}
@@ -61,6 +62,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS);
if (ret) {
QAT_DP_LOG(ERR, "QAT PMD Cannot fill source sgl array");
+ op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return ret;
}
@@ -71,6 +73,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS);
if (ret) {
QAT_DP_LOG(ERR, "QAT PMD Cannot fill dest. sgl array");
+ op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
return ret;
}