From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id C295A4F9A for ; Wed, 14 Mar 2018 14:30:51 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id z12so4791775wrg.4 for ; Wed, 14 Mar 2018 06:30:51 -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=GTsfvH1YCumK9I2aQ6jNnxkcG9uHOWT56KD5nED7FPA=; b=vq1r/XIvn6eGy7pXQZ3VVORJ/1Xe+b1TOZ26eqjDHWlHjVQtGtkEZEOCHMlOz2UhIG zZu43IRvOBJUmeoKSRUJBUFGqN8L/5jtxwkqdTQegAvs0qXvPXV91IuiaD5niVSew9PA LXPggNSoEr32022szGMVtm9sRMT0v/sqnw8yKRjKmjhmHBgYuyvUEuhhp4SE48tOZpYU c2xtXA/l7Tp2L1uSQmB6qnKL6WnDeMYG3RAXZX/subDBfwWQ8mkPOJNx3j35jPZjV3wC G4skBGngc845Ibdtrga3D7ezyHQI/6e3Uv69u9hQ3nrEk0b2M6LR7JzeWimdIuhPclX0 H/Jg== 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=GTsfvH1YCumK9I2aQ6jNnxkcG9uHOWT56KD5nED7FPA=; b=AUVEtKud17wh7ZBCPt2n6kjXPFxWiK52NQGwW1IyhytU+2tTvHvvg/LD3n1vDLty+v oehBQNFmf4INm74clohcCtDirToVYfNi187LICKt92qIe52mHbu2vNgUthIJAIPBrfO1 NcqxNS7rpcMIWM0N7PNkH+P7Q2WtGgxQVYwIASYq2nSVN1ltkIricZqOESPBHD5MGd96 a0rSaUhCWH9iFUh9pqlrO4Yz0w3z9qzj7hhWnx1oWgxhsWjdjyF9X7dXzuJwkefoC5Rh LibJiCvI2UUZO0dpKdHgTPU5DfbP1fIsXQFF0K+uYGo0GBFao2Yem1lyTvW9XO6iONMH Cxmg== X-Gm-Message-State: AElRT7F7KdJKgZVwCnI6dDeU3nORFLEm2pCLKgXxZGWPtFxOrjlpB4cS E+2gmCpjtod2+s3gnEYW2kbDVQ== X-Google-Smtp-Source: AG47ELsU7H8vg+FL/MRZjncbJ0rVSxj5yextGZ9QW1Y8UcAp0c/IQbfbnmDgeYiCbngD5PBaE83KLw== X-Received: by 10.223.136.13 with SMTP id d13mr2081758wrd.271.1521034251007; Wed, 14 Mar 2018 06:30:51 -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 10sm4531325wrv.95.2018.03.14.06.30.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Mar 2018 06:30:49 -0700 (PDT) Date: Wed, 14 Mar 2018 14:30:35 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: "Burakov, Anatoly" Cc: Xiao Wang , dev@dpdk.org, zhihong.wang@intel.com, maxime.coquelin@redhat.com, yliu@fridaylinux.org, cunming.liang@intel.com, rosen.xu@intel.com, junjie.j.chen@intel.com, dan.daly@intel.com Message-ID: <20180314133035.tmqgh2ghdyv3b47e@bidouze.vm.6wind.com> References: <20180309230809.63361-1-xiao.w.wang@intel.com> <20180309230809.63361-3-xiao.w.wang@intel.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: Wed, 14 Mar 2018 13:30:51 -0000 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. 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). > > -- > Thanks, > Anatoly -- Gaëtan Rivet 6WIND