Commit 5cffa4a9 authored by paul luse's avatar paul luse Committed by Darek Stojaczyk
Browse files

bdev/compress: check PMD shareable flag for transforms



Module only supports shareable transforms, also adjusted the number
to what we need, just 2.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 38c2a6f8
Loading
Loading
Loading
Loading
+18 −14
Original line number Diff line number Diff line
@@ -51,8 +51,7 @@
#include <rte_compressdev.h>
#include <rte_comp.h>

/* TODO: valdiate these are good starting values */
#define NUM_MAX_XFORMS 16
#define NUM_MAX_XFORMS 2
#define NUM_MAX_INFLIGHT_OPS 128
#define DEFAULT_WINDOW_SIZE 15
#define MAX_MBUFS_PER_OP 16
@@ -256,6 +255,7 @@ create_compress_dev(uint8_t index, uint16_t num_lcores)
		goto err;
	}

	if (device->cdev_info.capabilities->comp_feature_flags & RTE_COMP_FF_SHAREABLE_PRIV_XFORM) {
		rc = rte_compressdev_private_xform_create(cdev_id, &g_comp_xform,
				&device->comp_xform);
		if (rc < 0) {
@@ -271,6 +271,10 @@ create_compress_dev(uint8_t index, uint16_t num_lcores)
				    cdev_id, rc);
			goto err;
		}
	} else {
		SPDK_ERRLOG("PMD does not support shared transforms\n");
		goto err;
	}

	/* Build up list of device/qp combinations */
	for (i = 0; i < q_pairs; i++) {