From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by dpdk.org (Postfix) with ESMTP id 5442D8032 for ; Thu, 11 Dec 2014 08:21:04 +0100 (CET) Received: by mail-pa0-f41.google.com with SMTP id rd3so4520610pab.28 for ; Wed, 10 Dec 2014 23:21:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=OVCLDMLr+OVWVrzrVGR+w2DdxLNheBJq5PVnqNQiN+Y=; b=Hcb+DXCGqDo5ziyKMKbthYo2Lz6BLLIIFht37cIBzVn0xoMIpfeqr9i9ifxc7uvsg9 OPolaJ0b0EIwjTC3MhHZPoEqQGLOyCaGqOjSZ8HgY3m+s11cpen7/CPoB9D/idho+t9U xGG+Jau8bH65RCPt9As4/al0AdiqIo69YtKxolyHXENz65pKu5tzsEuvHBkYiAktayjf PQ7hULcGrgYhuSrtcuhei03NF58P4Jg5WYQ7T2JOS1FU72YisujeURtFeVglHLLHlsLB vKxTPyBAHm4rdfLnTzXG8TjLNooJ68Py69yQMGqJ1faF95w4j1gyjZ5UsrCLD4xmUL3q +OGQ== X-Gm-Message-State: ALoCoQnSD7rBO3oUgnemUC1r9qeKqkrayeEsGTVNlc3JFsiymQg/z0T+YjYcOh7V2HiXtma8pC8O X-Received: by 10.70.23.99 with SMTP id l3mr14354235pdf.86.1418282463583; Wed, 10 Dec 2014 23:21:03 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id k10sm502181pdm.3.2014.12.10.23.21.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Dec 2014 23:21:03 -0800 (PST) Message-ID: <548945DB.2070606@igel.co.jp> Date: Thu, 11 Dec 2014 16:20:59 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Qiu, Michael" , "dev@dpdk.org" 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> <533710CFB86FA344BFBF2D6802E60286C9ECF7@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286C9ECF7@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 07:21:04 -0000 (2014/12/11 15:02), Qiu, Michael wrote: > Why you do not call pci_invoke_all_drivers() directly in former patches= ? > > What you do is first modify then remove.... I have received comments for former patches internally. And you know, this patch series are long. For those reviewers, I didn't want to change original patch separation radically. Anyway, I will merge a few patches. At the time I will merge these. Thanks, Tetsuya > Thanks, > Michael > > On 12/9/2014 2:34 PM, Tetsuya Mukawa wrote: >> These functions are actually wrappers of pci_invoke_all_drivers(). >> Just call it directly. >> >> Signed-off-by: Tetsuya Mukawa >> --- >> lib/librte_eal/common/eal_common_pci.c | 30 ++++---------------------= ----- >> 1 file changed, 4 insertions(+), 26 deletions(-) >> >> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/c= ommon/eal_common_pci.c >> index 5ff7b49..5044d8e 100644 >> --- a/lib/librte_eal/common/eal_common_pci.c >> +++ b/lib/librte_eal/common/eal_common_pci.c >> @@ -130,29 +130,7 @@ pci_invoke_all_drivers(struct rte_pci_device *dev= , int type) >> return 1; >> } >> =20 >> -/* >> - * If vendor/device ID match, call the devinit() function of all >> - * registered driver for the given device. Return -1 if initializatio= n >> - * failed, return 1 if no driver is found for this device. >> - */ >> -static int >> -pci_probe_all_drivers(struct rte_pci_device *dev) >> -{ >> - return pci_invoke_all_drivers(dev, INVOKE_PROBE); >> -} >> - >> #if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAP= P) >> -/* >> - * If vendor/device ID match, call the devclose() function of all >> - * registered driver for the given device. Return -1 if initializatio= n >> - * failed, return 1 if no driver is found for this device. >> - */ >> -static int >> -pci_close_all_drivers(struct rte_pci_device *dev) >> -{ >> - return pci_invoke_all_drivers(dev, INVOKE_CLOSE); >> -} >> - >> static int >> rte_eal_pci_invoke_one(struct rte_pci_addr *addr, int type) >> { >> @@ -165,10 +143,10 @@ rte_eal_pci_invoke_one(struct rte_pci_addr *addr= , int type) >> =20 >> switch (type) { >> case INVOKE_PROBE: >> - ret =3D pci_probe_all_drivers(dev); >> + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE); >> break; >> case INVOKE_CLOSE: >> - ret =3D pci_close_all_drivers(dev); >> + ret =3D pci_invoke_all_drivers(dev, INVOKE_CLOSE); >> break; >> } >> if (ret < 0) >> @@ -237,10 +215,10 @@ rte_eal_pci_probe(void) >> =20 >> /* probe all or only whitelisted devices */ >> if (probe_all) >> - ret =3D pci_probe_all_drivers(dev); >> + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE); >> else if (devargs !=3D NULL && >> devargs->type =3D=3D RTE_DEVTYPE_WHITELISTED_PCI) >> - ret =3D pci_probe_all_drivers(dev); >> + ret =3D pci_invoke_all_drivers(dev, INVOKE_PROBE); >> if (ret < 0) >> rte_exit(EXIT_FAILURE, "Requested device " PCI_PRI_FMT >> " cannot be used\n", dev->addr.domain, dev->addr.bus,