From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id B5CCE5583 for ; Wed, 21 Jun 2017 13:39:37 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id 77so131228453wrb.1 for ; Wed, 21 Jun 2017 04:39: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=Aqui5ZzwfqTFtVVJ+GlVtJXuQC6aflCt7G5HsEk2HEI=; b=xOhyaq0XGD2Z7TivuHI8kS5WTBnIvsFkCthTe4CX0OZW0L6fSw+jaz14A07QtFzpkW tI9exWsIKUTy0ZYr5eNe6AXKSHmfJXlAeaXKkZSGquhmzbX7P5IexvPLWHXuAHqOcq0U +YFa/C+y3+LyEpToasNw7zYmddDG9tFT4VZt08+1HjwsfgWuqhJx4ByueW0URRJWUcRM N5S01WkDsyfCAnLzalJAH2XyuRUD4e8q1XR5k++HEC4nJH3ecf3GviXvWbMsvGS+SJnb KNKk1XBA43ZvLw6hP0kn1BEOh3OarZSa7pumKGyMBG/VoK/pspU0gystG83SGYgdhb1/ ya3w== 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=Aqui5ZzwfqTFtVVJ+GlVtJXuQC6aflCt7G5HsEk2HEI=; b=ofViyNE8vIugwut80rv9O1t/o1SrB4YPoUDwx61KYHDj1L12RCvvcH1aa/q+jLJSJ0 al7jbmmBNGQoW2l4N9URz1Wtp0SOJFzHHe/F5Zz1TnSETFo/GUK21WY87rlJlNqZFgW9 DS0Z8emgKgc6jdNrjPjLpLDuvU5QpaXpjaP6WOZLXcseX5hoNETLn7rCXQbp/FVgRf3f /FlVZ/H7++hNGdP3dfs+6kSsE+aVI+PFlm6/ROY2lWvqbitPVZgXbPN261tLv6EoASmc /JrAFmLqv+mN2PGrFQ+a23923KHm8eUFudAGpv7iZ0fJ//NeevytsBEozgDSVMNH4KiL fcNw== X-Gm-Message-State: AKS2vOxYEE7hXAMnQNgT3FLu/SqV3DP+Sqgk+tMr8X6/kte1mja/H6Wb trcJ7ZsGJ9htsUki2Fc= X-Received: by 10.223.160.111 with SMTP id l44mr10903717wrl.31.1498045177248; Wed, 21 Jun 2017 04:39:37 -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 l17sm10479547wre.25.2017.06.21.04.39.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 04:39:36 -0700 (PDT) Date: Wed, 21 Jun 2017 13:39:29 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20170621113929.GE2344@bidouze.vm.6wind.com> References: <8418992.7tWpiUoDtu@xps> <20170621094026.GD2344@bidouze.vm.6wind.com> <10937675.k8W90Yh6uJ@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <10937675.k8W90Yh6uJ@xps> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 5/9] pmdinfogen: move to drivers subdirectory 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, 21 Jun 2017 11:39:38 -0000 On Wed, Jun 21, 2017 at 12:00:24PM +0200, Thomas Monjalon wrote: > 21/06/2017 11:40, Gaëtan Rivet: > > On Wed, Jun 21, 2017 at 09:57:18AM +0200, Thomas Monjalon wrote: > > > Another (probably better) solution is to keep basic definitions > > > and helpers in EAL: > > > - rte_pci.h keeps only some PCI definitions and helpers > > > like rte_pci_addr and eal_parse_pci_BDF() in EAL > > > - bus management is done in the PCI driver > > > > > > For pmdinfogen, we just need struct rte_pci_id. > > > Other tools or applications will probably need this kind of basic > > > struct and functions available in EAL. > > > > I mostly agree, this proposal should be kept to a minimum at first for > > this release and carefully expanded afterward. > > > > If that's ok, I will propose a new version of this patchset with a new > > librte_pci, that might fix both pmdinfogen and librte_kni. > > Why creating a new librte_pci instead of just keeping it in EAL? While I agree that it makes sense to have PCI helpers shared among several subsystems, I do not see a reason for the EAL to rely on it. The EAL is the bedrock of the whole system. Having those helpers within would mean that one expects them to be used to build this bedrock. It would be misleading. In the context of a framework, aimed at being used by others, an okay architecture is one that works. A good architecture is one that intrinsically convey meaning and explains its goal to developers relying on it. I think that having this PCI lib within EAL just because nothing prevents us from doing so is mistaken, in this regard. Conversely, the argument about being conservative in the changes, especially to an essential part such as the EAL, is obsolete for this release and this subsystem, as deep changes are necessary anyway, and the design should be right from the get go to allow further stability. Finally, the PCI lib and bus is also an example for other developers. I do not think that all other hardware buses should be allowed in adding their own specific helpers to the EAL. In this regard, there is no reason to have an exception made just for the PCI lib. -- Gaëtan Rivet 6WIND