From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id DD87C9E7 for ; Wed, 15 Feb 2017 12:20:39 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id v186so39285531wmd.0 for ; Wed, 15 Feb 2017 03:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=K/uQUIG6okBUpVAegYJcXNRhhvJt/81Pr1kb+ROnZug=; b=Za3mb2n1nv4apqIfiFiUl0YrbogFbaK5g1rGvr9sGFrpZORx/AUHWr11JFqvXJqzfA KdOb1SaV6LFDgeuLMDK6gtLfoVrsBQrMLGbS1oO/a/9vv0hrKuvX1HmMb5LfDveZ6kmb SfwkceiNc9xqmpTbk3G5g8yrnK8JZ9PAlIpZz+ZyN+ZKXFY0KlE8tpuHntuNVzki43AW uqP7RQ2AZf6G0HWUWATpsa+iCHUKiFUW8DxkeRMb9Uyhut1ovMXLZOklFhnQOMro583E ZpXsc/oD382MPWpPl7rntdaBIxhJzC8fZGE309oHi8bxEG3QpT2zr2iyJ7QwSeL3j4/R jY4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=K/uQUIG6okBUpVAegYJcXNRhhvJt/81Pr1kb+ROnZug=; b=lna0PaMqEvAf+AwUOUop/jujCAwp366fNrOJmrFWhEKUO4LYFF3E4K8SQYuwoUDrtd pY0dhPwpomgTVShY6VfVw1F99u+7q1bkLOWRFVRzRir+vfo/pnkypt0cm8KWbtbg6Yyn QgDAIYTqdtmszlV9PFcoWtWN3sPp4QpnE2r5EDqDu7yOdvTub5rF6da/eT0rZz7tedDN 6JvC6zKoVpABRrtoHnJPxdTqvSF1CNMYZd5me9rUuuyvEAX/qGINZIdtJZFLzV0kmUoW UJLoxtJ5FopQVAgkRqK2XUbOaIE+rUusPqmT6Y8fYw8Z7nGoR/H3h+HlJIsGDxQiu+Zd 5SPQ== X-Gm-Message-State: AMke39lh6NzKXxBmwXYUSqH6ccOEBGqDxdL7+M3dz8iGVzdz7PMZLn3LdY19jJvRWfF1Vzmz X-Received: by 10.28.147.147 with SMTP id v141mr8021266wmd.110.1487157639565; Wed, 15 Feb 2017 03:20:39 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id k44sm4469327wrk.59.2017.02.15.03.20.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2017 03:20:38 -0800 (PST) From: Thomas Monjalon To: Jan Blunck Cc: Shreyansh Jain , dev@dpdk.org Date: Wed, 15 Feb 2017 12:20:37 +0100 Message-ID: <3443176.du41bGMhrB@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1484748329-5418-1-git-send-email-shreyansh.jain@nxp.com> <1484801117-779-10-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v11 09/13] pci: add bus driver 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, 15 Feb 2017 11:20:40 -0000 2017-02-15 11:42, Jan Blunck: > > /** > > + * Add a PCI device to the PCI Bus (append to PCI Device list). This function > > + * also updates the bus references of the PCI Device (and the generic device > > + * object embedded within. > > + * > > + * @param pci_dev > > + * PCI device to add > > + * @return void > > + */ > > +void rte_eal_pci_add_device(struct rte_pci_device *pci_dev); > > + > > Who would be the user of this? > > From my understanding a device will show up on the bus if: > 1. bus->scan() finds it > 2. bus->attach(devargs) explicitly adds it to the whitelist > > Both methods shouldn't require us to expose the API outside of eal. I agree > > +struct rte_pci_bus rte_pci_bus = { > > + .bus = { > > + .scan = rte_eal_pci_scan, > > + .probe = rte_eal_pci_probe, > > + }, > > + .device_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.device_list), > > + .driver_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.driver_list), > > I don't see why this is necessary and I believe it makes people think > we might want to model topology. It's better to keep it simple and > have it locally in eal_common_pci.c. I agree