From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4DCB06A95 for ; Thu, 11 Dec 2014 04:24:24 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 10 Dec 2014 19:22:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,555,1413270000"; d="scan'208";a="651990362" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga002.jf.intel.com with ESMTP; 10 Dec 2014 19:24:05 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 11 Dec 2014 11:24:04 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.216]) with mapi id 14.03.0195.001; Thu, 11 Dec 2014 11:24:03 +0800 From: "Qiu, Michael" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 18/28] eal/pci: Prevent double registrations for pci_device_list Thread-Index: AQHQE3ob879xQHL5kUeJo0aB0gyrcQ== Date: Thu, 11 Dec 2014 03:24:02 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9EBEA@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-19-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 18/28] eal/pci: Prevent double registrations for pci_device_list 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 03:24:24 -0000 If you modify one function, make sure all places, where call the=0A= function, have been modified accordingly in same patch.=0A= =0A= Please do not split it. Because we must make sure every patch could=0A= make dpdk work( I think without this patch, it will have some issue=0A= after you applied "Replace pci address comparison code by=0A= eal_compare_pci_addr").=0A= =0A= What's more, with your patch set, if someone wants to find out the=0A= commit, which result in bugs or issues, use git bisect, it may be fail=0A= by your patch, although it's none of your patch's business.=0A= =0A= So please merge this patch to=0A= [PATCH v3 03/28] eal/pci: Replace pci address comparison code by=0A= eal_compare_pci_addr=0A= =0A= If other patch, I missed, with the same issue, please take same action.=0A= =0A= Thanks,=0A= Michael=0A= On 12/9/2014 2:33 PM, Tetsuya Mukawa wrote:=0A= > The patch fixes pci_scan_one() not to register same pci devices twice.=0A= >=0A= > Signed-off-by: Tetsuya Mukawa =0A= > ---=0A= > lib/librte_eal/linuxapp/eal/eal_pci.c | 9 ++++++---=0A= > 1 file changed, 6 insertions(+), 3 deletions(-)=0A= >=0A= > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linux= app/eal/eal_pci.c=0A= > index fe212d1..355c858 100644=0A= > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c=0A= > @@ -306,14 +306,17 @@ pci_scan_one(const char *dirname, uint16_t domain, = uint8_t bus,=0A= > }=0A= > else {=0A= > struct rte_pci_device *dev2 =3D NULL;=0A= > + int ret;=0A= > =0A= > TAILQ_FOREACH(dev2, &pci_device_list, next) {=0A= > - if (eal_compare_pci_addr(&dev->addr, &dev2->addr) !=3D 0)=0A= > + ret =3D eal_compare_pci_addr(&dev->addr, &dev2->addr);=0A= > + if (ret > 0)=0A= > continue;=0A= > - else {=0A= > + else if (ret < 0) {=0A= > TAILQ_INSERT_BEFORE(dev2, dev, next);=0A= > return 0;=0A= > - }=0A= > + } else /* already registered */=0A= > + return 0;=0A= > }=0A= > TAILQ_INSERT_TAIL(&pci_device_list, dev, next);=0A= > }=0A= =0A=