Commit Graph

180 Commits

Author SHA1 Message Date
Anatoly Burakov
fbaf943887 build: remove individual library versions
Since the library versioning for both stable and experimental ABI's is
now managed globally, the LIBABIVER and version variables no longer
serve any useful purpose, and can be removed.

The replacement in Makefiles was done using the following regex:

	^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)?

(LIBABIVER := numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

The replacement for meson files was done using the following regex:

	^(#.*\n)?version\s*=\s*\d+\n(\s*\n)?

(version = numbers, optionally preceded by a comment and optionally
succeeded by an empty line)

[David]: those variables are manually removed for the files:
- drivers/common/qat/Makefile
- lib/librte_eal/meson.build
[David]: the LIBABIVER is restored for the external ethtool example
library.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20 23:05:39 +01:00
Kevin Traynor
021a812e88 compress/octeontx: remove commented out code
This code is commented out. Remove it.

Fixes: 43e610bb85 ("compress/octeontx: introduce octeontx zip PMD")
Cc: stable@dpdk.org

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-11-08 16:40:28 +01:00
Dharmik Thakkar
b28f28ae80 rename private header files
Some of the internal header files have 'rte_' prefix
and some don't.
Remove 'rte_' prefix from all internal header files.

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2019-10-27 22:03:06 +01:00
Ferruh Yigit
4d6194db01 compress/octeontx: fix global variable multiple definitions
'octtx_zip_logtype_driver' global variable is defined in a header file
which was causing multiple definitions of the variable, fixed it by
moving it to the .c file.

Issue has been detected by '-fno-common' gcc flag.

Fixes: 43e610bb85 ("compress/octeontx: introduce octeontx zip PMD")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ashish Gupta <ashishg@marvell.com>
2019-10-25 23:16:23 +02:00
Artur Trybula
984e78d3cd compress/qat: catch overflow for stateless compression
This patch adds out-of-space recoverable feature for stateless
compression scenario to QuickAssist compressdev driver

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-10-23 16:57:06 +02:00
Adam Dybkowski
82822753bd compress/qat: add stateful decompression
This patch adds the stateful decompression feature
to the DPDK QAT PMD.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-10-09 11:50:12 +02:00
Adam Dybkowski
8a95d6bc93 compress/isal: shorten queue pair name
This patch shortens the queue pair name created when initializing
the queue pair of the ISAL PIM, based on the device and qp ids.

Suggested-by: Paul Luse <paul.e.luse@intel.com>
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-10-09 11:50:12 +02:00
Thomas Monjalon
167d9c6797 build: remove redundant libs from pkgconfig
As explained in drivers/meson.build,
"
  For the find_library() case (but not with dependency()) we also
  need to specify the "-l" flags in pkgconfig_extra_libs variable
  too, so that it can be reflected in the pkgconfig output for
  static builds.
"

The commit e30b4e566f ("build: improve dependency handling")
must be followed up with this one in order to remove more
occurences of pkgconfig_extra_libs redundant with use of dependency().

Fixes: f1debd77ef ("net/af_xdp: introduce AF_XDP PMD")
Fixes: 3c32e89f68 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-09-12 18:32:40 +02:00
Adam Dybkowski
ff53baa9cc compress/zlib: fix error handling
Add missing return after setting the error status in case of
invalid flush_flag in the operation.
The issue was found by the coverity scan as the fin_flush variable,
not initialized in such case, was used later in the flow.

Coverity issue: 340859
Fixes: c7b436ec95 ("compress/zlib: support burst enqueue/dequeue")
Cc: stable@dpdk.org

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2019-07-26 14:52:24 +02:00
Tomasz Jozwiak
b643808ffb compress/qat: fix overflow status return
This patch fixes fail status returned from compression PMD
in case destination buffer size is not enough to store
all data.

Fixes: 3dc9ef2d23 ("compress/qat: fix returned status on overflow")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2019-07-19 14:15:21 +02:00
Stephen Hemminger
abdb798ae2 compress/isal: fix use after free
The release function was using qp->stream after already
releasing it and the null pointer checking was missing.

Also since rte_free(NULL) is a no-op, remove unnecessary
checks for NULL.

Coverity issure: 340860
Fixes: dc49e6aa48 ("compress/isal: add ISA-L compression functionality")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-07-05 14:52:25 +02:00
Bruce Richardson
530588f3cd drivers: add reasons for components being disabled
For each driver where we optionally disable it, add in the reason why it's
being disabled, so the user knows how to fix it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-07-02 23:21:11 +02:00
Fiona Trahe
bf0cd22643 compress/qat: fix dataplane return
Fixes: 352332744c ("compress/qat: add dynamic SGL allocation")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2019-04-18 16:01:28 +02:00
Tomasz Cel
bbbc39b2c2 compress/isal: fix getting information about CPU
This patch adds query about CPU features

Fixes: 53a9baa98c ("compress/isal: add basic PMD ops")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
2019-04-02 16:50:24 +02:00
Tomasz Jozwiak
1e796b11fe drivers/qat: fix queue pair NUMA node
This patch assigns QAT queue pair resources to the correct NUMA nodes.
Any DMA'able memory should use NUMA node of QAT device
rather than socket_id of the initializing process.

Fixes: 98c4a35c73 ("crypto/qat: move common qat files to common dir")
Fixes: a795248d74 ("compress/qat: add configure and clear functions")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-04-02 16:50:24 +02:00
Lee Daly
1aeb9fdb2e compress/isal: add appropriate flag on overflow
This patch will change the operation status when ISA-L returns because
of a recoverable out of space error, rather than a just generic fail.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Tested-by: Tomasz Cel <tomaszx.cel@intel.com>
2019-04-02 16:50:24 +02:00
Tomasz Jozwiak
352332744c compress/qat: add dynamic SGL allocation
This patch adds dynamic SGL allocation instead of static one.
The number of element in SGL can be adjusted in each operation
depend of the request.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-04-02 16:50:24 +02:00
Tomasz Cel
ae1374e240 compress/isal: fix compression stream initialization
This patch fixes ISAL internal state fields initialization.

Fixes: dc49e6aa48 ("compress/isal: add ISA-L compression functionality")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-04-02 16:50:24 +02:00
Tomasz Jozwiak
a720e6740a compress/qat: add fallback to fixed compression
This patch adds fallback to fixed compression
feature during dynamic compression, when the input data size
is greater than IM buffer size / 1.1. This feature doesn't
stop compression proccess when IM buffer can be too small
to handle produced data.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-03-22 14:27:46 +01:00
Tomasz Cel
fff7b0ddce compress/isal: add version display
Display information about ISA-L lib version in UTs.

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
2019-03-22 14:27:46 +01:00
Marko Kovacevic
25e9517961 compress/qat: fix setup inter buffers
This patch fixes qat comp setup inter_buffers
memory allocation size to a broader size
then just 2MB

Fixes: a124830a6f ("compress/qat: enable dynamic huffman encoding")
Cc: stable@dpdk.org

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-03-22 14:27:46 +01:00
Luca Boccassi
e30b4e566f build: improve dependency handling
Whenever possible (if the library ships a pkg-config file) use meson's
dependency() function to look for it, as it will automatically add it
to the Requires.private list if needed, to allow for static builds to
succeed for reverse dependencies of DPDK. Otherwise the recursive
dependencies are not parsed, and users doing static builds have to
resolve them manually by themselves.
When using this API avoid additional checks that are superfluous and
take extra time, and avoid adding the linker flag manually which causes
it to be duplicated.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-27 12:13:54 +01:00
Lee Daly
59af922ae4 compress/isal: fix build with old library version
This patch removes an unnecessary flag which was breaking the
build with older versions of the ISA-L library (v2.23 and older)
and replace with a more appropriate flag which is present
in older versions of library.

Fixes: bd03d3f1e4 ("compress/isal: enable checksum support")

Signed-off-by: Lee Daly <lee.daly@intel.com>
Tested-by: Harry van Haaren <harry.van.haaren@intel.com>
2019-01-19 00:07:52 +01:00
Tomasz Jozwiak
3dc9ef2d23 compress/qat: fix returned status on overflow
This patch fixes correct status in case of overflow on
QAT is detected.
In that case RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED value is set in
rte_comp_op.status field instead of RTE_COMP_OP_STATUS_ERROR

Fixes: 32842f2a6d ("compress/qat: create FW request and process response")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-01-10 16:57:22 +01:00
Tomasz Jozwiak
e2e35849ea compress/qat: add compression on DH895x
This patch enables compression on DH895x HW series
and updates supported hardware accelerator devices list.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-01-10 16:57:22 +01:00
Lee Daly
bd03d3f1e4 compress/isal: enable checksum support
This patch adds checksum support in the ISA-L PMD for both compression
and decompression.
CRC32 is supported as well as Adler32.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2019-01-10 16:57:22 +01:00
Tomasz Jozwiak
ba83e5c006 compress/qat: fix dequeue error counter
This patch increments error counter (stats.dequeue_err_count)
in case of any error detection during qat_comp_process_response
function.

Fixes: 3cc14fc48e ("compress/qat: check that correct firmware is in use")
Fixes: 32842f2a6d ("compress/qat: create FW request and process response")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-12-19 11:19:10 +01:00
Tomasz Jozwiak
652b59df06 compress/qat: fix return on building request error
This patch fixes error status which should be set inside
qat_comp_build_request function in case any errors are detected.
In these cases op.status is set to
RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug.

Fixes: 1947bd1858 ("compress/qat: support scatter-gather buffers")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-12-19 11:19:10 +01:00
Lee Daly
1713ad8bc5 compress/isal: fix uncleared compression states
Fixing uncleared states of compression & decompression engines post op.

Fixes: 788e748d38 ("compress/isal: support chained mbufs")
Fixes: dc49e6aa48 ("compress/isal: add ISA-L compression functionality")
Fixes: 7bf4f0630a ("compress/isal: add ISA-L decomp functionality")
Cc: stable@dpdk.org

Signed-off-by: Lee Daly <lee.daly@intel.com>
2018-11-02 12:26:06 +01:00
Fiona Trahe
4e8f2d6a6a compress/qat: add log for IM buffer too small
Display trace if error returned from firmware is likely due
to intermediate buffers being too small for the compressed
output. Update documentation to explain this error case
and to clarify intermediate buffer memory usage.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-11-02 12:26:06 +01:00
Fiona Trahe
cea6abe379 compress/qat: fix out-of-bounds write
QAT array for sgls in intermediate buffer structure
was #defined to 1, but setup code hardcoded as if 2 buffers
so causing out of bounds write. Reworked to loop correctly
using #define.

Fixes: a124830a6f ("compress/qat: enable dynamic huffman encoding")

Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-11-02 12:26:06 +01:00
Thomas Monjalon
df285f0e65 drivers: remove useless constructor headers
A constructor is usually declared with RTE_INIT* macros.
As it is a static function, no need to declare before its definition.
The macro is used directly in the function definition.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-11-01 22:38:00 +01:00
Ferruh Yigit
9757358342 fix global variable issues
Various fixes related to the global variable usage.

Fixes: 43e610bb85 ("compress/octeontx: introduce octeontx zip PMD")
Fixes: c378f084d6 ("compress/octeontx: add device setup ops")
Fixes: b43ebc65aa ("compress/octeontx: create private xform")
Fixes: b1ce8ebd97 ("eventdev: add PMD callbacks for eth Rx adapter")
Fixes: 3810ae4357 ("eventdev: add interrupt driven queues to Rx adapter")
Fixes: fefed3d1e6 ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-10-29 02:34:27 +01:00
Ferruh Yigit
b74fd6b842 add missing static keyword to globals
Some global variables can indeed be static, add static keyword to them.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-10-29 02:01:08 +01:00
Fiona Trahe
a124830a6f compress/qat: enable dynamic huffman encoding
Enable dynamic huffman encoding in the QAT comp PMD.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2018-10-27 01:30:21 +02:00
Fiona Trahe
1f5e4053f9 common/qat: support GEN3 devices
This adds pci detection, queue-pair configuration and
documentation for Intel GEN3 QuickAssist devices.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-10-17 12:23:40 +02:00
Fiona Trahe
78c5ea9132 compress/qat: remove unnecessary assignment
Same variable was assigned twice, remove one.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Fiona Trahe
7586c57873 compress/qat: fix checksum on decompression
Checksum was always 0 on QAT decompression due to
incorrect use of union variable.

Fixes: 6a7ea14819 ("compress/qat: add xform processing")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-09-27 13:40:22 +02:00
Fiona Trahe
df8cca4633 compress/qat: use compression specific driver name
The QAT compression driver was named "qat".
Rename to compress_qat for consistency with other compressdev drivers
and with crypto_qat.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-08-30 05:10:50 +02:00
Tomasz Jozwiak
b30aa8911c common/qat: fix offset greater than first segment
This patch fixes sgl filling to handle offset
greater than first sgl segment

Fixes: 1947bd1858 ("compress/qat: support scatter-gather buffers")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-08-03 09:14:24 +02:00
Tomasz Jozwiak
4b57bfec46 compress/qat: fix buffer lengths in offset case
Fixed lengths for src and dest buffers

Fixes: 32842f2a6d ("compress/qat: create FW request and process response")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2018-08-03 09:14:24 +02:00
Lee Daly
7f474b4324 compress/isal: fix offset check
This commit fixes an offset check in decompression which was checking
destination offset size against dst data_len rather than checking
against dst pkt_len as required, to support single and multi-segment
buffers.

Fixes: 788e748d38 ("compress/isal: support chained mbufs")

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-08-03 09:14:24 +02:00
Ashish Gupta
52048f8f89 compress/octeontx: support burst enqueue/dequeue
Implement enqueue/dequeue APIs to perform compression/decompression
operations

Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
2018-07-25 13:36:26 +02:00
Ashish Gupta
b43ebc65aa compress/octeontx: create private xform
Create non-shareable private xform for applications to
perform stateless compression/decompression.

Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
2018-07-25 13:36:26 +02:00
Ashish Gupta
c378f084d6 compress/octeontx: add device setup ops
Add compression PMD device and queue pair setup ops.

Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
2018-07-25 13:36:26 +02:00
Sunila Sahu
43e610bb85 compress/octeontx: introduce octeontx zip PMD
Octentx zipvf PMD provides hardware acceleration for
deflate and lzs compression and decompression operations
using Octeontx zip co-processor, which provide 8
virtualized zip devices.

This patch add basic initialization routine to register zip VFs
to compressdev library.

Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
2018-07-25 13:36:26 +02:00
Sunila Sahu
c7b436ec95 compress/zlib: support burst enqueue/dequeue
Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
2018-07-25 08:21:25 +02:00
Sunila Sahu
0cc20d33ac compress/zlib: create private xform
Create non-shareable private xform for stateless
operation processing

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
2018-07-25 08:21:25 +02:00
Ashish Gupta
27422fc33c compress/zlib: add basic ops
Implement device configure and queue pair
setup PMD ops

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
2018-07-25 08:21:25 +02:00
Ashish Gupta
0c4e4c16b0 compress/zlib: introduce zlib PMD
Add initial PMD setup routines in compressdev
framework. ZLIB PMD appears as virtual compression
device. User would need to install zlib prior to
enabling this PMD.

Signed-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>
Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
Signed-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>
2018-07-25 08:21:25 +02:00
Lee Daly
788e748d38 compress/isal: support chained mbufs
This patch adds chained mbuf support for input or output buffers
during compression/decompression operations.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-25 08:19:54 +02:00
Fiona Trahe
1947bd1858 compress/qat: support scatter-gather buffers
This patch adds Scatter-Gather List (SGL) feature to
QAT compression PMD.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-07-25 08:19:54 +02:00
Pablo de Lara
f51c290154 compress/isal: fix memory leak
Processed operations ring is created for each queue pair,
but it was not being freed when the queue pair was released.

Fixes: b0e23c458a ("compress/isal: add queue pair related ops")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
2018-07-24 01:48:10 +02:00
Pablo de Lara
2d02781c7a compress/isal: set null pointer after freeing
Fixes: b0e23c458a ("compress/isal: add queue pair related ops")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
2018-07-24 01:48:10 +02:00
Pablo de Lara
23edc362ff compress/isal: fix log type name
There is a naming convention for logtypes of PMDs:
"pmd.driverType.driverName".
Therefore, the logtype for ISA-L PMD should be "pmd.compress.isal".

Fixes: 490e725b95 ("compress/isal: add device init and de-init")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
2018-07-24 01:48:10 +02:00
Lee Daly
6a000343ed compress/isal: fix offset usage
This patch allows the ISA-L compression PMD,
to be used with offsets in the mbuf.
Offsets can now be used for source and destination buffers,
during compression or decompression.

Fixes: 7bf4f0630a ("compress/isal: add ISA-L decomp functionality")
Fixes: dc49e6aa48 ("compress/isal: add ISA-L compression functionality")
Cc: stable@dpdk.org

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
2519de891e compress/qat: prevent usage if incorrect firmware
Previous check only causes op to fail on dequeue.
This extends so once first fail is detected, application can
no longer enqueue ops to the device and will also get an
appropriate error if trying to reconfigure or setup the device.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
c0c90bc4ca compress/qat: add create and destroy functions
Now that all the device operations are available,
add the functions to create and destroy the pmd.
Called on probe and remove of the qat pci device, these
register the device with the compressdev API
and plug in all the device functionality.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
edd37ac10d compress/qat: create and populate the ops structure
Create an ops structure and populate it with the
qat-specific functions.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
d8d380ad1c compress/qat: add device start and stop
There are no specific actions needed to start/stop a QAT comp device
so these are just trivial fns to satisfy the pmd API.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
a232ca8bd7 compress/qat: add enqueue/dequeue functions
Wrap generic qat enqueue/dequeue functions with
compressdev enqueue and dequeue fns.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
84aaaf8e62 compress/qat: add info retrieval function
Add capabilities pointer to internal qat comp device
and function to return this and other info.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
a795248d74 compress/qat: add configure and clear functions
Add functions to configure and clear the qat comp device,
including the creation and freeing of the xform pool
and the freeing of queue-pairs.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
be8343b0f8 compress/qat: setup queue-pairs for compression
Setup and clear queue-pairs for handling compression
requests and responses.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
72385564e9 compress/qat: add stats functions
Add functions to get and clear compression queue-pair statistics.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
3cc14fc48e compress/qat: check that correct firmware is in use
Check bit in response message to verify that correct firmware
is in use for compression. If not return an error.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
32842f2a6d compress/qat: create FW request and process response
Add functions to create the request message to send to
firmware and to process the firmware response.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
6a7ea14819 compress/qat: add xform processing
Add code to process compressdev rte_comp_xforms, creating
private qat_comp_xforms with prepared firmware message templates.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Fiona Trahe
7a34c21557 compress/qat: add empty driver
Add Makefiles, meson files, and empty source files for compression PMD.
Handle cases for building either symmetric crypto PMD
or compression PMD or both and the common files both depend on.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2018-07-24 01:48:10 +02:00
Thomas Monjalon
f8e9989606 remove useless constructor headers
A constructor is usually declared with RTE_INIT* macros.
As it is a static function, no need to declare before its definition.
The macro is used directly in the function definition.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-07-12 00:00:35 +02:00
Pablo de Lara
0260571c99 compressdev: add huffman encoding flags
Added Huffman fixed and dynamic encoding feature flags,
so an application can query if a device supports
these two types, when performing DEFLATE compression.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shally.verma@caviumnetworks.com>
2018-07-11 00:57:51 +02:00
Lee Daly
7bf4f0630a compress/isal: add ISA-L decomp functionality
Adds decompression functionality, similar to compression,
this sets internal ISA-L structures, provides input & output mbuf
addresses, executes decompression, which ISA-L calls inflate and
finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
dc49e6aa48 compress/isal: add ISA-L compression functionality
Adds compression functionality, this sets internal ISA-L
structures, provides input & output mbuf addresses,
executes compression, which ISA-L calls deflate,
and finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
9536d2c043 compress/isal: add stats related ops
Add functions for statistic retrieval and resetting.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
21fd1e5949 compress/isal: support burst enqueue/dequeue
This patchs adds support for the compressdev enqueue_burst
and dequeue_burst API operations.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
b0e23c458a compress/isal: add queue pair related ops
This adds queue pair operations such as setup and release.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
c720cd2b35 compress/isal: add private xform related ops
This patch  creates, configures and frees the private xform, taking the
applications xform and using it to populate the PMDs own private xform
with the information which will be required for the compress/decompress
functions. This information includes the level, algorithm,
type of huffman code, type of checksum etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
53a9baa98c compress/isal: add basic PMD ops
Add basic device poll mode driver operations to
give ability to start, stop, close device etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
490e725b95 compress/isal: add device init and de-init
This patch adds device initialization functionality such as
probe and create, also adding deinitialize functionality.
Dynamic logging component also added.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00
Lee Daly
3c32e89f68 compress/isal: add skeleton ISA-L compression PMD
Adding basic skeleton of the ISA-L compression driver.
No compression functionality, but lays the foundation for
operations in the rest of the patchset.

The ISA-L compression driver utilizes Intel's ISA-L compression
library and compressdev API.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-10 17:46:20 +01:00