From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78BFCA0613 for ; Wed, 28 Aug 2019 11:04:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 748451C213; Wed, 28 Aug 2019 11:04:28 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3BDD91C1B8 for ; Wed, 28 Aug 2019 11:04:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2019 02:04:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,440,1559545200"; d="scan'208";a="185560410" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga006.jf.intel.com with ESMTP; 28 Aug 2019 02:04:24 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.61]) by IRSMSX109.ger.corp.intel.com ([169.254.13.11]) with mapi id 14.03.0439.000; Wed, 28 Aug 2019 10:04:23 +0100 From: "Trahe, Fiona" To: Shally Verma , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , Ashish Gupta , "Trahe, Fiona" Thread-Topic: [PATCH] doc/compressdev: clarify that structs should be zeroed before use Thread-Index: AQHVXPyQ0xxEd29mEEuAHRy5Zso1f6cP6dyAgABaGpA= Date: Wed, 28 Aug 2019 09:04:23 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435897FA43E@IRSMSX101.ger.corp.intel.com> References: <1566926764-31816-1-git-send-email-fiona.trahe@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmRmZWFkODEtZGYxMS00YWFhLWFhNjEtNGEyNDg0YTA5Njg5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9kYnRVM1lPZzdPRTIwaXVzSFhsS2QxRlB6Rzh1cEQ4bWJWN1wvd20wQUpKNmVYa2V5XC92a2xpaDFRYjVMT01qXC8ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] doc/compressdev: clarify that structs should be zeroed before use 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" HI Shally, > -----Original Message----- > From: Shally Verma [mailto:shallyv@marvell.com] > Sent: Wednesday, August 28, 2019 5:37 AM > To: Trahe, Fiona ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; Ashish Gupta > Subject: RE: [PATCH] doc/compressdev: clarify that structs should be zero= ed before use >=20 >=20 >=20 > > -----Original Message----- > > From: Fiona Trahe > > Sent: Tuesday, August 27, 2019 10:56 PM > > To: dev@dpdk.org > > Cc: akhil.goyal@nxp.com; Ashish Gupta ; Shally > > Verma ; Fiona Trahe > > Subject: [PATCH] doc/compressdev: clarify that structs should be zeroed > > before use > > > > Some structs used on the API are zeroed on creation by API calls, (e.g. > > rte_comp_op), but a few are allocated in the application domain. > > Clarify that the application should zero those to enable future extensi= ons > > without API breakage. > > > > Signed-off-by: Fiona Trahe > > --- > > doc/guides/prog_guide/compressdev.rst | 10 ++++++++++ > > 1 files changed, 10 insertions(+), 0 deletions(-) > > > > diff --git a/doc/guides/prog_guide/compressdev.rst > > b/doc/guides/prog_guide/compressdev.rst > > index a089db1..2a85eba 100644 > > --- a/doc/guides/prog_guide/compressdev.rst > > +++ b/doc/guides/prog_guide/compressdev.rst > > @@ -76,6 +76,11 @@ The ``rte_compressdev_configure`` API is used to > > configure a compression device. > > The ``rte_compressdev_config`` structure is used to pass the configura= tion > > parameters. > > > > +The allocation of the ``rte_compressdev_config`` struct passed on the > > +API is in the application domain, so to allow future API extensions in > > +a backwardly compatible manner the application should zero this struct= , > > +e.g. using sizeof(), before populating it. This allows the addition of= new > > parameters to the struct with default value of zero indicating original > > behaviour. > > + > > See *DPDK API Reference* for details. > > > > Configuration of Queue Pairs > > @@ -264,6 +269,11 @@ Compression transforms (``rte_comp_xform``) are > > the mechanism to specify the details of the compression operation such= as > > algorithm, window size and checksum. > > > > +The allocation of the ``rte_comp_xform`` struct passed on the API is i= n > > +the application domain, so to allow future API extensions in a > > +backwardly compatible manner the application should zero this struct, > > +e.g. using sizeof(), before populating it. This allows the addition of= new > > parameters to the struct with default value of zero indicating original > > behaviour. > > + > [Shally] Though summary and description looks fine. Only thing to confirm= is that this description is > applicable only on xform and config structure? And 0s to all field is all= owed values. > I have not gone back to refer to latest config and xform structure so tak= e it just a pointer to check on > these cases. [Fiona] I looked through all API calls and these were the only one I could = see. The op, private_xform and stream are all handed under the API. But wou= ld appreciate a review in case I've missed something. > Thanks > Shally > > Compression API Hash support > > ---------------------------- > > > > -- > > 1.7.0.7