Hi Fan, >-----Original Message----- >From: dev <dev-boun...@dpdk.org> On Behalf Of Fan Zhang >Sent: Friday 22 October 2021 18:04 >To: dev@dpdk.org >Cc: gak...@marvell.com; Zhang, Roy Fan <roy.fan.zh...@intel.com>; Kusztal, >ArkadiuszX <arkadiuszx.kusz...@intel.com>; Ji, Kai <kai...@intel.com> >Subject: [dpdk-dev] [dpdk-dev v4 8/9] crypto/qat: add gen specific data and >function > >This patch adds the symmetric and asymmetric crypto data >structure and function prototypes for different QAT >generations. > >Signed-off-by: Arek Kusztal <arkadiuszx.kusz...@intel.com> >Signed-off-by: Fan Zhang <roy.fan.zh...@intel.com> >Signed-off-by: Kai Ji <kai...@intel.com> >--- <snip> >@@ -101,19 +95,22 @@ qat_asym_dev_create(struct qat_pci_device >*qat_pci_dev, > .socket_id = qat_dev_instance->pci_dev- >>device.numa_node, > .private_data_size = sizeof(struct qat_cryptodev_private) > }; >+ struct qat_capabilities_info capa_info; >+ const struct rte_cryptodev_capabilities *capabilities; >+ const struct qat_crypto_gen_dev_ops *gen_dev_ops = >+ &qat_asym_gen_dev_ops[qat_pci_dev->qat_dev_gen]; > char name[RTE_CRYPTODEV_NAME_MAX_LEN]; > char capa_memz_name[RTE_CRYPTODEV_NAME_MAX_LEN]; > struct rte_cryptodev *cryptodev; > struct qat_cryptodev_private *internals; >+ uint64_t capa_size; > >- if (qat_pci_dev->qat_dev_gen == QAT_GEN4) { >- QAT_LOG(ERR, "Asymmetric crypto PMD not supported on >QAT 4xxx"); >- return -EFAULT; >- } >- if (qat_pci_dev->qat_dev_gen == QAT_GEN3) { >- QAT_LOG(ERR, "Asymmetric crypto PMD not supported on >QAT c4xxx"); >+ if (gen_dev_ops->cryptodev_ops == NULL) { >+ QAT_LOG(ERR, "Device %s does not support asymmetric >crypto", >+ name); > return -EFAULT; > }
I believe the name buffer is empty when it is included in the LOG above - it seems to be set below using snprintf. >+ > snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s", > qat_pci_dev->name, "asym"); > QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name); <snip> Thanks, Ciara