From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 354E75F11 for ; Wed, 1 Aug 2018 10:10:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2018 01:10:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,431,1526367600"; d="scan'208";a="58801971" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga007.fm.intel.com with ESMTP; 01 Aug 2018 01:10:48 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX106.ger.corp.intel.com (163.33.3.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Aug 2018 09:10:47 +0100 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by irsmsx111.ger.corp.intel.com ([169.254.2.118]) with mapi id 14.03.0319.002; Wed, 1 Aug 2018 09:10:47 +0100 From: "De Lara Guarch, Pablo" To: "Daly, Lee" CC: "dev@dpdk.org" Thread-Topic: [PATCH] compress/isal: fixes offset check Thread-Index: AQHUKL7kF2ekp5zxWUGiiA1dpRgSN6Sqi4Dg Date: Wed, 1 Aug 2018 08:10:46 +0000 Message-ID: References: <1533035316-63812-1-git-send-email-lee.daly@intel.com> In-Reply-To: <1533035316-63812-1-git-send-email-lee.daly@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTE1YzYxYWEtNjY3OS00YzJmLWJhNWItODRlYzk1YjczODk4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN0MrYWh0UW9FV29QZkExUVowVlZvQ1FGMUNIa0U3bVRwd0Q4TlB6cTFNYnpuQU10NmV5TTBtUlFhM09FMTVNUyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] compress/isal: fixes offset check 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: , X-List-Received-Date: Wed, 01 Aug 2018 08:10:50 -0000 Hi Lee, > -----Original Message----- > From: Daly, Lee > Sent: Tuesday, July 31, 2018 12:09 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; Daly, Lee > Subject: [PATCH] compress/isal: fixes offset check >=20 > This commit fixes an offset check in decompression which was checking > destination offset size against dst data_len rather than checking against= dst > pkt_len as required. >=20 > Fixes:788e748d3845 ("compress/isal: support chained mbufs") >=20 > Signed-off-by: Lee Daly > --- > drivers/compress/isal/isal_compress_pmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/compress/isal/isal_compress_pmd.c > b/drivers/compress/isal/isal_compress_pmd.c > index e75f48d..aef56e3 100644 > --- a/drivers/compress/isal/isal_compress_pmd.c > +++ b/drivers/compress/isal/isal_compress_pmd.c > @@ -483,7 +483,7 @@ process_isal_inflate(struct rte_comp_op *op, struct > isal_comp_qp *qp) > return -1; > } >=20 > - if (op->dst.offset > op->m_dst->data_len) { > + if (op->dst.offset > op->m_dst->pkt_len) { Actually, I think you should check if offset is higher or EQUAL to pktlen (= >=3D). This applies to the isal_deflate function too. =20 > ISAL_PMD_LOG(ERR, "Output mbuf not big enough for length > and " > "offset provided.\n"); I think message should say that mbuf is not big enough for the offset provi= ded, as length is not passed like in the input mbufs. > op->status =3D RTE_COMP_OP_STATUS_INVALID_ARGS; > -- > 2.7.4 Thanks, Pablo