From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) by dpdk.org (Postfix) with ESMTP id 092931B57E for ; Wed, 11 Jul 2018 16:01:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8Cyf/69RMYslgT9NxxeHRQxcmfw4ZbcZbctsFjFzRPc=; b=XF8iN4wj80amomL+Kf3/rOg8Zm4gUtFFBDHHlj3VYAbW3uTUhvI/XkqEthxPMJhBnvc5P9yvr6qG0DTWQ0lKrLQoi/SctooBcSOjJYiU2mDeoV3TeONktZv4q3V7KfaxGvcP5oKQgZAEM4PP+y5BrutUF1SDZAq9lRzScVzPNkI= Received: from CY4PR0701MB3634.namprd07.prod.outlook.com (52.132.101.164) by CY4PR0701MB3619.namprd07.prod.outlook.com (52.132.101.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Wed, 11 Jul 2018 14:01:33 +0000 Received: from CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927]) by CY4PR0701MB3634.namprd07.prod.outlook.com ([fe80::f0d4:1828:37f5:5927%2]) with mapi id 15.20.0930.022; Wed, 11 Jul 2018 14:01:33 +0000 From: "Verma, Shally" To: "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Challa, Mahipal" , "Sahu, Sunila" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v2 3/5] compress/zlib: add xform and stream create support Thread-Index: AQHUGRJwgyWuqobHTkytSqT56D7pZaSKDYJw Date: Wed, 11 Jul 2018 14:01:32 +0000 Message-ID: References: <1530550631-22841-1-git-send-email-shally.verma@caviumnetworks.com> <1530550631-22841-4-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR0701MB3619; 7:5ContC+1qUtc0QnvO7BG30fiEsGoZO8tDPdBzAZ5pxBDcHvbsE4+NoW5q07I/jH3awd43AhhwRPiqiLGCh4qxEU+uWWnVv5ixw/ef+xdceSUz/cDYDkN90wQW80ZEPnPgnzxxjQEmcbpRfr3gvK5FWJRs+A8G3qKmlgjnRAH9EdD6B/jrBuHvW+3/JJbaLXkKk7DGIB6o9ERIATsZ4HwJ/Gt3JmKyBFBNW13rHsadveRnrgXoR32+EqzYgZS6R2i x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(366004)(136003)(376002)(39850400004)(396003)(13464003)(189003)(199004)(186003)(54906003)(76176011)(53936002)(72206003)(33656002)(5660300001)(316002)(256004)(2906002)(476003)(107886003)(6246003)(486006)(6436002)(86362001)(305945005)(229853002)(446003)(6916009)(11346002)(66066001)(74316002)(2900100001)(97736004)(81156014)(8676002)(53546011)(6116002)(26005)(478600001)(7736002)(6506007)(81166006)(55016002)(68736007)(3846002)(9686003)(55236004)(25786009)(8936002)(7696005)(99286004)(14454004)(105586002)(102836004)(106356001)(5250100002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3619; H:CY4PR0701MB3634.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: e194542b-8ba9-44ea-caa5-08d5e736cf02 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3619; x-ms-traffictypediagnostic: CY4PR0701MB3619: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3619; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3619; x-forefront-prvs: 0730093765 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: sUv5vhnT5OWKFephUyJZADZDJzyXjQkuikw1mSWcfhQaDaZAbCuk7s7rQwO0ta5F1WTK3n40BR4R2kTbzMfZNsH07DyNa7zAX1XEFCcYjA5cV/+ZM7/m9VeexJ7/3DToywo77XioCfTf1rDcOA/OkuXHYBu6DntdAbHlC5LPXwZyk6IU12pbpat90l1emJeJhdZ4AjllFRayC0hAMPDSUvuCnUxvzDeT0wgrJ71tP76z0cHYBLLriAMJ5vFtODJLgqPyHpVTOHDKBpuIyxAahmLp/zM28vUC8BHlK2ds9slemeTZMlOr71wNB/tjuoKRUSIFUVWjOIr6XqGlPnuxpXEx0BRkA9HLTaEGxgr0GV8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: e194542b-8ba9-44ea-caa5-08d5e736cf02 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jul 2018 14:01:32.8860 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3619 Subject: Re: [dpdk-dev] [PATCH v2 3/5] compress/zlib: add xform and stream create support 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 14:01:36 -0000 >-----Original Message----- >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] >Sent: 11 July 2018 17:57 >To: Verma, Shally >Cc: dev@dpdk.org; Athreya, Narayana Prasad ; Challa, Mahipal >; Sahu, Sunila ; Sahu, = Sunila ; Gupta, Ashish > >Subject: RE: [PATCH v2 3/5] compress/zlib: add xform and stream create sup= port > >External Email > >> -----Original Message----- >> From: Shally Verma [mailto:shally.verma@caviumnetworks.com] >> Sent: Monday, July 2, 2018 5:57 PM >> To: De Lara Guarch, Pablo >> Cc: dev@dpdk.org; pathreya@caviumnetworks.com; >> mchalla@caviumnetworks.com; Sunila Sahu ; >> Sunila Sahu ; Ashish Gupta >> >> Subject: [PATCH v2 3/5] compress/zlib: add xform and stream create suppo= rt > >Retitle to "compress/zlib: support xform and stream creation" > >About stateful, since it looks like it is not supported for the moment, >I think stream_create/stream_free functions should fail or should not be i= mplemented. > >More comments inline. > >> >> From: Sunila Sahu >> >> Implement private xform and stream create ops >> >> Signed-off-by: Sunila Sahu >> Signed-off-by: Shally Verma >> Signed-off-by: Ashish Gupta >> --- >> drivers/compress/zlib/zlib_pmd.c | 93 >> ++++++++++++++++++++++++++++++++ >> drivers/compress/zlib/zlib_pmd_ops.c | 83 +++++++++++++++++++++++++= +-- >> drivers/compress/zlib/zlib_pmd_private.h | 4 ++ >> 3 files changed, 176 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zl= ib_pmd.c >> index c4f67bb..7c2614e 100644 >> --- a/drivers/compress/zlib/zlib_pmd.c >> +++ b/drivers/compress/zlib/zlib_pmd.c > >... > >> + case RTE_COMP_HUFFMAN_DYNAMIC: >> + strategy =3D Z_HUFFMAN_ONLY; > >I don't think this is the suitable value for dynamic compression. >Z_HUFFMAN_ONLY does not do LZ77. I think the strategy for this case is Z_D= EFAULT_STRATEGY. Ya. you right. It will be changed to DEFAULT_STRATEGY. Thanks Shally > >> + break; >> + default: >> + ZLIB_PMD_ERR("Compression strategy not >> supported\n"); >> + return -1; >> + } > >... > >> +++ b/drivers/compress/zlib/zlib_pmd_ops.c > >... > >> + struct rte_mempool *mp =3D rte_mempool_lookup(internals->mp_name); > >As said in other email, you can directly get the mempool pointer from inte= rnals. > >> + if (rte_mempool_get(mp, zstream)) { >> + ZLIB_PMD_ERR( >> + "Couldn't get object from session mempool"= ); > >This can be in the same line. > >... > >> +/** Configure private xform */ >> +static int >> +zlib_pmd_private_xform_create(struct rte_compressdev *dev, >> + const struct rte_comp_xform *xform, >> + void **private_xform) >> +{ >> + int ret =3D 0; >> + >> + ret =3D zlib_pmd_stream_create(dev, xform, private_xform); >> + return ret; > >This can be written like "return zlib_pmd_stream_create(...); > >... > >> + .private_xform_create =3D zlib_pmd_private_xform_create, >> + .private_xform_free =3D >> zlib_pmd_private_xform_free, > >Fix indentation here. > >> >> - .stream_create =3D NULL, >> - .stream_free =3D NULL >> + .stream_create =3D zlib_pmd_stream_create, >> + .stream_free =3D zlib_pmd_stream_free >> };