From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo de Lara Subject: [PATCH 02/12] cryptodev: set driver name for all devices Date: Wed, 24 May 2017 16:27:04 +0100 Message-ID: <1495639634-74846-3-git-send-email-pablo.de.lara.guarch@intel.com> References: <1495639634-74846-1-git-send-email-pablo.de.lara.guarch@intel.com> Cc: dev@dpdk.org, Pablo de Lara To: declan.doherty@intel.com, thomas@monjalon.net Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 83E847D02 for ; Wed, 24 May 2017 17:27:02 +0200 (CEST) In-Reply-To: <1495639634-74846-1-git-send-email-pablo.de.lara.guarch@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_cryptodev/rte_cryptodev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index edd683c..a5a5c36 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -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; } -- 2.7.4