1384bac8dSMatan Azrad.. SPDX-License-Identifier: BSD-3-Clause 2384bac8dSMatan Azrad Copyright 2021 Mellanox Technologies, Ltd 3384bac8dSMatan Azrad 4384bac8dSMatan Azrad.. include:: <isonum.txt> 5384bac8dSMatan Azrad 60f91f952SThomas MonjalonNVIDIA MLX5 Compress Driver 70f91f952SThomas Monjalon=========================== 80f91f952SThomas Monjalon 90f91f952SThomas Monjalon.. note:: 100f91f952SThomas Monjalon 110f91f952SThomas Monjalon NVIDIA acquired Mellanox Technologies in 2020. 120f91f952SThomas Monjalon The DPDK documentation and code might still include instances 130f91f952SThomas Monjalon of or references to Mellanox trademarks (like BlueField and ConnectX) 140f91f952SThomas Monjalon that are now NVIDIA trademarks. 15384bac8dSMatan Azrad 16a3ade5e3SMichael BaumThe mlx5 compress driver library 17cb0da841SRaslan Darawsheh(**librte_compress_mlx5**) provides support for **NVIDIA BlueField-2**, 18cb0da841SRaslan Darawshehand **NVIDIA BlueField-3** families of 25/50/100/200/400 Gb/s adapters. 19384bac8dSMatan Azrad 20384bac8dSMatan AzradDesign 21384bac8dSMatan Azrad------ 22384bac8dSMatan Azrad 23384bac8dSMatan AzradThis PMD is configuring the compress, decompress amd DMA engines. 24384bac8dSMatan Azrad 25384bac8dSMatan AzradGGAs (Generic Global Accelerators) are offload engines that can be used 26384bac8dSMatan Azradto do memory to memory tasks on data. 27384bac8dSMatan AzradThese engines are part of the ARM complex of the BlueField chip, and as 28384bac8dSMatan Azradsuch they do not use NIC related resources (e.g. RX/TX bandwidth). 29384bac8dSMatan AzradThey do share the same PCI and memory bandwidth. 30384bac8dSMatan Azrad 3167e1bb42SMichael BaumSo, using the BlueField device (starting from BlueField-2), the compress 32384bac8dSMatan Azradclass operations can be supported in parallel to the net, vDPA and 33384bac8dSMatan AzradRegEx class operations. 34384bac8dSMatan Azrad 35a3ade5e3SMichael BaumSee :doc:`../../platform/mlx5` guide for more design details. 36384bac8dSMatan Azrad 37384bac8dSMatan AzradFeatures 38384bac8dSMatan Azrad-------- 39384bac8dSMatan Azrad 40384bac8dSMatan AzradCompress mlx5 PMD has support for: 41384bac8dSMatan Azrad 42*d3845f49SMichael Baum- Compression 43*d3845f49SMichael Baum- Decompression 44*d3845f49SMichael Baum- DMA 45384bac8dSMatan Azrad 46*d3845f49SMichael BaumAlgorithms 47*d3845f49SMichael Baum---------- 48384bac8dSMatan Azrad 49*d3845f49SMichael BaumNULL algorithm 50*d3845f49SMichael Baum~~~~~~~~~~~~~~ 51*d3845f49SMichael Baum 52*d3845f49SMichael BaumNULL algorithm is the way to perform DMA operations. 53*d3845f49SMichael BaumIt works through either compress or decompress operation. 54*d3845f49SMichael Baum 55*d3845f49SMichael BaumShareable transformation. 56*d3845f49SMichael Baum 57*d3845f49SMichael BaumChecksum generation: 58*d3845f49SMichael Baum 59*d3845f49SMichael Baum* CRC32, Adler32 and combined checksum. 60*d3845f49SMichael Baum 61*d3845f49SMichael BaumDEFLATE algorithm 62*d3845f49SMichael Baum~~~~~~~~~~~~~~~~~ 63384bac8dSMatan Azrad 64384bac8dSMatan AzradHuffman code type: 65384bac8dSMatan Azrad 66384bac8dSMatan Azrad* FIXED. 67384bac8dSMatan Azrad* DYNAMIC. 68384bac8dSMatan Azrad 69384bac8dSMatan AzradWindow size support: 70384bac8dSMatan Azrad 71384bac8dSMatan Azrad1KB, 2KB, 4KB, 8KB, 16KB and 32KB. 72384bac8dSMatan Azrad 73384bac8dSMatan AzradShareable transformation. 74384bac8dSMatan Azrad 75384bac8dSMatan AzradChecksum generation: 76384bac8dSMatan Azrad 77384bac8dSMatan Azrad* CRC32, Adler32 and combined checksum. 78384bac8dSMatan Azrad 79*d3845f49SMichael BaumLZ4 algorithm 80*d3845f49SMichael Baum~~~~~~~~~~~~~ 81*d3845f49SMichael Baum 82*d3845f49SMichael BaumSupport for flags: 83*d3845f49SMichael Baum 84*d3845f49SMichael Baum* ``RTE_COMP_LZ4_FLAG_BLOCK_CHECKSUM`` 85*d3845f49SMichael Baum* ``RTE_COMP_LZ4_FLAG_BLOCK_INDEPENDENCE`` 86*d3845f49SMichael Baum 87*d3845f49SMichael BaumWindow size support: 88*d3845f49SMichael Baum 89*d3845f49SMichael Baum1KB, 2KB, 4KB, 8KB, 16KB and 32KB. 90*d3845f49SMichael Baum 91*d3845f49SMichael BaumShareable transformation. 92*d3845f49SMichael Baum 93*d3845f49SMichael BaumChecksum generation: 94*d3845f49SMichael Baum 95*d3845f49SMichael Baum* xxHash-32 checksum. 96*d3845f49SMichael Baum 97384bac8dSMatan AzradLimitations 98384bac8dSMatan Azrad----------- 99384bac8dSMatan Azrad 100384bac8dSMatan Azrad* Scatter-Gather, SHA and Stateful are not supported. 101384bac8dSMatan Azrad* Non-compressed block is not supported in compress (supported in decompress). 102*d3845f49SMichael Baum* Compress operation is not supported by BlueField-3. 103*d3845f49SMichael Baum* LZ4 algorithm is not supported by BlueField-2. 104384bac8dSMatan Azrad 105350e25faSRaja ZidaneDriver options 106350e25faSRaja Zidane-------------- 107350e25faSRaja Zidane 108a3ade5e3SMichael BaumPlease refer to :ref:`mlx5 common options <mlx5_common_driver_options>` 109a3ade5e3SMichael Baumfor an additional list of options shared with other mlx5 drivers. 110a3ade5e3SMichael Baum 111350e25faSRaja Zidane- ``log-block-size`` parameter [int] 112350e25faSRaja Zidane 113350e25faSRaja Zidane Log of the Huffman block size in the Deflate algorithm. 114*d3845f49SMichael Baum Values from [4-15]; value x means block size is 2\ :sup:`x`. 115350e25faSRaja Zidane The default value is 15. 116350e25faSRaja Zidane 117350e25faSRaja Zidane 118384bac8dSMatan AzradSupported NICs 119384bac8dSMatan Azrad-------------- 120384bac8dSMatan Azrad 1217b61f14eSRaslan Darawsheh* NVIDIA\ |reg| BlueField-2 SmartNIC 122cb0da841SRaslan Darawsheh* NVIDIA\ |reg| BlueField-3 SmartNIC 123384bac8dSMatan Azrad 124384bac8dSMatan AzradPrerequisites 125384bac8dSMatan Azrad------------- 126384bac8dSMatan Azrad 1270f91f952SThomas Monjalon- NVIDIA MLNX_OFED version: **5.2** 128a3ade5e3SMichael Baum See :ref:`mlx5 common prerequisites <mlx5_linux_prerequisites>` for more details. 129