From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 100AA5F5B for ; Thu, 15 Mar 2018 18:19:37 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id x7so11936794wmc.0 for ; Thu, 15 Mar 2018 10:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=k+6g5Awi0mPzfNWUa7SVDxuWnPwuYQGTTO221lZh/S0=; b=Mt/GgCSDslhooCk5wvLoYn0BH4dvmj6uY1W7yPHB9jzxCIm/vbPCydtOKrN+n+PK7n fFKxSwmV57+F0Y4X1RsZrmaImAPV6V29j5SC6st3YcjWPeV2l6ygpDDZ2zPsyfEskKTD 914R/Er5FrF62Qa2ggZkBUNFcwxXdD04/5l9xIINh2RsFNwmrbavaH1I/FDbbzSL94NO 9Y7PePSJNbLf8YA2KVB0WprBtAny/aOngqqGYZhT6KcqRwjwtJvs3UMV++ZC3MxW3fXT ffM2JfFwsEIOzUaT6a77OMwYUT+jQCYjTRGMt24f080ACgLdHN+PB+z1wE8bWzcCxJ2K h/kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=k+6g5Awi0mPzfNWUa7SVDxuWnPwuYQGTTO221lZh/S0=; b=sau5N1DgDf6qOuDMMWbxNozyNxzWq2cNr4swtjh+Gi4owDHnr61qF9oVTukh0suRv0 2PHg0zbfOx6/mzb4qC+Yte3dAhznXzr3A7NviqB2UoPPmuJPe1sJip2dIwk2YSmIni7r vpXSX+/L0x2BcQQBLPhPQ5ob1gCvoDmG4H9bRFSVLmMBixHPYiJfixztNfrSsJbv7ZWX GTY6Vj7OPuSgZup68FGp7mdFxB6gR+4OOO+N8CRDjNpR+0oIg0BsA6C0HDnwYzoeBfXs WZH7EbN952/ofwqRTZsCZvrXJPH4Hqg9KTo2zhWgITf4b4/8RzIANmozo5xUdQFQlMWJ VvBQ== X-Gm-Message-State: AElRT7FmVcWdH71qrx2p+r037wUs313dyWpjhrN+OsvnyQN5k9kQC3b0 GOl8sItohxdvd6dIQQ4g1HKThg== X-Google-Smtp-Source: AG47ELuTDXH3ofMeEH/d7pHiqrBPrVGo8t2Q+mG+YIrzMEo7MxQ8AzWKTyzPWDNaH5656lk8NRgEBg== X-Received: by 10.28.126.20 with SMTP id z20mr5245922wmc.152.1521134376471; Thu, 15 Mar 2018 10:19:36 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id j137sm6756991wmd.17.2018.03.15.10.19.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Mar 2018 10:19:35 -0700 (PDT) Date: Thu, 15 Mar 2018 18:19:21 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: "Wang, Xiao W" Cc: "Burakov, Anatoly" , "dev@dpdk.org" , "Wang, Zhihong" , "maxime.coquelin@redhat.com" , "yliu@fridaylinux.org" , "Liang, Cunming" , "Xu, Rosen" , "Chen, Junjie J" , "Daly, Dan" Message-ID: <20180315171921.zbdymoqrbfs6u6su@bidouze.vm.6wind.com> References: <20180309230809.63361-1-xiao.w.wang@intel.com> <20180309230809.63361-3-xiao.w.wang@intel.com> <20180314133035.tmqgh2ghdyv3b47e@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 2/3] bus/pci: expose sysfs parsing API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2018 17:19:37 -0000 On Thu, Mar 15, 2018 at 04:49:41PM +0000, Wang, Xiao W wrote: > Hi Rivet, > > > -----Original Message----- > > From: Gaëtan Rivet [mailto:gaetan.rivet@6wind.com] > > Sent: Wednesday, March 14, 2018 9:31 PM > > To: Burakov, Anatoly > > Cc: Wang, Xiao W ; dev@dpdk.org; Wang, Zhihong > > ; maxime.coquelin@redhat.com; > > yliu@fridaylinux.org; Liang, Cunming ; Xu, Rosen > > ; Chen, Junjie J ; Daly, Dan > > > > Subject: Re: [dpdk-dev] [PATCH 2/3] bus/pci: expose sysfs parsing API > > > > Hi, > > > > On Wed, Mar 14, 2018 at 11:19:31AM +0000, Burakov, Anatoly wrote: > > > On 09-Mar-18 11:08 PM, Xiao Wang wrote: > > > > Some existing sysfs parsing functions are helpful for the later vDPA > > > > driver, this patch make them global and expose them to shared lib. > > > > > > > > Signed-off-by: Xiao Wang > > > > --- > > > > drivers/bus/pci/linux/pci.c | 9 ++++----- > > > > drivers/bus/pci/linux/pci_init.h | 8 ++++++++ > > > > drivers/bus/pci/rte_bus_pci_version.map | 8 ++++++++ > > > > 3 files changed, 20 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c > > > > index abde64119..81e5e5650 100644 > > > > --- a/drivers/bus/pci/linux/pci.c > > > > +++ b/drivers/bus/pci/linux/pci.c > > > > @@ -32,7 +32,7 @@ > > > > extern struct rte_pci_bus rte_pci_bus; > > > > -static int > > > > +int > > > > pci_get_kernel_driver_by_path(const char *filename, char *dri_name) > > > > > > Here and in other places - shouldn't this too be prefixed with rte_? > > > > > > > A public PCI function should be prefixed by rte_pci_ yes. > > OK, will add this prefix. > > > > > Additionally, if this function was to be exposed, then there should be a > > BSD implementation as well (shared map file). > > > > I don't know how BSD works, I'm not sure parsing the filesystem is the > > way to get a PCI driver name. If so, maybe the function should be called > > another, generic, way, that would work for both linux and BSD (and > > ideally, having a real BSD implementation). > > BSD is not parsing the filesystem, it uses PCIOCGETCONF ioctl to retrieve > PCI device information. > This function is quite linux, especially for the API name. I'm afraid we can > only return err on BSD for this API. How about renaming the function to something like rte_pci_device_kdriver_name(); and allowing for a sensible BSD implementation to happen if someone needs it? -- Gaëtan Rivet 6WIND