From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D761B1B554; Wed, 11 Jul 2018 10:48:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 01:48:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,337,1526367600"; d="scan'208";a="71377154" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2018 01:48:41 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.193]) by irsmsx110.ger.corp.intel.com ([169.254.15.197]) with mapi id 14.03.0319.002; Wed, 11 Jul 2018 09:48:41 +0100 From: "De Lara Guarch, Pablo" To: "Daly, Lee" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] compress/isal: fixes ISA-L PMD used with offsets in mbuf Thread-Index: AQHUGEvEig8zpE4bYk+EUX7aPSYEcaSJswPQ Date: Wed, 11 Jul 2018 08:48:40 +0000 Message-ID: References: <1531226641-54158-1-git-send-email-lee.daly@intel.com> In-Reply-To: <1531226641-54158-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTg4NWU2YjktOTAwZi00Yjg4LTlkNzktZTVjZTU1ZWQ4MmY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieWo0UWdVVW0yb08xZkh1UWdBSTIzN0NNeFwvUVhKcGNHV05TejkrZkFrSmxOWEYxSHhFd2lmbmdBNElQcGNraTAifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] compress/isal: fixes ISA-L PMD used with offsets in mbuf 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, 11 Jul 2018 08:48:44 -0000 Hi Lee, > -----Original Message----- > From: Daly, Lee > Sent: Tuesday, July 10, 2018 1:44 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; Daly, Lee ; stable@dpdk.org > Subject: [PATCH] compress/isal: fixes ISA-L PMD used with offsets in mbuf >=20 No need to use ISA-L PMD in the title, as it is a duplicate. Also, titles always start with verb in infinitive (fix). So, maybe a suggestion could be: "compress/isal: fix offset usage"? > This patch allows the ISA-L compression PMD, to be used with offsets in t= he > mbuf. > Offsets can now be used for source and destination buffers, during compre= ssion > or decompression. >=20 > Fixes: dc49e6a "compress/isal: add ISA-L compression functionality" > Fixes: 7bf4f06 "compress/isal: add ISA-L decomp functionality" > Cc: stable@dpdk.org >=20 > Signed-off-by: Lee Daly ... > + qp->stream->end_of_stream =3D 1; /* All input consumed in one go */ > + if ((op->src.length + op->src.offset) > op->m_src->data_len) { > + ISAL_PMD_LOG(ERR, "Input mbuf not big enough for > offset.\n"); I would rephrase this to "Input buffer not big enough for the length and of= fset provided". Same for inflate. > + op->status =3D RTE_COMP_OP_STATUS_INVALID_ARGS; > + return -1; > + } > + /* Point compression stream to input buffer */ > + qp->stream->avail_in =3D op->src.length; > + qp->stream->next_in =3D rte_pktmbuf_mtod_offset(op->m_src, uint8_t *, > + op->src.offset); > + > + if (op->dst.offset > op->m_dst->data_len) { > + ISAL_PMD_LOG(ERR, "Output mbuf not big enough for > offset.\n"); I would rephrase this to "Output buffer not big enough for the offset provi= ded". Same for inflate. > + op->status =3D RTE_COMP_OP_STATUS_INVALID_ARGS; > + return -1; > + }