From patchwork Fri Dec 14 11:19:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Jozwiak X-Patchwork-Id: 48843 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6440B1B96B; Fri, 14 Dec 2018 12:23:36 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 7E9151B92D; Fri, 14 Dec 2018 12:23:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2018 03:23:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,352,1539673200"; d="scan'208";a="129926214" Received: from tjozwiax-mobl.ger.corp.intel.com (HELO tojo-Virtual-Machine.mshome.net) ([10.103.104.47]) by fmsmga001.fm.intel.com with ESMTP; 14 Dec 2018 03:23:32 -0800 From: Tomasz Jozwiak To: dev@dpdk.org, fiona.trahe@intel.com, tomaszx.jozwiak@intel.com, akhil.goyal@nxp.com, stable@dpdk.org Date: Fri, 14 Dec 2018 12:19:31 +0100 Message-Id: <1544786371-29799-2-git-send-email-tomaszx.jozwiak@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544786371-29799-1-git-send-email-tomaszx.jozwiak@intel.com> References: <1544786371-29799-1-git-send-email-tomaszx.jozwiak@intel.com> Subject: [dpdk-dev] [PATCH] compress/qat: fix status return on error building request X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Fiona Trahe --- drivers/compress/qat/qat_comp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c index 2754742..8a6fad0 100644 --- a/drivers/compress/qat/qat_comp.c +++ b/drivers/compress/qat/qat_comp.c @@ -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; }