Commit 976f8b09 authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

module/accel: Add compressDev accel_module



This is the port of the vbdev compress logic into the accel
framework.  It includes just one enhancement, to only fill each
mbuf in either src or dst array with max "window size" param to
avoid QAT errors. Note that DPDK ISAL PMD was not ported as we
have native ISAL compression in accel now.

Note: ISAL w/DPDK is still built w/this patch, that can't be
removed until the vbdev module moves to accel fw as it still
depends on DPDK ISAL PMD.

Follow-on patches will include addition C API for PMD selection,
this patch just gets equivalent functionality going.  Upcoming
patches will also convert the vbdev compress module to use the
accel framework instead of talking directly to compressdev.

More patches will also address comments on vbdev common code
that addressed here would make the review challenging.

This patch also fixes a bug in the ported code that needs to
be fixed here to pass CI.  Capability discovery was incorrect
causing all devices to appear to not support chained mbufs,
with the mbuf splitting code this is important to get right.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: I7f526404819b145ef26e40877122ba80a02fcf51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15178


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 05e7a8a8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@ CONFIG_PMDK_DIR=
# Build with xNVMe
CONFIG_XNVME=n

# Enable the dependencies for building the DPDK accel compress module
CONFIG_DPDK_COMPRESSDEV=n

# Enable the dependencies for building the compress vbdev, includes the reduce library
CONFIG_VBDEV_COMPRESS=n

+9 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ function usage() {
	echo " --without-pmdk		 No path required."
	echo " --with-vbdev-compress     Build vbdev compression module and dependencies."
	echo " --without-vbdev-compress  No path required."
	echo " --with-dpdk-compressdev   Build accel DPDK compression module and dependencies."
	echo " --without-dpdk-compressdev No path required."
	echo " --with-rbd                Build Ceph RBD bdev module."
	echo " --without-rbd             No path required."
	echo " --with-rdma[=DIR]         Build RDMA transport for NVMf target and initiator."
@@ -535,6 +537,12 @@ for i in "$@"; do
		--without-vbdev-compress)
			CONFIG[VBDEV_COMPRESS]=n
			;;
		--with-dpdk-compressdev)
			CONFIG[DPDK_COMPRESSDEV]=y
			;;
		--without-dpdk-compressdev)
			CONFIG[DPDK_COMPRESSDEV]=n
			;;
		--with-xnvme)
			CONFIG[XNVME]=y
			;;
@@ -1192,6 +1200,7 @@ else
	echo "so these features will be disabled."
	CONFIG[CRYPTO]=n
	CONFIG[VBDEV_COMPRESS]=n
	CONFIG[DPDK_COMPRESSDEV]=n
fi

# ISA-L-crypto complements ISA-L functionality, it is only enabled together with ISA-L
+37 −0
Original line number Diff line number Diff line
@@ -1867,6 +1867,43 @@ Example response:
}
~~~

### compressdev_scan_accel_module {#rpc_compressdev_scan_accel_module}

Set config and enable compressdev accel module offload.
Select the DPDK polled mode driver (pmd) for the accel compress module,
0 = auto-select, 1= QAT only, 2 = mlx5_pci only.

#### Parameters

Name                    | Optional | Type        | Description
----------------------- | -------- | ----------- | -----------
pmd                     | Required | int         | pmd selection

#### Example

Example request:

~~~json
{
  "params": {
    "pmd": 1
  },
  "jsonrpc": "2.0",
  "method": "compressdev_scan_accel_module",
  "id": 1
}
~~~

Example response:

~~~json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}
~~~

### dsa_scan_accel_module {#rpc_dsa_scan_accel_module}

Set config and enable dsa accel module offload.
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ DPDK_LIBS += kvargs telemetry
DPDK_LIBS += power timer ethdev net

# common crypto/compress drivers
ifeq ($(findstring y,$(CONFIG_CRYPTO)$(CONFIG_VBDEV_COMPRESS)),y)
ifeq ($(findstring y,$(CONFIG_DPDK_COMPRESSDEV)$(CONFIG_CRYPTO)$(CONFIG_VBDEV_COMPRESS)),y)
DPDK_DRIVERS += crypto/qat compress/qat common/qat
endif

@@ -63,7 +63,7 @@ DPDK_LDFLAGS += -L$(IPSEC_MB_DIR)
endif
endif

ifeq ($(CONFIG_VBDEV_COMPRESS),y)
ifeq ($(findstring y,$(CONFIG_DPDK_COMPRESSDEV)$(CONFIG_VBDEV_COMPRESS)),y)
DPDK_DRIVERS += compress compress/isal
ifeq ($(CONFIG_VBDEV_COMPRESS_MLX5),y)
DPDK_DRIVERS += compress/mlx5
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ endif
endif
endif

ifeq ($(CONFIG_VBDEV_COMPRESS),y)
ifeq ($(findstring y,$(CONFIG_DPDK_COMPRESSDEV)$(CONFIG_VBDEV_COMPRESS)),y)
DPDK_FRAMEWORK=y
ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_compress_isal.*))
DPDK_LIB_LIST += rte_compress_isal
Loading