From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 91A3D282 for ; Thu, 11 Dec 2014 07:02:08 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 10 Dec 2014 22:02:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="427646897" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by FMSMGA003.fm.intel.com with ESMTP; 10 Dec 2014 21:51:21 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 11 Dec 2014 14:02:04 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.5]) with mapi id 14.03.0195.001; Thu, 11 Dec 2014 14:02:03 +0800 From: "Qiu, Michael" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 25/28] eal/pci: Remove pci_probe/close_all_drivers() Thread-Index: AQHQE3ogY64KhhMem0WLzXgPK2XfNA== Date: Thu, 11 Dec 2014 06:02:02 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9ECF7@SHSMSX101.ccr.corp.intel.com> References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-26-git-send-email-mukawa@igel.co.jp> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "nakajima.yoshihiro@lab.ntt.co.jp" , "masutani.hitoshi@lab.ntt.co.jp" , "menrigh@brocade.com" Subject: Re: [dpdk-dev] [PATCH v3 25/28] eal/pci: Remove pci_probe/close_all_drivers() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2014 06:02:09 -0000 Why you do not call pci_invoke_all_drivers() directly in former patches?=0A= =0A= What you do is first modify then remove....=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 12/9/2014 2:34 PM, Tetsuya Mukawa wrote:=0A= > These functions are actually wrappers of pci_invoke_all_drivers().=0A= > Just call it directly.=0A= >=0A= > Signed-off-by: Tetsuya Mukawa =0A= > ---=0A= > lib/librte_eal/common/eal_common_pci.c | 30 ++++------------------------= --=0A= > 1 file changed, 4 insertions(+), 26 deletions(-)=0A= >=0A= > diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/comm= on/eal_common_pci.c=0A= > index 5ff7b49..5044d8e 100644=0A= > --- a/lib/librte_eal/common/eal_common_pci.c=0A= > +++ b/lib/librte_eal/common/eal_common_pci.c=0A= > @@ -130,29 +130,7 @@ pci_invoke_all_drivers(struct rte_pci_device *dev, i= nt type)=0A= > return 1;=0A= > }=0A= > =0A= > -/*=0A= > - * If vendor/device ID match, call the devinit() function of all=0A= > - * registered driver for the given device. Return -1 if initialization= =0A= > - * failed, return 1 if no driver is found for this device.=0A= > - */=0A= > -static int=0A= > -pci_probe_all_drivers(struct rte_pci_device *dev)=0A= > -{=0A= > - return pci_invoke_all_drivers(dev, INVOKE_PROBE);=0A= > -}=0A= > -=0A= > #if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAPP)= =0A= > -/*=0A= > - * If vendor/device ID match, call the devclose() function of all=0A= > - * registered driver for the given device. Return -1 if initialization= =0A= > - * failed, return 1 if no driver is found for this device.=0A= > - */=0A= > -static int=0A= > -pci_close_all_drivers(struct rte_pci_device *dev)=0A= > -{=0A= > - return pci_invoke_all_drivers(dev, INVOKE_CLOSE);=0A= > -}=0A= > -=0A= > static int=0A= > rte_eal_pci_invoke_one(struct rte_pci_addr *addr, int type)=0A= > {=0A= > @@ -165,10 +143,10 @@ rte_eal_pci_invoke_one(struct rte_pci_addr *addr, i= nt type)=0A= > =0A= > switch (type) {=0A= > case INVOKE_PROBE:=0A= > - ret =3D pci_probe_all_drivers(dev);=0A= > + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE);=0A= > break;=0A= > case INVOKE_CLOSE:=0A= > - ret =3D pci_close_all_drivers(dev);=0A= > + ret =3D pci_invoke_all_drivers(dev, INVOKE_CLOSE);=0A= > break;=0A= > }=0A= > if (ret < 0)=0A= > @@ -237,10 +215,10 @@ rte_eal_pci_probe(void)=0A= > =0A= > /* probe all or only whitelisted devices */=0A= > if (probe_all)=0A= > - ret =3D pci_probe_all_drivers(dev);=0A= > + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE);=0A= > else if (devargs !=3D NULL &&=0A= > devargs->type =3D=3D RTE_DEVTYPE_WHITELISTED_PCI)=0A= > - ret =3D pci_probe_all_drivers(dev);=0A= > + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE);=0A= > if (ret < 0)=0A= > rte_exit(EXIT_FAILURE, "Requested device " PCI_PRI_FMT=0A= > " cannot be used\n", dev->addr.domain, dev->addr.bus,=0A= =0A=