From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 14A6C239 for ; Thu, 8 Nov 2018 13:35:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 04:35:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="106943593" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 08 Nov 2018 04:35:03 -0800 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.408.0; Thu, 8 Nov 2018 04:35:04 -0800 Received: from hasmsx107.ger.corp.intel.com (10.184.198.27) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 8 Nov 2018 04:35:03 -0800 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.193]) by hasmsx107.ger.corp.intel.com ([169.254.2.159]) with mapi id 14.03.0415.000; Thu, 8 Nov 2018 14:35:01 +0200 From: "Stojaczyk, Dariusz" To: Thomas Monjalon CC: "dev@dpdk.org" , "gaetan.rivet@6wind.com" , "Zhang, Qi Z" , "Guo, Jia" Thread-Topic: [PATCH] devargs: do not replace already inserted devargs Thread-Index: AQHUdvCbSithoLnKnECKIBOzRfCUu6VFvPAw///wJYCAACH9AA== Date: Thu, 8 Nov 2018 12:35:01 +0000 Message-ID: References: <20181107232105.19187-1-thomas@monjalon.net> <7262839.kmssWOtaOX@xps> In-Reply-To: <7262839.kmssWOtaOX@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYThkODRkMjMtODk2ZS00YjM1LThhOWYtZjBhOWFhYjJmZDE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMjNVZUVHQldmcVZBeVV1dmpWWWZSVmppS293MEw1SmVlcVBKSTFUQ2g1eWpKd3dDUFJROHpEUER2eDJuN3oyZyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.102.11.35] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] devargs: do not replace already inserted devargs 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: Thu, 08 Nov 2018 12:35:06 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, November 8, 2018 1:26 PM > To: Stojaczyk, Dariusz > Cc: dev@dpdk.org; gaetan.rivet@6wind.com; Zhang, Qi Z > ; Guo, Jia > Subject: Re: [PATCH] devargs: do not replace already inserted devargs >=20 > 08/11/2018 12:25, Stojaczyk, Dariusz: > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > The devargs of a device can be replaced by a newly allocated one > > > when trying to probe again the same device (multi-process or > > > multi-ports scenarios). This is breaking some pointer references. > > > > > > It can be avoided by copying the new content, freeing the new devargs= , > > > and returning the already inserted pointer. > > > > > > Signed-off-by: Thomas Monjalon > > > > Tested-by: Darek Stojaczyk >=20 > Is it fixing any use case? >=20 Of course it is. I was previously seeing a regression with the following sc= enario: 1. hotplug device in the primary process 2. start a secodary process 3. hotplug device in secondary -> primary segfaults And now it's working. D.