From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9BAC7255; Sat, 29 Sep 2018 08:43:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Sep 2018 23:43:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,318,1534834800"; d="scan'208";a="237068072" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 28 Sep 2018 23:43:25 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 28 Sep 2018 23:43:25 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 28 Sep 2018 23:43:24 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.183]) with mapi id 14.03.0319.002; Sat, 29 Sep 2018 14:43:22 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon CC: "dev@dpdk.org" , "Burakov, Anatoly" , "Yigit, Ferruh" , "geoffrey.lv@gmail.com" , "ajit.khaparde@broadcom.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] bus/pci: fix unexpected resource mapping override Thread-Index: AQHUQ2GagQQ7QW6vRU2h4SDUxq2P+qUCMvuAgASUheA= Date: Sat, 29 Sep 2018 06:43:22 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532A7E71@SHSMSX103.ccr.corp.intel.com> References: <20180903084005.29706-1-qi.z.zhang@intel.com> <14389377.uLlNGEYteW@xps> In-Reply-To: <14389377.uLlNGEYteW@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWZhZDRmZmYtZTZiMC00OTJkLWFjMTMtM2IzMWI2NWU1NDVhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieE1FdnZEVE5oNGJwUnpZeFExZk5ZXC9NRFVkTU1cL0NOM1k5Tlwvd2N1YnFTMisxZWZ5Um1KZ3BWSVVzWUZYYVM0MCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix unexpected resource mapping override X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 06:43:42 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, September 26, 2018 9:51 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Yigit, > Ferruh ; geoffrey.lv@gmail.com; > ajit.khaparde@broadcom.com; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix unexpected resource mapping > override >=20 > Hi, >=20 > 03/09/2018 10:40, Qi Zhang: > > When scanning an already plugged device, the virtual address of mapped > > PCI resource in rte_pci_device will be overridden with 0, that may > > cause driver does not work correctly. >=20 > Why is it overridden with 0? > Can we try to fix the root cause? >>From my view this is place to fix the issue: "scan an already probed device= will corrupt the PCI resource map" Another option is "to prevent scan an already probed device", this can be i= mplemented by adding some check before bus->scan in rte_dev_hotplug_add but= I'm not prefer for this solution, because it's better to keep bus->scan's = independency. >=20 > > The fix is not to update any rte_pci_device's field if the being > > scanned device's driver is already probed. >=20 > I am going to send a patch to have a safer way of checking whether a devi= ce is > probed or not. > If this change is really needed, I suggest to rebase it on top my patch. OK, I will rebase on it by using rte_dev_is_probed. Regards Qi >=20