From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v8 22/25] eal/pci: inherit rte_driver by rte_pci_driver Date: Thu, 1 Sep 2016 19:24:57 +0530 Message-ID: <9d0aa9a3-6238-b341-e739-dcee1f3d83d9@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1472219823-29486-1-git-send-email-shreyansh.jain@nxp.com> <1472219823-29486-23-git-send-email-shreyansh.jain@nxp.com> <57C5AA99.7030005@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , To: Ferruh Yigit , Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0070.outbound.protection.outlook.com [104.47.40.70]) by dpdk.org (Postfix) with ESMTP id A0B4D2716 for ; Thu, 1 Sep 2016 15:55:04 +0200 (CEST) In-Reply-To: <57C5AA99.7030005@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, On Tuesday 30 August 2016 09:17 PM, Ferruh Yigit wrote: > On 8/26/2016 2:57 PM, Shreyansh Jain wrote: >> Remove the 'name' member from rte_pci_driver and move to generic rte_driver. >> >> Most of the PMD drivers were initially using DRIVER_REGISTER_PCI(..) >> as well as assigning a name to eth_driver.pci_drv.name member. >> In this patch, only the original DRIVER_REGISTER_PCI(..) name has been >> populated into the rte_driver.name member - assignments through eth_driver >> has been removed. >> >> Signed-off-by: Jan Viktorin >> Signed-off-by: Shreyansh Jain >> --- > > There are a few name fields: > > 1) eth_dev->data->name > 2) eth_dev->data->drv_name > 3) rte_driver->name > 4) dev_info->driver_name > > > What should be the relation between them? > > I guess 1) is device_name, 2, 3, 4 are same thing and driver_name. Yes, (1) is the ethernet device name. (2), (3) are same, i.e. driver name (4) is an output field for eth_dev_info_get method and would represent same thing as (2) and (3). > > If this is correct, virtual drivers needs to be updated for this, > because for them 3 != (2 == 4). They all use global variable for 2 & 4. Ok. I didn't notice this. I will check it once again. > > And what do you think removing 2) completely? > I guess it exists for virtual devices, since for them eth_driver is not > exists and not able to access to rte_driver->name from eth_dev, but this > is solvable. Ok. Probably, one way to solve is to make eth_dev->driver point to rte_vdev_driver. That way, rte_driver->name would replace eth_dev->data->drv_name. I will give it a thought. Thanks for pointing out. > > > Thanks, > ferruh > - Shreyansh