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 C77D328FD for ; Thu, 8 Nov 2018 18:12:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 09:12:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,480,1534834800"; d="scan'208";a="89622207" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 08 Nov 2018 09:12:52 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 8 Nov 2018 09:12:51 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 8 Nov 2018 09:12:51 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.102]) with mapi id 14.03.0415.000; Fri, 9 Nov 2018 01:12:49 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon , "Stojaczyk, Dariusz" CC: "dev@dpdk.org" , "gaetan.rivet@6wind.com" , "Guo, Jia" Thread-Topic: [PATCH] devargs: do not replace already inserted devargs Thread-Index: AQHUdvCaq2rUDg2HHU6jiAXQSjN/7KVFN3WAgAARC4CAANVtwA== Date: Thu, 8 Nov 2018 17:12:49 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532E16FB@SHSMSX103.ccr.corp.intel.com> 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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2I5OWQ2MTAtY2Q3OC00NmU3LWE3ODYtN2Q4OTU0NDczMzdmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidTZ1RGhMNG82bFwvaDZsNUNZSkY1RkUyZ2FHemNrdkdvR3BWVlU2eXZZXC9OSzJrMEZQUGRlbVYrOVF0VHFlSUZVIn0= 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-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 17:12:54 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, November 8, 2018 5:26 AM > 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? Tested-by: Qi Zhang The patch also fix below scenario attach net_af_packet,iface=3Denp50s0f0 attach net_af_packet,iface=3Denp50s0f0 (failed as expected)=20 detach net_af_packet (failed) Thanks! Qi >=20