From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0059.outbound.protection.outlook.com [104.47.33.59]) by dpdk.org (Postfix) with ESMTP id 0954B1B590 for ; Mon, 2 Jul 2018 18:58:02 +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=CsSXd7xZeDAzsPEov6i/fPYkjeykCdyv/Mg7RcbcBCY=; b=NDVzjgHgHkwZUKjWS226iUxFUVh6b53nUJDS/dgAGhrWB4nhbknuEZY4MTtMJnnmLSea6UZljgOmBjvtT+aLUDwkghFqSZckzqZElVRrnvQrx4ndbhqdG2Fat2b2aEeqWB4doIWgmMa7Fx26X6cR1AgoI+2xHynSWQMO52yTgUI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shally.Verma@cavium.com; Received: from hyd1sverma-dt.caveonetworks.com (115.113.156.2) by CY4PR0701MB3635.namprd07.prod.outlook.com (2603:10b6:910:93::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Mon, 2 Jul 2018 16:57:58 +0000 From: Shally Verma To: pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org, pathreya@caviumnetworks.com, mchalla@caviumnetworks.com, Sunila Sahu , Sunila Sahu , Ashish Gupta Date: Mon, 2 Jul 2018 22:27:09 +0530 Message-Id: <1530550631-22841-4-git-send-email-shally.verma@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530550631-22841-1-git-send-email-shally.verma@caviumnetworks.com> References: <1530550631-22841-1-git-send-email-shally.verma@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR01CA0081.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::21) To CY4PR0701MB3635.namprd07.prod.outlook.com (2603:10b6:910:93::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d4750a6-5b8c-4ef7-2b8e-08d5e03cf7ea X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR0701MB3635; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3635; 3:tGxB1cqjoJa+c1wQTPDgugHjXAFWBhnOUQQhEVFML0i9/SvAJj21Pt78S4XalTv32e3as55d8AkV4c7hQUt1SXip62F9JAyHMPmIjE8JQXqLauBdPkjP3BzVDtVqP5KuEcKAoMzmcr+B2otHyRrYudzFGGuGnDbPbPAsS8zAifq3aNLmkzA8jnWSWHM8YxhhA1wJhq3uCT2MgHuUmhLC1x4pXxKSGQu3esNJcqrDOzJRs04N5R8I9J3K6545Ily2; 25:9STeP9SJpaT4hpIP3WpEidvBf8efcmAfreT2gXXBCYPim2JS9w5uzoiQpnCeR4+h9uAY5PNKdyazoDTRxjWmbBqqYpiq1neD1oScyE120hFowosbXtARcmzioE5aeNWJTBKihCx+0l+60qKwQwq91ClXM7ThR7a2tGIQao8ujwdHZcE1UWXLQlfdda9BUlrgxUuMi6P2LUUONOLzN0SII2G883DHpvgOZiL365ARQqRtIFPrXIHQnThpgHGy90dRo4BNvTiax32YXb4VDxXFuTleHMniei8ye2u/4xUGMlmU8Odf+TbOgkBV2QX9I4Oi7Dyc+OW7k277GD8Cx7ySdA==; 31:qGlobXjsvBCDO/ychysowZnbQhuG7q7dkbciCwn96fho7DGrXQNc0LpDhVdkxnKgzilEq+Qdzorpt2cgBAXlfN6lkZ2KxWpNjaUlxlEO38hqkE89ZT4zjdaT78FNbtjpWIZxy7m6a35fc2oQD6w6nMUVxi0j2qSVFute7uMv73yvv0unoA9fxd9ll4+1u5VE7sBx7K365kKxSAixqCQ0CouIXRN1OQEMX4x6OwgSOd4= X-MS-TrafficTypeDiagnostic: CY4PR0701MB3635: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3635; 20:WmCdPBgsB88CVya3lvaafEXIdcx/sP/h+I5a8m5aKWTGIq9waFZmEH7JmlRBSwhmXHszjJdxxNBvw+DtRh8c0m/mB/FXXvDQc8Wm/i0vs1SAwudX+RS0XleG1/eyn+QJHyXzj4CTYqdisFhgvXht1GIwmOafJHpjvxeoc7GH+u/Bg7BYUQQnxun+AJIHi3mHz29YJaoi/6d4ICmwjeA34M4GGiPQiCu+nz6dqq9t+Largjx2Jhh1uTMN9/d0AdjLS9/BE72biRn9EpkPtFFq5jCbviJYQ8DSnjB6F0SS++0xmI0eVftUJl+4ZYVGc0c9DqC4GVONKC4zClGAdcljGGftXI88ZlFS9ETCdMAwkFpQdkaeDM0A3CIWACzryaZHs5kMWklY6zdCL/SWuOVLhsLcEsIUDZGuwnq31ANHPQqSxHfEcX3mFpksdAFxzfW/p/j+r+lr+/0YBOwUPAgb1255xAKmbYX257gg87Bcabm81jZy3gkcGfX6gvXQQE9ae0RLivHZ09CcMJAKz45J4ipRkUKYBGpgGqX2D30peGpEffNXICX30YdX1bLN7+Frf9zR5jozC36GZFUG3Sc9QaFc3tucaCqPoEd2b66cL70=; 4:slhdDK/DK2Nrc5mAKQF9tBYjz7r0dV8a/dGpiDtaRsC4Tl4r4mqErLro70/sE30fvDahOLjUwErXS27rf2SesBfUnylCB8fv2ct7Fl5h6FivCGU5YRavFO2UMPFIx09J3Deri9ADdMaDTWQ0DX8pdBHHl+JdmsANC4czsjtQKUU+ZAAJZ9YtOgCliDczlSvQQE80HZxTGcvbyvgfUTImeCSwfKjdvhhQYZSTQsHvnRaYT0CkkEl640+woOYYHIccaMe+r8h/GJ7khtGN0H6ICw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:CY4PR0701MB3635; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0701MB3635; X-Forefront-PRVS: 07215D0470 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(39860400002)(376002)(366004)(136003)(199004)(189003)(478600001)(72206003)(106356001)(6486002)(42882007)(4326008)(53936002)(107886003)(25786009)(476003)(26005)(8936002)(16526019)(6666003)(8676002)(55236004)(2616005)(11346002)(6512007)(51416003)(76176011)(186003)(6506007)(446003)(956004)(52116002)(6916009)(81166006)(7736002)(81156014)(44832011)(486006)(305945005)(386003)(66066001)(16586007)(47776003)(316002)(50226002)(54906003)(5660300001)(3846002)(6116002)(50466002)(48376002)(68736007)(2906002)(2351001)(2361001)(97736004)(105586002)(53416004)(36756003)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3635; H:hyd1sverma-dt.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3635; 23:rUjfI8SewCxwKbojrM3DV7IBGC63hIW81wTZCt9?= =?us-ascii?Q?acNUO55r7Q1Enco/DZSS+bs0ELcdUNyWh8NlLXgBESDDEHG80roGcizZRv1L?= =?us-ascii?Q?xkvCEICszo+9B1O3yBhWe50qdm89Goii/o3pM2v9n4wx6IdFEcJydx6ayt2z?= =?us-ascii?Q?sd+ENJb74zidZqFFz3Q1Xn0VyLjvoGZDGY2fv9XP/o/0RQguyfL6MFSWQ0ZJ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OcUkx2YbhBaiQivyoq17cWgadIfORxQPNCyCPPcJS46Xp4MB5XMQvCEOfHMy195JNqQrLYIpSkIGwaJMm7jA1a27MqRFaV52BAOIv+633kjoI3QuE+AJikLoXsX1vTXQbRqUwPnUsUTH5gsdFVRa2aKfkIVuZ26zjT+aoWLMQOcQBWhQ23sw==; 5:x9X/GfQ3AAnaosu1if2wv6ef/vn5EutQE+tqXVpaFe3tJEqNpG/i5K/6i8IjyyRQgj6gLQvX9gAhPjDULS5nbXgVYEZKHa2xHPVtG0xd5Rru7D7sT3POVwCqKiYKNt7rNQOCKP9bClkU4K4YVJi+zodim3Q6aU7XzW1/k7vSgw8=; 24:N7fomY5Wz03JOIhRgRqNOOApbZU9vr4kgaMsEibWjEdvFDpv+UDaM7YzD3DeertEgdUq7Dt+33TjMl5IXsW+klRSJVPE+UQI1QoBsIt4s84= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3635; 7:1sZJyGFbetfb1OCpPclkiuXZdDFYGBV51ZbzEFhB4VDEhiBZJO+Wvp5lCxcw5KQanT3USTQYLSobhdyOcetgXb5/bzrQCHXJU3zz6DRmIPpqE625cMbsmTTQOiY7QoKBk553IV3zTsmkhZsp3LBAJhv5tsFnTZe85NNXZTF7cK3sI5H0Kac5FBtXpue1pBWyqvsvQyKrAmPPpeg8E83/uZUwgi+B9o4pImyn08/shAfeZA7UpmKQGKm4k6I3kEhh X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2018 16:57:58.2216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d4750a6-5b8c-4ef7-2b8e-08d5e03cf7ea X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3635 Subject: [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: Mon, 02 Jul 2018 16:58:02 -0000 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/zlib_pmd.c index c4f67bb..7c2614e 100644 --- a/drivers/compress/zlib/zlib_pmd.c +++ b/drivers/compress/zlib/zlib_pmd.c @@ -6,6 +6,99 @@ #include #include "zlib_pmd_private.h" +/** Parse comp xform and set private xform/stream parameters */ +int +zlib_set_stream_parameters(const struct rte_comp_xform *xform, + struct zlib_stream *stream) +{ + int strategy, level, wbits; + z_stream *strm = &stream->strm; + + /* allocate deflate state */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + + switch (xform->type) { + case RTE_COMP_COMPRESS: + /** Compression window bits */ + switch (xform->compress.algo) { + case RTE_COMP_ALGO_DEFLATE: + wbits = -(xform->compress.window_size); + break; + default: + ZLIB_PMD_ERR("Compression algorithm not supported\n"); + return -1; + } + /** Compression Level */ + switch (xform->compress.level) { + case RTE_COMP_LEVEL_PMD_DEFAULT: + level = Z_DEFAULT_COMPRESSION; + break; + case RTE_COMP_LEVEL_NONE: + level = Z_NO_COMPRESSION; + break; + case RTE_COMP_LEVEL_MIN: + level = Z_BEST_SPEED; + break; + case RTE_COMP_LEVEL_MAX: + level = Z_BEST_COMPRESSION; + break; + default: + level = xform->compress.level; + if (level < RTE_COMP_LEVEL_MIN || + level > RTE_COMP_LEVEL_MAX) { + ZLIB_PMD_ERR("Compression level %d " + "not supported\n", + level); + return -1; + } + } + /** Compression strategy */ + switch (xform->compress.deflate.huffman) { + case RTE_COMP_HUFFMAN_DEFAULT: + strategy = Z_DEFAULT_STRATEGY; + break; + case RTE_COMP_HUFFMAN_FIXED: + strategy = Z_FIXED; + break; + case RTE_COMP_HUFFMAN_DYNAMIC: + strategy = Z_HUFFMAN_ONLY; + break; + default: + ZLIB_PMD_ERR("Compression strategy not supported\n"); + return -1; + } + if (deflateInit2(strm, level, + Z_DEFLATED, wbits, + DEF_MEM_LEVEL, strategy) != Z_OK) { + ZLIB_PMD_ERR("Deflate init failed\n"); + return -1; + } + break; + + case RTE_COMP_DECOMPRESS: + /** window bits */ + switch (xform->decompress.algo) { + case RTE_COMP_ALGO_DEFLATE: + wbits = -(xform->decompress.window_size); + break; + default: + ZLIB_PMD_ERR("Compression algorithm not supported\n"); + return -1; + } + + if (inflateInit2(strm, wbits) != Z_OK) { + ZLIB_PMD_ERR("Inflate init failed\n"); + return -1; + } + break; + default: + return -1; + } + return 0; +} + static int zlib_create(const char *name, struct rte_vdev_device *vdev, diff --git a/drivers/compress/zlib/zlib_pmd_ops.c b/drivers/compress/zlib/zlib_pmd_ops.c index 03b6da5..812406b 100644 --- a/drivers/compress/zlib/zlib_pmd_ops.c +++ b/drivers/compress/zlib/zlib_pmd_ops.c @@ -212,6 +212,81 @@ zlib_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, return -1; } +/** Configure stream */ +static int +zlib_pmd_stream_create(struct rte_compressdev *dev, + const struct rte_comp_xform *xform, + void **zstream) +{ + int ret = 0; + struct zlib_stream *stream; + struct zlib_private *internals = dev->data->dev_private; + + if (xform == NULL) { + ZLIB_PMD_ERR("invalid xform struct"); + return -EINVAL; + } + + struct rte_mempool *mp = rte_mempool_lookup(internals->mp_name); + if (rte_mempool_get(mp, zstream)) { + ZLIB_PMD_ERR( + "Couldn't get object from session mempool"); + return -ENOMEM; + } + stream = *((struct zlib_stream **)zstream); + + ret = zlib_set_stream_parameters(xform, stream); + + if (ret < 0) { + ZLIB_PMD_ERR("failed configure session parameters"); + + memset(stream, 0, sizeof(struct zlib_stream)); + /* Return session to mempool */ + rte_mempool_put(mp, stream); + return ret; + } + + return 0; +} + +/** 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 = 0; + + ret = zlib_pmd_stream_create(dev, xform, private_xform); + return ret; +} + +/** Clear the memory of stream so it doesn't leave key material behind */ +static int +zlib_pmd_stream_free(__rte_unused struct rte_compressdev *dev, + void *zstream) +{ + struct zlib_stream *stream = (struct zlib_stream *)zstream; + if (!stream) + return -EINVAL; + + stream->free(&stream->strm); + /* Zero out the whole structure */ + memset(stream, 0, sizeof(struct zlib_stream)); + struct rte_mempool *mp = rte_mempool_from_obj(stream); + rte_mempool_put(mp, stream); + + return 0; +} + +/** Clear the memory of stream so it doesn't leave key material behind */ +static int +zlib_pmd_private_xform_free(struct rte_compressdev *dev, + void *private_xform) +{ + return zlib_pmd_stream_free(dev, private_xform); +} + struct rte_compressdev_ops zlib_pmd_ops = { .dev_configure = zlib_pmd_config, .dev_start = zlib_pmd_start, @@ -226,11 +301,11 @@ struct rte_compressdev_ops zlib_pmd_ops = { .queue_pair_setup = zlib_pmd_qp_setup, .queue_pair_release = zlib_pmd_qp_release, - .private_xform_create = NULL, - .private_xform_free = NULL, + .private_xform_create = zlib_pmd_private_xform_create, + .private_xform_free = zlib_pmd_private_xform_free, - .stream_create = NULL, - .stream_free = NULL + .stream_create = zlib_pmd_stream_create, + .stream_free = zlib_pmd_stream_free }; struct rte_compressdev_ops *rte_zlib_pmd_ops = &zlib_pmd_ops; diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h index dc83464..cdfa866 100644 --- a/drivers/compress/zlib/zlib_pmd_private.h +++ b/drivers/compress/zlib/zlib_pmd_private.h @@ -61,6 +61,10 @@ struct zlib_priv_xform { struct zlib_stream stream; } __rte_cache_aligned; +int +zlib_set_stream_parameters(const struct rte_comp_xform *xform, + struct zlib_stream *stream); + /** Device specific operations function pointer structure */ extern struct rte_compressdev_ops *rte_zlib_pmd_ops; -- 2.9.5