From fb40cfb424494d81a74fc1813b96b44e39e8aafa Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 20 Jan 2022 16:13:13 +0100 Subject: [PATCH] vbdev_compress: reduce MAX_NUM_QP This is a workaround for #2338. Ideally the fix should remove this define and use number of cores from the application. With large number of QAT devices following error can be obsered: compdev_isal_create(): ISA-L library version used: 2.30.0 vbdev_compress.c: 358:vbdev_init_compress_drivers: *NOTICE*: created virtual PMD compress_isal EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested memzone segments exceeds RTE_MAX_MEMZONE RING: Cannot reserve memory isal_comp_pmd_qp_setup(): Failed to create unique name for isal compression device vbdev_compress.c: 268:create_compress_dev: *NOTICE*: FYI failed to setup a queue pair on compressdev 48 with error 4294967295 so limiting to 84 qpairs Signed-off-by: Tomasz Zawadzki Change-Id: I689ab6bda991e3864da9f4135f57849e3c0c3986 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11179 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- module/bdev/compress/vbdev_compress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/bdev/compress/vbdev_compress.c b/module/bdev/compress/vbdev_compress.c index f5ff1533b..4d87cc799 100644 --- a/module/bdev/compress/vbdev_compress.c +++ b/module/bdev/compress/vbdev_compress.c @@ -93,8 +93,9 @@ static TAILQ_HEAD(, compress_dev) g_compress_devs = TAILQ_HEAD_INITIALIZER(g_com /* Although ISAL PMD reports 'unlimited' qpairs, it has an unplanned limit of 99 due to * the length of the internal ring name that it creates, it breaks a limit in the generic * ring code and fails the qp initialization. + * FIXME: Reduce number of qpairs to 48, due to issue #2338 */ -#define MAX_NUM_QP 99 +#define MAX_NUM_QP 48 /* Global list and lock for unique device/queue pair combos */ struct comp_device_qp { struct compress_dev *device; /* ptr to compression device */