From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A6C762D13 for ; Thu, 25 Jan 2018 12:55:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2018 03:55:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,412,1511856000"; d="scan'208";a="198560062" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga005.fm.intel.com with ESMTP; 25 Jan 2018 03:55:54 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.236]) by IRSMSX108.ger.corp.intel.com ([169.254.11.167]) with mapi id 14.03.0319.002; Thu, 25 Jan 2018 11:55:54 +0000 From: "Ananyev, Konstantin" To: Thomas Monjalon CC: Matan Azrad , =?iso-8859-1?Q?Ga=EBtan_Rivet?= , "Wu, Jingjing" , "dev@dpdk.org" , Neil Horman , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership Thread-Index: AQHTlcQj+ZywAbUDwkKUgUrHghrd8aOEbsNAgAAGQYCAAAOxgA== Date: Thu, 25 Jan 2018 11:55:53 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725886283676@irsmsx105.ger.corp.intel.com> References: <1516293317-30748-8-git-send-email-matan@mellanox.com> <8784959.KALqi1c4OM@xps> <2601191342CEEE43887BDE71AB97725886283602@irsmsx105.ger.corp.intel.com> <6943290.WpmPGMvTZ0@xps> In-Reply-To: <6943290.WpmPGMvTZ0@xps> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ZmZDRlMWQtOGZkNS00ZjA5LTkwN2EtNDY4MWIxOGY5MjRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjVyVHdQQjA4aEdvVm1aTDl2ZXVyZHV5T0ltcTJYeVlCQ24yWFlEckx2YTA9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership 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, 25 Jan 2018 11:55:58 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Thursday, January 25, 2018 11:33 AM > To: Ananyev, Konstantin > Cc: Matan Azrad ; Ga=EBtan Rivet ; Wu, Jingjing ; > dev@dpdk.org; Neil Horman ; Richardson, Bruce > Subject: Re: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ow= nership >=20 > 25/01/2018 12:15, Ananyev, Konstantin: > > Hi everyone, > > > > > > > > 25/01/2018 10:36, Matan Azrad: > > > > Gaetan, Konstantin, Thomas > > > > > > > > Any response to my suggestion below? > > > > > > > > From: Matan Azrad > > > > > Suggestion: > > > > > > > > > > 2 system owners. > > > > > APP_OWNER - 1. > > > > > NO_OWNER - 0. > > > > > > > > > > And allowing for more owners as now. > > > > > > > > > > 1. Every port creation will set the owner for NO_OWNER (as now). > > > > > 2. There is option for all dpdk entities to take owner of NO_OWN= ER ports all > > > > > the time(as now). > > > > > 3. In some point in the end of EAL init: set all the NO_OWNER to > > > > > APP_OWNER(for V6). > > > > What will happen if we have 2 (or more process) sharing the same device= ? > > How we will distinguish what APP_OWNER we are talking about? > > Shouldn't default_owner be unique per process? >=20 > Yes, good point! > Each application process should be considered a different owner > by default. >=20 > > > > > 4. Change the old iterator to iterate over APP_OWNER ports(for V6= ). > > > > If I get it right it means no changes in tetpmd, correct? >=20 > It is my understanding yes. Sounds reasonable to me then. >=20 > > > > > What do you think? > > > > > > Reminder for everybody: there is no issue if no hotplug. > > > There is a race condition with hotplug. > > > Hotplug is not managed by EAL yet, but there is a temporary hotplug > > > management in failsafe. > > > So until now, the issue is seen only with hotplug in failsafe. > > > > > > Your suggestion makes no change for applications, > > > and fix the ownership issue for failsafe. > > > And later, if an application wants to support generic hotplug properl= y > > > (when it will be generally available in DPDK), > > > the application should use the ownership API. > > > Right? > > > > > > I think it is a good compromise. > > > > I still think it would be good if future hotplug support will be transp= arent > > to existing apps (no/minimal changes). > > But I suppose we can discuss it later, when will have hotplug patches. >=20 > It cannot be really transparent. > If an application is based on port detection at init, it has to be change= d > to decide how to handle new ports. > That's why I introduced the new events for ethdev notification callback. Ok, but I think, most processes would just assign default_owner for newly p= lugged device.=20 For that case I don't see why it can't be transparent. Anyway, that's probably a topic for new mail thread. Konstantin