From: Pablo de Lara Date: Wed, 21 Jun 2017 06:28:19 +0000 (+0100) Subject: cryptodev: set driver name for all devices X-Git-Tag: spdx-start~2952 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d814e9b02cf65c42d52dd13279ba36edacb47247;p=dpdk.git cryptodev: set driver name for all devices When retrieving device information for a crypto driver, driver name was only set when it was a PCI driver. Getting the driver name from rte_device structure allows rte_cryptodev_get_info() function to return it regardless they are virtual or physical devices. Signed-off-by: Pablo de Lara Acked-by: Declan Doherty --- diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 2b2f0fe0dd..cb3e23609d 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -1144,8 +1144,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info) (*dev->dev_ops->dev_infos_get)(dev, dev_info); dev_info->pci_dev = RTE_DEV_TO_PCI(dev->device); - if (dev->driver) - dev_info->driver_name = dev->driver->pci_drv.driver.name; + dev_info->driver_name = dev->device->driver->name; }