New upstream version 18.08
[deb_dpdk.git] / doc / guides / compressdevs / zlib.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2018 Cavium Networks.
3
4 ZLIB Compression Poll Mode Driver
5 ==================================
6
7 The ZLIB PMD (**librte_pmd_zlib**) provides poll mode compression &
8 decompression driver based on SW zlib library,
9
10 Features
11 --------
12
13 ZLIB PMD has support for:
14
15 Compression/Decompression algorithm:
16
17 * DEFLATE
18
19 Huffman code type:
20
21 * FIXED
22 * DYNAMIC
23
24 Window size support:
25
26 * Min - 256 bytes
27 * Max - 32K
28
29 Limitations
30 -----------
31
32 * Scatter-Gather and Stateful not supported.
33
34 Installation
35 ------------
36
37 * To build DPDK with ZLIB library, the user is required to download the ``libz`` library.
38 * Use following command for installation.
39
40 * For Fedora users::
41      sudo yum install zlib-devel
42 * For Ubuntu users::
43      sudo apt-get install zlib1g-dev
44
45 * Once downloaded, the user needs to build the library.
46
47 * To build from sources
48   download zlib sources from http://zlib.net/ and do following before building DPDK::
49
50     make
51     sudo make install
52
53 Initialization
54 --------------
55
56 In order to enable this virtual compression PMD, user must:
57
58 * Set ``CONFIG_RTE_LIBRTE_PMD_ZLIB=y`` in config/common_base.
59
60 To use the PMD in an application, user must:
61
62 * Call ``rte_vdev_init("compress_zlib")`` within the application.
63
64 * Use ``--vdev="compress_zlib"`` in the EAL options, which will call ``rte_vdev_init()`` internally.
65
66 The following parameter (optional) can be provided in the previous two calls:
67
68 * ``socket_id:`` Specify the socket where the memory for the device is going to be allocated
69   (by default, socket_id will be the socket where the core that is creating the PMD is running on).