From: Pablo de Lara Date: Wed, 21 Jun 2017 06:28:22 +0000 (+0100) Subject: cryptodev: set PCI info only when device is PCI X-Git-Tag: spdx-start~2949 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5a7af3bb9881ff6a07ee61100409fcc5301f3705;p=dpdk.git cryptodev: set PCI info only when device is PCI Do not set PCI information in the device information structure for any crypto device, just for the ones that are PCI, so this is set internally in the PCI crypto PMDs (only QAT now). Signed-off-by: Pablo de Lara Acked-by: Declan Doherty --- diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 37d8a585b8..0a14c2dceb 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -1240,8 +1240,8 @@ int qat_dev_close(struct rte_cryptodev *dev) return 0; } -void qat_dev_info_get(__rte_unused struct rte_cryptodev *dev, - struct rte_cryptodev_info *info) +void qat_dev_info_get(struct rte_cryptodev *dev, + struct rte_cryptodev_info *info) { struct qat_pmd_private *internals = dev->data->dev_private; @@ -1254,6 +1254,7 @@ void qat_dev_info_get(__rte_unused struct rte_cryptodev *dev, info->capabilities = internals->qat_dev_capabilities; info->sym.max_nb_sessions = internals->max_nb_sessions; info->dev_type = RTE_CRYPTODEV_QAT_SYM_PMD; + info->pci_dev = RTE_DEV_TO_PCI(dev->device); } } diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 46b9adc9cb..8e5382db80 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -1139,7 +1139,6 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); (*dev->dev_ops->dev_infos_get)(dev, dev_info); - dev_info->pci_dev = RTE_DEV_TO_PCI(dev->device); dev_info->driver_name = dev->device->driver->name; }