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 64E6C2BE1 for ; Wed, 28 Jun 2017 10:05:53 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id c11so170297091wrc.3 for ; Wed, 28 Jun 2017 01:05:53 -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=lyZGFAf/lBbPtlGRfWCcwrDiKYgdKjuDUkv7eUba8P8=; b=O9RJxhq2H1pncijbaEiR2raN8rxJm727UhMd+WmIqEFtEfKwr1mY/XH6a5Y1/d70Hh TpMAxmncBLPS7+Ilt0kHM59l/vTKRg64ckKCWG2UZXm9kl4D/pLHrSQbuZ9G4VuujRnl srveg8tGW4YzOCsQTEOpIUV6WIhpjw1Oymv7clKvGQ+Oql/kHQVJiC+wav57rYzxbLGf sJrtZEjYA47eyVB9Xstu7BtZPPk0tkY4P3g6s3u07ZDm7O/CqaS5kADaei6yEfN1UGHn gEMkI8MLzonSFUVlZV+TwbvgbGYRKZbBENPm3jdfR1I/b/X+dSzGCZQfTlwVDzpzW6dq +e/Q== 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=lyZGFAf/lBbPtlGRfWCcwrDiKYgdKjuDUkv7eUba8P8=; b=J6rhsJX0t8kldmbKXhazVMZ8gcInPZVCAOcJgVqbJiavwOlCN8DM1vlDIuYDdFDCHG XjZM0O26NYCslLesmSK9qlf/FGidzoq3xTIfcKTlvLu1k1IIgOcUTLDUjaQFjolKTXF7 awnfpLg53Kgp4uoJEQw5u2r90mAuOPq7IAOO94RDYDdtelaMiPq2PX3rnN7ZwVncn0dO 5kwL1OpFKcZiUKn182zeKvk7FK8cLA42dZrY/KQXeCzoE3n4KDEnoYwmAFusx6OaAsjn unCnR1gSGLhRPwwf3HS2b+nxAnQBX+PbSx5nMiVGt33uocGzxr6Q0mOiL45OyF0squo4 9dgA== X-Gm-Message-State: AKS2vOyEzGibequglyd0+bo8AJgUcvSy5wASkjU/0kRx1Gvu7tpcxFEw vnURVxgY3KytcwVP0jc= X-Received: by 10.223.136.37 with SMTP id d34mr20579511wrd.160.1498637153068; Wed, 28 Jun 2017 01:05:53 -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 w96sm917881wrc.33.2017.06.28.01.05.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 01:05:52 -0700 (PDT) Date: Wed, 28 Jun 2017 10:05:44 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20170628080544.GF13355@bidouze.vm.6wind.com> References: <3705717.5YLzOZFs93@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3705717.5YLzOZFs93@xps> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v5 12/19] devargs: generic device representation 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, 28 Jun 2017 08:05:53 -0000 On Wed, Jun 28, 2017 at 09:44:18AM +0200, Thomas Monjalon wrote: > 21/06/2017 01:35, Gaetan Rivet: > > Remove the dependency of this subsystem upon bus specific device > > representation. > > > > Devargs only validates that a device declaration is correct and handled > > by a bus. The device interpretation is done afterward within the bus. > > > > Signed-off-by: Gaetan Rivet > > --- > > app/test-pmd/testpmd.c | 9 ++---- > > lib/librte_eal/common/eal_common_devargs.c | 48 +++++------------------------ > > lib/librte_eal/common/eal_common_pci.c | 9 ++++-- > > lib/librte_eal/common/eal_common_vdev.c | 17 +++++----- > > lib/librte_eal/common/include/rte_devargs.h | 16 ++-------- > > lib/librte_eal/common/include/rte_vdev.h | 2 +- > > test/test/test_devargs.c | 9 ++---- > > 7 files changed, 30 insertions(+), 80 deletions(-) > > Is it correct to add this change when rebasing? > > --- a/lib/librte_eal/common/eal_common_pci.c > +++ b/lib/librte_eal/common/eal_common_pci.c > @@ -533,7 +533,7 @@ pci_plug(struct rte_devargs *da) > struct rte_pci_device *pdev; > struct rte_pci_addr *addr; > > - addr = &da->pci.addr; > + da->bus->parse(da->name, &addr); > /* > * Update eventual pci device in global list. > * Insert it if none was found. > This is the spirit of this API at least :). bus->parse() will verify that the name is correct, as well as interpret it to obtain the bus-specific representation of the device. > > Devargs only validates that a device declaration is correct and handled > > by a bus. The device interpretation is done afterward within the bus. So the PCI address can be removed from rte_devargs. As such, it cannot be intepreted during parsing, and it must be done afterward from within the bus itself. I was wondering whether I should update all subsystems relying on this previous rte_devargs logic at once, EAL + vdev + PCI + tests etc... But this is the only way to keep compilation atomicity between patches. -- Gaëtan Rivet 6WIND