From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH v4] ethdev: replace bus specific struct with generic dev Date: Tue, 3 Apr 2018 11:06:49 +0200 Message-ID: References: <20180329175206.127943-1-ferruh.yigit@intel.com> <20180330151704.183495-1-ferruh.yigit@intel.com> <08358c50-1076-21c0-cf79-25d7a25d6255@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Ferruh Yigit , dev@dpdk.org, Shreyansh Jain , Allain Legacy , Tomasz Duszynski , Thomas Monjalon To: santosh Return-path: Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by dpdk.org (Postfix) with ESMTP id 319D51B40D for ; Tue, 3 Apr 2018 11:07:11 +0200 (CEST) Received: by mail-io0-f195.google.com with SMTP id l3so21123389iog.0 for ; Tue, 03 Apr 2018 02:07:11 -0700 (PDT) In-Reply-To: <08358c50-1076-21c0-cf79-25d7a25d6255@caviumnetworks.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" On Mon, Apr 2, 2018 at 6:13 PM, santosh wrote: > On Friday 30 March 2018 08:59 PM, David Marchand wrote: >> I can see we enforce the driver name by putting it after the call to >> .dev_infos_get. >> http://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.c#n2399 >> >> octeontx pmd seems to try to do something about it: >> http://dpdk.org/browse/dpdk/tree/drivers/net/octeontx/octeontx_ethdev.c#n622 >> >> Not sure it does something, might be a thing to cleanup. >> >> > In case, if your referring to driver_name update then > indeed its a cleanup [1]. > > Otherwise, I don't see any issue with v4 Or > may be /I /misunderstood your comment. I agree there is no fundamental issue. dev_info->device = dev->device; RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); (*dev->dev_ops->dev_infos_get)(dev, dev_info); dev_info->driver_name = dev->device->driver->name; If somebody (I mean some pmd out there) has a usecase with dev_info->device != dev->device, why not. Thomas ? -- David Marchand