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 5F8641B1BD for ; Fri, 19 Jan 2018 14:08:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 05:08:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,381,1511856000"; d="scan'208";a="23029050" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga004.fm.intel.com with ESMTP; 19 Jan 2018 05:08:31 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.236]) by IRSMSX151.ger.corp.intel.com ([169.254.4.108]) with mapi id 14.03.0319.002; Fri, 19 Jan 2018 13:08:30 +0000 From: "Ananyev, Konstantin" To: Matan Azrad , Thomas Monjalon , Gaetan Rivet , "Wu, Jingjing" CC: "dev@dpdk.org" , Neil Horman , "Richardson, Bruce" Thread-Topic: [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership Thread-Index: AQHTkHpyuUKMeuPQw06Oud7boKI8uKN7InaggAAFDoCAAAQmUA== Date: Fri, 19 Jan 2018 13:08:30 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725886280AE8@irsmsx105.ger.corp.intel.com> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <1516293317-30748-1-git-send-email-matan@mellanox.com> <1516293317-30748-8-git-send-email-matan@mellanox.com> <2601191342CEEE43887BDE71AB97725886280A68@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjkzZGY0MDctMzI3ZC00YmE3LTkxZjQtZTU1OWJlNWRjZDg4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InlwSVNQcmxJQ2xKTnVLOStaZnpuTXB0NlhuM1Z0ZzYyc0YyNlF3dlJPenM9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" 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: Fri, 19 Jan 2018 13:08:34 -0000 > -----Original Message----- > From: Matan Azrad [mailto:matan@mellanox.com] > Sent: Friday, January 19, 2018 12:52 PM > To: Ananyev, Konstantin ; Thomas Monjalon <= thomas@monjalon.net>; Gaetan Rivet > ; Wu, Jingjing > Cc: dev@dpdk.org; Neil Horman ; Richardson, Bruce = > Subject: RE: [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership >=20 > Hi Konstantin >=20 > From: Ananyev, Konstantin, Friday, January 19, 2018 2:38 PM > > To: Matan Azrad ; Thomas Monjalon > > ; Gaetan Rivet ; Wu, > > Jingjing > > Cc: dev@dpdk.org; Neil Horman ; Richardson, > > Bruce > > Subject: RE: [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership > > > > Hi Matan, > > > > > -----Original Message----- > > > From: Matan Azrad [mailto:matan@mellanox.com] > > > Sent: Thursday, January 18, 2018 4:35 PM > > > To: Thomas Monjalon ; Gaetan Rivet > > > ; Wu, Jingjing > > > Cc: dev@dpdk.org; Neil Horman ; Richardson, > > > Bruce ; Ananyev, Konstantin > > > > > > Subject: [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership > > > > > > Testpmd should not use ethdev ports which are managed by other DPDK > > > entities. > > > > > > Set Testpmd ownership to each port which is not used by other entity > > > and prevent any usage of ethdev ports which are not owned by Testpmd. > > > > > > Signed-off-by: Matan Azrad > > > --- > > > app/test-pmd/cmdline.c | 89 +++++++++++++++++++----------------= ----- > > ----- > > > app/test-pmd/cmdline_flow.c | 2 +- > > > app/test-pmd/config.c | 37 ++++++++++--------- > > > app/test-pmd/parameters.c | 4 +- > > > app/test-pmd/testpmd.c | 63 ++++++++++++++++++++------------ > > > app/test-pmd/testpmd.h | 3 ++ > > > 6 files changed, 103 insertions(+), 95 deletions(-) > > > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > > > 31919ba..6199c64 100644 > > > --- a/app/test-pmd/cmdline.c > > > +++ b/app/test-pmd/cmdline.c > > > @@ -1394,7 +1394,7 @@ struct cmd_config_speed_all { > > > &link_speed) < 0) > > > return; > > > > > > - RTE_ETH_FOREACH_DEV(pid) { > > > + RTE_ETH_FOREACH_DEV_OWNED_BY(pid, my_owner.id) { > > > > Why do we need all these changes? > > As I understand you changed definition of RTE_ETH_FOREACH_DEV(), so no > > testpmd should work ok default (no_owner case). > > Am I missing something here? >=20 > Now, After Gaetan suggestion RTE_ETH_FOREACH_DEV(pid) will iterate over a= ll valid and ownerless ports. Yes. > Here Testpmd wants to iterate over its owned ports. Why? Why it can't just iterate over all valid and ownerless ports? As I understand it would be enough to fix current problems and would allow us to avoid any changes in testmpd (which I think is a good thing). Konstantin >=20 > I added to Testpmd ability to take an ownership of ports as the new owner= ship and synchronization rules suggested, > Since Tespmd is a DPDK entity which wants that no one will touch its owne= d ports, > It must allocate an unique ID, set owner for its ports (see in main funct= ion) and recognizes them by its owner ID. >=20 > > Konstantin > >