From ca89b502aaf170ad84b33536dbc708fbd54f6cfa Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 20 Jan 2022 16:01:29 +0100 Subject: [PATCH] vbdev_crypto: skip handling QAT_ASYM devices Historically only QAT_SYM devices for crypto were supported. The DPDK submodule explicitly disabled its compilation. For details please see: https://review.spdk.io/gerrit/c/spdk/dpdk/+/9217 Starting with DPDK 21.11 QAT_SYM and QAT_ASYM were merged together, so it is no longer possible to disable it QAT_ASYM as it was before. As vbdev_crypto didn't make use of it, this driver is now skipped in preparation for update to DPDK 21.11. Signed-off-by: Tomasz Zawadzki Change-Id: Ib606a4b450cd224d96bc21a64384297b2182967c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11178 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- module/bdev/crypto/vbdev_crypto.c | 6 ++++++ module/bdev/crypto/vbdev_crypto.h | 1 + 2 files changed, 7 insertions(+) diff --git a/module/bdev/crypto/vbdev_crypto.c b/module/bdev/crypto/vbdev_crypto.c index 06f3ac3c70..7b333a0ea8 100644 --- a/module/bdev/crypto/vbdev_crypto.c +++ b/module/bdev/crypto/vbdev_crypto.c @@ -260,6 +260,12 @@ create_vbdev_dev(uint8_t index, uint16_t num_lcores) cdrv_id = device->cdev_info.driver_id; cdev_id = device->cdev_id = index; + /* QAT_ASYM devices are not supported at this time. */ + if (strcmp(device->cdev_info.driver_name, QAT_ASYM) == 0) { + free(device); + return 0; + } + /* Before going any further, make sure we have enough resources for this * device type to function. We need a unique queue pair per core accross each * device type to remain lockless.... diff --git a/module/bdev/crypto/vbdev_crypto.h b/module/bdev/crypto/vbdev_crypto.h index 98ca50d81e..d079d13abf 100644 --- a/module/bdev/crypto/vbdev_crypto.h +++ b/module/bdev/crypto/vbdev_crypto.h @@ -43,6 +43,7 @@ #define AESNI_MB "crypto_aesni_mb" #define QAT "crypto_qat" +#define QAT_ASYM "crypto_qat_asym" /* Supported ciphers */ #define AES_CBC "AES_CBC" /* QAT and AESNI_MB */