[dpdk-dev,02/12] cryptodev: set driver name for all devices
Checks
Commit Message
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 <pablo.de.lara.guarch@intel.com>
---
lib/librte_cryptodev/rte_cryptodev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 24/05/2017 4:27 PM, Pablo de Lara wrote:
> 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 <pablo.de.lara.guarch@intel.com>
> ---
...
>
Acked-by: Declan Doherty <declan.doherty@intel.com>
@@ -1166,8 +1166,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;
}